Skip to content

support Nanotrack in video module#22808

Merged
asmorkalov merged 8 commits intoopencv:4.xfrom
zihaomu:nanotrack
Dec 6, 2022
Merged

support Nanotrack in video module#22808
asmorkalov merged 8 commits intoopencv:4.xfrom
zihaomu:nanotrack

Conversation

@zihaomu
Copy link
Copy Markdown
Member

@zihaomu zihaomu commented Nov 15, 2022

teset data in opencv_extra

NanoTrack is an extremely lightweight and fast object-tracking model.
The total size is 1.1 MB.
And the FPS on M1 chip is 150, on Raspberry Pi 4 is about 30. (Float32 CPU only)

With this model, many users can run object tracking on the edge device.

The author of NanoTrack is @HonglinChu.
The original repo is https://github.com/HonglinChu/NanoTrack.

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

@zihaomu
Copy link
Copy Markdown
Member Author

zihaomu commented Nov 15, 2022

Hi @HonglinChu, Please review this patch.

@asmorkalov asmorkalov added this to the 4.7.0 milestone Nov 15, 2022
Copy link
Copy Markdown
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test approach looks great! Thanks.

Copy link
Copy Markdown
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@asmorkalov
Copy link
Copy Markdown
Contributor

Looks good to me. Please check the models url in extra. Some CI builders cannot download proper file.

@asmorkalov
Copy link
Copy Markdown
Contributor

Tested manually both C++ and Python version with ubuntu 18.04 and default OpenCV backend. Works great!

@zihaomu
Copy link
Copy Markdown
Member Author

zihaomu commented Dec 1, 2022

Passed all CI.

@asmorkalov
Copy link
Copy Markdown
Contributor

@alalek Could I merge the PR?

@asmorkalov
Copy link
Copy Markdown
Contributor

@zihaomu There is still onnx hash mismatch in extra. Please update models information.

@zihaomu
Copy link
Copy Markdown
Member Author

zihaomu commented Dec 2, 2022

Thx for your reminder. This is a network issue for downloading model from github. I'm trying to fix it.

@asmorkalov
Copy link
Copy Markdown
Contributor

@sturkmen72 @alalek ?

[--dasiamrpn_backend DASIAMRPN_BACKEND]
[--dasiamrpn_target DASIAMRPN_TARGET]
[--nanotrack_backBone NANOTRACK_BACKEND] [--nanotrack_headNeck NANOTRACK_TARGET]
[--nanotrack_backone NANOTRACK_BACKEND] [--nanotrack_headneck NANOTRACK_TARGET]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nanotrack_backone

typo
multiple places

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx, my fault.

Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Validated Python sample

@asmorkalov asmorkalov merged commit cb8f1dc into opencv:4.x Dec 6, 2022
asmorkalov pushed a commit to opencv/opencv_extra that referenced this pull request Dec 6, 2022
@alalek alalek mentioned this pull request Jan 8, 2023
a-sajjad72 pushed a commit to a-sajjad72/opencv that referenced this pull request Mar 30, 2023
[teset data in opencv_extra](opencv/opencv_extra#1016)

NanoTrack is an extremely lightweight and fast object-tracking model. 
The total size is **1.1 MB**.
And the FPS on M1 chip is **150**, on Raspberry Pi 4 is about **30**. (Float32 CPU only)

With this model, many users can run object tracking on the edge device.

The author of NanoTrack is @HonglinChu.
The original repo is https://github.com/HonglinChu/NanoTrack.

### 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
- [ ] 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants