Commit Graph

1941 Commits

Author SHA1 Message Date
Alexander Alekhin
effce0573b dnn: drop legacy Inference Engine NN builder API 2022-02-10 11:55:24 +00:00
Alexander Alekhin
57d3002ee1 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-02-06 16:10:43 +00:00
Alexander Alekhin
a00a0dbfcd Merge pull request #21564 from alalek:dnn_fix_openvino_outputs 2022-02-06 16:06:23 +00:00
Alexander Alekhin
b41d2c5c14 Merge pull request #21569 from alalek:fixup_18031 2022-02-06 16:04:38 +00:00
Alexander Alekhin
1da48beeec dnn(ngraph): fix output names 2022-02-06 13:08:53 +00:00
Alexander Alekhin
b57ff73086 dnn(ngraph): fix outputs handling, drop 'unconnected' logic 2022-02-06 13:08:53 +00:00
Alexander Alekhin
67978b5746 dnn(ngraph): add debuging messages 2022-02-06 13:08:53 +00:00
Alexander Alekhin
062f305d1a dnn: don't fuse 'outputs' with OpenVINO backend 2022-02-06 13:08:53 +00:00
Alexander Alekhin
1f70d4e2a5 dnn(test): re-enable ONNX split tests for OpenVINO 2022-02-06 10:36:15 +00:00
Alexander Alekhin
aa5bc20c83 dnn(ngraph): fixup get_output_as_single_output_node() replacement patch 2022-02-06 10:35:59 +00:00
Maksim Shabunin
d1e76a34a0 3.4: Use modern OpenVINO package interface
original commit: 437af37b13
2022-02-02 09:04:03 +00:00
Maksim Shabunin
437af37b13 Use modern OpenVINO package interface 2022-02-01 16:52:17 +00:00
Alexander Alekhin
870c8d3c4e dnn(test): fix int8 tolerances 2022-01-31 12:54:01 +00:00
Alexander Alekhin
d573472a86 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-01-31 12:53:45 +00:00
Alexander Alekhin
a7e6a1059c dnn(test): fix outputs handling in ONNX conformance
- ONNX output is 1 tensor per defined output instead of N tensors from outputs of "output" layer
2022-01-29 23:29:51 +00:00
Alexander Alekhin
85719a0a5d dnn: support outputs registration under new names
- fixed ONNX importer
2022-01-29 23:29:51 +00:00
Alexander Alekhin
dc35633aa4 Merge pull request #21521 from alalek:dnn_ignore_denormals 2022-01-28 15:31:44 +00:00
Zihao Mu
9e3ba487fa
Merge pull request #21518 from zihaomu:resize_onnx_opset13
Add resize layer compatible with ONNX opset13 version
2022-01-28 17:55:01 +03:00
Alexander Alekhin
9188ce68aa Merge pull request #21490 from rogday:optional_outputs 2022-01-26 15:18:07 +00:00
Alexander Alekhin
70b0274c8e dnn: apply hint to ignore denormals processing 2022-01-26 11:28:35 +00:00
Alexander Alekhin
b796ededae Merge pull request #21437 from alalek:dnn_api_explicit_const_4.x 2022-01-21 20:19:50 +00:00
Alexander Alekhin
eb7b45d26b dnn: fix API - explicit ctors, const methods 2022-01-21 12:38:51 +00:00
Smirnov Egor
17b2d92a3d add optional outputs support and fix graph links 2022-01-21 12:31:46 +03:00
Alexander Alekhin
6ffa2b01e1 Merge pull request #21357 from rogday:model_diag 2022-01-18 15:50:11 +00:00
rogday
0fe7420638 fix model diagnostic tool 2022-01-18 01:22:22 +03:00
Alexander Alekhin
b304730225 dnn: fix API - explicit ctors, const methods 2022-01-17 21:45:29 +00:00
Maksim Shabunin
d5f73f89d8 Fixed issues found by static analysis 2022-01-13 14:51:25 +03:00
Alexander Alekhin
aebb65e983 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-01-12 13:26:10 +00:00
Alexander Alekhin
80d9f624d0 dnn: don't use aligned load without alignment checks
- weights are unaligned in dasiamprn sample (comes from numpy)
2022-01-12 05:11:18 +00:00
Alexander Alekhin
76fb3652fc dnn(ocl): fix fp16 kernel compilation 2021-12-29 19:58:25 +00:00
Alexander Alekhin
9699e2b483 dnn(onnx): handle non-default ONNX domains
- re-enable quantized models tests
2021-12-25 01:38:52 +00:00
Alexander Alekhin
217fea9667 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-12-24 16:48:07 +00:00
Alexander Alekhin
cdd4354256 Merge pull request #21336 from alalek:dnn_pooling_check_array_indexes 2021-12-24 08:35:11 +00:00
Alexander Alekhin
6385511e88 dnn: add checks in pooling layer implementation
- to avoid out of buffer access
2021-12-24 00:15:30 +00:00
Alexander Alekhin
ed4becf007 dnn(onnx): debug dump of inputs/outputs/initializers in importer 2021-12-23 21:11:40 +00:00
Alexander Alekhin
f5589445b9 Merge pull request #21322 from alalek:dnn_catch_errors 2021-12-23 20:09:22 +00:00
Alexander Alekhin
011ed380aa Merge pull request #21323 from alalek:dnn_do_not_rebuilt_network_in_setInput 2021-12-23 15:45:28 +00:00
Alexander Alekhin
88a18c8b6a dnn(onnx): emit error in Shape for dynamic input 2021-12-23 15:42:59 +00:00
Alexander Alekhin
51e65db715 dnn(onnx): fix Resize inputs handling 2021-12-23 15:42:59 +00:00
Alexander Alekhin
cc02fcd889 dnn: improve debug messages, add ONNX opset version 2021-12-23 15:42:59 +00:00
Alexander Alekhin
c408157a4d dnn: do not try to rebuilt network during setInput()
- this doesn't make sense in case of multiple inputs
2021-12-23 02:40:33 +00:00
Alexander Alekhin
6e299b582a dnn(test): decompose 'DynamicAxes' test 2021-12-23 00:47:27 +00:00
Alexander Alekhin
9777fbacf6 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-12-22 15:57:02 +00:00
Alexander Alekhin
c78a8dfd2d fix 4.x links 2021-12-22 13:24:30 +00:00
Alexander Alekhin
b1a57c4cb2 fix 3.4 links 2021-12-22 12:38:21 +00:00
rogday
0a178a687a fix const/x in Div 2021-12-20 19:53:37 +03:00
Alexander Alekhin
80492d663e Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-12-18 16:19:06 +00:00
Alexander Alekhin
172c539a5a Merge pull request #21281 from alalek:update_version_4.5.5-pre 2021-12-18 13:46:38 +00:00
Alexander Alekhin
a079acc0d9 Merge pull request #21280 from alalek:update_version_3.4.17-pre 2021-12-18 13:46:29 +00:00
Smirnov Egor
71a22e45b0 add celu, hardsigmoid, selu, thresholdedrelu layers 2021-12-18 03:19:54 +03:00
Alexander Alekhin
04ee99f1a3 Merge pull request #21282 from alalek:dnn_test_vulkan_skip 2021-12-17 19:39:35 +00:00
Smirnov Egor
1bd382c1d0 Add acos, acosh, asin, asinh, atan, atanh, cos, cosh, erf, hardswish, sin, sinh, softplus, softsign, tan layers 2021-12-17 18:19:40 +03:00
Alexander Alekhin
249c508126 dnn(test): skip failed tests on Vulkan backend 2021-12-17 14:01:04 +00:00
Smirnov Egor
fec2c7e715 fix Flatten layer 2021-12-17 16:29:56 +03:00
Alexander Alekhin
07dca8cc03 pre: OpenCV 4.5.5 (version++) 2021-12-17 10:12:11 +00:00
Alexander Alekhin
60c093f086 pre: OpenCV 3.4.17 (version++) 2021-12-17 10:05:52 +00:00
Alexander Alekhin
622b9d9276 Merge pull request #21267 from mshabunin:fix-kw-2021-12 2021-12-16 18:51:47 +00:00
Gruhuang
b4bb98ea60
Merge pull request #21268 from pccvlab:tf_Arg
add argmax and argmin parsing for tensorflow

