Commit Graph

33277 Commits

Author SHA1 Message Date
Kumataro
81cc89a3ce
Merge pull request #24179 from Kumataro:fix24145
* core:add OPENCV_IPP_MEAN/MINMAX/SUM option to enable IPP optimizations

* fix: to use guard HAVE_IPP and ocv_append_source_file_compile_definitions() macro.

* support OPENCV_IPP_ENABLE_ALL

* add document for OPENCV_IPP_ENABLE_ALL

* fix OPENCV_IPP_ENABLE_ALL comment
2023-08-23 22:53:11 +03:00
Alexander Alekhin
bb43927077 Merge pull request #24189 from dkurt:skip_ov_max_pool_ov 2023-08-23 11:59:22 +00:00
Dmitry Kurtaev
a0debc3a9a Enable OpenVINO max pooling with indices since 2022.1 2023-08-23 10:39:38 +03:00
Alexander Alekhin
ca0bd70cde Merge pull request #24143 from seanm:sprintf4 2023-08-18 15:49:20 +00:00
Alexander Alekhin
613ff7c85d Merge pull request #24176 from dkurt:correct_perf_test 2023-08-18 15:48:53 +00:00
Dmitry Kurtaev
d88ad46978 Remove explitit transB attribute from MatMul perf test 2023-08-18 15:10:14 +03:00
Alexander Alekhin
bb7c35b99f Merge pull request #24160 from mshabunin:update-ade 2023-08-18 08:02:44 +00:00
Alexander Alekhin
2b87e78e18 Merge pull request #24157 from dkurt:gapi_ov_optional 2023-08-18 08:02:11 +00:00
Alexander Alekhin
6b3b8c59c3 Merge pull request #24172 from CSBVision:CSBVision-patch-1-1 2023-08-18 06:17:58 +00:00
CSBVision
70a58d7198
Use STRING instead of PATH to fix #24141 2023-08-17 12:02:29 +02:00
autoantwort
f5a14532c2
Merge pull request #24167 from autoantwort:missing-include
* add missing include

* Apply CR
2023-08-17 09:34:19 +00:00
Sean McBride
d792ebc5d2 Fixed buffer overrun; removed the last two uses of sprintf
Fixed an off-by-1 buffer resize, the space for the null termination was forgotten.

Prefer snprintf, which can never overflow (if given the right size).

In one case I cheated and used strcpy, because I cannot figure out the buffer size at that point in the code.
2023-08-16 20:04:17 -04:00
Alexander Alekhin
abda763073 Merge pull request #24150 from DeePingXian:4.x 2023-08-16 22:25:11 +00:00
Dmitry Kurtaev
8ad5eb521a
Merge pull request #24120 from dkurt:actualize_dnn_links
OCL_FP16 MatMul with large batch

* Workaround FP16 MatMul with large batch

* Fix OCL reinitialization

* Higher thresholds for INT8 quantization

* Try fix gemm_buffer_NT for half (columns)

* Fix GEMM by rows

* Add batch dimension to InnerProduct layer test

* Fix Test_ONNX_conformance.Layer_Test/test_basic_conv_with_padding

* Batch 16

* Replace all vload4

* Version suffix for MobileNetSSD_deploy Caffe model
2023-08-16 15:46:11 +03:00
Alexander Alekhin
8d1c73a912 Merge pull request #24156 from zihaomu:fix_24041 2023-08-16 12:37:50 +00:00
MuZihao
16681d1080 fix the issue in layer fused 2023-08-16 09:34:59 +08:00
Maksim Shabunin
8e52c0155b gapi: update ADE library to 0.1.2b 2023-08-15 20:49:21 +03:00
Alexander Alekhin
ace781740c Merge pull request #24153 from Ginkgo-Biloba:ipp-warp-affine 2023-08-15 11:33:26 +00:00
Dmitry Kurtaev
ad7ecf1dba Mark OpenVINO models for G-API tests optional 2023-08-15 11:32:44 +03:00
Ginkgo
a301d1c298 fix ipp_warpAffine return value error 2023-08-14 20:58:35 +08:00
Alexander Alekhin
27d718b223 Merge pull request #24138 from mshabunin:fix-gst-plugin-camera 2023-08-13 19:47:21 +00:00
DeePingXian
a300e7e945 Adding support for Streamlabs Desktop Virtual Webcam
Streamlabs Desktop has the same issue in https://github.com/opencv/opencv/issues/19746.
This fixes it using https://github.com/opencv/opencv/pull/23460 method.
2023-08-13 16:40:38 +08:00
Alexander Smorkalov
747b7cab6c
Merge pull request #23734 from seanm:unaligned-copy
Fixed invalid cast and unaligned memory access
2023-08-11 15:23:08 +03:00
Alexander Smorkalov
232c67bf76
Merge pull request #24140 from sthibaul:4.x
Fix GNU/Hurd build
2023-08-11 12:32:22 +03:00
Alexander Smorkalov
5b41134ee7
Merge pull request #24012 from cudawarpedЖvideocapture_raw_read
`VideoCapture`: remove decoder initialization when demuxing
2023-08-11 11:28:57 +03:00
HAN Liutong
0dd7769bb1
Merge pull request #23980 from hanliutong:rewrite-core
Rewrite Universal Intrinsic code by using new API: Core module. #23980

