opencv/modules/gapi/test
Anatoliy Talamanov 60848519b5
Merge pull request #23843 from TolyaTalamanov:at/fix-missing-opaque-kind-for-kernel
G-API: Fix incorrect OpaqueKind for Kernel outputs #23843

### Pull Request Readiness Checklist

#### Overview
The PR is going to fix several problems:
1. Major: `GKernel` doesn't hold `kind` for its outputs. Since `GModelBuilder` traverse graph from outputs to inputs once it reaches any output of the operation it will use its `kind` to create  `Data` meta for all operation outputs. Since it essential for `python` to know `GTypeInfo` (which is `shape` and `kind`) it will be confused.

Consider this operation:
```
 @cv.gapi.op('custom.square_mean', in_types=[cv.GArray.Int], out_types=[cv.GOpaque.Float, cv.GArray.Int])
    class GSquareMean:
        @staticmethod
        def outMeta(desc):
            return cv.empty_gopaque_desc(), cv.empty_array_desc()
```
Even though `GOpaque` is `Float`, corresponding metadata might have `Int` kind because it might be taken from `cv.GArray.Int`
so it will be a problem if one of the outputs of these operation is graph output because python will cast it to the wrong type based on `Data` meta.

2. Minor: Some of the OpenVINO `IR`'s doesn't any layout information for input. It's usually true only for `IRv10` but since `OpenVINO 2.0` need this information to correctly configure resize we need to put default layout if there no such assigned in `ov::Model`. 

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 another license that is incompatible with OpenCV
- [ ] The PR is proposed to the proper branch
- [ ] There is a reference to the 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
2023-06-22 12:46:25 +03:00
..
common Merge pull request #22935 from alalek:gapi_error 2022-12-19 06:05:15 +00:00
cpu Merge pull request #21909 from dbudnikov:dbudnikov/reduce_gapi_tests_number 2022-05-15 10:07:01 +00:00
executor build: eliminate build warnings on Ubuntu 20.04/16.04 2022-12-20 06:46:30 +00:00
gpu Merge pull request #21909 from dbudnikov:dbudnikov/reduce_gapi_tests_number 2022-05-15 10:07:01 +00:00
infer Merge pull request #23799 from TolyaTalamanov:at/ov20-backend-implement-missing-kernels 2023-06-20 13:29:23 +03:00
internal Merge pull request #23843 from TolyaTalamanov:at/fix-missing-opaque-kind-for-kernel 2023-06-22 12:46:25 +03:00
oak Merge pull request #20785 from smirnov-alexey:as/oak_backend 2022-01-17 22:56:01 +00:00
own Merge pull request #20922 from alexgiving:atrutnev/align_expect_assert_macros 2021-10-29 16:30:35 +00:00
render Merge pull request #20284 from TolyaTalamanov:at/wrap-render 2021-07-01 09:36:19 +00:00
rmat gapi(test): reduce used amount of memory 2022-05-15 09:41:25 +00:00
s11n Merge pull request #22935 from alalek:gapi_error 2022-12-19 06:05:15 +00:00
streaming Fix some clang 14 warnings 2023-02-07 01:19:00 +03:00
util Merge pull request #20922 from alexgiving:atrutnev/align_expect_assert_macros 2021-10-29 16:30:35 +00:00
gapi_array_tests.cpp Merge pull request #19828 from OrestChura:oc/fix_garray_garray_input 2021-04-01 20:39:31 +00:00
gapi_async_test.cpp Included thread in gapi_async_test.cpp 2022-10-31 12:19:04 +01:00
gapi_basic_hetero_tests.cpp Move GKernelPackage to cv namespace 2021-12-24 18:04:11 +03:00
gapi_compile_args_tests.cpp Move GKernelPackage to cv namespace 2021-12-24 18:04:11 +03:00
gapi_desc_tests.cpp Merge pull request #16995 from mpashchenkov:mp/ocv-gapi-standalone-mat 2020-04-21 20:22:01 +00:00
gapi_fluid_parallel_rois_test.cpp Merge pull request #16745 from Volskig:mp/ocv-gapi-standalone-size 2020-04-02 18:19:45 +00:00
gapi_fluid_resize_test.cpp Fix tolerance for Preproc4lpiTest set 2023-03-24 14:20:22 +03:00
gapi_fluid_roi_test.cpp Merge pull request #16745 from Volskig:mp/ocv-gapi-standalone-size 2020-04-02 18:19:45 +00:00
gapi_fluid_test_kernels.cpp Move GKernelPackage to cv namespace 2021-12-24 18:04:11 +03:00
gapi_fluid_test_kernels.hpp Move GKernelPackage to cv namespace 2021-12-24 18:04:11 +03:00
gapi_fluid_test.cpp Merge pull request #21157 from alexgiving:atrutnev/move_resize 2021-12-29 15:13:43 +00:00
gapi_frame_tests.cpp Merge pull request #21511 from dbudniko:dbudniko/gapi_media_format_gray 2022-02-03 15:20:21 +03:00
gapi_gcompiled_tests.cpp Merge pull request #20184 from sivanov-work:fix_gapi_empty_input 2021-06-10 14:05:46 +03:00
gapi_gcomputation_tests.cpp Merge pull request #19322 from TolyaTalamanov:at/python-callbacks 2021-03-01 15:52:11 +00:00
gapi_gpu_test.cpp Move GKernelPackage to cv namespace 2021-12-24 18:04:11 +03:00
gapi_graph_meta_tests.cpp Merge pull request #20995 from mpashchenkov:mp/ocv-gapi-tdp-skip 2021-11-16 18:27:42 +00:00
gapi_kernel_tests.cpp Merge pull request #19617 from smirnov-alexey:as/extend_kernel_package_api 2021-03-10 15:58:34 +00:00
gapi_mock_kernels.hpp Merge pull request #14741 from rgarnov:gapi_fix_includes 2019-06-14 19:27:19 +03:00
gapi_opaque_tests.cpp Merge pull request #20922 from alexgiving:atrutnev/align_expect_assert_macros 2021-10-29 16:30:35 +00:00
gapi_plaidml_pipelines.cpp Add implementation in case plaidml isn't found 2020-06-22 00:46:41 +03:00
gapi_planar_test.cpp gapi(test): ban and get rid of countNonZero() checks 2020-02-26 14:19:19 +03:00
gapi_sample_pipelines.cpp Merge pull request #21775 from luzpaz:typos/gapi 2022-04-13 17:06:37 +00:00
gapi_scalar_tests.cpp gapi(test): ban and get rid of countNonZero() checks 2020-02-26 14:19:19 +03:00
gapi_smoke_test.cpp gapi(test): ban and get rid of countNonZero() checks 2020-02-26 14:19:19 +03:00
gapi_transform_tests.cpp Move GKernelPackage to cv namespace 2021-12-24 18:04:11 +03:00
gapi_typed_tests.cpp Merge pull request #17871 from OrestChura:oc/typed_GArray_GMat 2020-07-28 14:20:36 +03:00
gapi_util_tests.cpp Merge pull request #21041 from sivanov-work:gin_gout_concept 2021-12-03 12:30:05 +00:00
opencl_kernels_test_gapi.hpp avoid kernel compile error on Arm SBCs 2020-07-06 18:27:19 +09:00
test_main.cpp Merge pull request #20995 from mpashchenkov:mp/ocv-gapi-tdp-skip 2021-11-16 18:27:42 +00:00
test_precomp.hpp Fix building opencv using gcc 11.x #19244 2021-01-02 17:43:11 +00:00