* add argmax and argmin for tf

* remove whitespace

* remove whitespace

* remove static_cast

Signed-off-by: Crayon-new <1349159541@qq.com>
2021-12-16 17:06:02 +00:00
Maksim Shabunin
792b7e0629 (3.4) Fixed several issues found by static analysis
original commit: a079c2eb7c
2021-12-16 17:02:58 +00:00
Maksim Shabunin
a079c2eb7c Fixed several issues found by static analysis 2021-12-16 19:21:25 +03:00
Alexander Alekhin
6d677bbd63 dnn(test): update ONNX conformance filters (4.x) 2021-12-16 12:09:31 +00:00
Alexander Alekhin
299f9837b7 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-12-15 16:38:56 +00:00
Alexander Alekhin
f3ba88c87c dnn(test): update ONNX conformance filters 2021-12-15 12:53:53 +00:00
Smirnov Egor
e97c7e042b fix max_unpool missing attributes, add default value of keepdims in reducemean/max/sum, add support for keepdims=true in full reduction branch, add new padding type to Pad 2021-12-14 22:09:27 +03:00
rogday
4827fe86bb
Merge pull request #21088 from rogday:onnx_tests
Onnx conformance tests

* Add ONNX conformance tests

* dnn(test): add filters for ONNX conformance tests

* add filter lists for OCV backend

* address review comments

* move test_clip_inbounds to all_denylist

* address clip issue

* avoid empty lists

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
2021-12-14 16:58:06 +00:00
cqn2219076254
252ce0b581 add square layer 2021-12-13 21:43:13 +08:00
Alexander Alekhin
6e50e4b9ee Merge pull request #21161 from rogday:elu_alpha_4x 2021-12-10 16:04:01 +00:00
HAN Liutong
1599f9f0c0
Merge pull request #21086 from hanliutong:rvv-dnn
Further optimize DNN for RISC-V Vector.

* Optimize DNN on RVV by using vsetvl.

* Rename vl.

* Update fastConv by using setvl instead of mask.

* Fix fastDepthwiseConv
2021-12-10 16:03:22 +00:00
Gruhuang
17bc8565f6
Merge pull request #21154 from pccvlab:MatMul_with_two_inputs
Add BatchMatMul layer support for tf_importer

* two inputs

* support batch_matmul

* refactor: remove useless code

* refactor: decrease nesting
2021-12-10 14:44:27 +03:00
Smirnov Egor
e608adea60 add ArgMax and ArgMin layers 2021-12-06 20:49:54 +03:00
Alexander Alekhin
73318fd514 Merge pull request #21167 from alalek:dnn_test_reenable_ov_2021_4 2021-12-04 22:12:18 +00:00
HAN Liutong
4935b14539
Merge pull request #21012 from hanliutong:rvv_clang
Update RVV backend for using Clang.

* Update cmake file of clang.

* Modify the RVV optimization on DNN to adapt to clang.

* Modify intrin_rvv: Disable some existing types.

* Modify intrin_rvv: Reinterpret instead of load&cast.

* Modify intrin_rvv: Update load&store without cast.

* Modify intrin_rvv: Rename vfredsum to fredosum.

* Modify intrin_rvv: Rewrite Check all/any by using vpopc.

* Modify intrin_rvv: Use reinterpret instead of c-style casting.

* Remove all macros which is not used in v_reinterpret

* Rename vpopc to vcpop according to spec.
2021-12-03 15:13:24 +00:00
Alexander Alekhin
0835611d3a dnn(test): re-enable tests which works with OpenVINO 2021.4.x 2021-12-03 14:01:30 +00:00
Alexander Alekhin
8b4fa2605e Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-12-03 12:32:49 +00:00
Alexander Alekhin
35ff9af6ce Merge pull request #21162 from rogday:softmax_simplification 2021-12-02 17:14:48 +00:00
Alexander Alekhin
dad2b9aac8 Merge pull request #21160 from rogday:elu_alpha 2021-12-02 17:13:57 +00:00
rogday
1613d30544
Merge pull request #21159 from rogday:ceil_mode
fix ceil_mode for Average/MaxPooling

* fix ceil_mode

