Commit Graph

361 Commits

Author SHA1 Message Date
Dmitry Matveev
ca8bb8d053 G-API: Introduce streaming::desync and infer(ROI)
- desync() is a new (and for now, the only one) intrinsic
  which splits the graph execution into asynchronous parts
  when running in Streaming mode;
- desync() makes no effect when compiling in Traditional mode;
- Added tests on desync() working in various scenarios;
- Extended GStreamingExecutor to support desync(); also extended
  GStreamingCompiled() with a new version of pull() returning a
  vector of optional values;
- Fixed various issues with storing the type information & proper
  construction callbacks for GArray<> and GOpaque;

- Introduced a new infer(Roi,GMat) overload with a sample;

- Introduced an internal API for Islands to control fusion
  procedure (to fuse or not to fuse);
- Introduced handleStopStream() callback for island executables;
- Added GCompileArgs to metadata of the graph (required for other
  features).
2020-10-29 20:19:15 +03:00
Anatoliy Talamanov
3d4563913d
Merge pull request #18600 from TolyaTalamanov:at/implement-render-using-stateful
[G-API] Implement render using stateful kernel

* Implement render using stateful kernel

* Move freetype to backends folder

* Fix freetype compilation

* Fix freetype smoke test

* Fix comments

* Refactoring
2020-10-26 19:55:43 +00:00
Anatoliy Talamanov
93c3775927
Merge pull request #18491 from TolyaTalamanov:at/wrap-inference
[G-API] Wrap cv::gapi::infer<Generic> into python

* Introduce generic infer

* Move Generic to infer.hpp

* Removew num_outs

* Fix windows warnings

* Fix comments to review

* Fix doxygen

* Add comment

* Fix comments to review

* Wrap inference to python

* Add default ctor to Params

* Add test

* Fix clang build

* Implement GInferInputs/GInferOutputs as Pimpl

* Add checkIEtarget to infer test

* Fix path

* Supress warning

* Use getAvailableDevices insted of checkIETarget

* Move PyParams to bindings_ie

* Add namespace

* Update CMakeLists.txt
2020-10-26 19:02:03 +00:00
Alexander Alekhin
bd40952097 Merge pull request #18622 from TolyaTalamanov:at/fix-namespace 2020-10-22 17:43:23 +00:00
Dmitry Matveev
95ff928228 G-API: Introduced a Text Detection sample
This sample models the Text Detection demo from OMZ:
https://github.com/openvinotoolkit/open_model_zoo/tree/2020.4/demos/text_detection_demo

Also: renamed cv::gapi::size() to cv::gapi::streaming::size()
2020-10-21 17:25:56 +03:00
Anna Khakimova
510dc17c2e
Merge pull request #18338 from anna-khakimova:ak/opt_arithm_kernel
Univ Intrinsics implementation of Add, Sub, Absdiff kernels

* Add, sub, absdiff kernels optimization

* avoid unused conditions

* add conditions for tail processing
2020-10-21 10:52:03 +00:00
Alexey Smirnov
2669d8ce73
Merge pull request #18584 from smirnov-alexey:as/rmat_s11n
[G-API]: Introduce RMat serialization API

* Introduce RMat serialization API

* Fix RunArgs deserialization

* Address review comments

* Export operators for GRunArg serialization

* Fix warning and add handling for RMat in bind()

* Update CMakeLists.txt

* G-API: RMat S11N -- probably fix the Windows warning
2020-10-20 20:58:54 +00:00
Anatoliy Talamanov
49d5960a32 Fix namespace for OCVCallHelper 2020-10-19 14:19:17 +03:00
Dmitry Budnikov
dcfa23d5d2 KW fixes 2020-10-19 13:46:23 +03:00
Anatoliy Talamanov
8bf451a3e0
Merge pull request #18542 from TolyaTalamanov:at/import-network
[G-API] Support ImportNetwork for cv::gapi::infer

* wip

* Refactoring

* Fix comments to review

* Fix warning

