Skip to content
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 G-API demos to API2.0 #3887

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DariaMityagina
Copy link
Contributor

@DariaMityagina DariaMityagina commented Dec 21, 2023

Ticket:

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.

Affected demos:

Passing:

  • classification_benchmark_demo
  • face_detection_mtcnn_demo
  • interactive_face_detection_demo
  • gaze_estimation_demo
    OK: Works with a single image and with a video input.
    BUT: 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).
    The issue seems to come from govbackend, I will open a PR shortly.

Failing still:

  • gesture_recognition_demo
    person-detection-asl-0001/FP16/person-detection-asl-0001.xml is indeed dynamic. Will disable this one until we support dynamism. G-API demo also fails on CPU after transition to API2.0 for some reason (Segmentation fault (core dumped)). Benchmark_app, on the other hand, works fine with this model. Python demo works on CPU as well.
    AR Daria: create ticket for G-API demo and investigate.
<layer id="1826" name="1632" type="NonMaxSuppression" version="opset9">
			<data box_encoding="corner" sort_result_descending="false" output_type="i64" />
			<input>
				<port id="0" precision="FP32">
					<dim>1</dim>
					<dim>1534</dim>
					<dim>4</dim>
				</port>
				<port id="1" precision="FP32">
					<dim>1</dim>
					<dim>1</dim>
					<dim>1534</dim>
				</port>
				<port id="2" precision="I64" />
				<port id="3" precision="FP32" />
				<port id="4" precision="FP32" />
			</input>
			<output>
				<port id="5" precision="I64" names="1632">
					<dim>-1</dim>
					<dim>3</dim>
				</port>
				<port id="6" precision="FP32">
					<dim>-1</dim>
					<dim>3</dim>
				</port>
				<port id="7" precision="I64">
					<dim>1</dim>
				</port>
			</output>
		</layer>
  • background_subtraction_demo
    [ ERROR ] OpenCV(4.8.0-dev) ..\modules\gapi\src\backends\ov\govbackend.cpp:799: error: (-215:Assertion failed) cv::util::holds_alternativecv::GMatDesc(input_meta) in function 'cv::gimpl::ov::PrePostProcWrapper::cfgPreProcessing' - WIP

Related PRs:

Part 1: #3889 - Merged
Part 2: #3891 - In review

@DariaMityagina

This comment was marked as outdated.

@DariaMityagina
Copy link
Contributor Author

DariaMityagina commented Dec 27, 2023

It may be worth merging changes in parts. We can start with those that do not break anything, namely 3 demos: classification_benchmark_demo, face_detection_mtcnn_demo, interactive_face_detection_demo

Part 1: #3889 - classification_benchmark_demo, face_detection_mtcnn_demo, interactive_face_detection_demo - merged
Part 2: #3891 - gaze_estimation_demo - merged
Part 2: #3903 - background_subtraction_demo - WIP
Part 4: this PR 3887 - gesture_recognition_demo - WIP

Comment on lines -156 to +157
.pluginConfig(config.getLegacyConfig());
.cfgPluginConfig(config.getLegacyConfig());
Copy link
Contributor

Choose a reason for hiding this comment

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

@TolyaTalamanov should probably align these APIs between ie::Params<> and ov::Params<>

@DariaMityagina
Copy link
Contributor Author

This change seems to fix gaze_estimation_demo demo, but it kind of looks like a workaround. Will check if there are other ways to solve this.

@DariaMityagina DariaMityagina force-pushed the icv/dm/gapi-demos-dyn-shape-error branch 24 times, most recently from 57fc6a0 to f9636ab Compare January 4, 2024 12:32
@DariaMityagina DariaMityagina force-pushed the icv/dm/gapi-demos-dyn-shape-error branch 15 times, most recently from cd6ba9a to 0044eda Compare January 5, 2024 18:38
@DariaMityagina DariaMityagina force-pushed the icv/dm/gapi-demos-dyn-shape-error branch 2 times, most recently from f285227 to 6677969 Compare January 29, 2024 17:53
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.

None yet

2 participants