* add a comment
2021-12-02 20:11:11 +03:00
Alexander Alekhin
b9d0dc60b0 Merge pull request #21173 from alalek:3.4_dnn_test_reenable_ov_2021_4 2021-12-02 16:33:15 +00:00
Alexander Alekhin
d206350738 Merge pull request #21172 from alalek:dnn_test_drop_non_cpu_int8 2021-12-02 13:50:04 +00:00
Alexander Alekhin
bd396e1fd5 dnn(test): re-enable tests which works with OpenVINO 2021.4.x (3.4) 2021-12-02 11:30:45 +00:00
Alexander Alekhin
f55c9ed1ba dnn(test): drop non OCV/CPU cases for Int8
- zero code coverage and up to x3-x8 tests slowdown
- implementation executes OCV/CPU in all cases
- wrong skip conditions
2021-12-02 06:27:10 +00:00
Alexander Alekhin
5da69c0b9a Merge pull request #21164 from rogday:sum_identity 2021-12-01 22:49:02 +00:00
Alexander Alekhin
a806e8cc58 Merge pull request #21163 from rogday:transpose_default 2021-12-01 22:47:57 +00:00
Alexander Alekhin
d9e7c1626a Merge pull request #21153 from alalek:build_warnings_msvs2017 2021-12-01 12:49:28 +00:00
Smirnov Egor
33e97e994d add sum of 1 input 2021-11-30 15:42:20 +03:00
Smirnov Egor
11e6848bb9 add default order to transpose 2021-11-30 15:34:34 +03:00
Smirnov Egor
829410729c add new (Log)SoftMax simplification passes 2021-11-30 15:20:52 +03:00
Smirnov Egor
4995aecd62 add alpha parameter to ELU 2021-11-30 14:43:18 +03:00
Smirnov Egor
0e2a3686c0 add alpha parameter to ELU layer 2021-11-30 12:20:35 +03:00
Alexander Alekhin
66b2140892 build: eliminate C4309 warning from protobuf files with MSVS2017 2021-11-30 04:27:39 +00:00
Alexander Alekhin
0d2857a242 Merge pull request #21152 from rogday:fix_defaults 2021-11-29 22:39:27 +00:00
Alexander Alekhin
17d99e6266 Merge pull request #21142 from alalek:dnn_two_inputs_ocl_fp16_3.4 2021-11-29 21:44:59 +00:00
Andrew Ryrie
ea7d4be3f8
Merge pull request #20658 from smbz:lstm_optimisation
* dnn: LSTM optimisation

This uses the AVX-optimised fastGEMM1T for matrix multiplications where available, instead of the standard cv::gemm.

fastGEMM1T is already used by the fully-connected layer.  This commit involves two minor modifications:
 - Use unaligned access.  I don't believe this involves any performance hit in on modern CPUs (Nehalem and Bulldozer onwards) in the case where the address is actually aligned.
 - Allow for weight matrices where the number of columns is not a multiple of 8.

I have not enabled AVX-512 as I don't have an AVX-512 CPU to test on.

* Fix warning about initialisation order

* Remove C++11 syntax

* Fix build when AVX(2) is not available

In this case the CV_TRY_X macros are defined to 0, rather than being undefined.

* Minor changes as requested:

 - Don't check hardware support for AVX(2) when dispatch is disabled for these
 - Add braces

* Fix out-of-bounds access in fully connected layer

The old tail handling in fastGEMM1T implicitly rounded vecsize up to the next multiple of 8, and the fully connected layer implements padding up to the next multiple of 8 to cope with this.  The new tail handling does not round the vecsize upwards like this but it does require that the vecsize is at least 8.  To adapt to the new tail handling, the fully connected layer now rounds vecsize itself at the same time as adding the padding(which makes more sense anyway).

This also means that the fully connected layer always passes a vecsize of at least 8 to fastGEMM1T, which fixes the out-of-bounds access problems.

* Improve tail mask handling

 - Use static array for generating tail masks (as requested)
 - Apply tail mask to the weights as well as the input vectors to prevent spurious propagation of NaNs/Infs

* Revert whitespace change

* Improve readability of conditions for using AVX

* dnn(lstm): minor coding style changes, replaced left aligned load
2021-11-29 21:43:00 +00:00
Smirnov Egor
05db8784ae fix Clip, LeakyReLU, LRN, Split defaults 2021-11-29 20:20:34 +03:00
Supernovae
b594ed99b8
Merge pull request #20933 from shubham-shahh:master
Improved overall readability of the code

* grid_nms.cu: minor fix-ups

* Update grid_stride_range.hpp

* Update tf_importer.cpp
2021-11-28 12:54:29 +00:00
Alexander Alekhin
58b06222ff dnn(DataLayer): fix CPU/OpenCL code paths for FP16 handling 2021-11-28 07:44:05 +00:00
Alexander Alekhin
58dc397930 dnn(test): add two_inputs test with FP32/U8 data types
- remove similar test from IE scope under HAVE_INF_ENGINE
2021-11-28 07:44:04 +00:00
yuki takehara
a6277370ca
Merge pull request #21107 from take1014:remove_assert_21038
resolves #21038

