Skip to content

[G-API] Support GFrame for infer#19002

Merged
alalek merged 8 commits intoopencv:masterfrom
TolyaTalamanov:at/infer_gframe
Dec 9, 2020
Merged

[G-API] Support GFrame for infer#19002
alalek merged 8 commits intoopencv:masterfrom
TolyaTalamanov:at/infer_gframe

Conversation

@TolyaTalamanov
Copy link
Copy Markdown
Contributor

@TolyaTalamanov TolyaTalamanov commented Dec 3, 2020

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake
force_builders=Custom,Custom Win,Custom Mac
build_gapi_standalone:Linux x64=ade-0.1.1f
build_gapi_standalone:Win64=ade-0.1.1f
build_gapi_standalone:Mac=ade-0.1.1f
build_gapi_standalone:Linux x64 Debug=ade-0.1.1f

Xbuild_image:Custom=centos:7
Xbuildworker:Custom=linux-1
build_gapi_standalone:Custom=ade-0.1.1f

build_image:Custom=ubuntu-openvino-2021.1.0:20.04
build_image:Custom Win=openvino-2021.1.0
build_image:Custom Mac=openvino-2021.1.0

test_modules:Custom=gapi
test_modules:Custom Win=gapi
test_modules:Custom Mac=gapi

buildworker:Custom=linux-1
# disabled due high memory usage: test_opencl:Custom=ON
test_opencl:Custom=OFF
test_bigdata:Custom=1
test_filter:Custom=*

Copy link
Copy Markdown
Contributor

@dmatveev dmatveev left a comment

Choose a reason for hiding this comment

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

👍 approved, thanks!

std::back_inserter(context.in_shapes),
[](const cv::GArg& arg) {
return arg.get<cv::gimpl::RcDesc>().shape;
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So do you use it really?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

use it to distinguish cv::GMat & cv::GFrame

@TolyaTalamanov
Copy link
Copy Markdown
Contributor Author

@alalek
Copy link
Copy Markdown
Member

alalek commented Dec 3, 2020

Mentioned sample is available since OV 2019 R2.

You are testing using OV LTS release:

openvino-2020.3.0

Need to add proper version check through #if if this is necessary to include some headers.

BTW, You can use different OV versions on Linux/Windows/Mac configurations to perform robust checking (recommended).

@TolyaTalamanov
Copy link
Copy Markdown
Contributor Author

@alalek Custom jobs failed due known problems (cpu options isn't supported in this OV version)

I think it can be merged

@alalek
Copy link
Copy Markdown
Member

alalek commented Dec 4, 2020

Custom jobs failed due known problems (cpu options isn't supported in this OV version)
I think it can be merged

Really? I see this:

Results:
Failed compile release

and missing build images (OV LTS 2020.3.1 is not supported for now). Consider using 2021.1 instead.


Compilation must be fixed before merge.

@TolyaTalamanov
Copy link
Copy Markdown
Contributor Author

Custom jobs failed due known problems (cpu options isn't supported in this OV version)
I think it can be merged

Really? I see this:

Results:
Failed compile release

and missing build images (OV LTS 2020.3.1 is not supported for now). Consider using 2021.1 instead.

Compilation must be fixed before merge.

2021.1 isn't supported on CI, is it ?

@alalek
Copy link
Copy Markdown
Member

alalek commented Dec 4, 2020

2021.1 isn't supported on CI, is it ?

Supported (on Linux in Ubuntu 20.04 container): https://github.com/opencv/opencv/wiki/CI-configuration

util::throw_error(std::runtime_error("Unsupported input meta for IE backend"));
}

if (util::holds_alternative<cv::GMatDesc>(mm_0)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Isn't this checked in switch? For what case is it, if not.

@smirnov-alexey
Copy link
Copy Markdown
Contributor

smirnov-alexey commented Dec 8, 2020

Was able to successfully built with both 2020.03 and 2021.01 on my Ubuntu 18.04

@smirnov-alexey
Copy link
Copy Markdown
Contributor

@alalek
Copy link
Copy Markdown
Member

alalek commented Dec 8, 2020

openvino-2021.1

Use this Wiki page for proper names of available build images: https://github.com/opencv/opencv/wiki/CI-configuration

Should be *openvino-2021.1.0*

@smirnov-alexey
Copy link
Copy Markdown
Contributor

openvino-2021.1

Use this Wiki page for proper names of available build images: https://github.com/opencv/opencv/wiki/CI-configuration

Should be *openvino-2021.1.0*

Missed that, thanks!

@smirnov-alexey
Copy link
Copy Markdown
Contributor

@alalek can we merge this if the build will be green? There was a warning on Mac which hopefully will be fixed and other warnings are:

CMake Warning at /opt/intel/openvino_2021.1.110/deployment_tools/inference_engine/share/ie_parallel.cmake:6 (find_package):
  By not providing "FindTBB.cmake" in CMAKE_MODULE_PATH this project has

and

CMake Warning:
  Manually-specified variables were not used by the project:

    ENABLE_CXX11
    INF_ENGINE_RELEASE
    WITH_INF_ENGINE

@alalek
Copy link
Copy Markdown
Member

alalek commented Dec 9, 2020

Yes, even with warnings on "optional" configuration (in scope of OpenCV, not G-API) if these warnings are not related to this PR (the same issues are with other G-API PRs on the same configurations).

@dmatveev
Copy link
Copy Markdown
Contributor

dmatveev commented Dec 9, 2020

Let's merge this - we need this feature for the next internal update

@smirnov-alexey
Copy link
Copy Markdown
Contributor

@alalek the build is green except for 2 warnings I've mentioned above (which have nothing to do with this PR). Can we merge this?

@alalek alalek merged commit a55150b into opencv:master Dec 9, 2020
@smirnov-alexey
Copy link
Copy Markdown
Contributor

@alalek Thanks!

@dmatveev
Copy link
Copy Markdown
Contributor

dmatveev commented Dec 9, 2020

Fantastic!

@alalek alalek mentioned this pull request Apr 9, 2021
a-sajjad72 pushed a commit to a-sajjad72/opencv that referenced this pull request Mar 30, 2023
[G-API] Support GFrame for infer

* GInfer(GFrame), currently broken

* Fixed (API only)

* Support GFrame in GIEBackend

* Fix comments to review

* Fix comments to review

* Fix doxygen

* Fix building with different IE versions

* Fix warning on MacOS

Co-authored-by: Dmitry Matveev <dmitry.matveev@intel.com>
Co-authored-by: Smirnov Alexey <alexey.smirnov@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants