Skip to content

Conversation

DariaMityagina
Copy link
Contributor

@DariaMityagina DariaMityagina commented Jan 3, 2024

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

get_shape was called on a descriptor::Tensor with dynamic shape
  • 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).

TestCase(options={'-no_show': None,
**MONITORS,
'-i': TestDataArg('coco128/images/train2017/')}),
'-i': DataPatternArg('coco128-every-480x640x3')}),
Copy link
Contributor Author

@DariaMityagina DariaMityagina Jan 4, 2024

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)

Copy link
Contributor Author

@DariaMityagina DariaMityagina Jan 4, 2024

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

image

Working on it.

Copy link
Collaborator

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

Copy link
Contributor Author

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!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks!

@DariaMityagina DariaMityagina force-pushed the icv/dm/gaze-est-demo-gapi branch from 7653574 to 7f34a19 Compare January 4, 2024 10:03
}
COCO128_URL = "https://ultralytics.com/assets/coco128.zip"

VIDEO_URL = "https://storage.openvinotoolkit.org/data/test_data/videos/head-pose-face-detection-male.mp4"
Copy link
Contributor Author

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)
image

image

Comment on lines 38 to 39
sudo apt install pkg-config
sudo apt install ffmpeg libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libavresample-dev
Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Comment on lines 268 to 271
single_option_cases(
'-i',
str('/tmp/video.mp4'),
DataPatternArg('coco128-every-480x640x3')),
Copy link
Contributor Author

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

@DariaMityagina DariaMityagina marked this pull request as ready for review January 5, 2024 10:14
@DariaMityagina
Copy link
Contributor Author

@Wovchena hi! Could you please review this PR?

@DariaMityagina
Copy link
Contributor Author

DariaMityagina commented Jan 5, 2024

gapi demos are passing
image

@DariaMityagina DariaMityagina force-pushed the icv/dm/gaze-est-demo-gapi branch from d4b02f2 to 75d371d Compare January 5, 2024 10:25
@DariaMityagina DariaMityagina force-pushed the icv/dm/gaze-est-demo-gapi branch from 75d371d to 80d52b0 Compare January 5, 2024 11:00
@Wovchena Wovchena merged commit 8c9bc0d into openvinotoolkit:master Jan 5, 2024
@dmatveev
Copy link
Contributor

dmatveev commented Jan 6, 2024

Thanks a lot @Wovchena @DariaMityagina !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants