CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Lb/tracking by matching #2182
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
Lb/tracking by matching #2182
Conversation
Also make the sample build in the case when opencv_dnn module is not built. Also help is added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for contribution!
Please take a look on notes below.
modules/tracking/include/opencv2/tracking/tracking_by_matching.hpp
Outdated
Show resolved
Hide resolved
double confidence; ///< Detection confidence level (-1 if N/A). | ||
int frame_idx; ///< Frame index where object was detected (-1 if N/A). | ||
int object_id; ///< Unique object identifier (-1 if N/A). | ||
uint64_t timestamp; ///< Timestamp in milliseconds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
frame_idx
and timestamp
are highly correlated values.
Not sure if we need both for object detection.
modules/tracking/include/opencv2/tracking/tracking_by_matching.hpp
Outdated
Show resolved
Hide resolved
modules/tracking/include/opencv2/tracking/tracking_by_matching.hpp
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,50 @@ | |||
#pragma once | |||
|
|||
#include "opencv2/core.hpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually handled by precomp.hpp
@@ -0,0 +1,1354 @@ | |||
#include <map> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#include "precomp.hpp"
cv::Ptr<ITrackerByMatching> cv::tbm::CreateTrackerByMatching(const TrackerParams ¶ms) | ||
{ | ||
ITrackerByMatching* ptr = new TrackerByMatching(params); | ||
return cv::Ptr<ITrackerByMatching>(ptr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makePtr<T>(ctor params)
as alternative to std::make_shared
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you π
@LeonidBeynenson Does this have associated documentation, paper, tutorial, or sample? |
This pullrequest changes
This pullrequest adds a tracker that uses Tracking-by-Matching approach.
The approach uses two different appearance measures to compute affinity between bounding boxes:
some fast descriptor and some strong descriptor. Each time the assignment
problem is solved. The assignment problem in our case is how to establish
correspondence between existing tracklets and recently detected objects.
First step is to compute an affinity matrix between tracklets and
detections. The affinity equals to
appearance_affinity * motion_affinity * shape_affinity.
Where appearance is 1 - distance(tracklet_fast_dscr, detection_fast_dscr).
Second step is to solve the assignment problem using Kuhn-Munkres
algorithm. If correspondence between some tracklet and detection is
established with low confidence (affinity) then the strong descriptor is
used to determine if there is correspondence between tracklet and detection.