The goal of this PR is to match and modify all SIMD code blocks guarded by `CV_SIMD` macro in the `opencv/modules/core` folder and rewrite them by using the new Universal Intrinsic API.

The patch is almost auto-generated by using the [rewriter](https://github.com/hanliutong/rewriter), related PR #23885.

Most of the files have been rewritten, but I marked this PR as draft because, the `CV_SIMD` macro also exists in the following files, and the reasons why they are not rewrited are:

1. ~~code design for fixed-size SIMD (v_int16x8, v_float32x4, etc.), need to manually rewrite.~~ Rewrited
- ./modules/core/src/stat.simd.hpp
- ./modules/core/src/matrix_transform.cpp
- ./modules/core/src/matmul.simd.hpp

2. Vector types are wrapped in other class/struct, that are not supported by the compiler in variable-length backends. Can not be rewrited directly.
- ./modules/core/src/mathfuncs_core.simd.hpp 
```cpp
struct v_atan_f32
{
    explicit v_atan_f32(const float& scale)
    {
...
    }

    v_float32 compute(const v_float32& y, const v_float32& x)
    {
...
    }

...
    v_float32 val90; // sizeless type can not used in a class
    v_float32 val180;
    v_float32 val360;
    v_float32 s;
};
```

3. The API interface does not support/does not match

- ./modules/core/src/norm.cpp 
Use `v_popcount`, ~~waiting for #23966~~ Fixed
- ./modules/core/src/has_non_zero.simd.hpp
Use illegal Universal Intrinsic API: For float type, there is no logical operation `|`. Further discussion needed

```cpp
/** @brief Bitwise OR

Only for integer types. */
template<typename _Tp, int n> CV_INLINE v_reg<_Tp, n> operator|(const v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b);
template<typename _Tp, int n> CV_INLINE v_reg<_Tp, n>& operator|=(v_reg<_Tp, n>& a, const v_reg<_Tp, n>& b);
```

```cpp
#if CV_SIMD
    typedef v_float32 v_type;
    const v_type v_zero = vx_setzero_f32();
    constexpr const int unrollCount = 8;
    int step = v_type::nlanes * unrollCount;
    int len0 = len & -step;
    const float* srcSimdEnd = src+len0;

    int countSIMD = static_cast<int>((srcSimdEnd-src)/step);
    while(!res && countSIMD--)
    {
        v_type v0 = vx_load(src);
        src += v_type::nlanes;
        v_type v1 = vx_load(src);
        src += v_type::nlanes;
....
        src += v_type::nlanes;
        v0 |= v1; //Illegal ?
....
        //res = v_check_any(((v0 | v4) != v_zero));//beware : (NaN != 0) returns "false" since != is mapped to _CMP_NEQ_OQ and not _CMP_NEQ_UQ
        res = !v_check_all(((v0 | v4) == v_zero));
    }

    v_cleanup();
#endif
```

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [ ] I agree to contribute to the project under Apache 2 License.
- [ ] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [ ] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
2023-08-11 08:33:33 +03:00
Samuel Thibault
82de5b3a67 Fix GNU/Hurd build
It has the usual Unix filesystem operations.
2023-08-10 22:43:46 +02:00
Alexander Smorkalov
3421b950ce
Merge pull request #24133 from alexlyulkov:al/fixed-msmf-webcam
Fixed bug when MSMF webcamera doesn't start when build with VIDEOIO_PLUGIN_ALL
2023-08-10 11:48:38 +03:00
Maksim Shabunin
53dfd9536a videoio: fix camera opening with GStreamer plugin 2023-08-10 11:39:29 +03:00
chaebkimm
f834736307
Merge pull request #24116 from chaebkimm/update-samples-python-tst_scene_render
Fix python sample code (tst_scene_render) #24116

Fix bug of python sample code (samples/python/tst_scene_render.py) when backGr or fgr is None (#24114)

1) pass shape tuple to np.zeros arguments instead of integers
2) change np.int to int

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [o] I agree to contribute to the project under Apache 2 License.
- [o] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [o] The PR is proposed to the proper branch
- [o] There is a reference to the original bug report and related work
- [o] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [o] The feature is well documented and sample code can be built with the project CMake
2023-08-09 13:46:25 +03:00
Alexander Lyulkov
4a12707103 Fixed bug when MSMF webcamera doesn't start when build with VIDEOIO_PLUGIN_ALL 2023-08-09 18:43:49 +08:00
Alexander Smorkalov
eccfd98b92
Merge pull request #24089 from cudawarped:cuda_gpumat_fix_convertTo_copyTo_bindings
`cuda`: Fix `GpuMat::copyTo` and `GpuMat::converTo` python bindings
2023-08-09 13:25:39 +03:00
Alexander Smorkalov
9b5b2540a4
Merge pull request #24086 from Kumataro:fix24081
videoio: doc: add odd width or height limitation for FFMPEG
2023-08-09 09:31:47 +03:00
Yuantao Feng
ba70ec99b3
Merge pull request #24122 from fengyuentau:remove_tengine
dnn: cleanup of tengine backend #24122

