|
Cpp-Processing
|
Manages object persistence and state across sequential video frames. The Tracker takes raw detections and associates them over time to create consistent tracks. This tracks can be then used to combat flickering of detections. More...
#include <CelanturSDKInterface.h>
Public Member Functions | |
| Tracker (std::filesystem::path license_path, float min_iou_threshold=0.3f, float high_score_threshold=0.7f) | |
| Constructs a new Tracker instance. More... | |
| void | update (const std::vector< celantur::CelanturDetection > &detections) |
| Processes a new frame of detections. More... | |
| std::vector< celantur::CelanturDetection > | get_lost_detections () const |
| Retrieves detections associated with tracks currently in the 'Lost' state. More... | |
| void | reset () |
| Resets the tracker state. More... | |
| void | init_logging () |
| Initializes the internal logging system for the Tracker module. More... | |
Rule of Five | |
Standard memory management | |
| Tracker (const Tracker &other)=delete | |
| Tracker & | operator= (const Tracker &other)=delete |
| Tracker (Tracker &&other) noexcept | |
| Tracker & | operator= (Tracker &&other) noexcept |
| ~Tracker () | |
Manages object persistence and state across sequential video frames. The Tracker takes raw detections and associates them over time to create consistent tracks. This tracks can be then used to combat flickering of detections.
| Tracker::Tracker | ( | std::filesystem::path | license_path, |
| float | min_iou_threshold = 0.3f, |
||
| float | high_score_threshold = 0.7f |
||
| ) |
Constructs a new Tracker instance.
| license_path | Path to the Celantur license file required for operation. |
| min_iou_threshold | The minimum Intersection over Union (IoU) required to associate a new detection with an existing track. Range: [0.0, 1.0]. Lower IOU makes it easier for tracker to track detections when they are moving fast in the image, but it also makes it less accurate. Make it higher if you get a lot of false-positives from tracker and lower if the objects that are moving quickly in the frame are lost too often |
| high_score_threshold | The confidence value above which a detection is getting initialised into track. The detection needs to be two frames above this confidence to become a frame. Decrease it if you have multiple low-confidence detections that you still want to track. Increase it to decrease the amount of false positives. |
References CelanturSDK::License::_pimpl.
|
delete |
|
noexcept |
| Tracker::~Tracker | ( | ) |
| std::vector< celantur::CelanturDetection > Tracker::get_lost_detections | ( | ) | const |
Retrieves detections associated with tracks currently in the 'Lost' state.
Use this to apply predictive anonymization on objects that were recently tracked but temporarily disappeared. These detections often are very good approximations of where the object would be given a couple of conditions:
In summary, tracking can be a very good way to combat intermittent detection flickering but in some usecasees it might become active hindrance for anonymisation quality. Test it for your usecase!
References celantur::CelanturDetection::class_id.
| void Tracker::init_logging | ( | ) |
Initializes the internal logging system for the Tracker module.
Internal module is written in Rust and its logging can be controlled by Rust env logger
| void Tracker::reset | ( | ) |
Resets the tracker state.
use when you need to process new video and you need to clear all existing tracks.
| void Tracker::update | ( | const std::vector< celantur::CelanturDetection > & | detections | ) |
Processes a new frame of detections.
detections to existing tracks via IoU.| detections | a vector of detections found in the current frame. |