Fix ALPR pipeline. Ready for production

This commit is contained in:
2026-04-05 11:55:37 +10:00
parent db089c3697
commit f7cef5015a
14 changed files with 331 additions and 22 deletions

View File

@@ -43,7 +43,7 @@ namespace ANSCENTER {
ANSByteTrack::ANSByteTrack() {
_licenseValid = false;
CheckLicense();
tracker.update_parameters(30, 30, 0.5, 0.6, 0.8);
tracker.update_parameters(10, 30, 0.5, 0.6, 0.8);
}
ANSByteTrack::~ANSByteTrack() {

View File

@@ -50,7 +50,7 @@ namespace ANSCENTER {
_licenseValid = false;
CheckLicense();
int frame_rate = 30;
int frame_rate = 10;
int track_buffer = 30;
float track_thresh = 0.25;
float track_highthres = 0.25;

View File

@@ -44,7 +44,7 @@ namespace ANSCENTER{
ANSByteTrackNCNN::ANSByteTrackNCNN() {
_licenseValid = false;
CheckLicense();
tracker.update_parameters(30, 30, 0.5, 0.6, 0.8);
tracker.update_parameters(10, 30, 0.5, 0.6, 0.8);
}
ANSByteTrackNCNN::~ANSByteTrackNCNN() {

View File

@@ -16,14 +16,14 @@ namespace ByteTrack
public:
using STrackPtr = std::shared_ptr<STrack>;
BYTETracker(const int& frame_rate = 30,
BYTETracker(const int& frame_rate = 10,
const int& track_buffer = 30,
const float& track_thresh = 0.5,
const float& high_thresh = 0.6,
const float& match_thresh = 0.8);
~BYTETracker();
std::vector<STrackPtr> update(const std::vector<Object>& objects);
void update_parameters(int frameRate = 30, int trackBuffer = 30, double trackThreshold = 0.5, double highThreshold = 0.6, double matchThresold = 0.8, bool autoFrameRate = false);
void update_parameters(int frameRate = 10, int trackBuffer = 30, double trackThreshold = 0.5, double highThreshold = 0.6, double matchThresold = 0.8, bool autoFrameRate = false);
float getEstimatedFps() const;
private:

View File

@@ -34,8 +34,8 @@ namespace ByteTrackEigen {
* @param match_thresh Threshold for matching detections to tracks.
* @param frame_rate Frame rate of the video being processed.
*/
BYTETracker(float track_thresh = 0.25, int track_buffer = 30, float match_thresh = 0.8, int frame_rate = 30);
void update_parameters(int frameRate = 30, int trackBuffer = 30, double trackThreshold = 0.5, double highThreshold = 0.6, double matchThresold = 0.8, bool autoFrameRate = false);
BYTETracker(float track_thresh = 0.25, int track_buffer = 30, float match_thresh = 0.8, int frame_rate = 10);
void update_parameters(int frameRate = 10, int trackBuffer = 30, double trackThreshold = 0.5, double highThreshold = 0.6, double matchThresold = 0.8, bool autoFrameRate = false);
float getEstimatedFps() const;
std::vector<KalmanBBoxTrack> update(const Eigen::MatrixXf& output_results, const std::vector<std::string> obj_ids);

View File

@@ -6,12 +6,12 @@ namespace ByteTrackNCNN {
class BYTETracker
{
public:
BYTETracker(int frame_rate = 30, int track_buffer = 30);
BYTETracker(int frame_rate = 10, int track_buffer = 30);
~BYTETracker();
std::vector<STrack> update(const std::vector<ByteTrackNCNN::Object>& objects);
//cv::Scalar get_color(int idx);
void update_parameters(int frameRate = 30, int trackBuffer = 30, double trackThreshold = 0.5, double highThreshold = 0.6, double matchThresold = 0.8, bool autoFrameRate = false);
void update_parameters(int frameRate = 10, int trackBuffer = 30, double trackThreshold = 0.5, double highThreshold = 0.6, double matchThresold = 0.8, bool autoFrameRate = false);
float getEstimatedFps() const;
private:
std::vector<STrack*> joint_stracks(std::vector<STrack*>& tlista, std::vector<STrack>& tlistb);