mirror of
https://github.com/opencv/opencv.git
synced 2025-06-11 20:09:23 +08:00
add nanotrack v2 at regression test.
This commit is contained in:
parent
103212f209
commit
7dbb125a34
@ -851,9 +851,9 @@ public:
|
||||
|
||||
/** @brief the Nano tracker is a super lightweight dnn-based general object tracking.
|
||||
*
|
||||
* Nano tracker is much faster and extremely lightweight due to special model structure, the whole model size is about 1.1 MB.
|
||||
* Nano tracker is much faster and extremely lightweight due to special model structure, the whole model size is about 1.9 MB.
|
||||
* Nano tracker needs two models: one for feature extraction (backbone) and the another for localization (neckhead).
|
||||
* Please download these two onnx models at:https://github.com/HonglinChu/SiamTrackers/tree/master/NanoTrack/models/onnx.
|
||||
* Please download these two onnx models at:https://github.com/HonglinChu/SiamTrackers/tree/master/NanoTrack/models/nanotrackv2.
|
||||
* Original repo is here: https://github.com/HonglinChu/NanoTrack
|
||||
* Author:HongLinChu, 1628464345@qq.com
|
||||
*/
|
||||
|
@ -79,7 +79,7 @@ static bool checkIOU(const Rect& r0, const Rect& r1, double threshold)
|
||||
}
|
||||
}
|
||||
|
||||
static void checkTrackingAccuracy(cv::Ptr<Tracker>& tracker, double iouThreshold = 0.8)
|
||||
static void checkTrackingAccuracy(cv::Ptr<Tracker>& tracker, double iouThreshold = 0.7)
|
||||
{
|
||||
// Template image
|
||||
Mat img0 = imread(findDataFile("tracking/bag/00000001.jpg"), 1);
|
||||
@ -136,7 +136,7 @@ TEST(DaSiamRPN, accuracy)
|
||||
checkTrackingAccuracy(tracker, 0.7);
|
||||
}
|
||||
|
||||
TEST(NanoTrack, accuracy)
|
||||
TEST(NanoTrack, accuracy_NanoTrack_V1)
|
||||
{
|
||||
std::string backbonePath = cvtest::findDataFile("dnn/onnx/models/nanotrack_backbone_sim.onnx", false);
|
||||
std::string neckheadPath = cvtest::findDataFile("dnn/onnx/models/nanotrack_head_sim.onnx", false);
|
||||
@ -147,4 +147,17 @@ TEST(NanoTrack, accuracy)
|
||||
cv::Ptr<Tracker> tracker = TrackerNano::create(params);
|
||||
checkTrackingAccuracy(tracker);
|
||||
}
|
||||
|
||||
TEST(NanoTrack, accuracy_NanoTrack_V2)
|
||||
{
|
||||
std::string backbonePath = cvtest::findDataFile("dnn/onnx/models/nanotrack_backbone_sim_v2.onnx", false);
|
||||
std::string neckheadPath = cvtest::findDataFile("dnn/onnx/models/nanotrack_head_sim_v2.onnx", false);
|
||||
|
||||
cv::TrackerNano::Params params;
|
||||
params.backbone = backbonePath;
|
||||
params.neckhead = neckheadPath;
|
||||
cv::Ptr<Tracker> tracker = TrackerNano::create(params);
|
||||
checkTrackingAccuracy(tracker, 0.69);
|
||||
}
|
||||
|
||||
}} // namespace opencv_test::
|
||||
|
@ -10,8 +10,8 @@ For DaSiamRPN:
|
||||
kernel_r1: https://www.dropbox.com/s/999cqx5zrfi7w4p/dasiamrpn_kernel_r1.onnx?dl=0
|
||||
kernel_cls1: https://www.dropbox.com/s/qvmtszx5h339a0w/dasiamrpn_kernel_cls1.onnx?dl=0
|
||||
For NanoTrack:
|
||||
nanotrack_backbone: https://github.com/HonglinChu/SiamTrackers/blob/master/NanoTrack/models/onnx/nanotrack_backbone_sim.onnx
|
||||
nanotrack_headneck: https://github.com/HonglinChu/SiamTrackers/blob/master/NanoTrack/models/onnx/nanotrack_head_sim.onnx
|
||||
nanotrack_backbone: https://github.com/HonglinChu/SiamTrackers/blob/master/NanoTrack/models/nanotrackv2/nanotrack_backbone_sim.onnx
|
||||
nanotrack_headneck: https://github.com/HonglinChu/SiamTrackers/blob/master/NanoTrack/models/nanotrackv2/nanotrack_head_sim.onnx
|
||||
|
||||
USAGE:
|
||||
tracker.py [-h] [--input INPUT] [--tracker_algo TRACKER_ALGO]
|
||||
|
Loading…
Reference in New Issue
Block a user