* remove C assert

* revert C header

* fix several points in review

* fix test_ds.cpp
2021-11-27 18:34:52 +00:00
Alexander Alekhin
31b2d6be75 dnn(test): update InferenceEngine tests (4.x) 2021-11-27 18:16:52 +00:00
Alexander Alekhin
57ee14d62d Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-11-27 16:50:55 +00:00
Alexander Alekhin
985aa0423d dnn(test): update InferenceEngine tests 2021-11-26 18:46:26 +00:00
Hanxi Guo
1fcf7ba5bc
Merge pull request #20406 from MarkGHX:gsoc_2021_webnn
[GSoC] OpenCV.js: Accelerate OpenCV.js DNN via WebNN

* Add WebNN backend for OpenCV DNN Module

Update dnn.cpp

Update dnn.cpp

Update dnn.cpp

Update dnn.cpp

Add WebNN head files into OpenCV 3rd partiy files

Create webnn.hpp

update cmake

Complete README and add OpenCVDetectWebNN.cmake file

add webnn.cpp

Modify webnn.cpp

Can successfully compile the codes for creating a MLContext

Update webnn.cpp

Update README.md

Update README.md

Update README.md

Update README.md

Update cmake files and

update README.md

Update OpenCVDetectWebNN.cmake and README.md

Update OpenCVDetectWebNN.cmake

Fix OpenCVDetectWebNN.cmake and update README.md

Add source webnn_cpp.cpp and libary libwebnn_proc.so

Update dnn.cpp

Update dnn.cpp

Update dnn.cpp

Update dnn.cpp

update dnn.cpp

update op_webnn

update op_webnn

Update op_webnn.hpp

update op_webnn.cpp & hpp

Update op_webnn.hpp

Update op_webnn

update the skeleton

Update op_webnn.cpp

Update op_webnn

Update op_webnn.cpp

Update op_webnn.cpp

Update op_webnn.hpp

update op_webnn

update op_webnn

Solved the problems of released variables.

Fixed the bugs in op_webnn.cpp

Implement op_webnn

Implement Relu by WebNN API

Update dnn.cpp for better test

Update elementwise_layers.cpp

Implement ReLU6

Update elementwise_layers.cpp

Implement SoftMax using WebNN API

Implement Reshape by WebNN API

Implement PermuteLayer by WebNN API

Implement PoolingLayer using WebNN API

Update pooling_layer.cpp

Update pooling_layer.cpp

Update pooling_layer.cpp

Update pooling_layer.cpp

Update pooling_layer.cpp

Update pooling_layer.cpp

Implement poolingLayer by WebNN API and add more detailed logs

Update dnn.cpp

Update dnn.cpp

Remove redundant codes and add more logs for poolingLayer

Add more logs in the pooling layer implementation

Fix the indent issue and resolve the compiling issue

Fix the build problems

Fix the build issue

FIx the build issue

Update dnn.cpp

Update dnn.cpp

* Fix the build issue

* Implement BatchNorm Layer by WebNN API

* Update convolution_layer.cpp

This is a temporary file for Conv2d layer implementation

* Integrate some general functions into op_webnn.cpp&hpp

* Update const_layer.cpp

* Update convolution_layer.cpp

Still have some bugs that should be fixed.

* Update conv2d layer and fc layer

still have some problems to be fixed.

* update constLayer, conv layer, fc layer

There are still some bugs to be fixed.

* Fix the build issue

* Update concat_layer.cpp

Still have some bugs to be fixed.

* Update conv2d layer, fully connected layer and const layer

* Update convolution_layer.cpp

* Add OpenCV.js DNN module WebNN Backend (both using webnn-polyfill and electron)

* Delete bib19450.aux

* Add WebNN backend for OpenCV DNN Module

Update dnn.cpp

Update dnn.cpp

Update dnn.cpp

Update dnn.cpp

Add WebNN head files into OpenCV 3rd partiy files

Create webnn.hpp

update cmake

Complete README and add OpenCVDetectWebNN.cmake file

add webnn.cpp

Modify webnn.cpp

Can successfully compile the codes for creating a MLContext

Update webnn.cpp

Update README.md

