Commit Graph

54 Commits

Author SHA1 Message Date
SergeyIvanov87
f562264674 Add VAAPI into tests & VPL sample 2022-07-08 11:43:56 +03:00
luzpaz
554d08c3a1
Merge pull request #21775 from luzpaz:typos/gapi
* GAPI: fix various gapi related typos

Fixes source comments and documentation related to gapi code.

* Fix source typos

* Fixed typos requested

* Follow-up typo fix
2022-04-13 17:06:37 +00:00
Alexey Smirnov
7ed557497d
Merge pull request #21504 from smirnov-alexey:as/oak_infer
[GAPI] Support basic inference in OAK backend

* Combined commit which enables basic inference and other extra capabilities of OAK backend

* Remove unnecessary target options from the cmakelist
2022-04-05 21:00:32 +03:00
Sergey Ivanov
f3945fbddb
Merge pull request #21688 from sivanov-work:vpp_ie_integration
G-API: VPP preprocessing GIEBackend integration

* Add ROI in VPP prepro

* Apply comments

* Integration to IE

* Removed extra invocations

* Fix no-vpl compilation

* Fix compilations

* Apply comments

* Use thin wrapper for device & ctx

* Implement Device/Context constructor functions

* Apply samples comment

* Fix compilation

* Fix compilation

* Fix build

* Separate Device&Context from selector, apply other comments

* Fix typo

* Intercept OV exception with pretty print out
2022-04-01 10:06:47 +00:00
Anatoliy Talamanov
9390c56831
Merge pull request #21782 from TolyaTalamanov:at/fix-1d-mat-problems
[G-API] Fix problems with 1D cv::Mat as graph output

* Fix issues with 1D cv::Mat

* Fix cv::Mat::create

* Fix standalone build

* Add test on 1d mat

* Fix warning

* Add additional condition

* Add more tests
2022-03-31 21:00:45 +00:00
Anatoliy Talamanov
9dd8e4df7f
Merge pull request #21719 from TolyaTalamanov:at/pipeline_modeling_tool-skip-frames-for-nodes
[G-API] Pipeline modeling tool: Skip frames

* Add skip feature

* Refactoring

* Fix warning

* Put more comments

* Fix comments to review

* Agregate common params into structure

* Fix warning

* Clean up & add test

* Add assert

* Fix warning on Mac

* Update modules/gapi/samples/pipeline_modeling_tool.cpp

Co-authored-by: Dmitry Matveev <dmitry.matveev@intel.com>
2022-03-25 08:22:45 +00:00
Anatoliy Talamanov
e5f2a8ebf2
Merge pull request #21636 from TolyaTalamanov:at/gapi_modeling_tool_drop_frames
[G-API] Pipeline modeling tool - support frame dropping for source

* Implement drop frames functionality for dummy src

* Reconsider frame dropping

* Fix comments
2022-03-15 18:27:39 +03:00
Sergey Ivanov
8f1c502d2b
Merge pull request #21618 from sivanov-work:vpp_preproc_core
G-API: Add VPL/VPP preproc core module

* Add BaseMediAdapter for VPL

* Add PreprocSession & PreprocEngine interface part

* Implement preproc UT, Fix base path

* Add common PP interface, add common pp_params

* Rough decoupling VPL & Preproc

* Add syntax sugar for PP interface

* Integrate VPP preproc in GIEbackend

* Add PP bypass

* Add perf tests for PP

* Fix warning in vpl core UT

* Add inner preproc resolution Unit Test

* Remove VPP preproc description from single ROI sample

* Apply SetROIBlob for diferent Infer operations

* Eliminate extra branch-lines for cfg_param_parser & transcode_engine

* Fix UT warning &PreprocSession compile

* Fix compilation & warnings

* Reduce Session&Engine code amount

* Apply some comments

* Revert IE changes, rename preproc

* Fix for DX11 infer for OV: turn off texture array

* Remove dependency PP on IE

* Change fixture tests params

* Apply other comments & turn off ROI for GPU

* Fix compilation: remove forgotten INFER define

* Apply debt comments

* Fix PP UTs: add FrameInfo value comparator

* Fix style

* Remove standalone map for preproc frames storage

* Add other comments
2022-02-24 10:35:52 +00:00
Anatoliy Talamanov
619b6dfae3
Merge pull request #21579 from TolyaTalamanov:at/handle-errors-in-iebackend
[G-API] Handle errors in IEBackend & modeling tool

* Handle errors in IEBackend & modeling tool

* Handle exceptions in callback

* Add const cv to exception
2022-02-09 16:52:23 +00:00
Anatoliy Talamanov
08356007c9
Merge pull request #21566 from TolyaTalamanov:at/gapi-modeling-tool_fix_handling_fp16_precision
[G-API] Pipeline modeling tool - Fix generating FP16 Mat

* Fix handling fp16 precision

* Disable preproc in case FP16 input inside IE backend

* Fix isApplicableForResize function
2022-02-07 16:48:43 +00:00
Anatoliy Talamanov
a92cba8484
Merge pull request #21477 from TolyaTalamanov:at/pipeline-builder-tool
[G-API] Implement G-API pipeline modeling tool

* Implement G-API pipeline builder tool

* Remove whitespaces from config

* Remove unused unittest stuff

* Fix comments to review

* Fix MAC warning

* Rename to pipeline_modeling_tool

* Move to opencv apps

* Move config to gapi/samples/data

* gapi: samples sources are installed automatically
2022-02-01 16:32:56 +03:00
Sergey Ivanov
266835cd2e
Merge pull request #21232 from sivanov-work:vpl_gpu_remote_infer
G-API: oneVPL DX11 inference

* Draft GPU infer

* Fix incorrect subresource_id for array of textures

* Fix for TheOneSurface in different Frames

* Turn on VPP param configuration

* Add cropIn params

* Remove infer sync sample

* Remove comments

* Remove DX11AllocResource extra init

* Add condition for NV12 processing in giebackend

* Add VPP frames pool param configurable

* -M Remove extra WARN & INFOs, Fix custom MAC

* Remove global vars from example, Fix some comments, Disable blobParam due to OV issue

* Conflict resolving

* Revert back pointer cast for cv::any
2022-01-24 17:05:26 +03:00
Alexey Smirnov
f2d5d6d24e
Merge pull request #20785 from smirnov-alexey:as/oak_backend
GAPI: Add OAK backend

* Initial tests and cmake integration

* Add a public header and change tests

* Stub initial empty template for the OAK backend

* WIP

* WIP

* WIP

* WIP

* Runtime dai hang debug

* Refactoring

* Fix hang and debug frame data

* Fix frame size

* Fix data size issue

* Move test code to sample

* tmp refactoring

* WIP: Code refactoring except for the backend

* WIP: Add non-camera sample

* Fix samples

* Backend refactoring wip

* Backend rework wip

* Backend rework wip

* Remove mat encoder

* Fix namespace

* Minor backend fixes

* Fix hetero sample and refactor backend

* Change linking logic in the backend

* Fix oak sample

* Fix working with ins/outs in OAK island

* Trying to fix nv12 problem

* Make both samples work

* Small refactoring

* Remove meta args

* WIP refactoring kernel API

* Change in/out args API for kernels

* Fix build

* Fix cmake warning

* Partially address review comments

* Partially address review comments

* Address remaining comments

* Add memory ownership

* Change pointer-to-pointer to reference-to-pointer

* Remove unnecessary reference wrappers

* Apply review comments

* Check that graph contains only one OAK island

* Minor refactoring

* Address review comments
2022-01-17 22:56:01 +00:00
Sergey Ivanov
b70370f3fd
Merge pull request #21230 from sivanov-work:gapi_win32_vpl_fix
G-API: Fix Win32 build: uint64_t ->size_t

* Fix Win32 build: uint64_t ->size_t

* Fix for MAC
2021-12-10 08:58:59 +00:00
Sergey Ivanov
5c91f5b71d
Merge pull request #21049 from sivanov-work:vpl_dx11_merge
G-API: oneVPL merge DX11 acceleration

* Merge DX11 initial

* Fold conditions row in MACRO in utils

* Inject DeviceSelector

* Turn on DeviceSelector in DX11

* Change sharedLock logic & Move FMT checking in FrameAdapter c-tor

* Move out NumSuggestFrame to configure params

* Drain file source fix

* Fix compilation

* Force zero initializetion of SharedLock

* Fix some compiler warnings

* Fix integer comparison warnings

* Fix integers in sample

* Integrate Demux

* Fix compilation

* Add predefined names for some CfgParam