🚀 Cleanup for OpenCV 5.0. Tengine backend is added for convolution layer speedup on ARM CPUs, but it is not maintained and the convolution layer on our default backend has reached similar performance to that of Tengine.

Tengine backend related PRs:
- https://github.com/opencv/opencv/pull/16724
- https://github.com/opencv/opencv/pull/18323

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
2023-08-09 09:26:02 +03:00
Alexander Smorkalov
7d59db4ec4
Merge pull request #24108 from LaurentBerger:I24044
Solved bug in Reduce layer #24044
2023-08-07 12:39:05 +03:00
unknown
87b7ce4415 Solved issue 24044 2023-08-04 21:57:22 +02:00
Laurent Berger
2ff16d4c45
Merge pull request #24101 from LaurentBerger:I24076
Invalid memory access fix for ONNX split layer parser #24076 #24101

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work https://github.com/opencv/opencv/issues/24076
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
2023-08-04 12:18:49 +03:00
Alexander Smorkalov
5466fd2606
Merge pull request #24104 from cudawarped:cuda_fix_cuda_toolkit_12_2
`cuda`: fix for compatibility with CUDA Toolkit >= 12.2.0
2023-08-04 12:11:15 +03:00
Dmitry Kurtaev
4b8aeb1129
Merge pull request #24039 from dkurt:tflite_test_backends
TFLite models on different backends (tests and improvements) #24039

### Pull Request Readiness Checklist

* MaxUnpooling with OpenVINO
* Fully connected with transposed inputs/weights with OpenVINO
* Enable backends tests for TFLite (related to https://github.com/opencv/opencv/issues/23992#issuecomment-1640691722)
* Increase existing tests thresholds

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
2023-08-04 11:28:51 +03:00
Dmitry Kurtaev
96f23e3da1
Merge pull request #24080 from dkurt:dnn_cuda_layers
Resolve uncovered CUDA dnn layer #24080

### Pull Request Readiness Checklist

* Gelu activation layer on CUDA
* Try to relax GEMM from ONNX

resolves https://github.com/opencv/opencv/issues/24064

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
2023-08-03 09:13:42 +03:00
cudawarped
e4ad7e3778 VideoCapture: remove decoder initialization when CAP_PROP_FORMAT== -1 (rawMode == true) 2023-08-02 16:34:22 +03:00
Dmitry Kurtaev
0245c0cd10
Merge pull request #24072 from dkurt:openvino_cpu_tests
Remove legacy nGraph logic #24072

### Pull Request Readiness Checklist

TODO:
- [x] Test with OpenVINO 2021.4 (tested locally)

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
2023-08-02 14:39:11 +03:00
Dmitry Kurtaev
195aad8e6a
Merge pull request #24069 from dkurt:openvino_detection_layer
DetectionOutput layer on OpenVINO without limitations #24069

### Pull Request Readiness Checklist

required for https://github.com/opencv/opencv/pull/23987

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
2023-08-02 14:28:47 +03:00
Anatoliy Talamanov
f46f7eff0c
Merge pull request #24059 from TolyaTalamanov:at/add-onnx-cuda-execution-provider
G-API: Support CUDA & TensoRT Execution Providers for ONNXRT Backend #24059

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [ ] I agree to contribute to the project under Apache 2 License.
- [ ] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [ ] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
2023-08-02 14:13:07 +03:00
Alexander Alekhin
0883c6a913 Merge pull request #24087 from mshabunin:fix-videoio-warnings 2023-08-01 13:22:39 +00:00
cudawarped
bea0c1b660 cuda: Fix GpuMat::copyTo and GpuMat::converTo python bindings 2023-08-01 15:09:37 +03:00
Maksim Shabunin
9fc83ac544 videoio: fix V4L compilation for older kernels 2023-08-01 14:11:14 +03:00
Maksim Shabunin
e0e537d94e videoio: fixed MSVC warning in test 2023-08-01 14:09:22 +03:00
cudawarped
ab8cb6f8a9 cuda: fix for compatibility with CUDA Toolkit >= 12.2.0 2023-08-01 13:02:42 +03:00
Kumataro
68968eda8d videoio: doc: add odd width or height limitation for FFMPEG 2023-08-01 18:56:20 +09:00