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):
255
255
test_cases = combine_cases (
256
256
TestCase (options = {'-no_show' : None ,
257
257
** MONITORS ,
258
- '-i' : TestDataArg ('coco128/images/train2017/ ' )}),
258
+ '-i' : TestDataArg ('video.mp4 ' )}),
259
259
TestCase (options = {
260
260
'-m' : ModelArg ('gaze-estimation-adas-0002' ),
261
261
'-m_hp' : ModelArg ('head-pose-estimation-adas-0001' ),
@@ -445,7 +445,7 @@ def single_option_cases(key, *args):
445
445
test_cases = combine_cases (
446
446
TestCase (options = {'-no_show' : None ,
447
447
** MONITORS ,
448
- '-i' : DataPatternArg ('gaze-estimation-adas ' )}),
448
+ '-i' : DataPatternArg ('video.mp4 ' )}),
449
449
TestCase (options = {
450
450
'-m' : ModelArg ('gaze-estimation-adas-0002' ),
451
451
'-m_hp' : ModelArg ('head-pose-estimation-adas-0001' ),
Original file line number Diff line number Diff line change 44
44
45
45
from pathlib import Path
46
46
from io import BytesIO
47
- from urllib .request import urlopen
47
+ import urllib .request
48
48
from zipfile import ZipFile
49
49
50
50
from args import ArgContext , Arg , ModelArg
51
51
from cases import Demo
52
52
from data_sequences import DATA_SEQUENCES
53
53
54
+ import shutil
55
+
54
56
scopes = {
55
57
'base' : importlib .import_module ('cases' ).DEMOS ,
56
58
'performance' : importlib .import_module ('performance_cases' ).DEMOS ,
57
59
}
58
60
COCO128_URL = "https://ultralytics.com/assets/coco128.zip"
61
+ VIDEO_URL = "https://github.com/intel-iot-devkit/sample-videos/raw/master/face-demographics-walking.mp4"
59
62
60
63
61
64
def parser_paths_list (supported_devices ):
@@ -243,10 +246,13 @@ def main():
243
246
print (* [demo .subdirectory for demo in demos_to_test ], sep = ',' )
244
247
os .environ ["REQUESTS_CA_BUNDLE" ] = certifi .where ()
245
248
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
247
250
with ZipFile (BytesIO (zipresp .read ())) as zfile :
248
251
zfile .extractall (args .test_data_dir )
249
252
253
+ fullfilename = os .path .join (args .test_data_dir , "video.mp4" )
254
+ urllib .request .urlopen (VIDEO_URL , fullfilename )
255
+
250
256
with temp_dir_as_path () as global_temp_dir :
251
257
if args .models_dir :
252
258
dl_dir = args .models_dir
You can’t perform that action at this time.
0 commit comments