Skip to content

Commit

Permalink
Fix issues with the link
Browse files Browse the repository at this point in the history
  • Loading branch information
DariaMityagina committed Jan 4, 2024
1 parent b50d1e7 commit f9636ab
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cpp_gapi-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
rm -rf cache/opencv/.git/ # Minimize cache
mkdir cache/opencv/build
cd cache/opencv/build
cmake -DCMAKE_BUILD_TYPE=Release -DWITH_INF_ENGINE=y -DOpenVINO_DIR=$GITHUB_WORKSPACE/ov/runtime/cmake/ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_LINKER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_C_LINKER_LAUNCHER=ccache -DBUILD_TESTS=n -DBUILD_PERF_TESTS=n -DBUILD_EXAMPLES=n -DBUILD_opencv_apps=n -DWITH_OPENCL=n -DWITH_OPENCLAMDBLAS=n -DWITH_OPENCLAMDFFT=n -DWITH_VA=n -DWITH_VA_INTEL=n -DWITH_V4L=n -DWITH_GSTREAMER=n -DWITH_PROTOBUF=n -DBUILD_PROTOBUF=n -DBUILD_JAVA=n -DBUILD_opencv_java_bindings_generator=n -DBUILD_opencv_python2=n -DBUILD_opencv_python3=n -DWITH_IMGCODEC_HDR=n -DWITH_IMGCODEC_SUNRASTER=n -DWITH_IMGCODEC_PXM=n -DWITH_IMGCODEC_PFM=n -DWITH_PNG=n -DWITH_TIFF=n -DWITH_WEBP=n -DWITH_OPENJPEG=n -DWITH_JASPER=n -DWITH_OPENEXR=n -DBUILD_opencv_dnn=n -DBUILD_opencv_features2d=n -DBUILD_opencv_flann=n -DWITH_TBB=n -DBUILD_INFO_SKIP_EXTRA_MODULES=n -DBUILD_JASPER=n -DBUILD_PNG=n -DBUILD_OPENEXR=n -DBUILD_WEBP=n -DBUILD_ZLIB=n -DWITH_CUDA=n -DWITH_EIGEN=n -DWITH_GPHOTO2=n -DOPENCV_GAPI_GSTREAMER=n -DWITH_LAPACK=n -DWITH_MATLAB=n -DWITH_MFX=n -DWITH_QUIRC=n -DWITH_VTK=n -DINSTALL_PDB=n -DINSTALL_TESTS=n -DINSTALL_C_EXAMPLES=n -DINSTALL_PYTHON_EXAMPLES=n -DOPENCV_GENERATE_SETUPVARS=n -DWITH_1394=n -DWITH_FFMPEG=n -DWITH_GTK_2_X=y -DBUILD_JPEG=y -DWITH_IPP=y -DENABLE_CONFIG_VERIFICATION=y -DBUILD_LIST=core,gapi,highgui,imgcodecs,imgproc,videoio ..
cmake -DCMAKE_BUILD_TYPE=Release -DWITH_INF_ENGINE=y -DOpenVINO_DIR=$GITHUB_WORKSPACE/ov/runtime/cmake/ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_LINKER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_C_LINKER_LAUNCHER=ccache -DBUILD_TESTS=n -DBUILD_PERF_TESTS=n -DBUILD_EXAMPLES=n -DBUILD_opencv_apps=n -DWITH_OPENCL=n -DWITH_OPENCLAMDBLAS=n -DWITH_GSTREAMER=ON -DWITH_GSTREAMER_0_10=OFF -DWITH_OPENCLAMDFFT=n -DWITH_VA=n -DWITH_VA_INTEL=n -DWITH_V4L=n -DWITH_PROTOBUF=n -DBUILD_PROTOBUF=n -DBUILD_JAVA=n -DBUILD_opencv_java_bindings_generator=n -DBUILD_opencv_python2=n -DBUILD_opencv_python3=n -DWITH_IMGCODEC_HDR=n -DWITH_IMGCODEC_SUNRASTER=n -DWITH_IMGCODEC_PXM=n -DWITH_IMGCODEC_PFM=n -DWITH_PNG=n -DWITH_TIFF=n -DWITH_WEBP=n -DWITH_OPENJPEG=n -DWITH_JASPER=n -DWITH_OPENEXR=n -DBUILD_opencv_dnn=n -DBUILD_opencv_features2d=n -DBUILD_opencv_flann=n -DWITH_TBB=n -DBUILD_INFO_SKIP_EXTRA_MODULES=n -DBUILD_JASPER=n -DBUILD_PNG=n -DBUILD_OPENEXR=n -DBUILD_WEBP=n -DBUILD_ZLIB=n -DWITH_CUDA=n -DWITH_EIGEN=n -DWITH_GPHOTO2=n -DOPENCV_GAPI_GSTREAMER=n -DWITH_LAPACK=n -DWITH_MATLAB=n -DWITH_MFX=n -DWITH_QUIRC=n -DWITH_VTK=n -DINSTALL_PDB=n -DINSTALL_TESTS=n -DINSTALL_C_EXAMPLES=n -DINSTALL_PYTHON_EXAMPLES=n -DOPENCV_GENERATE_SETUPVARS=n -DWITH_1394=n -DWITH_FFMPEG=n -DWITH_GTK_2_X=y -DBUILD_JPEG=y -DWITH_IPP=y -DENABLE_CONFIG_VERIFICATION=y -DBUILD_LIST=core,gapi,highgui,imgcodecs,imgproc,videoio ..
cmake --build . -j $((`nproc`*2+2))
- name: build_demos.sh
run: |
Expand Down
9 changes: 6 additions & 3 deletions demos/tests/cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,7 @@ def single_option_cases(key, *args):
device_keys=['-d', '-d_fd', '-d_hp', '-d_lm', '-d_es'],
test_cases=combine_cases(
TestCase(options={'-no_show': None,
**MONITORS,
'-i': TestDataArg('video.mp4')}),
**MONITORS}),
TestCase(options={
'-m': ModelArg('gaze-estimation-adas-0002'),
'-m_hp': ModelArg('head-pose-estimation-adas-0001'),
Expand All @@ -266,6 +265,10 @@ def single_option_cases(key, *args):
'-m_fd',
ModelArg('face-detection-adas-0001'),
ModelArg('face-detection-retail-0004')),
single_option_cases(
'-i',
str('/tmp/video.mp4'),
DataPatternArg('coco128-every-480x640x3')),
)),

