Commit Graph

33853 Commits

Author SHA1 Message Date
Alexander Smorkalov
abbd878eb5
Merge pull request #24576 from AsyaPronina:ot_to_python
Enable GAPI VASOT in Python
2023-12-20 15:26:01 +03:00
Alexander Smorkalov
181850e808 Drop old Android toolchain file
- The toolchain file for CMake is provided by all modern NDKs.
- The OpenCV version does not work with modern NDKs.
2023-12-20 15:19:53 +03:00
Alexander Smorkalov
a61306f79a
Merge pull request #24716 from asmorkalov:as/spng_warning_fix
SPNG integration warning fixes on Windows
2023-12-20 13:34:59 +03:00
Alexander Smorkalov
70b87804cf SPNG integration warning fixes. 2023-12-20 13:09:21 +03:00
Alexander Smorkalov
c92815238e
Merge pull request #24718 from asmorkalov/as/system_spng
Add support for external libspng. #24718

Fixes https://github.com/opencv/opencv/issues/24683
Related patch to libspng: https://github.com/randy408/libspng/pull/264

### 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
- [ ] 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-12-20 13:05:09 +03:00
Anastasiya Pronina
d20727a5be Enabled VAS OT in G-API Python interface 2023-12-19 17:51:59 +00:00
Laurent Berger
3e6dcdc0a4
Merge pull request #24539 from LaurentBerger:blobrecttoimage
Add blobrecttoimage #24539

