Skip to content

Tracking API: added DaSiamRPN tracker#20036

Merged
alalek merged 5 commits intoopencv:masterfrom
APrigarina:tracking_api
May 31, 2021
Merged

Tracking API: added DaSiamRPN tracker#20036
alalek merged 5 commits intoopencv:masterfrom
APrigarina:tracking_api

Conversation

@APrigarina
Copy link
Copy Markdown
Contributor

@APrigarina APrigarina commented May 5, 2021

Merge with extra: opencv/opencv_extra#874

This PR moves DaSiamRPN tracker to video/tracking.hpp and allows to run tracker.py sample with specified tracking algorithm

relates #19078 #16554

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.

Overall looks good!

After initial testing it makes sense to replace dedicated C++/Python samples.

elif trackerAlgorithm == 'dasiamrpn':
tracker = cv.TrackerDaSiamRPN_create()
else:
sys.exit("Tracker is not recognized. Please use one of three available: mil, goturn, dasiamrpn.")
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.

It makes sense to dump trackerAlgorithm value here.

@APrigarina APrigarina marked this pull request as ready for review May 25, 2021 12:20
@APrigarina
Copy link
Copy Markdown
Contributor Author

@alalek could you please check why models for tests haven't been downloaded?

@alalek
Copy link
Copy Markdown
Member

alalek commented May 26, 2021

  1. DNN models are stored on shared drive and that shared storage are not updated from PRs automatically.
  2. Such test data should be considered as optional Test should not fail if test data is missing. (CI is configured to fail if optional test data is missing too).

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.

Well done 👍

Comment on lines +28 to +29
backend = 0;
target = 0;
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.

Prefer to avoid magic numbers:

#ifdef HAVE_OPENCV_DNN
    backend = DNN_BACKEND_DEFAULT;
    target = DNN_TARGET_CPU;
#else
    backend = -1;  // invalid value
    target = -1;  // invalid value
#endif

@alalek alalek merged commit 478663b into opencv:master May 31, 2021
@alalek alalek mentioned this pull request Aug 28, 2021
6 tasks
a-sajjad72 pushed a commit to a-sajjad72/opencv that referenced this pull request Mar 30, 2023
Tracking API: added DaSiamRPN tracker

* added dasiamrpn tracker

* dasiamrpn: add test, rewrite sample

* change python samples

* fix tests

* fix params
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.

2 participants