Update README.md

Update README.md

Update README.md

Update cmake files and

update README.md

Update OpenCVDetectWebNN.cmake and README.md

Update OpenCVDetectWebNN.cmake

Fix OpenCVDetectWebNN.cmake and update README.md

Add source webnn_cpp.cpp and libary libwebnn_proc.so

Update dnn.cpp

Update dnn.cpp

Update dnn.cpp

Update dnn.cpp

update dnn.cpp

update op_webnn

update op_webnn

Update op_webnn.hpp

update op_webnn.cpp & hpp

Update op_webnn.hpp

Update op_webnn

update the skeleton

Update op_webnn.cpp

Update op_webnn

Update op_webnn.cpp

Update op_webnn.cpp

Update op_webnn.hpp

update op_webnn

update op_webnn

Solved the problems of released variables.

Fixed the bugs in op_webnn.cpp

Implement op_webnn

Implement Relu by WebNN API

Update dnn.cpp for better test

Update elementwise_layers.cpp

Implement ReLU6

Update elementwise_layers.cpp

Implement SoftMax using WebNN API

Implement Reshape by WebNN API

Implement PermuteLayer by WebNN API

Implement PoolingLayer using WebNN API

Update pooling_layer.cpp

Update pooling_layer.cpp

Update pooling_layer.cpp

Update pooling_layer.cpp

Update pooling_layer.cpp

Update pooling_layer.cpp

Implement poolingLayer by WebNN API and add more detailed logs

Update dnn.cpp

Update dnn.cpp

Remove redundant codes and add more logs for poolingLayer

Add more logs in the pooling layer implementation

Fix the indent issue and resolve the compiling issue

Fix the build problems

Fix the build issue

FIx the build issue

Update dnn.cpp

Update dnn.cpp

* Fix the build issue

* Implement BatchNorm Layer by WebNN API

* Update convolution_layer.cpp

This is a temporary file for Conv2d layer implementation

* Integrate some general functions into op_webnn.cpp&hpp

* Update const_layer.cpp

* Update convolution_layer.cpp

Still have some bugs that should be fixed.

* Update conv2d layer and fc layer

still have some problems to be fixed.

* update constLayer, conv layer, fc layer

There are still some bugs to be fixed.

* Update conv2d layer, fully connected layer and const layer

* Update convolution_layer.cpp

* Add OpenCV.js DNN module WebNN Backend (both using webnn-polyfill and electron)

* Update dnn.cpp

* Fix Error in dnn.cpp

* Resolve duplication in conditions in convolution_layer.cpp

* Fixed the issues in the comments

* Fix building issue

* Update tutorial

* Fixed comments

* Address the comments

* Update CMakeLists.txt

* Offer more accurate perf test on native

* Add better perf tests for both native and web

* Modify per tests for better results

* Use more latest version of Electron

* Support latest WebNN Clamp op

* Add definition of HAVE_WEBNN macro

* Support group convolution

* Implement Scale_layer using WebNN

* Add Softmax option for native classification example

* Fix comments

* Fix comments
2021-11-23 21:15:31 +00:00
Alexander Alekhin
394e640909 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-11-13 15:11:30 +00:00
Alexander Alekhin
8041ab8a61
Merge pull request #21025 from alalek:issue_21004
* dnn(ocl4dnn): fix LRN layer accuracy problems

- FP16 intermediate computation is not accurate and may provide NaN values

* dnn(test): update tolerance for FP16
2021-11-12 01:54:07 +03:00
Alexander Alekhin
d934bb15b0
Merge pull request #20998 from alalek:update_protobuf_3.19.1
3rdparty(protobuf): upgrade 3.5.2 => 3.19.1

* 3rdparty(protobuf): upgrade 3.5.2 => 3.19.1

* dnn: update protobuf files (3.19.1)

* 3rdparty(protobuf): re-apply OpenCV patch for custom fields (3.19.1)

* protobuf: suppress new build warnings

* protobuf: remove unused files
2021-11-10 12:03:45 +00:00
ZaKiiiiiiiii
98b6ce353c
Merge pull request #20904 from Crayon-new:fix_bug_in_maxLayer
fix bug: wrong output dimension when "keep_dims" is false in pooling layer.

* fix bug in max layer

* code align

* delete permute layer and add test case

* add name assert

* check other cases

* remove c++11 features

* style:add "const" remove assert

