Commit Graph

422 Commits

Author SHA1 Message Date
Anatoliy Talamanov
244511e434
Merge pull request #19205 from TolyaTalamanov:at/remove-streamingbackend-export
[G-API] Fix streaming kernels in standalone

* Move streaming kernels from public header

* Add streaming backend to standalone
2020-12-24 16:46:10 +00:00
Maxim Pashchenkov
656b20a169
Merge pull request #19070 from mpashchenkov:mp/onnx-gframe
G-API: Support GFrame for ONNX infer 

* Added GFrame for ONNX

* Cut test

* Removed IE from assert

* Review comments

* Added const/bbot rstrt

* View instead unique_ptr in func. sig.

* Added extractMat function, ONNXCompiled contains exMat - cv::Mat with non processed input data

* Added meta check for inferList2
2020-12-24 13:55:33 +00:00
Alexander Alekhin
50bb344a9d Merge pull request #19206 from OrestChura:oc/fix_plugconfparams_n_align 2020-12-24 13:54:02 +00:00
OrestChura
e80f6624ed - Replace plugin config parameters with the working ones
- refactor for consistency
2020-12-23 17:06:45 +03:00
Anastasiya Pronina
cdbea6f0a0 GFrame as internal node in GExecutor 2020-12-21 14:06:47 +03:00
Alexander Alekhin
3e9158acd6 Merge pull request #19128 from asmorkalov:as/gapi_phase_tolerance 2020-12-18 13:43:07 +00:00
Alexander Smorkalov
009860e98a arm64 fix: Replaced float value strong equal checks with check with tolerance. 2020-12-18 14:57:51 +03:00
Alexander Alekhin
7d7ab462d6 Merge pull request #19130 from dmatveev:dm/fix_docs_ocv451 2020-12-16 20:26:41 +00:00
Ruslan Garnov
e06a497c7c Added format.hpp include to core.hpp 2020-12-16 19:29:06 +03:00
Ruslan Garnov
f7cab121fe
Merge pull request #19112 from rgarnov:rg/generic_copy_kernel
Generic copy kernel

* Moved RMat wrapping of cv::Mats to StreamingInput

* Generalized GCopy kernel

* Generic GCopy kernel: applied review comments
2020-12-16 11:18:08 +00:00
Dmitry Matveev
b74804f61f G-API: Fix various Doxygen isses for the 4.5.1 release 2020-12-15 23:21:46 +03:00
Anatoliy Talamanov
50baf76cc2
Merge pull request #19107 from TolyaTalamanov:at/hotfix-gstreamingbackend
[G-API] GStreamingBackend hotfix

* GStreamingBackend hotfix

* Fix comments to review

* Add strides

* Removew while loop inside actor
2020-12-15 18:05:26 +00:00
Orest Chura
fcdd69fd97
Merge pull request #19103 from OrestChura:oc/cvtI420_perftests
[G-API]: Performance tests for color conversion kernels

* Performance tests for 5 new color conversion kernels:
 - BGR2RGB
 - BGR2I420
 - RGB2I420
 - I4202BGR
 - I4202RGB

* Addressing comment
2020-12-14 22:45:41 +00:00
Anna Khakimova
46e275dfe4
Merge pull request #18869 from anna-khakimova:ak/kalman
* GAPI: Kalman filter stateful kernel

* Applied comments

* Applied comments. Second iteration

* Add overload without control vector

* Remove structure constructor and dimension fields.

* Add sample as test

* Remove visualization from test-sample + correct doxygen comments

* Applied comments.
2020-12-14 08:56:37 +00:00
OrestChura
79b4dc14a3 Fix new streaming tests for CI 2020-12-11 20:26:39 +03:00
Anatoliy Talamanov
8ed0fc6f0c
Merge pull request #19009 from TolyaTalamanov:at/media-frame-copy
[G-API] GStreamingBackend

* Snapshot

* Implement StreamingBackend

* Refactoring

* Refactoring 2

* Clean up

* Add missing functionality to support MediaFrame as output

* Partially address review comments

* Fix build

* Implement reshape for gstreamingbackend and add a test on it

* Address more comments

* Add format.hpp to gapi.hpp

* Fix debug build

* Address review comments