Co-authored-by: Ruslan Garnov <ruslan.garnov@intel.com>
2020-10-15 13:59:02 +00:00
Anatoliy Talamanov
0d3e05f9b3
Merge pull request #18493 from TolyaTalamanov:at/wrap-streaming
[G-API Wrap streaming

* Wrap streaming

* Fix build

* Add comments

* Remove comment

* Fix comments to review

* Add test for python pull overload
2020-10-14 22:21:09 +00:00
Alexander Alekhin
06a09d5991 Merge pull request #18583 from weltonrodrigo:remap_inter_doc_4 2020-10-14 18:06:59 +00:00
Anna Khakimova
4c048a487e
Merge pull request #18516 from anna-khakimova:ak/bgr2rgb
GAPI: Addition new Color conversion kernels to CPU backend.

* Add BGR2RGB kernel to CPU backend

* Add BGR2I420 and RGB2I420 kernels to CPU backend

* Add I4202BGR and I4202RGB kernels to CPU backend
2020-10-14 16:51:35 +00:00
Welton Rodrigo Torres Nascimento
09a62012b2 Doc update. INTER_LINEAR_EXACT unsupported in remap 2020-10-14 11:09:12 -03:00
maxint
2dd2d60955 Fix warnings: "-Wrange-loop-construct" in gapi 2020-10-10 07:13:23 +00:00
Anatoliy Talamanov
76be3529f4
Merge pull request #18419 from TolyaTalamanov:at/generic-inference
[G-API] Introduce generic version for cv::gapi::infer

* Introduce generic infer

* Move Generic to infer.hpp

* Removew num_outs

* Fix windows warnings

* Fix comments to review

* Fix doxygen

* Add comment

* Fix comments to review

* standoalone ifdef in ginfer.cpp

* Fix test
2020-10-08 22:12:25 +00:00
Anastasiya(Asya) Pronina
af2f8c69f0
Merge pull request #18496 from AsyaPronina:comp_args_serialization
Serialization && deserialization for compile arguments

* Initial stub

* Add test on serialization of a custom type

* Namespaces rework

* Fix isSupported in test struct

* Fix clang lookup issue

* Initial implementation

* Drop the isSupported flag

* Initial implementation

* Removed internal header inclusion

* Switched to public API

* Implemented serialization

* Adding desirialize: WIP

* Fixed merge errors

* Implemented

* Final polishing

* Addressed review comments and added debug throw

* Added FluidROI test

* Polishing

* Polishing

* Polishing

* Polishing

* Polishing

* Updated CMakeLists.txt

* Fixed comments

* Addressed review comments

* Removed decay from deserialize_arg

* Addressed review comments

* Removed extra inclusion

* Fixed Win64 warning

* Update gcommon.hpp

* Update serialization.cpp

* Update gcommon.hpp

* gapi: drop GAPI_EXPORTS_W_SIMPLE from GCompileArg

Co-authored-by: Smirnov Alexey <alexey.smirnov@intel.com>
Co-authored-by: AsyaPronina <155jj@mail.ru>
2020-10-07 21:48:49 +00:00
Anatoliy Talamanov
537494f4dd
Merge pull request #18512 from TolyaTalamanov:at/fix-untyped-np-array-for-gapi-python
[G-API] Numpy array with int64 failed in cv.gin

* Fix bug with numpy array precision in G-API python

* Fix comments to review
2020-10-07 20:38:59 +00:00
Dmitry Matveev
050c960dfc G-API: Integrated cv::MediaFrame as I/O type + CPU backend 2020-10-05 20:21:15 +03:00
Ruslan Garnov
5224d016e9
Merge pull request #18339 from rgarnov:rg/rmat_integration
[GAPI] RMat integration into the framework

* RMat integration

* Added initialization of input mat in GArray initialization tests

* Fixed klocwork warnings in RMat tests, changed argument order in EXPECT_EQ
2020-10-04 18:57:41 +00:00
Alexey Smirnov
a3e7c2d8e3
Merge pull request #18452 from smirnov-alexey:as/export_serialization_api
[G-API] Export a part of serialization interface

* Initial stub

* Add test on serialization of a custom type

* Namespaces rework

* Fix isSupported in test struct

* Fix clang build and rework namespaces

* Remove redundant header
2020-10-01 18:11:23 +00:00
Orest Chura
40b8b58bc6
Merge pull request #18451 from OrestChura:oc/count_non_zero
[G-API]: countNonZero() Standard Kernel Implementation

* Add countNonZero() standard kernel
 - API and documentation provided
 - OCV backend supported
 - accuracy and performance tests provided
 - some refactoring of related documentation done

* Fix GOpaque functionality for OCL Backend
 - test for OCL Opaque usage providied

* countNonZero for GPU
 - OCL Backend implementation for countNonZero() added
 - tests provided

* Addressing comments
2020-09-30 16:07:35 +00:00
Dmitry Matveev
43d306fc2d
Merge pull request #18415 from dmatveev:dm/gframe_01_new_host_type
* G-API: Introduce cv::MediaFrame, a host type for cv::GFrame

* G-API: RMat -- address review comments
2020-09-29 19:19:54 +00:00
Anatoliy Talamanov
e998d89e88 Implement cv.gin and multiple output for python 2020-09-29 13:45:40 +03:00
Alexey Smirnov
8da1b9aafa
Merge pull request #18401 from smirnov-alexey:as/serialization_more_types
[G-API] Add support for more types serialization

* Support more types

* Add std::string support

* Fix GOpaque and gin interaction

* Fix tests on kind

* Make map serialization support templates and add tests on kind
2020-09-28 18:20:04 +00:00
Dmitry Matveev
4dbb8ac4b2
Merge pull request #18387 from dmatveev:dm/slides_upd_44
Update G-API slides to OpenCV 4.4

* G-API: Updated slides to v4.4 (+ sample)

* Slight formatting changes + Python API page

* Some more updates to slides:

- Added more info on 4.2 and 4.4 versions
- Added explanation on Operations and their functional wrappers
2020-09-26 20:59:26 +00:00
Alexander Alekhin
118218754b Merge pull request #18408 from rgarnov:rg/fix_standalone_windows_build 2020-09-25 15:28:51 +00:00
Alexander Alekhin
0dc28d3446 Merge pull request #18397 from mshabunin:fix-gapi-test 2020-09-24 22:36:53 +00:00
Ruslan Garnov
50657e2324 Added linkage of s11n required libs in standalone 2020-09-24 17:44:58 +03:00
Dmitry Matveev
e937d9b559
Merge pull request #18391 from dmatveev:dm/gframe_00_new_type
* G-API: Make GFrame a new (distinct) G-type, not an alias to GMat

- The underlying host type is still cv::Mat, a new cv::MediaFrame
  type is to be added as a separate PR

* Fix warnings and review comments

- Somewhow there was a switch() without a default: clause in Fluid
2020-09-23 18:25:14 +00:00
Maksim Shabunin
7186c46377 gapi: fix building wihout video module, fix infer test 2020-09-23 16:51:36 +03:00
AsyaPronina
3ea9022c5f Disabled failed test instantiations 2020-09-22 15:45:31 +03:00
Alexey Smirnov
f6aa9ac304
Merge pull request #18292 from smirnov-alexey:as/osd_serialization
[G-API]: Support render primitives serialization

* Add GOpaque and GArray serialization support

* Address review comments

* Remove holds() method

* Add serialization mechanism for render primitives

* Fix standalone mode

* Fix wchar_t error on win64

* Fix assert on windows

* Address review comments

* Fix GArray and GOpaque reset() method to store proper kind

* Reset wchar before deserializing it

* Fix wchar_t cross-platform issue

* Address review comments

* Fix wchar_t serialization and tests

* Remove FText serialization
2020-09-21 19:08:58 +00:00
Orest Chura
95fd61c9b4
Merge pull request #18261 from OrestChura:oc/fluid_convert_mask
[G-API]: Fluid: add mask, extend convertTo for CV_16S

* Add Fluid `mask` kernel + Acc. and Perf. tests
 - simple cycle implementation with restrictions on mask type and input/output type like in OCV/GPU kernels (mask - CV_8UC1 only, input/output - CV_8UC1, CV_16UC1, CV_16SC1)

* Added convertions from/to 16S

* `convertTo()` perf tests refactoring
 - add testing of `alpha` and `beta` parameters
 - fixed unreliable comparison
 - added instances to OCV, Fluid and GPU tests according to the changes

* Addressing comments
 - fixed multiple-channel mistake - prohibited multiple-channeling

* Reduced perf tests
2020-09-18 14:24:34 +00:00
Orest Chura
d1cdef596c
Merge pull request #18257 from OrestChura:oc/fluid_operator_bitwise_and_scalar
[G-API]: Add Fluid bitwise operations implementation for (GMat, GScalar)

* Added Fluid `bitwise` with `Scalar` + acc.tests
 - simple loop implementation for Fluid used (no `hal`);
   - `Scalar` is casted to `int` in the beginning
 - tests just modified to work with `Scalar`
 - expected output in operators' tests fixed (operators can't change Mat's depth)
 - `float` `Scalar` `RNG` added, `RNG` reworked (`time` is used now), initialization of test fixtures reworked
   - if input or output is `float` Scalar is initialized by `float`
 - some problems with Fluid/OCV floating-point comparison difference stashed by `AbsSimilarPoints()` usage, FIXME added
 - divide-by-zero is now fixed differently and everywhere

* - Added perf_tests for bitwise_Scalar operations
 - due to errors of Fluid floating-point comparison operations, added support of different validation in Cmp perf_tests; added FIXME

 - reworked integral initialization of Scalar

* Addressing comments
 - NULL -> nullptr
 - Scalar convertion moved to the function
 - avoid -> avoiding

* Addressing comments

* CV_assert -> GAPI_assert

* Addressed DM comments
 - refactored convertScalarForBitwise()
 - removed unnecessary braces for switch

* Changed the operators tests
 - switch via `enum` implemented
 - infrastructure for that refactored
2020-09-18 13:44:47 +00:00
Alexander Alekhin
7163781639
Merge pull request #18343 from TolyaTalamanov:at/support-return-tuple
[G-API] Support std::tuple for return type
2020-09-18 16:38:37 +03:00
Maxim Pashchenkov
a63cee2139
Merge pull request #18287 from mpashchenkov:mp/ocv-gapi-blue-branch
[G-API]: Add four kernels to parse NN outputs & provide information in Streaming scenarios

* Kernels from GL "blue" branch, acc and perf tests

* Code cleanup

* Output fix

* Comment fix

* Added new file for parsers, stylistic corrections

* Added end line

* Namespace fix

* Code cleanup

* nnparsers.hpp moved to gapi/infer/, nnparsers -> parsers

* Removed cv:: from parsers.hpp
2020-09-18 13:31:16 +00:00
Maxim Pashchenkov
830d8d6b75
Merge pull request #18196 from mpashchenkov:mp/garray-initialization
[G-API]: Add GArray initialization support

* Added GArray initialization (CONST_VALUE, GScalar analog) and test for this

* Whitespaces

* And one more space

* Trailing whitespace

* Test name changed. Build with magic commands.

* GArray works with rvalue initialization

* Code cleanup

* Ternary operator in the initialization list.
2020-09-18 13:06:23 +00:00
Anatoliy Talamanov
a07f064e50
Merge pull request #18332 from TolyaTalamanov:at/wrap-GIn-GOut
[G-API] Wrap GIn & GOut

* Wrap GIn & GOut into python

* Remove extra brackets

* Use reinterpret_cast
2020-09-17 19:00:03 +00:00
Ruslan Garnov
ea4b491a73
Merge pull request #18213 from rgarnov:rg/rmat_api
Basic RMat implementation

* Added basic RMat implementation

* Fix typos in basic RMat implementation

Co-authored-by: Anton Potapov <anton.potapov@intel.com>
2020-09-17 12:39:10 +00:00
Anatoliy Talamanov
986bc65e1f Change imports order for copytomask 2020-09-17 11:09:41 +03:00
Anatoliy Talamanov
5218443784 Support tuple for python bindings 2020-09-16 16:22:46 +03:00
Alexander Alekhin
3b00ee2afb Merge pull request #18320 from choffmann:master 2020-09-13 13:30:57 +00:00
Anatoliy Talamanov
a258404a58
Merge pull request #18309 from TolyaTalamanov:at/wrap-apply-overloads
[G-API] Wrap cv::gapi::mean kernel into python

* Wrap cv::gapi::mean kernel into python

* Fix test
2020-09-12 22:02:21 +00:00
Christoph Gringmuth
a3048239b3 Fix implicitly-deleted default constructor 2020-09-12 22:28:11 +02:00
Alexey Smirnov
a3e8c6e866
Merge pull request #18127 from smirnov-alexey:as/gapi_serialization
[G-API]: Add GOpaque and GArray serialization support

* Add GOpaque and GArray serialization support

* Address review comments

* Remove holds() method

* Address review comments

* Remove comments

* Align streaming with kind changes

* Fix kind in kernel

* Address review comments
2020-09-07 17:10:03 +00:00
Orest Chura
7a796b20ea
Merge pull request #18182 from OrestChura:oc/operators_to_cv
[G-API]: Relocation of operators' overloads

* Relocates overloaded operators for `cv::GMat` and `cv::GScalar` to `cv::` namespace
 - adds test to check usage of operators compilation

* Add tests for all the operators

* Address comments
2020-09-02 19:28:10 +00:00
Anastasiya(Asya) Pronina
1192cbe4ab
Merge pull request #17163 from AsyaPronina:gcompound_kernel_gmatp_coop
* Fixed cooperation of Compound kernel and GMatP type

* Added test for GCompound kernel + GMatP type cooperation
2020-08-25 13:51:43 +00:00
Orest Chura
e5e08ec523
Merge pull request #18148 from OrestChura:oc/fluid_core_perf
[G-API]: Fluid Core kernels performance tests

* Add performance tests for a list of Fluid Core kernels

* Update gapi_core_perf_tests_fluid.cpp

Addressing a comment
2020-08-24 11:46:32 +00:00
Anatoliy Talamanov
c708f506a4
Merge pull request #17493 from TolyaTalamanov:at/python-bindings-gapi
* Implement G-API python bindings

* Fix hdr_parser

* Drop initlization with brackets using regexp

* Handle bracket initilization another way

* Add test for core operations

* Declaration and definition of View constructor now in different files

* Refactor tests

* Remove combine decorator from tests

* Fix comment to review

* Fix test

* Fix comments to review

* Remove GCompilerArgs implementation from python

Co-authored-by: Pinaev <danil.pinaev@intel.com>
2020-07-29 16:18:52 +03:00