-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[E-103104] - Port gaze_estimation_demo gapi demo to OV API2.0 #3891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[E-103104] - Port gaze_estimation_demo gapi demo to OV API2.0 #3891
Conversation
demos/tests/cases.py
Outdated
TestCase(options={'-no_show': None, | ||
**MONITORS, | ||
'-i': TestDataArg('coco128/images/train2017/')}), | ||
'-i': DataPatternArg('coco128-every-480x640x3')}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This case is closer to the video input (since the frame size does not change)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason there are issues with reading video input in github actions: https://github.com/openvinotoolkit/open_model_zoo/actions/runs/7408585487/job/20157102210?pr=3887

Working on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may check OpenCV cmake flags. I heavily reduced build time by disabling modules
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, will check them. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks!
7653574
to
7f34a19
Compare
} | ||
COCO128_URL = "https://ultralytics.com/assets/coco128.zip" | ||
|
||
VIDEO_URL = "https://storage.openvinotoolkit.org/data/test_data/videos/head-pose-face-detection-male.mp4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the same video used in the gaze_estimation_demo
readme file (here)

.github/workflows/cpp_gapi-demos.yml
Outdated
sudo apt install pkg-config | ||
sudo apt install ffmpeg libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libavresample-dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Required for -DWITH_FFMPEG=y
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not affect OpenCV build time.
single_option_cases( | ||
'-i', | ||
str('/tmp/video.mp4'), | ||
DataPatternArg('coco128-every-480x640x3')), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both options:
- video input
- folder with images as input
@Wovchena hi! Could you please review this PR? |
d4b02f2
to
75d371d
Compare
75d371d
to
80d52b0
Compare
Thanks a lot @Wovchena @DariaMityagina ! |
Tiket:
103104
Description:
G-API Background Subtraction Demo, Classification Benchmark C++ G-API Demo, G-API Gaze Estimation Demo and other - fail on NPU with the following error:
dynamic shape issues
OpenVINO is actively removing API 1.0 from their code
Both G-API framework and G-API demos use API 1.0 --> which leads to disruption of certain functionality
Conclusion: We need to port the G-API demos to API2.0 to make them work.
gaze_estimation_demo
OK: Fixed on NPU. Works with a single image and with a video input.
FAIL: But still has issues in case folder with images is provided (in CI) - WIP
Failed to copy data from cv::Mat to ov::Tensor. Data type or number of elements mismatch. ov::Tensor: u8 [1,490,1183,3] and cv::Mat: 8UC3 1180x490
It seems to fail if the input folder contains images of different sizes. It works fine with the first image from the folder and does not work with the second (if it is a different size).