Co-authored-by: Smirnov Alexey <alexey.smirnov@intel.com>
2020-12-11 16:29:34 +00:00
Anatoliy Talamanov
a55150b1bc
Merge pull request #19002 from TolyaTalamanov:at/infer_gframe
[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>
2020-12-09 14:00:56 +00:00
Orest Chura
f41327df0c
Merge pull request #18969 from OrestChura:oc/fix_notes_returns
[G-API] Multiple return/note fix

* Fix doxygen:
 - multiple return
 - multiple notes

* Addressing comments
 - divide description of split(merge)3/4
2020-12-08 15:44:33 +00:00
OrestChura
02488c5cbb Moved G-API output to the first place of arguments in comparison functions 2020-12-08 02:44:01 +03:00
Alexander Alekhin
d1b5a78171 build warnings
- GCC 4.8.5 / CentOS 7
2020-12-05 20:08:29 +00:00
Alexander Alekhin
ef0eed8d3c Merge pull request #18981 from anton-potapov:fix_gnet_package_compilation_std_17 2020-12-01 17:42:12 +00:00
Alexander Alekhin
3f686a6ab8 Merge pull request #18967 from anton-potapov:reuse_move_through_copy 2020-12-01 12:57:06 +00:00
Anton Potapov
eb6d8e6af2 TBB executor for GAPI: fix race consition in Async test
The test has race condition, which is addressed by the patch.

The race is next:

    Master thread is calling execute (effectively blocked, waiting for
callback to be called)
    "Async" thread picks up the callback
    Call the callback
    Then sets the variables in test
    After call back is called, master thread is unblocked and may check
the variables (set in point 4 by the "async" thread) earlier then they
actually changed

Changes:

    callback should be called as the last step (after flag variables are
    set), as it effectively unblock the master thread

fixes #18974
2020-12-01 11:12:36 +03:00
Anton Potapov
446f344818 GAPI: fix C++17 compilation errors in GNetPackage (fixes #17385)
- explicitly declared default constructor
- made initilizer_list  constructor to accept the list by copy
   -- as it is  more canonical (and as copying the initializer_list does
not force copy of the list items)
   -- current version anyway does not do what it is intended to
2020-12-01 09:34:53 +03:00
Anna Khakimova
56568dae31
Merge pull request #18674 from anna-khakimova:ak/backgroundSubtractor
GAPI: New BackgroundSubtractor stateful kernel

* New BackgroundSubtractorMOG2 kernel

* Add BS parameters
2020-11-30 18:09:42 +00:00
Anton Potapov
74b6646737 GAPI: reuse copy_through_move_t in the gasync.cpp file 2020-11-30 16:26:54 +03:00
Orest Chura
986ad4ff06
Merge pull request #18857 from OrestChura:oc/kmeans
[G-API]: kmeans() Standard Kernel Implementation

* cv::gapi::kmeans kernel implementation
 - 4 overloads:
    - standard GMat - for any dimensionality
    - GMat without bestLabels initialization
    - GArray<Point2f> - for 2D
    - GArray<Point3f> - for 3D
 - Accuracy tests:
   - for every input - 2 tests
   1) without initializing. In this case, no comparison with cv::kmeans is done as kmeans uses random auto-initialization
   2) with initialization
   - in both cases, only 1 attempt is done as after first attempt kmeans initializes bestLabels randomly

* Addressing comments
 - bestLabels is returned to its original place among parameters
 - checkVector and isPointsVector functions are merged into one, shared between core.hpp & imgproc.hpp by placing it into gmat.hpp (and implementation - to gmat.cpp)
 - typos corrected

* addressing comments
 - unified names in tests
 - const added
 - typos

* Addressing comments
 - fixed the doc note
 - ddepth -> expectedDepth, `< 0 ` -> `== -1`

* Fix unsupported cases of input Mat
 - supported: multiple channels, reversed width
 - added test cases for those
 - added notes in docs
 - refactored checkVector to return dimentionality along with quantity

* Addressing comments
 - makes chackVector smaller and (maybe) clearer

* Addressing comments

* Addressing comments
 - cv::checkVector -> cv::gapi::detail

* Addressing comments
 - Changed checkVector: returns bool, quantity & dimensionality as references

* Addressing comments
 - Polishing checkVector
 - FIXME added

* Addressing discussion
 - checkVector: added overload, separate two different functionalities
 - depth assert - out of the function

* Addressing comments
 - quantity -> amount, dimensionality -> dim
 - Fix typos

* Addressing comments
 - fix docs
 - use 2 variable's definitions instead of one (for all non-trivial variables)
2020-11-30 13:18:43 +00:00
Anton Potapov
95ce8f45ea
Merge pull request #17851 from anton-potapov:sole_tbb_executor
* TBB executor for GAPI

 - the sole executor
 - unit tests for it
 - no usage in the GAPI at the momnet

* TBB executor for GAPI

 - introduced new overload of execute to explicitly accept tbb::arena
   argument
 - added more basic tests
 - moved arena creation code into tests
 -

* TBB executor for GAPI

 - fixed compie errors & warnings

* TBB executor for GAPI

 - split all-in-one execute() function into logicaly independant parts

