Lens AI Profiler Cpp
trackerprofile.h
1 #ifndef TRACKER_PROFILE_H
2 #define TRACKER_PROFILE_H
3 
4 #include <string>
5 #include <map>
6 #include "saver.h"
7 #include "generic.h"
8 #include "kll_sketch.hpp"
9 
10 // Forward declaration of classes or structs if needed
11 class Saver;
12 
13 // Define KLL sketch type
15 
21 public:
27  TrackerProfile(std::string conf_path, int save_interval);
28 
37  void log_detection_confidence(float confidence);
38 
43  void log_track_length(int length);
44 
49  void log_iou(float iou);
50 
51 private:
52  Saver* saver;
53  std::map<std::string, std::string> modelConfig;
54  std::string statSavepath;
55 
56  // KLL sketches for tracking statistics
57  distributionBox confidence_sketch_;
58  distributionBox track_length_sketch_;
59  distributionBox iou_sketch_;
60 
64  void registerStatistics();
65 
66  // Configurations read from the INI file
67  std::map<std::string, std::vector<std::string>> trackerConfig;
68 
72  void cleanup();
73 };
74 
75 #endif // TRACKER_PROFILE_H
76 
Definition: saver.h:39
Class responsible for managing and logging tracking-related statistics.
Definition: trackerprofile.h:20
~TrackerProfile()
Destructor to clean up resources.
Definition: trackerprofile.cpp:36
TrackerProfile(std::string conf_path, int save_interval)
Constructor to initialize the TrackerProfile object.
Definition: trackerprofile.cpp:7
void log_track_length(int length)
Log track length to the track length sketch.
Definition: trackerprofile.cpp:68
void log_iou(float iou)
Log IoU to the IoU sketch.
Definition: trackerprofile.cpp:76
void log_detection_confidence(float confidence)
Log detection confidence to the confidence sketch.
Definition: trackerprofile.cpp:60