File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ def single_option_cases(key, *args):
255255 test_cases = combine_cases (
256256 TestCase (options = {'-no_show' : None ,
257257 ** MONITORS ,
258- '-i' : TestDataArg ('coco128/images/train2017/ ' )}),
258+ '-i' : TestDataArg ('video.mp4 ' )}),
259259 TestCase (options = {
260260 '-m' : ModelArg ('gaze-estimation-adas-0002' ),
261261 '-m_hp' : ModelArg ('head-pose-estimation-adas-0001' ),
@@ -445,7 +445,7 @@ def single_option_cases(key, *args):
445445 test_cases = combine_cases (
446446 TestCase (options = {'-no_show' : None ,
447447 ** MONITORS ,
448- '-i' : DataPatternArg ('gaze-estimation-adas ' )}),
448+ '-i' : DataPatternArg ('video.mp4 ' )}),
449449 TestCase (options = {
450450 '-m' : ModelArg ('gaze-estimation-adas-0002' ),
451451 '-m_hp' : ModelArg ('head-pose-estimation-adas-0001' ),
Original file line number Diff line number Diff line change 4444
4545from pathlib import Path
4646from io import BytesIO
47- from urllib .request import urlopen
47+ import urllib .request
4848from zipfile import ZipFile
4949
5050from args import ArgContext , Arg , ModelArg
5151from cases import Demo
5252from data_sequences import DATA_SEQUENCES
5353
54+ import shutil
55+
5456scopes = {
5557 'base' : importlib .import_module ('cases' ).DEMOS ,
5658 'performance' : importlib .import_module ('performance_cases' ).DEMOS ,
5759}
5860COCO128_URL = "https://ultralytics.com/assets/coco128.zip"
61+ VIDEO_URL = "https://github.com/intel-iot-devkit/sample-videos/raw/master/face-demographics-walking.mp4"
5962
6063
6164def parser_paths_list (supported_devices ):
@@ -243,10 +246,13 @@ def main():
243246 print (* [demo .subdirectory for demo in demos_to_test ], sep = ',' )
244247 os .environ ["REQUESTS_CA_BUNDLE" ] = certifi .where ()
245248 os .environ ["SSL_CERT_FILE" ] = certifi .where ()
246- with urlopen (COCO128_URL ) as zipresp : # nosec B310 # disable urllib_urlopen because url is hardcoded
249+ with urllib . request . urlopen (COCO128_URL ) as zipresp : # nosec B310 # disable urllib_urlopen because url is hardcoded
247250 with ZipFile (BytesIO (zipresp .read ())) as zfile :
248251 zfile .extractall (args .test_data_dir )
249252
253+ fullfilename = os .path .join (args .test_data_dir , "video.mp4" )
254+ urllib .request .urlopen (VIDEO_URL , fullfilename )
255+
250256 with temp_dir_as_path () as global_temp_dir :
251257 if args .models_dir :
252258 dl_dir = args .models_dir
You can’t perform that action at this time.
0 commit comments