* Trigger CI

* Fix MultithreadCtx bug, Add Dx11 GetBlobParam(), Get rif of ATL CComPtr

* Fix UT: remove unit test with deprecated video from opencv_extra

* Add creators for most usable CfgParam

* Eliminate some warnings

* Fix warning in GAPI_Assert

* Apply comments

* Add VPL wrapped header with MSVC pragma to get rid of global warning masking
2021-12-08 07:09:33 +00:00
Maxim Pashchenkov
b95d71af2b
Merge pull request #21106 from mpashchenkov:mp/ocv-gapi-clean-samples
G-API: Cleaning samples

* parseSSD + removed render details from gcpukernel

* self-rev

* Applying comment

* Added operators

* warnings
2021-11-26 14:31:15 +03:00
Trutnev Aleksei
b525480b25
Merge pull request #20857 from alexgiving:atrutnev/move_API_samples
Move API sample code to tutorial_code location
2021-11-12 14:17:21 +00:00
Sergey Ivanov
da6344297a
Merge pull request #20901 from sivanov-work:merge_source_unite_perf_mod
G-API: oneVPL - Performance: Add async decode pipeline & add cached pool

* Add async decode pipeline & intro cached pool

* Fix performacne test with checking OPENCV_EXTRA

* Add sip perf test with no VPL

* Fix misprint

* Remove empty line..

* Apply some comments

* Apply some comments

* Make perf test fail if no OPENCV_TEST_DATA_PATH declared
2021-11-10 13:21:51 +00:00
Sergey Ivanov
d376fe9e17
Merge pull request #20921 from sivanov-work:atl_patch
G-API: FIX OpenVINO build - Add CComPtr RAII replacement into G-API sample

* Add CComPtr RAII replacement into G-API sample

