Skip to content

[G-API] Python backend#19351

Merged
opencv-pushbot merged 1 commit intoopencv:masterfrom
TolyaTalamanov:at/python-backend
Mar 29, 2021
Merged

[G-API] Python backend#19351
opencv-pushbot merged 1 commit intoopencv:masterfrom
TolyaTalamanov:at/python-backend

Conversation

@TolyaTalamanov
Copy link
Copy Markdown
Contributor

@TolyaTalamanov TolyaTalamanov commented Jan 19, 2021

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

Build configuration

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.3.0:20.04
build_image:Custom Win=openvino-2021.2.0
build_image:Custom Mac=openvino-2021.2.0

test_modules:Custom=gapi,python2,python3,java
test_modules:Custom Win=gapi,python2,python3,java
test_modules:Custom Mac=gapi,python2,python3,java

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

@TolyaTalamanov TolyaTalamanov force-pushed the at/python-backend branch 3 times, most recently from 79f351b to 1610363 Compare March 5, 2021 14:04
@TolyaTalamanov TolyaTalamanov force-pushed the at/python-backend branch 4 times, most recently from 988bb68 to 3ac4340 Compare March 26, 2021 12:28
@TolyaTalamanov TolyaTalamanov changed the title [WIP] [G-API] Python backend [G-API] Python backend Mar 29, 2021
@TolyaTalamanov TolyaTalamanov force-pushed the at/python-backend branch 6 times, most recently from d209fc3 to 9c02d39 Compare March 29, 2021 10:50
@TolyaTalamanov TolyaTalamanov added this to the 4.5.2 milestone Mar 29, 2021
@TolyaTalamanov TolyaTalamanov requested a review from dmatveev March 29, 2021 11:36
@TolyaTalamanov
Copy link
Copy Markdown
Contributor Author

@dmatveev Have a look, please

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

Comment on lines +20 to +22
using Impl = std::function<cv::GRunArgs(const cv::GArgs&,
const cv::GTypesInfo&,
const cv::GTypesInfo&)>;
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.

Is it required here or can it be part of GPythonKernel?

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.

I thought about it, but it's used in GPythonFunctor as well, so let it be, if it isn't a big deal

std::string tag;
if (!pyopencv_to(PyTuple_GetItem(pair, 1), tag, ArgInfo("tag", false)))
{
PyErr_SetString(PyExc_TypeError, "Failed to obtain kernel tag. Must be string");
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.

What must be string?

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.

tag must be string

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.

Fixed


comp = cv.GComputation(g_in, g_out)

pkg = cv.gapi_wip_kernels((custom_mean, 'org.opencv.core.math.mean'))
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.

can it be cv.gapi.wip_kernels instead?

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.

...don't spend much time here if it is not

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.

No, it can't, all custom function placed in cv2 package, I believe we work it out in future

@TolyaTalamanov TolyaTalamanov force-pushed the at/python-backend branch 4 times, most recently from b9ee785 to abca930 Compare March 29, 2021 17:26
@TolyaTalamanov
Copy link
Copy Markdown
Contributor Author

@alalek Can it be merged ?

@opencv-pushbot opencv-pushbot merged commit 64072e4 into opencv:master Mar 29, 2021
@alalek alalek mentioned this pull request Apr 9, 2021
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.

3 participants