Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TrackerNano implementation #165

Merged
merged 13 commits into from
Sep 26, 2024

Conversation

figamore
Copy link

@figamore figamore commented Sep 18, 2024

I have added bindings for using OpenCV's TrackerNano single object tracker, which is superior to any of the other available trackers (CSRT, MOSSE, TLD, etc.).

The changes allow a new TrackNano instance to be created by specifying the path of the backbone and neckhead model files in the "new cv.TrackerNano(backboneModelPath: String, neckheadModelPath)" constructor. All other methods, such as init and update, follow the convention and usage of the rest of the trackers.

@figamore figamore changed the title NanoTrack implementation TrackerNano implementation Sep 18, 2024

#include "TrackerNano.h"

#if CV_VERSION_GREATER_EQUAL(3, 2, 0)
Copy link
Owner

Choose a reason for hiding this comment

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

Think the min value for the NanoTracker is 4.7.0

}

NAN_METHOD(TrackerNano::GetModel) {
// TBD
Copy link
Owner

Choose a reason for hiding this comment

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

TBD ???

@UrielCh
Copy link
Owner

UrielCh commented Sep 19, 2024

  • clean cleanup your CV_VERSION_GREATER_EQUAL macro usage.
  • add a test unit.

-Check for OpenCV version 4.7 or greater
@figamore
Copy link
Author

  • clean cleanup your CV_VERSION_GREATER_EQUAL macro usage.
  • add a test unit.

Done.

@UrielCh
Copy link
Owner

UrielCh commented Sep 19, 2024

ho nooooo !!!! Some checks were not successful

@figamore
Copy link
Author

ho nooooo !!!! Some checks were not successful

Oh no! There was an issue with loading the model in the unit test. I have fixed it now.

@figamore
Copy link
Author

@UrielCh, it looks like the test "Use openCV from Brew / build (4, 22) (pull_request)" failed due to an unrelated system fault. Could you please run it again?

@UrielCh
Copy link
Owner

UrielCh commented Sep 26, 2024

all Tests pass, but the I still need to test mutiple openCV version.

@UrielCh UrielCh changed the base branch from master to TrackerNano September 26, 2024 08:27
@UrielCh UrielCh merged commit c1b0fc8 into UrielCh:TrackerNano Sep 26, 2024
4 checks passed
@UrielCh
Copy link
Owner

UrielCh commented Sep 26, 2024

I still get some Stack trace whene I use TrackerNano.

@figamore
Copy link
Author

I still get some Stack trace whene I use TrackerNano.

Did you try it using the official TrackerNano model files here?

https://github.com/HonglinChu/SiamTrackers/tree/master/NanoTrack/models/nanotrackv2

@UrielCh
Copy link
Owner

UrielCh commented Sep 26, 2024

I did some cleaning in the source tree moving all legacy tracker in a single file.

@UrielCh
Copy link
Owner

UrielCh commented Sep 26, 2024

you commit the 2 models:

fdf592d3f946aa84775eecd1e388ab9f nanotrackv2/nanotrack_backbone_sim.onnx
7eb4bfeda369ece80218ef4070b9bef6 nanotrackv2/nanotrack_head_sim.onnx

is there something wrong with the V3 ?

could you please add an smple code in the "examples" folder ?

by the way the ackbone.onnx and neckhead.onnx file should be moved to the data folder

@figamore
Copy link
Author

you commit the 2 models:

fdf592d3f946aa84775eecd1e388ab9f nanotrackv2/nanotrack_backbone_sim.onnx

7eb4bfeda369ece80218ef4070b9bef6 nanotrackv2/nanotrack_head_sim.onnx

is there something wrong with the V3 ?

I haven't tried the V3 models, but they should work just as well. I only included the V2 models so the tests run could run.

@UrielCh
Copy link
Owner

UrielCh commented Sep 26, 2024

could you please add an smple code in the "examples" folder ?

by the way the ackbone.onnx and neckhead.onnx file should be moved to the data folder

Use the branch named 7.2.0 to make changes

https://github.com/UrielCh/opencv4nodejs/tree/7.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants