opencv/samples
lpylpy0514 70d7e83dca
Merge pull request #24201 from lpylpy0514:4.x
VIT track(gsoc realtime object tracking model) #24201

Vit tracker(vision transformer tracker) is a much better model for real-time object tracking. Vit tracker can achieve speeds exceeding nanotrack by 20% in single-threaded mode with ARM chip, and the advantage becomes even more pronounced in multi-threaded mode. In addition, on the dataset, vit tracker demonstrates better performance compared to nanotrack. Moreover, vit trackerprovides confidence values during the tracking process, which can be used to determine if the tracking is currently lost.
opencv_zoo: https://github.com/opencv/opencv_zoo/pull/194
opencv_extra: [https://github.com/opencv/opencv_extra/pull/1088](https://github.com/opencv/opencv_extra/pull/1088)

# Performance comparison is as follows:
NOTE: The speed below is tested by **onnxruntime** because opencv has poor support for the transformer architecture for now.

ONNX speed test on ARM platform(apple M2)(ms):
| thread nums | 1| 2| 3| 4|
|--------|--------|--------|--------|--------|
| nanotrack| 5.25| 4.86| 4.72| 4.49|
| vit tracker| 4.18| 2.41| 1.97| **1.46 (3X)**|

ONNX speed test on x86 platform(intel i3 10105)(ms):
| thread nums | 1| 2| 3| 4|
|--------|--------|--------|--------|--------|
| nanotrack|3.20|2.75|2.46|2.55|
| vit tracker|3.84|2.37|2.10|2.01|

opencv speed test on x86 platform(intel i3 10105)(ms):
| thread nums | 1| 2| 3| 4|
|--------|--------|--------|--------|--------|
| vit tracker|31.3|31.4|31.4|31.4|

preformance test on lasot dataset(AUC is the most important data. Higher AUC means better tracker):

|LASOT | AUC| P| Pnorm|
|--------|--------|--------|--------|
| nanotrack| 46.8| 45.0| 43.3|
| vit tracker| 48.6| 44.8| 54.7|

[https://youtu.be/MJiPnu1ZQRI](https://youtu.be/MJiPnu1ZQRI)
 In target tracking tasks, the score is an important indicator that can indicate whether the current target is lost. In the video, vit tracker can track the target and display the current score in the upper left corner of the video. When the target is lost, the score drops significantly. While nanotrack will only return 0.9 score in any situation, so that we cannot determine whether the target is lost.

### 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.
- [ ] The feature is well documented and sample code can be built with the project CMake
2023-09-19 15:36:38 +03:00
..
android Backport C-API cleanup (imgproc) from 5.x 2023-01-16 23:29:50 +03:00
cpp Merge pull request #23666 from mshabunin:barcode-move 2023-06-14 22:21:38 +03:00
data add py charuco sample+choriginal.jpg+camera_params 2023-03-15 11:27:55 +03:00
directx Merge pull request #22462 from Biswa96:fix-directx-check 2022-10-03 08:37:36 +03:00
dnn Merge pull request #24201 from lpylpy0514:4.x 2023-09-19 15:36:38 +03:00
gdb Merge pull request #21805 from rogday:pretty_fix 2022-04-20 04:55:04 +00:00
gpu Merge pull request #22615 from cudawarped:nvcuvenc 2022-10-28 11:03:51 +03:00
hal build: suppress the warning 2022-07-12 19:42:39 +09:00
install fix 4.x links 2021-12-22 13:24:30 +00:00
java Backport C-API cleanup (imgproc) from 5.x 2023-01-16 23:29:50 +03:00
opencl samples: fix OpenCL events leaks 2020-05-14 17:15:09 +00:00
opengl use findFile in opengl.cpp sample 2023-03-20 15:44:14 +01:00
openvx build: suppress the warning 2022-07-12 19:42:39 +09:00
python Merge pull request #24201 from lpylpy0514:4.x 2023-09-19 15:36:38 +03:00
semihosting fix 4.x links 2021-12-22 13:24:30 +00:00
swift/ios Update tests and samples to work with changes to dynamic build 2020-09-27 21:12:28 +09:00
sycl ocl: fixes for OpenCL multiple contexts support 2020-09-03 20:34:49 +00:00
tapi Merge pull request #19755 from mikhail-nikolskiy:ffmpeg-umat 2021-05-14 16:48:50 +00:00
va_intel samples(va): fix build warnings, use cv::format() 2021-02-19 10:36:26 +00:00
winrt Fix some typos in platforms/, samples/, 3rdparty/. 2022-09-07 16:09:23 +03:00
winrt_universal samples: avoid using of legacy C-like API (part 2) 2018-03-29 14:17:23 +03:00
wp8 Merge pull request #20223 from jogo-:3.4_wp8_samples_typos 2021-06-07 17:32:14 +00:00
_winpack_build_sample.cmd Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-05-18 17:50:16 +00:00
_winpack_run_python_sample.cmd Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-12-18 02:17:17 +00:00
CMakeLists.example.in cmake: enable C++11 implicitly 2020-02-03 17:45:37 +03:00
CMakeLists.txt build: suppress the warning 2022-07-12 19:42:39 +09:00
samples_utils.cmake imgproc: add IntelligentScissors 2020-12-25 10:57:11 +00:00