Render Frame NV12 on CPU
* render frame on CPU
* doxygen fix
* address review from Alexey
* comment fixes
* Address comments from Ruslan
* remove NV12 specific
* mat clone and more renaming
* misprint fix
[G-API] Introduce GOpaque and GArray for python
* Introduce GOpaque and GArray for python
* Fix ctor
* Avoid code duplication by using macros
* gapi: move Python-specific files to misc/python
* Fix windows build
Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
G-API: ONNX. Support for networks with three dimensional input.
* Padding without tests
* Removed padding
* Some small fixes
* Added wstring_convert
* Alignment fix, m b
* Small fixes
* Moved include from onnx.hpp
[G-API]: Performance tests for fitLine and findContours
* Perf.Test for findContours(H)
* Perf.Test for fitLine(2D.3D;Mat,vector<Point2i/2f/2d/3i/3f/3d>)
* Reducing the template specializations number
* Applying comments
[G-API]: Performance tests for boundingRect
* Update boundingRect() tests with the changes from fitLine() PR
* Add performance tests for boundingRect
* Applying comment about g_type_of_t
* Addressing comments
* Addressing comment: replace cmp_f by CompareF in perf.tests + add the default constructor for CompareF
* Fix typo
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
[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>
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
- 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
[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)
* 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
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
[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
[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
* G-API: Introduce ONNX backend for Inference
- Basic operations are implemented (Infer, -ROI, -List, -List2);
- Implemented automatic preprocessing for ONNX models;
- Test suite is extended with `OPENCV_GAPI_ONNX_MODEL_PATH` env for test data
(test data is an ONNX Model Zoo repo snapshot);
- Fixed kernel lookup logic in core G-API:
- Lookup NN kernels not in the default package, but in the associated
backend's aux package. Now two NN backends can work in the same graph.
- Added Infer SSD demo and a combined ONNX/IE demo;
* G-API/ONNX: Fix some of CMake issues
Co-authored-by: Pashchenkov, Maxim <maxim.pashchenkov@intel.com>
Expand ie::Params to support config
* Add config to IE params
* Add test
* Remove comments from tests
* Rename to pluginConfig
* Add one more overloads for pluginConfig
* Add more tests
Set queue size = 1 to Copy island right after the desync.
In this case, Copy won't read more data from a "last_written"
container than required, while feeding the desynchronized path.
Sometimes Copy don't get fused into an island and behaves
on its own -- in this case, it reads more data in advance
so the slow (desync) part actually processes some data in-sync
(more than actually required)
- cv::gapi::serialize bypasses compile arguments which have no S11N specialization with serialize/deserialize callbacks for underlying types
- cv::gapi::deserialize can accept arbitraty number of serialized compile args in a stream but will return only those which are requested by user via template parameter pack if they are presented in the stream. If some or all of them are not presented cv::gapi::deserialize will ignore and return only those which are presented
- cv::gapi::deserialize can accept only types which can be deserialized (have S11N<T> specialization with the user callbacks)
- Added cv::gapi::s11n::detail::has_S11N_spec<T> trait to separate compile arguments which have S11N<T> specialization with the user callbacks
- 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).
- Changed descr_of(RMat) to use canDescribeHelper to correctly handle planar case
- Added export of createMat
- Added setting of Storage::INPUT and Storage::OUTPUT in deserialization routine of GComputation
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
[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
[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
[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
[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
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
* 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
[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
[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
[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.
[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
[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
* 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>
* Added overload for `GArray<GMat>` ProtoParam in `gtyped.hpp`
* Tests+compile_args
- added tests for GArray<GMat> as an input and an output of GComputationT
- added possibility to give the compile_args to GComputationT.apply()
* Fix win errors
GAPI: Migration to IE Core API
* Migration to IE Core API
- both versions are maintained
- checked building with all the OpenVINO versions (2019.R1, R2, R3, 2020.4 (newest))
* commit to awake builders
* Addressing comments
- migrated to Core API in 'gapi_ie_infer_test.cpp'
- made Core a singleton object
- dropped redundant steps
* Addressing comments
- modified Mutex locking
* Update
* Addressing comments
- remove getInitMutex()
- reduce amount of #ifdef by abstracting into functions
* return to single IE::Core
* Divide functions readNet and loadNet to avoid warnings on GCC
* Fix deprecated code warnings
* Fix deprecated code warnings on CMake level
* Functions wrapped
- All the functions depended on IE version wrapped into a cv::gapi::ie::wrap namesapace
- All this contained to a new "giebackend/gieapi.hpp" header
- The header shared with G-API infer tests to avoid code duplications
* Addressing comments
- Renamed `gieapi.hpp` -> `giewrapper.hpp`, `cv::gapi::ie::wrap` -> `cv::gimpl::ie::wrap`
- Created new `giewrapper.cpp` source file to avoid potential "multiple definition" problems
- removed unnecessary step SetLayout() in tests
* Enabling two NN infer teest
* Two-NN infer test change for CI
- deleted additional network
- inference of two identical NN used instead
* Fix CI fileNotFound
* Disable MYRIAD test not to fail Custom CI runs
[G-API] Allow building graphs with a dynamic number of inputs and outputs
* Add dinamic graph feature and tests
* Remove unnecessary file
* Review response
* Add implementation of operator += for GRunArgs
And test for that case
* Tests refactoring
* Add doxygen
Review response
* Fix docs
* A small documentation fix
* Review response
* Add tests for more entities
* Add typed tests
* Another typed tests
* Doc fix
* Documentation fix
* Build fix
* Commit for rebuild
* The last one
* G-API: Introduce a new gapi::infer2 overload + gaze estimation sample
* G-API/infer2: Introduced static type checking for infer2
- Also added extra tests on the type check routine
* G-API/infer2: Addressed self-review comments in the sample app
- Also fix build on Linux;
* G-API/infer2: Remove incorrect SetLayout(HWC) + dead code
- Also fixed comments in the backend
* G-API/infer2: Continue with self-review
- Fix warnings/compile errors in gaze estimation
- Dropped the use of RTTI (VectorRef::holds()) from the giebackend
- Replaced it with a trait-based enums for GArray<T> and std::vector<T>
- The enums and traits are temporary and need to be unified with
the S11N when it comes
* G-API/infer2: Final self-review items
- Refactored ROIList test to cover 70% for infer<> and infer2<>;
- Fixed the model data discovery routine to be compatible with new
OpenVINO;
- Hopefully fixed the final issues (warnings) with the sample.
* G-API/infer2: address review problems
- Fixed typo in comments;
- Fixed public (Doxygen) comment on GArray<GMat> input case for infer2;
- Made model lookup more flexible to allow new & old OMZ dir layouts.
* G-API/infer2: Change the model paths again
* G-API/infer2: Change the lookup path for test data
* G-API/infer2: use randu instead of imread. CI war is over
G-API args serialization
* args serialization
* GRunArgP draft
* UMat added
* bind added
* DmitryM's review addressed. Code clean up required.
* fix android build
* bind test added
* more comments addressed
* try to fix Mac build
* clean up
* header-based generic implementation (GRunArg)
* clang again
* one more attempt for clang
* more clean up
* More Dmitry's comments addressed.
* monostate removed
* Top level functions and some other comments addressed.
* fix warnings
* disable warning