# CppDemo(name='gesture_recognition_demo', implementation='cpp_gapi',
Expand Down Expand Up @@ -445,7 +448,7 @@ def single_option_cases(key, *args):
test_cases=combine_cases(
TestCase(options={'-no_show': None,
**MONITORS,
'-i': DataPatternArg('video.mp4')}),
'-i': DataPatternArg('gaze-estimation-adas')}),
TestCase(options={
'-m': ModelArg('gaze-estimation-adas-0002'),
'-m_hp': ModelArg('head-pose-estimation-adas-0001'),
Expand Down
18 changes: 13 additions & 5 deletions demos/tests/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,22 @@

from pathlib import Path
from io import BytesIO
import urllib.request
from urllib.request import urlopen
from zipfile import ZipFile

from args import ArgContext, Arg, ModelArg
from cases import Demo
from data_sequences import DATA_SEQUENCES

import shutil
import requests

scopes = {
'base': importlib.import_module('cases').DEMOS,
'performance': importlib.import_module('performance_cases').DEMOS,
}
COCO128_URL = "https://ultralytics.com/assets/coco128.zip"
VIDEO_URL = "https://github.com/intel-iot-devkit/sample-videos/raw/master/face-demographics-walking.mp4"
VIDEO_URL = "https://storage.openvinotoolkit.org/data/test_data/videos/head-pose-face-detection-male.mp4"


def parser_paths_list(supported_devices):
Expand Down Expand Up @@ -246,12 +247,19 @@ def main():
print(*[demo.subdirectory for demo in demos_to_test], sep =',')
os.environ["REQUESTS_CA_BUNDLE"] = certifi.where()
os.environ["SSL_CERT_FILE"] = certifi.where()
with urllib.request.urlopen(COCO128_URL) as zipresp: # nosec B310 # disable urllib_urlopen because url is hardcoded
with urlopen(COCO128_URL) as zipresp: # nosec B310 # disable urllib_urlopen because url is hardcoded
with ZipFile(BytesIO(zipresp.read())) as zfile:
zfile.extractall(args.test_data_dir)

fullfilename = os.path.join(args.test_data_dir, "video.mp4")
urllib.request.urlopen(VIDEO_URL, fullfilename)
try:
r = requests.get(VIDEO_URL)
with open("video.mp4", 'wb') as f:
f.write(r.content)
print('Video for demos downloaded successfully')
shutil.copy("video.mp4", "/tmp/")
except requests.exceptions.HTTPError as err:
print(err)


with temp_dir_as_path() as global_temp_dir:
if args.models_dir:
Expand Down

0 comments on commit f9636ab

Please sign in to comment.