* TBB executor for GAPI

 - used util::variant in in the tile_node

* TBB executor for GAPI

 - moved copy_through_move to separate header
 - rearranged details staff in proper namespaces
 - moved all implementation into detail namespace

* TBB executor for GAPI

 - fixed build error with TBB 4.4.
 - fixed build warnings

* TBB executor for GAPI

 - aligned strings width
 - fixed spaces in expressions
 - fixed english grammar
 - minor improvements

* TBB executor for GAPI

 - added more comments
 - minor improvements

* TBB executor for GAPI

 - changed ITT_ prefix for macroses to GAPI_ITT

* TBB executor for GAPI

 - no more "unused" warning for GAPI_DbgAssert
 - changed local assert macro to man onto GAPI_DbgAssert

* TBB executor for GAPI

 - file renamings
 - changed local assert macro to man onto GAPI_DbgAsse

* TBB executor for GAPI

 - test file renamed
 - add more comments

* TBB executor for GAPI

 - minor clenups and cosmetic changes

* TBB executor for GAPI

 - minor clenups and cosmetic changes

* TBB executor for GAPI

 - changed spaces and curly braces alignment

* TBB executor for GAPI

 - minor cleanups

* TBB executor for GAPI

 - minor cleanups
2020-11-30 13:15:13 +00:00
Anatoliy Talamanov
7521f207b1
Merge pull request #18762 from TolyaTalamanov:at/support-garray
[G-API] Wrap GArray

* Wrap GArray for output

* Collect in/out info in graph

* Add imgproc tests

* Add cv::Point2f

* Update test_gapi_imgproc.py

* Fix comments to review
2020-11-27 17:39:46 +00:00
Alexander Alekhin
23be514886 Merge pull request #18935 from rgarnov:rg/remove_double_handle_new_stream_call 2020-11-27 14:05:01 +00:00
Alexander Alekhin
f90673ef4c Merge pull request #18938 from alalek:issue_18865 2020-11-27 08:55:49 +00:00
Alexander Alekhin
5c987e4c75
Merge pull request #18924 from alalek:4.x-xcode12
(4.x) build: Xcode 12 support

* build: xcode 12 support, cmake fixes

* ts: eliminate clang 11 warnigns

* 3rdparty: clang 11 warnings

* features2d: eliminate build warnings

* test: warnings

* gapi: warnings from 18928
2020-11-26 22:56:59 +00:00
Alexander Alekhin
7efc0011fd gapi(test): avoid anonymous namespace types as template parameters 2020-11-26 21:37:54 +00:00
Ruslan Garnov
ece14eae24 Removed redundant call of handleNewStream in streaming executor 2020-11-26 22:46:26 +03:00
Alexander Alekhin
7afd48658c gapi: eliminate std::rand() and RAND_MAX from tests 2020-11-26 10:20:02 +00:00
Maxim Pashchenkov
19d825aa16
Merge pull request #18904 from mpashchenkov:mp/ocv-gapi-skip-gm-tests
G-API: Adding skip for GraphMeta tests

* Added skip for GraphMeta tests

* Removed false
2020-11-24 17:51:02 +00:00
Maxim Pashchenkov
94e8a08d1d
Merge pull request #18819 from mpashchenkov:mp/ocv-gapi-skip-centos-tests
G-API: Adding a skip for failed streaming tests

* Skip tests

* Pathfinding

* Pathfinding part 2

* Pathfinding part 3

* Fix review comments
2020-11-17 22:57:57 +00:00
Orest Chura
2c6a2f0381
Merge pull request #18790 from OrestChura:oc/fitLine
[G-API]: fitLine() Standard Kernel Implementation

* fitLine API (Mat, 32S, 32F) (2D, 3D)

* Complete fitLine kernel & accuracy tests
 - initialization for vectors of cv::Point and Mats via vectors added
 - comparison functions for Vec<T, n> added:
   - straight average difference comparison
   - comparison by equasion for 2d line
 - stream overload for cv::DistanceTypes added

* Fix precommit warnings

* Fix docs

* Address comments
Try to fix warning

* Disable warning in tests
2020-11-17 15:59:59 +00:00
Dmitry Matveev
b866d0dc38
Merge pull request #18793 from dmatveev:dm/in_graph_metadata
G-API: Introduce runtime in-graph metadata

* G-API: In-graph metadata -- initial implementation

* G-API: Finish the in-graph metadata implementation for Streaming

* G-API: Fix standalone build & warnings for in-graph metadata

* G-API: In-graph meta -- fixed review comments