* style:sanitize file names
2021-11-09 19:24:04 +03:00
Alexander Alekhin
7842181b47 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-11-05 09:27:46 +00:00
Alexander Alekhin
562f2375c5 dnn(test): skip tests with high memory usage
- 32-bit configuration may fail due to memory fragmentation
2021-11-04 13:26:33 +00:00
Alexander Alekhin
edf533c83e Merge pull request #21007 from alalek:cmake_dnn_fix_wrong_tengine_order 2021-11-04 12:28:27 +00:00
Alexander Alekhin
c1d61c88e9 dnn(cmake): don't hijack OpenCL options with Tengine 2021-11-04 09:59:19 +00:00
Alexander Alekhin
d484939c02
Merge pull request #20999 from alalek:dnn_replace_deprecated_calls
dnn(protobuf): replace deprecated calls

* dnn: replace deprecated ByteSize() => ByteSizeLong()

* dnn: replace deprecated calls, use GetRepeatedFieldRef
2021-11-03 15:59:36 +00:00
Alexander Alekhin
ec10f2e72b Merge pull request #20877 from rogday:simple_layers 2021-10-20 17:00:38 +00:00
rogday
b3f966e2ca
Merge pull request #20883 from rogday:eltwise_refactoring
* backport elementwise_layers refactor

* keep NULL
2021-10-19 13:29:22 +00:00
Alexander Alekhin
1926e919be dnn(int8): fix using of incorrect UMat constructor 2021-10-18 04:46:00 +00:00
Alexander Alekhin
31c40fa4cc Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-10-15 13:35:03 +00:00
Smirnov Egor
1feb3838b5 add Ceil, Floor, Log, Round, Sqrt, Not, Equal, Less, Greater 2021-10-15 16:02:46 +03:00
Alexander Alekhin
53d6c9b9c0 Merge pull request #20860 from rogday:sum_fix 2021-10-12 15:36:32 +00:00
Smirnov Egor
238dbffb48 change asserts for Sum 2021-10-11 20:59:44 +03:00
Smirnov Egor
a9d7b6eab7 fix const - input and remove unimplemented function 2021-10-11 18:58:10 +03:00
Alexander Alekhin
4672dbda2a Merge pull request #20818 from rogday:yolov4x_mish_cuda 2021-10-08 19:12:43 +00:00
Smirnov Egor
9c84749e2c backport YOLOv4x-mish new_coords CUDA implementation 2021-10-08 14:14:49 +03:00
Alexander Alekhin
cca4c47781 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-10-08 11:05:45 +00:00
Alexander Alekhin
81e7988eb9 Merge pull request #20840 from alalek:dnn_ocl_cleanup_code 2021-10-08 05:07:51 +00:00
Alexander Alekhin
8c2dd5fb9a dnn(ocl4dnn): cleanup dead code, improve logging 2021-10-08 00:39:40 +00:00
Alexander Alekhin
724e04e979 dnn(ocl4dnn): add extra checks to convolution layer
- prevent running code over unsupported/non-tested configurations
- prevent integer div by zero
2021-10-07 23:18:32 +00:00
Alexander Alekhin
03a08435e2 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-10-07 04:27:22 +00:00
Alexander Alekhin
1a29ea1038 Merge pull request #20829 from alalek:dnn_ocl_skip_int8_tests 2021-10-06 22:46:21 +00:00
Alexander Alekhin
94e92cd6c0 dnn(ocl): skip int8 tests due to memory access issues 2021-10-06 21:27:18 +00:00
Alexander Alekhin
822d468232 Merge pull request #20813 from rogday:soft_nms 2021-10-06 20:20:34 +00:00
Smirnov Egor
2221dcc9f2 add SoftNMS implementation 2021-10-06 21:31:45 +03:00
Oliver Kuckertz
a3d7811f24
Merge pull request #20725 from mologie:fix-dnn-tf-on-arm
* dnn: fix unaligned memory access crash on armv7

The getTensorContent function would return a Mat pointing to some
member of a Protobuf-encoded message. Protobuf does not make any
alignment guarantees, which results in a crash on armv7 when loading
models while bit 2 is set in /proc/cpu/alignment (or the relevant
kernel feature for alignment compatibility is disabled). Any read
attempt from the previously unaligned data member would send SIGBUS.

