opencv/modules/gapi/test/internal
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
..
gapi_int_backend_tests.cpp gapi: fix tests build 2019-04-02 13:46:25 +03:00
gapi_int_dynamic_graph.cpp Merge pull request #17741 from aDanPin:dp/add_dinamic_graph_feature 2020-07-15 18:37:08 +00:00
gapi_int_executor_tests.cpp Fix some clang 14 warnings 2023-02-07 01:19:00 +03:00
gapi_int_garg_test.cpp Merge pull request #18127 from smirnov-alexey:as/gapi_serialization 2020-09-07 17:10:03 +00:00
gapi_int_gmetaarg_test.cpp Merge pull request #21041 from sivanov-work:gin_gout_concept 2021-12-03 12:30:05 +00:00
gapi_int_gmodel_builder_test.cpp Merge pull request #23843 from TolyaTalamanov:at/fix-missing-opaque-kind-for-kernel 2023-06-22 12:46:25 +03:00
gapi_int_island_fusion_tests.cpp Merge pull request #19112 from rgarnov:rg/generic_copy_kernel 2020-12-16 11:18:08 +00:00
gapi_int_island_tests.cpp Merge pull request #13943 from rgarnov:export_headers_for_backend_development 2019-04-17 21:54:47 +03:00
gapi_int_pattern_matching_test.cpp Merge pull request #21157 from alexgiving:atrutnev/move_resize 2021-12-29 15:13:43 +00:00
gapi_int_perform_substitution_test.cpp Merge pull request #21157 from alexgiving:atrutnev/move_resize 2021-12-29 15:13:43 +00:00
gapi_int_proto_tests.cpp Merge pull request #21041 from sivanov-work:gin_gout_concept 2021-12-03 12:30:05 +00:00
gapi_int_recompilation_test.cpp Merge pull request #21157 from alexgiving:atrutnev/move_resize 2021-12-29 15:13:43 +00:00
gapi_int_vectorref_test.cpp gapi: fix tests build 2019-04-02 13:46:25 +03:00
gapi_transactions_test.cpp G-API: Introduce streaming::desync and infer(ROI) 2020-10-29 20:19:15 +03:00