Versions in this module Expand all Collapse all v0 v0.4.0 Dec 5, 2025 v0.3.0 Dec 4, 2025 v0.2.0 Nov 11, 2025 v0.1.1 Nov 10, 2025 Changes in this version type Metrics + MLCount int + MTCount int + NumTracks int + PTCount int v0.1.0 Nov 10, 2025 v0.0.1 Nov 10, 2025 Changes in this version + func AnyTrue(values []bool) bool + func CreateKeypointsVotingDistance(keypointDistanceThreshold, detectionThreshold float64) func(*Detection, *TrackedObject) float64 + func CreateNormalizedMeanEuclideanDistance(height, width int) func(*Detection, *TrackedObject) float64 + func Frobenius(detection *Detection, trackedObject *TrackedObject) float64 + func GetCutout(points *mat.Dense, img gocv.Mat) gocv.Mat + func GetTerminalSize(defaultCols, defaultLines int) (cols, lines int) + func GlobalCount() int + func IoU(candidates, objects *mat.Dense) *mat.Dense + func MatchDetectionsAndObjects(distanceMatrix *mat.Dense, distanceThreshold float64) (matchedCandIndices, matchedObjIndices []int) + func MeanEuclidean(detection *Detection, trackedObject *TrackedObject) float64 + func MeanManhattan(detection *Detection, trackedObject *TrackedObject) float64 + func ResetGlobalCount() + func StringPtr(s string) *string + func ValidateDistanceMatrix(m *mat.Dense) error + func ValidatePoints(points *mat.Dense) (*mat.Dense, error) + func WarnOnce(message string) + type Accumulators struct + func CompareDataframes(gt, predictions *MOTChallengeData, distanceFunc string, threshold float64) (*Accumulators, error) + func NewAccumulators() *Accumulators + func (a *Accumulators) ComputeMetrics() (*Metrics, error) + func (a *Accumulators) CreateAccumulator(videoName string) error + func (a *Accumulators) PrintMetrics() error + func (a *Accumulators) Reset() + func (a *Accumulators) SaveMetrics(filePath string) error + func (a *Accumulators) Update(gtBBoxes [][]float64, gtIDs []int, predBBoxes [][]float64, predIDs []int, ...) error + type CoordinateTransformation interface + AbsToRel func(points *mat.Dense) *mat.Dense + RelToAbs func(points *mat.Dense) *mat.Dense + type Detection struct + AbsolutePoints *mat.Dense + Age int + Data interface{} + Embedding []float64 + Label *string + Points *mat.Dense + Scores []float64 + func NewDetection(points *mat.Dense, config *DetectionConfig) (*Detection, error) + func (d *Detection) GetLabel() *string + func (d *Detection) GetPoints() *mat.Dense + func (d *Detection) GetScores() []float64 + func (d *Detection) UpdateCoordinateTransformation(coordTransform CoordinateTransformation) + type DetectionConfig struct + Data interface{} + Embedding []float64 + Label *string + Scores []float64 + type DetectionFileParser struct + func NewDetectionFileParser(inputPath string, informationFile *InformationFile) (*DetectionFileParser, error) + func (dfp *DetectionFileParser) Detections() <-chan []*Detection + func (dfp *DetectionFileParser) Length() int + type Distance interface + GetDistances func(objects []*TrackedObject, candidates interface{}) *mat.Dense + func DistanceByName(name string) Distance + func GetDistanceByName(name string) Distance + type Filter interface + GetDimZ func() int + GetState func() *mat.Dense + GetStateVector func() *mat.Dense + Predict func() + SetStateVector func(x *mat.Dense) + Update func(detectionPointsFlatten *mat.Dense, R, H *mat.Dense) + type FilterFactory interface + CreateFilter func(initialDetection *mat.Dense) Filter + type FilterPyKalmanFilter struct + func (kf *FilterPyKalmanFilter) GetStateVector() *mat.Dense + func (kf *FilterPyKalmanFilter) SetStateVector(x *mat.Dense) + type FilterPyKalmanFilterFactory struct + PMult float64 + QMult float64 + RMult float64 + func NewFilterPyKalmanFilterFactory(rMult, qMult, pMult float64) *FilterPyKalmanFilterFactory + func (f *FilterPyKalmanFilterFactory) CreateFilter(initialDetection *mat.Dense) Filter + type HomographyTransformation struct + HomographyMatrix *mat.Dense + InverseHomographyMatrix *mat.Dense + func NewHomographyTransformation(homographyMatrix *mat.Dense) (*HomographyTransformation, error) + func (h *HomographyTransformation) AbsToRel(points *mat.Dense) *mat.Dense + func (h *HomographyTransformation) RelToAbs(points *mat.Dense) *mat.Dense + type HomographyTransformationGetter struct + Confidence float64 + MaxIters int + Method gocv.HomographyMethod + ProportionPointsUsedThreshold float64 + RansacReprojThreshold float64 + func NewHomographyTransformationGetter(ransacReprojThreshold float64, maxIters int, ...) *HomographyTransformationGetter + func (h *HomographyTransformationGetter) Call(currPts, prevPts *mat.Dense) (bool, CoordinateTransformation) + type InformationFile struct + func NewInformationFile(filePath string) (*InformationFile, error) + func (inf *InformationFile) Search(variableName string) (interface{}, error) + func (inf *InformationFile) SearchInt(variableName string) (int, error) + func (inf *InformationFile) SearchString(variableName string) (string, error) + type MOTChallengeData struct + Frames map[int]*MOTChallengeFrame + VideoName string + func LoadMotchallenge(csvPath string) (*MOTChallengeData, error) + type MOTChallengeFrame struct + BBoxes [][]float64 + FrameID int + IDs []int + type Metrics struct + IDF1 float64 + IDP float64 + IDR float64 + ML float64 + MOTA float64 + MOTP float64 + MT float64 + NumFalsePositives int + NumFragmentations int + NumMatches int + NumMisses int + NumObjects int + NumSwitches int + PT float64 + Precision float64 + Recall float64 + func EvalMotChallenge(gtPath, predPath string, metricsToCompute []string) (*Metrics, error) + type MetricsDataFrame struct + Rows []MetricsRow + func NewMetricsDataFrame() *MetricsDataFrame + func (df *MetricsDataFrame) AddRow(row MetricsRow) + func (df *MetricsDataFrame) Get(videoName, metricName string) (float64, bool) + func (df *MetricsDataFrame) GetRow(videoName string) (MetricsRow, bool) + type MetricsRow struct + IDF1 float64 + IDP float64 + IDR float64 + ML float64 + MOTA float64 + MOTP float64 + MT float64 + NumFalsePositives int + NumFragmentations int + NumMatches int + NumMisses int + NumObjects int + NumSwitches int + PT float64 + Precision float64 + Recall float64 + VideoName string + type MotionEstimator struct + BlockSize int + DrawFlow bool + FlowColor color.RGBA + MaxPoints int + MinDistance int + QualityLevel float64 + TransformationsGetter TransformationGetter + func NewMotionEstimator(maxPoints int, minDistance int, blockSize int, qualityLevel float64, ...) *MotionEstimator + func (m *MotionEstimator) Close() + func (m *MotionEstimator) Update(frame gocv.Mat, mask gocv.Mat) CoordinateTransformation + type NilCoordinateTransformation struct + func (n *NilCoordinateTransformation) AbsToRel(points *mat.Dense) *mat.Dense + func (n *NilCoordinateTransformation) RelToAbs(points *mat.Dense) *mat.Dense + type NoFilter struct + func (nf *NoFilter) GetDimZ() int + func (nf *NoFilter) GetState() *mat.Dense + func (nf *NoFilter) GetStateVector() *mat.Dense + func (nf *NoFilter) Predict() + func (nf *NoFilter) SetStateVector(x *mat.Dense) + func (nf *NoFilter) Update(detectionPointsFlatten *mat.Dense, R, H *mat.Dense) + type NoFilterFactory struct + func NewNoFilterFactory() *NoFilterFactory + func (f *NoFilterFactory) CreateFilter(initialDetection *mat.Dense) Filter + type OptimizedKalmanFilter struct + PosVariance []float64 + PosVelCovariance []float64 + VelVariance []float64 + func (okf *OptimizedKalmanFilter) GetDimZ() int + func (okf *OptimizedKalmanFilter) GetState() *mat.Dense + func (okf *OptimizedKalmanFilter) GetStateVector() *mat.Dense + func (okf *OptimizedKalmanFilter) Predict() + func (okf *OptimizedKalmanFilter) SetStateVector(x *mat.Dense) + func (okf *OptimizedKalmanFilter) Update(detectionPointsFlatten *mat.Dense, R, H *mat.Dense) + type OptimizedKalmanFilterFactory struct + PosVariance float64 + PosVelCovariance float64 + QMult float64 + RMult float64 + VelVariance float64 + func NewOptimizedKalmanFilterFactory(rMult, qMult, posVar, posVelCov, velVar float64) *OptimizedKalmanFilterFactory + func (f *OptimizedKalmanFilterFactory) CreateFilter(initialDetection *mat.Dense) Filter + type PredictionsTextFile struct + func NewPredictionsTextFile(inputPath string, savePath string, informationFile *InformationFile) (*PredictionsTextFile, error) + func (ptf *PredictionsTextFile) Close() error + func (ptf *PredictionsTextFile) Update(predictions []*TrackedObject, frameNumber *int) error + type ScalarDistance struct + func NewScalarDistance(distanceFunction func(*Detection, *TrackedObject) float64) *ScalarDistance + func (sd *ScalarDistance) GetDistances(objects []*TrackedObject, candidates interface{}) *mat.Dense + type ScipyDistance struct + func NewScipyDistance(metric string) *ScipyDistance + type TrackedObject struct + AbsToRel func(*mat.Dense) *mat.Dense + Age int + CurrentMinDistance *float64 + DetectedAtLeastOncePoints []bool + DimPoints int + DimZ int + Estimate *mat.Dense + Filter Filter + GlobalID *int + HitCounter int + ID *int + InitialPeriod int + InitializingID *int + IsInitializing bool + Label *string + LastDetection *Detection + LastDistance *float64 + NumPoints int + PastDetections []*Detection + PointHitCounter []int + ReidHitCounter *int + func NewTrackedObject(objFactory *TrackedObjectFactory, initialDetection *Detection, ...) (*TrackedObject, error) + func (to *TrackedObject) EstimateVelocity() *mat.Dense + func (to *TrackedObject) GetEstimate(absolute bool) (*mat.Dense, error) + func (to *TrackedObject) GetID() *int + func (to *TrackedObject) GetLabel() *string + func (to *TrackedObject) GetLivePoints() []bool + func (to *TrackedObject) Hit(detection *Detection, period int) error + func (to *TrackedObject) HitCounterIsPositive() bool + func (to *TrackedObject) LivePoints() []bool + func (to *TrackedObject) Merge(trackedObject *TrackedObject) + func (to *TrackedObject) ReidHitCounterIsPositive() bool + func (to *TrackedObject) TrackerStep() + func (to *TrackedObject) UpdateCoordinateTransformation(coordTransform CoordinateTransformation) + type TrackedObjectFactory struct + func NewTrackedObjectFactory() *TrackedObjectFactory + func (f *TrackedObjectFactory) Count() int + func (f *TrackedObjectFactory) GetIDs() (id int, globalID int) + func (f *TrackedObjectFactory) GetInitializingID() int + func (f *TrackedObjectFactory) InitializingCount() int + type Tracker struct + Config *TrackerConfig + TrackedObjects []*TrackedObject + func NewTracker(config *TrackerConfig) (*Tracker, error) + func (t *Tracker) CurrentObjectCount() int + func (t *Tracker) GetActiveObjects() []*TrackedObject + func (t *Tracker) TotalObjectCount() int + func (t *Tracker) Update(detections []*Detection, period int, ...) []*TrackedObject + type TrackerConfig struct + DetectionThreshold float64 + DistanceFunction Distance + DistanceThreshold float64 + FilterFactory FilterFactory + HitCounterMax int + InitializationDelay int + PastDetectionsLength int + PointwiseHitCounterMax int + ReidDistanceFunction Distance + ReidDistanceThreshold float64 + ReidHitCounterMax *int + type TransformationGetter interface + Call func(currPts, prevPts *mat.Dense) (bool, CoordinateTransformation) + type TranslationTransformation struct + MovementVector []float64 + func NewTranslationTransformation(movementVector []float64) (*TranslationTransformation, error) + func (t *TranslationTransformation) AbsToRel(points *mat.Dense) *mat.Dense + func (t *TranslationTransformation) RelToAbs(points *mat.Dense) *mat.Dense + type TranslationTransformationGetter struct + BinSize float64 + ProportionPointsUsedThreshold float64 + func NewTranslationTransformationGetter(binSize, proportionPointsUsedThreshold float64) *TranslationTransformationGetter + func (t *TranslationTransformationGetter) Call(currPts, prevPts *mat.Dense) (bool, CoordinateTransformation) + type VectorizedDistance struct + func NewVectorizedDistance(distanceFunction func(candidates, objects *mat.Dense) *mat.Dense) *VectorizedDistance + func (vd *VectorizedDistance) GetDistances(objects []*TrackedObject, candidates interface{}) *mat.Dense + type Video struct + func NewVideo(opts VideoOptions) (*Video, error) + func (v *Video) Close() error + func (v *Video) Frames() <-chan gocv.Mat + func (v *Video) GetOutputFilePath() string + func (v *Video) Show(frame gocv.Mat, downsampleRatio float64) int + func (v *Video) Write(frame gocv.Mat) error + type VideoFromFrames struct + func NewVideoFromFrames(inputPath, savePath string, makeVideo bool) (*VideoFromFrames, error) + func (vff *VideoFromFrames) Close() error + func (vff *VideoFromFrames) Frames() <-chan gocv.Mat + func (vff *VideoFromFrames) Update(frame gocv.Mat) error + type VideoOptions struct + Camera *int + InputPath *string + Label string + OutputExt string + OutputFourcc *string + OutputFps float64 + OutputPath string