As workaround, this commit makes an aligned copy via existing clone
functionality in getTensorContent. The unsafe copy=false option is
removed. Unfortunately, a rather crude hack in PReLUSubgraph in fact
writes(!) to the Protobuf message. We limit ourselves to fixing the
alignment issues in this commit, and add getTensorContentRefUnaligned
to cover the write case with a safe memcpy. A FIXME marks the issue.

* dnn: reduce amount of .clone() calls

* dnn: update FIXME comment

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
2021-10-06 16:41:05 +00:00
Alexander Alekhin
646924fce8 dnn(pytest/test_input_3d): reload model between switching targets 2021-10-05 23:23:08 +00:00
HAN Liutong
e5fb50476c
Merge pull request #20521 from hanliutong:dev-rvv-multiVLEN
Make the implementation of optimization in DNN adjustable to different vector sizes with RVV intrinsics.

* Update fastGEMM for multi VLEN.

* Update fastGEMM1T for multi VLEN.

* Update fastDepthwiseConv for multi VLEN.

* Update fastConv for multi VLEN.

* Replace malloc with cv::AutoBuffer.
2021-10-05 15:35:00 +00:00
Alexander Alekhin
3e6f27522b pre: OpenCV 4.5.4 (version++) 2021-10-04 22:35:47 +00:00
Alexander Alekhin
1b70f94282 Merge pull request #20782 from YashasSamaga:cuda4dnn-eltwise-broadcast 2021-10-04 22:35:00 +00:00
Alexander Alekhin
ebef84e9ea pre: OpenCV 3.4.16 (version++) 2021-10-04 20:47:07 +00:00
Jebastin Nadar
cce78cc5e2
Merge pull request #20535 from SamFC10:onnx-q
dnn : int8 quantized layers support in onnx importer

* added quantized layers support in onnx importer

* added more cases in eltwise node, some more checks

* added tests for quantized nodes

* relax thresholds for failed tests, address review comments

* refactoring based on review comments

* added support for unsupported cases and pre-quantized resnet50 test

* relax thresholds due to int8 resize layer
2021-10-04 18:07:38 +00:00
Zihao Mu
9085b933d8
Merge pull request #20702 from zihaomu:tf_expand_dim_layer
Add ExpandDims layer of tf_importer.cpp

* Add ExpandDims to tf_importer.

* add -1 expand test case.

* Support different dimensions of input.

* Compatible with 5-dimensional NDHWC data

* Code align

* support 3-dim input.

* 3-dim bug fixed.

* fixing error of code format.
2021-10-04 16:37:38 +00:00
YashasSamaga
505dde09de support broadcasting in eltwise ops 2021-10-04 12:38:45 +05:30
SamFC10
87ebf2e50b fix illegal memory access in int8 convolution 2021-10-03 15:16:01 +05:30
Alexander Alekhin
37c3f0d8a0 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-10-02 17:57:18 +00:00
Alexander Alekhin
f977d10a19 dnn(ocl): fix conv DWCONV workgroup 2021-10-01 18:52:07 +00:00
Alexander Alekhin
846317ef37 dnn(ocl): fix conv BASIC workgroup 2021-09-29 14:55:46 +00:00
Alexander Alekhin
24fcb7f813 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-09-25 17:50:00 +00:00
rogday
38b9ec7a18
Merge pull request #20682 from rogday:min
* Add Min layer to CPU, OpenCL, Halide, Inference Engine, NGraph and CUDA

* fix indentation

* add min to fusion and halide tests; fix doc
2021-09-22 15:17:37 +03:00
SamFC10
9c5d7716e2 fix for unsqueeze opset version 13 2021-09-17 17:40:57 +05:30
Alexander Alekhin
46fd26e366 Merge pull request #20699 from alalek:dnn_perf_update_convolution_tests 2021-09-16 17:11:32 +00:00
rogday
c410d7a97d
Merge pull request #20671 from rogday:yolov4x-mish
Add support for YOLOv4x-mish

* backport to 3.4 for supporting yolov4x-mish

* add YOLOv4x-mish test

* address review comments

Co-authored-by: Guo Xu <guoxu@1school.com.cn>
2021-09-14 17:49:49 +00:00
YashasSamaga
50462dcdc6 fix effrank assert to allow input effrank <= output effrank 2021-09-13 20:44:33 +05:30
Alexander Alekhin
6e66a9222a dnn(onnx): fix format specifier 2021-09-11 22:26:52 +00:00