* Remove completely `atlbase.h'
2021-10-21 16:12:03 +00:00
Sergey Ivanov
1f9a7b8fd3
Merge pull request #20738 from sivanov-work:merge_master_vpl_dev_select
G-API: oneVPL - Implement IDeviceSelector & default cfg_param-based selector

* Initial commit

* Add MACRO undef

* Change IDeviceSelector, Change Inf sample for choose external device

* Fix compilation

* Address some comments

* Fix compilation

* Add missing header

* Add EXPORT to dev selector

* Add guard

* Remove enum type attr

* Fix compilation without VPL

* Add HAVE_INFER guard in sample

* Remove unusable include from tests

* Remove unusable include from sample

* Remove cl_d3d11 header from unit test
2021-10-20 12:43:32 +03:00
Sergey Ivanov
0cf79155d4
Merge pull request #20773 from sivanov-work:merge_vpl_source_unite
G-API: oneVPL (simplification) unite components in entire VPL source

* Unify components in VPLSource

* Revert back decode WRN & Add compile guard

* Address come comments

* Add source alias

* Apply comment for exception handling
2021-10-18 19:20:55 +03:00
Sergey Ivanov
65ef82a946
Merge pull request #20570 from sivanov-work:vpl_source_data_adapter
G-API: oneVPL (simplification) Add data adapter & Cfg params

* Add cfg_param & data_provider

* Fix compilation after rebase

* Apply some comments

* Apply default ctor outside class definition comment

* Apply cfg param in source

* Fix compilation: add virtual dtor

* Move cfg_params in regular gapi src list

* Fix compilation: add export.hpp

* Add errno.h

* Add errno.h

* Apply namespace comment

* Add several Doxygen & rename cfg_param

* Fix build

* Update Doxygen docs for onevpl

* Fix typo
2021-08-24 15:41:57 +03:00
Sergey Ivanov
46fb88c76f
Merge pull request #20546 from sivanov-work:initial_vpl_source
G-API: oneVPL (simplification) source base commit

* oneVPL source initial

* Fix compilation

* Fix compilation path

* Fix NO VPL compile

* Fix unused vars

* Fix unused vars in example

* Simplify oneVPL search: no custom path & download

* Fix standalone GAPI

* Apply comments
2021-08-17 20:11:22 +03:00
Anatoliy Talamanov
24de676a64
Merge pull request #20476 from TolyaTalamanov:at/support-unet-camvid-0001-segm-sample
[G-API] Support postprocessing for not argmaxed outputs

* Support postprocessing for not argmaxed outputs

* Fix typo

* Add assert

* Remove static cast

* CamelCast to snake_case

* Fix windows warning

* Add static_cast to uint8_t

* Add const to variables
2021-08-06 10:26:49 +00:00
Dmitry Budnikov
ba0cea6826
Merge pull request #20474 from dbudniko:dbudniko/mtcnn_graph_without_resizes
Remove explicit PNet resizes from MTCNN graph

* remove PNet resizes

* address comment from Ruslan
2021-08-02 10:58:18 +00:00
Dmitry Budnikov
aae48e6fd7 single transpose MTCNN version 2021-07-22 16:52:11 +03:00
Dmitry Budnikov
a7742d7d63
Merge pull request #20383 from dbudniko:dbudniko/mtcnn_1st_pnet_simplification
MTCNN 1st pnet simplification to ensure single graph input

* 1st pnet simplification to ensure single graph input

* address comment from Dmitry M regarding unused variable
2021-07-13 19:33:13 +00:00
Alexey Smirnov
59ae0e0013
Merge pull request #20163 from smirnov-alexey:as/gapi_serialization_docs
G-API: add documentation on serialization functionality

* Add documentation on serialization/deserialization

* Add docs on bind() methods

* Fix typo

* Docs refactoring

* Fix s11n docs

* Fix deserialize() docs

* Change deserialize docs

* Fix warning

* Address review comments

* Fix sample

* Fix warnings and errors

* Fix docs warnings

* Fix warnings

* Address review comments

* Add prefixes to snippets and fix indentation

* Address review comments and move snippets to a single file
2021-07-07 19:07:59 +00:00
Alexander Alekhin
b3db37b99d Merge pull request #20238 from dmatveev:dm/gframe_docs 2021-06-16 15:06:04 +00:00
Dmitry Matveev
415668ecf0 G-API: Documentation updates
1) Document GFrame/MediaFrame (and also other G-API types)
- Added doxygen comments for GMat, GScalar, GArray<T>, GOpaque classes;
- Documented GFrame and its host-side counterpart MediaFrame;
- Added some more notes to the data type classes.

2) Give @brief descriptions to most of the cv::gapi::* namespaces

3) Make some symbols private
- These structures are mainly internal and shouldn't be used directly
2021-06-16 01:01:55 +03:00
Dmitry Budnikov
4c2dff88de
Merge pull request #20245 from dbudniko:dbudniko/mtcnn_roi_size_hotfix
Hot fix negative MTCNN PNet ROI coordinates

* fix negative roi start

* some more experiments

* clean up
2021-06-09 10:28:32 +00:00
Dmitry Budnikov
826fdaf06c
Merge pull request #20189 from dbudniko:dbudniko/mtcnn_sample_with_regular_transpose_kernel
Remove custom transpose kernel from MTCNN sample
2021-06-02 16:26:22 +00:00
Maxim Pashchenkov
2610724ee0
Merge pull request #20157 from mpashchenkov:mp/ocv-gapi-pnetworks
G-API: Python. Wrapper for networks.

* Python networks

* Added pyopencv_to

* Changed work with pyopencv_to
2021-06-01 14:42:44 +00:00
Dmitry Budnikov
cf96a9fd27
Merge pull request #20155 from dbudniko:dbudniko/G-API_mtcnn_demo_queue_option
Add streaming queue capacity option choice to MTCNN G-API sample

* Add streaming queue capacity option

* trying to fix mac build

* rename face detection sample
2021-05-27 18:50:13 +03:00
Dmitry Budnikov
4753206783
Merge pull request #20065 from dbudniko:dbudniko/G-API_mtcnn_demo_PR_hotfix2
G-API MTCNN demo hotfix to align overall pipeline accuracy with the reference Python code output.

* MTCNN G-API demo aligned with Python from OMZ

* clean up

* more comments from Maxim are addressed.

* address comment from Dmitry
2021-05-18 10:58:08 +00:00
Dmitry Budnikov
a53582d706
Merge pull request #19923 from dbudniko:dbudniko/G-API_mtcnn_demo_PR
G-API MTCNN sample

* add face detection demo

* clean up

* enable back accumulate

* additional input

* meta args workaround

* additional arg

* add init

* roll back

* fix shadowing

* roll back

* clean up and PNet copy from debug branch which now works

* try nets operator

* more clean up

* more clean up

* add 6 layers pyramid experimental code

* final clean up and ready for PR

* original image resize

* Remove Pnet declarations. Generic infer is used now.

* scales and sizes calculation added

* fix assert, and add ceil to size calculation

* try doubles for scales

* Address comments from Dmitry.

* use half scale option

* fix half scale

* clean up debug outputs

* try to get input image width and height

* clean up

* trailing spaces and review from Maxim

* more comments from Maxim are addressed

* try to fix warnings

* try to fix warnings and address more comments from Dmitry

* crop fix and clean up

* more warnings fixes

* more warnings fixes

* more comments from Maxim are addressed

* even more consts

* copy_n for regressions

* address more comments from Dmitry

* more comments from Maxim
2021-04-23 10:26:53 +00:00
Maxim Pashchenkov
e7007668a6
Merge pull request #19792 from mpashchenkov:mp/ie-add-int32
G-API: IE. Adding support for INT32 type.

* Added support for int32

* Added sample for semantic-segmentation-adas-0001

* Alignment

* Alignment 2

* Rstrt build

* Removed test for sem seg
2021-03-29 20:59:55 +00:00
Dmitry Matveev
a110ede0a2
Merge pull request #18716 from dmatveev:dm/upstream_onnx
* 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>
2020-11-03 18:39:16 +00:00
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
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
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
Pinaev Danil
cb2e276bff
Merge pull request #17741 from aDanPin:dp/add_dinamic_graph_feature
[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
2020-07-15 18:37:08 +00:00
Dmitry Matveev
f0c411d8b5
Merge pull request #17502 from dmatveev:dm/infer2
* 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
2020-07-14 11:06:49 +03:00
Dmitry Matveev
a724dc99e8 G-API: Change the default FD model in the privacy-masking-camera 2020-07-09 14:09:59 +03:00
Rajkiran Natarajan
b17e9c614b Fix annoying compiler warning. 2020-02-26 22:59:02 -08:00
Dmitry Matveev
dae1fc8889
Merge pull request #16555 from dmatveev:dm/ocv_blog_sample
* G-API/Samples: Added a simple "privacy masking camera" sample

The main idea is to host this code for an opencv.org blog post only

* G-API/Samples: Modified privacy masking camera code to look better for the post

* G-API/Samples: fix Windows (MSVC) support in Privacy Masking Camera

* G-API/Samples: Addressed the majority of review comments in PMC

* G-API/Samples: Use TickMeter to measure time + more info in cmd options

* G-API/Samples: fix yet another Windows warning in PMC

* G-API/Samples: Fix wording in PMC cmd arg parameters

* Fix wording, again

* G-API/Samples: Fix PMC cmd-line arguments, again
2020-02-18 15:11:44 +03:00
Brian Wignall
659ffaddb4 Fix spelling typos 2019-12-26 06:45:03 -05:00
Orest Chura
287874a444 Merge pull request #15942 from OrestChura:fb_tutorial
G-API: Tutorial: Face beautification algorithm implementation

* Introduce a tutorial on face beautification algorithm

- small typo issue in render_ocv.cpp

* Addressing comments rgarnov smirnov-alexey
2019-12-17 11:00:49 +03:00
Dmitry Matveev
f270e8d040 Merge pull request #16066 from dmatveev:dm/gapi_slides
* G-API: Added G-API Overview slides & its source code

- Sample code snippets are moved to separate files;
- Introduced a separate benchmark to measure Fluid/OpenCV
  performance;
- Added notes on API changes (it is still a 4.0, not a 4.2 talk!)
- Added a "Metropolis" beamer download-n-build script.

* G-API: Addressed review issues on G-API overview slides
2019-12-12 18:48:38 +03:00
Dmitry Matveev
b2b6f52d14 Merge pull request #16050 from dmatveev:dm/ocv42_gapi_doc_fixup
* G-API: Addressed various documentation issues

- Fixed various typos and missing references;
- Added brief documentaion on G_TYPED_KERNEL and G_COMPOUND_KERNEL macros;
- Briefly described GComputationT<>;
- Briefly described G-API data objects (in a group section).

* G-API: Some clean-ups in doxygen, also a chapter on Render API

* G-API: Expose more graph compilation arguments in the documentation

* G-API: Address documentation review comments
2019-12-06 15:36:02 +03:00