* G-API: Fix issues with desync causing failing tests
2020-11-17 14:04:19 +00:00
Maxim Pashchenkov
06477743ab
Merge pull request #18744 from mpashchenkov:mp/onnx-dynamic-input-tensor
G-API: ONNX. Support tensor input for CNN with dynamic input 

* Added support for dynamic input tensor, refactored one input/output tests

* Added multiple input/output fixture, test for mobilenet

* Removed whitespace

* Removed mistake in inferROI

* Small fixes

* One more fix

* Code cleanup

* Code cleanup X2

* bb rstrt

* Fix review comments

* One more fix review comments

* Mistake
2020-11-16 19:24:55 +00:00
Alexander Alekhin
e4a9ad1730 Merge pull request #18688 from rgarnov:rg/add_gmatdesc_s11n_nd_test 2020-11-16 19:18:38 +00:00
Alexander Alekhin
d0b6637c1d Merge pull request #18720 from rgarnov:rg/nd_rmat_view 2020-11-16 12:05:08 +00:00
Ruslan Garnov
58268b6eef Added ND GMatDesc serialization test 2020-11-16 13:03:18 +03:00
Alexander Alekhin
41e906d1a4 Merge pull request #18729 from rgarnov:rg/extend_parse_yolo 2020-11-13 15:18:55 +00:00
Ruslan Garnov
0e4b5b88dc Added support of 1x1x1xN input for parseYolo 2020-11-13 16:20:45 +03:00
Ruslan Garnov
724001aa0f Added multidimensional RMat::View steps 2020-11-12 13:15:02 +03:00
Alexander Alekhin
5564d73071 Merge pull request #18770 from mshabunin:fix-kw-1 2020-11-11 16:14:15 +00:00
Orest Chura
3fc1c73064
Merge pull request #18510 from OrestChura:oc/boundingRect
[G-API]: findContours() and boundingRect() Standard Kernels Implementation

* Add findContours() standard kernel
 - API and documentation provided:
   - as OpenCV provides two overloads whether to calculate hierarchy or not, but they differ by only the output in sight of G-API, two different G-API functions and kernels implemented
   - G-API Imgproc documentation divided into more parts according to imgproc module parts
   - some typos connected with division into parts corrected
 - `GArray<GArray<U>>` overload for `get_out` function provided to coonvert correctly into `vector<vector<U>>`
 - OCV backend supported
 - accuracy tests provided

* Add boundingRect() standard kernel
     - API and documentation provided:
       - GOpaque<Rect> used as an output
       - as OpenCV provides two possibilities whether to take a gray-scale image or a set of 2D points (`Point2i` or `Point2f` supported), three different overloads of a single G-API function and three kernels implemented
          - for a gray-scale image the overload via `GMat`
          - for a set of `Point2i` - the one via GArray<`Point2i`>
          - set of `Point2f` -> GArray<`Point2f`>
     - OCV backend supported
     - accuracy tests provided
       - comparison function for Rects provided
     - some typos in `gapi_tests_common` corrected

* Fix precommit windows warnings

* - Addressing comments:
   - split tests
 - Fix Windows warnings

* Static_cast for warnings

* - Remove randomness
 - Fix unnecessary precision losses

* - Forgot reference for RNG

* addressing comments

* equalizeHist -> no group

* `const` addedin new functions

* Address suggestions:
 - Hierarchical -> H
 - added cv::GMatDesc::isVectorPoins()
 - added support of giving a set of points to boundingRect()

* Addressing comments
 - IoU comparison function added for Rects
 - isPointsVector moved from a GMatDesc method to a separate function in imgproc.hpp
 - enums instead of int
 - typos corrected

* Addressing comments
 - findContours: Point offset -> GOpaque<Point>
 - removed "straight" comparison for Rects, IoU available only
 - changed vectors initialization -> fix Debug test run
 - Some typos

* added comment for later upgrades

* Fix not to corrupt docs by FIXME

* Addressing commens
 - overload without offset added (as a temporary workaround)
 - checkMetaForFindingContours -> validateFindingContoursMeta
 - added ostream overload for enums used in tests
2020-11-11 12:13:10 +00:00
Maksim Shabunin
1b0dca9c2c Fix issues found by static analysis 2020-11-11 13:59:01 +03:00
Orest Chura
5f1ca33c6f
Merge pull request #18652 from OrestChura:oc/morphologyEx
[G-API]: morphologyEx() Standard Kernel Implementation

* cv::gapi::morphologyEx() kernel
 - implemented (without separate 3x3 version)
 - tests added: check only different operations, not kernels/borders

* Address comments: add `const` where needed

* Replaced fundamental tyeps -> enums where needed
 - added operator<< overload for cv::MorphTypes for tests output
2020-11-10 18:57:52 +00:00