### Pull Request Readiness Checklist

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

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 #14659
- [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-12-19 20:00:04 +03:00
Yuantao Feng
fa5ed62a66
Merge pull request #24694 from fengyuentau:matmul_refactor
dnn: refactor ONNX MatMul with fastGemm #24694

Done:
- [x] add backends
    - [x] CUDA
    - [x] OpenVINO
    - [x] CANN
    - [x] OpenCL
    - [x] Vulkan
- [x] add perf tests
- [x] const B case

### Benchmark

Tests are done on M1. All data is in milliseconds (ms).

| Configuration | MatMul (Prepacked) | MatMul | InnerProduct |
| - | - | - | - |
| A=[12, 197, 197], B=[12, 197, 64], trans_a=0, trans_b=0 | **0.39** | 0.41 | 1.33 |
| A=[12, 197, 64], B=[12, 64, 197], trans_a=0, trans_b=0  | **0.42** | 0.42 | 1.17 |
| A=[12, 50, 64], B=[12, 64, 50], trans_a=0, trans_b=0    | **0.13** | 0.15 | 0.33 |
| A=[12, 50, 50], B=[12, 50, 64], trans_a=0, trans_b=0    | **0.11** | 0.13 | 0.22 |
| A=[16, 197, 197], B=[16, 197, 64], trans_a=0, trans_b=0 | **0.46** | 0.54 | 1.46 |
| A=[16, 197, 64], B=[16, 64, 197], trans_a=0, trans_b=0  | **0.46** | 0.95 | 1.74 |
| A=[16, 50, 64], B=[16, 64, 50], trans_a=0, trans_b=0    | **0.18** | 0.32 | 0.43 |
| A=[16, 50, 50], B=[16, 50, 64], trans_a=0, trans_b=0    | **0.15** | 0.25 | 0.25 |

### 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-12-19 19:36:41 +03:00
Alexander Smorkalov
465e601e10
Merge pull request #24713 from MaximSmolskiy:improve-icvSmoothHistogram256
Improve icvSmoothHistogram256
2023-12-19 18:39:34 +03:00
zzuliys
dfc61fbfaa
Merge pull request #24666 from zzuliys:4.x
Add support for Orbbec Gemini2 and Gemini2 XL camera #24666

### 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
2023-12-19 18:34:21 +03:00
Alexander Smorkalov
509c1afb8d
Merge pull request #24659 from MaximSmolskiy:fix-bug-in-ChessBoardDetector-cleanFoundConnectedQuads
Fix bug in ChessBoardDetector::cleanFoundConnectedQuads
2023-12-19 16:05:29 +03:00
Alexander Smorkalov
f1d33410fd
Merge pull request #24717 from FantasqueX:zlib-1-3
Update 3rdparty zlib to 1.3
2023-12-19 16:02:38 +03:00
Alexander Smorkalov
283407e1ff
Merge pull request #24698 from tomoaki0705:support_arm64_windows
build: prepare to build for ARM64 on Windows with Visual Studio
2023-12-19 13:19:54 +03:00
MengqingCao
b6cc74f855 link libacl_dvpp_mpi library when building with CANN backend 2023-12-19 17:35:11 +08:00
Letu Ren
baf07f9a03 Update 3rdparty zlib to 1.3
The opencv zlib patch is still not merged. So I applied it to zlib-1.3.
Since zlib-1.3 didn't modify CMakeLists.txt, opencv's zlib
CMakeLists.txt doesn't need to be modified.
2023-12-19 14:48:39 +08:00
Tomoaki Teshima
b6ec9b9d8c prepare to build for ARM64 on Windows with Visual Studio 2023-12-19 09:40:35 +09:00
Alexander Smorkalov
7892517b3d
Merge pull request #24642 from tomoaki0705:merge_features_aarch64
build: merge multiple features specified at once
2023-12-18 19:57:19 +03:00
MaximSmolskiy
398611b7e8 Improve icvSmoothHistogram256 2023-12-18 16:56:05 +03:00
Alexander Smorkalov
70618cb7bf
Merge pull request #24702 from vrabaud:compilation
Empty vectors before filling them in ChessBoardDetector::processQuads
2023-12-18 16:18:43 +03:00
Tomoaki Teshima
bc12e4fe55 merge multiple features specified at once
* follow the comment
2023-12-18 22:02:33 +09:00
Alexander Alekhin
eb736c272e Merge pull request #24706 from Kumataro:fix24705 2023-12-17 17:01:27 +00:00
Kumataro
ea3164ac77 3rdparty: update libtiff URLs 2023-12-16 10:23:22 +09:00
Rostislav Vasilikhin
ccc97b5c46
Merge pull request #24700 from savuor:doc_android_win_fix
Android Tutorial for Windows Updated #24700

This PR updates Android tutorials parts related to Windows

### 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-12-15 18:07:06 +03:00
Alexander Smorkalov
1cca4bef64
Merge pull request #24689 from FantasqueX:update-libspng-0-7-4
Update 3rdparty libspng to 0.7.4
2023-12-15 17:53:42 +03:00
Vincent Rabaud
915e39cdf0 Empty vectors before filling them in ChessBoardDetector::processQuads
It seems the port in https://github.com/opencv/opencv/pull/11703 lost
the initialization.
2023-12-15 14:48:14 +01:00
Anatoliy Talamanov
1017ea4f83
Merge pull request #24601 from TolyaTalamanov:at/fix-onnxrt-include-path-in-cmake
Fix path to ONNX Runtime include folder #24601

### Pull Request Readiness Checklist

Looks the `install` directory layout has been changed for `v1.16.3`

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-12-15 16:21:01 +03:00
Alexander Smorkalov
0735d7b328
Merge pull request #24701 from dodo920306:4.x
Fix typo
2023-12-15 14:48:51 +03:00
Wanli
6ae1709c6a
Merge pull request #24613 from WanliZhong:softmax_default_axis
Make default axis of softmax in onnx "-1" without opset option #24613

Try to solve problem: https://github.com/opencv/opencv/pull/24476#discussion_r1404821158

**ONNX**
`opset <= 11` use 1
`else` use -1

**TensorFlow**
`TF version = 2.x` use -1
`else` use 1

**Darknet, Caffe, Torch**
use 1 by definition
2023-12-15 10:41:42 +03:00
Kirin Chu
fb9f75c5ba
Fix typo
Changed "shough" to "should" for better clarity.
2023-12-15 09:21:23 +08:00
Alexander Alekhin
3d1f6465da Merge pull request #24696 from Kumataro:fix24695 2023-12-13 20:56:03 +00:00
Anatoliy Talamanov
9a47e1764a
Merge pull request #24068 from TolyaTalamanov:at/add-onnx-coreml-execution-provider
G-API: Support CoreML Execution Providers for ONNXRT Backend #24068

### 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-12-13 21:22:15 +03:00
Alexey Smirnov
14688e95ea
Merge pull request #24658 from smirnov-alexey:as/gapi_ov_get_model_layout
G-API: Get input model layout from the IR if possible in OV 2.0 backend #24658

### 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
- [ ] 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-12-13 18:40:08 +03:00
Kumataro
fdfe64e5f2 doc: use python3-minimal instead of python3-dev 2023-12-14 00:30:03 +09:00
Rostislav Vasilikhin
500fd453a1
Merge pull request #24592 from savuor:recorder_android
Android sample for VideoWriter #24592

This PR:
* adds an Android sample for video recording with MediaNDK and built-in MJPEG.
* adds a flag `--no_media_ndk` for `build_sdk.py` script to disable MediaNDK linkage.

### 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-12-13 15:54:31 +03:00
Alexander Alekhin
2e37a697b9 Merge pull request #24693 from FantasqueX:fix-spng-homepage 2023-12-13 12:22:25 +00:00
Rostislav Vasilikhin
42ab298f01
Merge pull request #24692 from savuor:doc_android_tutorial_camera
Android camera tutorial update #24692

This PR extends the OpenCV 4 Android tutorial by a simple camera app based on existing code.
This part was accidentally removed during the #24653 preparation, this PR restores it and aligns it to the latest Android Studio.

### 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-12-13 14:37:23 +03:00
Letu Ren
992c527c91 Fix homepage of libspng
The current one cannot be reached. I replaced it with the one I found in
official Github repository https://github.com/randy408/libspng
2023-12-13 11:51:19 +08:00
Letu Ren
46743c1701 Update 3rdparty libspng to 0.7.4
Include three fixes:
e68ba5df57
6c7c8ce372
c9451cab66

and three chores:
d86a11d3ab
bab9f94a11
fb768002d4

I have reviewed CMakeLists.txt and I think disabling unused-variable
warning is not needed.
2023-12-12 23:05:02 +08:00
Alexander Smorkalov
850be1e087
Merge pull request #24653 from savuor:doc_android_tutorials
Android Studio tutorials rewritten
2023-12-12 17:10:11 +03:00
Rostislav Vasilikhin
5498f419df Android tutorials refresh
- Use Android Studio instead of Ecliplse.
- Use new Gradle-based OpenCV for Android SDK.
2023-12-12 16:53:49 +03:00
Alexander Smorkalov
bf72e9d625
Merge pull request #24680 from AleksandrPanov:update_android_mobilenet_tutorial
Update Android mobilenet tutorial
2023-12-12 16:17:19 +03:00
AleksandrPanov
556f539531 Updated Android tutorial for MobileNet-SSD detector
- Refreshed images, links, OpenCV API.
- Added more details to Android Mobilenet sample.
- Moved to new location and re-linked tutorials.
2023-12-12 15:40:36 +03:00
Wanli
9bbc890d96
Merge pull request #24681 from WanliZhong:err_armv8
Fixed armv8 compilation warnings #24681 

Fixes the following warning on  armv8:
```
warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
```
Buildbot: https://pullrequest.opencv.org/buildbot/builders/4_x_ARMv8-lin
2023-12-12 15:38:07 +03:00
Alexander Smorkalov
3c1423c970
Merge pull request #24685 from AleksandrPanov:fix_build_grandle
fix build.gradle
2023-12-12 09:11:22 +03:00
AleksandrPanov
9814a514fa fix build.gradle 2023-12-12 02:57:06 +03:00
Wanli
6ee71fee88
Merge pull request #24547 from WanliZhong:refactor_conv_perf_test
Classify and extend convolution and depthwise performance tests #24547

This PR aims to:
1. Extend the test cases from models: `YOLOv5`, `YOLOv8`, `EfficientNet`, `YOLOX`, `YuNet`, `SFace`, `MPPalm`, `MPHand`, `MPPose`, `ViTTrack`, `PPOCRv3`, `CRNN`, `PPHumanSeg`. (371 new test cases are added)

2. Classify the existing convolution performance test to below cases
    - CONV_1x1
    - CONV_3x3_S1_D1 (winograd)
    - CONV
    - DEPTHWISE

3. Reduce unnecessary test cases by follow 3 rules (366 test cases are pruned):
(i). For all tests, except for pad and bias related parameters, all other parameters are the same. Only one case can be reserved.
(ii). When the only difference is the channel of input shape, and other parameters are the same. Only one case can be reserved in each range `[1, 3], [4, 7], [8, 15], [16, 31], [32, 63], [64, 127], [128, 255], [256, 511], [512, 1023], [1024, 2047], [2048, 4095]`
(iii). When the only difference is the width and height of input shape, and other parameters are the same. Only one case can be reserved in each range `[1, 31], [32, 63], [64, 95]... `

> **Reproduced**: 1. follow step in https://github.com/alalek/opencv/commit/dnn_dump_conv_kernels to dump all convolution cases from new models. (declared flops may not right, need to be checked manually) 2 and 3. Use the script from python code [classify conv.txt](https://github.com/opencv/opencv/files/13522228/classify.conv.txt)


**Performance test result on Apple M2**

**Test result details**:  [M2.md](https://github.com/opencv/opencv/files/13379189/M2.md)

**Additional test result details with FP16**:  [m2_results_with_fp16.zip](https://github.com/opencv/opencv/files/13491070/m2_results_with_fp16.zip)


**Brief summary for 4.8.1 vs 4.7.0 or 4.6.0**: 
1. `CONV_1x1_S1_D1` dropped significant with small or large input shape.
2. `DEPTHWISE_5x5 ` dropped a little compared with 4.7.0. 

---

**Performance test result on [Intel Core i7-12700K](https://www.intel.com/content/www/us/en/products/sku/134594/intel-core-i712700k-processor-25m-cache-up-to-5-00-ghz/specifications.html)**: 8 Performance-cores (3.60 GHz, turbo up to 4.90 GHz), 4 Efficient-cores (2.70 GHz, turbo up to 3.80 GHz), 20 threads.

**Test result details**: [INTEL.md](https://github.com/opencv/opencv/files/13374093/INTEL.md)
**Brief summary for 4.8.1 vs 4.5.5**: 
1. `CONV_5x5_S1_D1` dropped significant. 
2. `CONV_1x1_S1_D1`, `CONV_3x3_S1_D1`, `DEPTHWISE_3x3_S1_D1`, `DEPTHWISW_3x3_S2_D1` dropped with small input shape.

---

TODO:
- [x] Perform tests on arm with each opencv version
- [x] Perform tests on x86 with each opencv version
- [x] Split each test classification with single test config
- [x] test enable fp16
2023-12-11 21:35:33 +03:00
Kumataro
b6b40a85e4
Merge pull request #24629 from Kumataro:add_crosscompile_with_multiarch
doc: add crosscompile_with_multiarch #24629

Add cross compile tutorial for ubuntu/debian.
( I'm sorry to my poor English. )

Fix https://github.com/opencv/opencv/issues/24628

### 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
- [ ] 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-12-11 21:29:44 +03:00
Maxim Smolskiy
b1b59c87b9
Merge pull request #24605 from MaximSmolskiy:speed-up-ChessBoardDetector-findQuadNeighbors
Speed up ChessBoardDetector::findQuadNeighbors #24605

### Pull Request Readiness Checklist

Replaced brute-force algorithm with O(N^2) time complexity with kd-tree with something like O(N * log N) time complexity (maybe only in average case).

For example, on image from #23558 without quads filtering (by using `CALIB_CB_FILTER_QUADS` flag) finding chessboards corners took ~770 seconds on my laptop, of which finding quads neighbors took ~620 seconds.

Now finding chessboards corners takes ~155-160 seconds, of which finding quads neighbors takes only ~5-10 seconds.

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
- [ ] 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-12-11 19:11:58 +03:00
Abduragim Shtanchaev
d3dd2e463c
Merge pull request #24611 from Abdurrahheem:ash/add_yolov6_test
Add test for YoloX Yolo v6 and Yolo v8 #24611

This PR adds test for YOLOv6 model (which was absent before)
The onnx weights for the test are located in this PR [ #1126](https://github.com/opencv/opencv_extra/pull/1126)

### 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
- [ ] 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-12-11 16:42:51 +03:00
Alexander Smorkalov
06ff35c9af
Merge pull request #24662 from asmorkalov:as/android_native_camera
Added experimental NativeCameraView class for Android 24+.
2023-12-11 16:40:57 +03:00