Documentation ¶
Index ¶
- Constants
- type BYTETracker
- type DetectBox
- type KalmanFilter
- type Object
- type Point
- type Rect
- func (r *Rect) BRX() float32
- func (r *Rect) BRY() float32
- func (r *Rect) CalcIoU(other Rect) float32
- func (r *Rect) GetTlbr() Tlbr
- func (r *Rect) GetXyah() Xyah
- func (r *Rect) Height() float32
- func (r *Rect) SetHeight(height float32)
- func (r *Rect) SetWidth(width float32)
- func (r *Rect) SetX(x float32)
- func (r *Rect) SetY(y float32)
- func (r *Rect) TLX() float32
- func (r *Rect) TLY() float32
- func (r *Rect) Width() float32
- func (r *Rect) X() float32
- func (r *Rect) Y() float32
- type STrack
- func (s *STrack) Activate(frameID, trackID int)
- func (s *STrack) GetDetectionID() int64
- func (s *STrack) GetFrameID() int
- func (s *STrack) GetLabel() int
- func (s *STrack) GetRect() *Rect
- func (s *STrack) GetSTrackState() STrackState
- func (s *STrack) GetScore() float32
- func (s *STrack) GetStartFrameID() int
- func (s *STrack) GetTrackID() int
- func (s *STrack) GetTrackletLength() int
- func (s *STrack) IsActivated() bool
- func (s *STrack) MarkAsLost()
- func (s *STrack) MarkAsRemoved()
- func (s *STrack) Predict()
- func (s *STrack) ReActivate(newTrack *STrack, frameID, newTrackID int)
- func (s *STrack) Update(newTrack *STrack, frameID int) error
- type STrackState
- type StateCov
- type StateHCov
- type StateHMean
- type StateMean
- type Tlbr
- type Tlwh
- type Track
- type Trail
- type Xyah
Constants ¶
const (
LARGE = 1000000.0
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BYTETracker ¶
type BYTETracker struct {
// contains filtered or unexported fields
}
BYTETracker represents the BYTE Tracker
func NewBYTETracker ¶
func NewBYTETracker(frameRate int, trackBuffer int, trackThresh float32, highThresh float32, matchThresh float32) *BYTETracker
NewBYTETracker initializes and returns a new BYTETracker
func (*BYTETracker) Reset ¶
func (bt *BYTETracker) Reset()
Reset clears the tracked data and resets everything
type DetectBox ¶
type DetectBox []float32
DetectBox represents a 1x4 matrix using a slice of float32
type KalmanFilter ¶
type KalmanFilter struct {
// contains filtered or unexported fields
}
KalmanFilter represents the Kalman filter
func NewKalmanFilter ¶
func NewKalmanFilter(stdWeightPosition, stdWeightVelocity float32) *KalmanFilter
NewKalmanFilter initializes and returns a new KalmanFilter
func (*KalmanFilter) Initiate ¶
func (kf *KalmanFilter) Initiate(mean StateMean, covariance *StateCov, measurement DetectBox)
Initiate initializes the state mean and covariance
func (*KalmanFilter) Predict ¶
func (kf *KalmanFilter) Predict(mean StateMean, covariance *StateCov)
Predict predicts the next state mean and covariance
type Object ¶
type Object struct { // Rect is the bounding box representation of the detected object Rect Rect // Label is the class label of the object detected Label int // Prob is the confidence/probability of the object detected Prob float32 // ID is a unique ID to give this object which can be used to match // the input detection object and tracked object ID int64 }
Object represents an object detected in ByteTrack
type Point ¶
type Point struct {
X, Y int
}
Point represents the x,y coordinates of the center box of a tracking rect/bounding box results
type Rect ¶
type Rect struct {
Tlwh Tlwh
}
Rect represents a rectangle with Tlwh (top, left, width, height) format
func GenerateRectByTlbr ¶
GenerateRectByTlbr creates a Rect from Tlbr (top, left, bottom, right) format
func GenerateRectByXyah ¶
GenerateRectByXyah creates a Rect from Xyah (center x, center y, aspect ratio, height) format
func (*Rect) GetXyah ¶
GetXyah converts the rectangle to Xyah (center x, center y, aspect ratio, height) format
type STrack ¶
type STrack struct {
// contains filtered or unexported fields
}
STrack represents a single track of an object
func (*STrack) GetDetectionID ¶
GetDetectionID returns the unique ID for the detection
func (*STrack) GetFrameID ¶
GetFrameID returns the current frame ID
func (*STrack) GetSTrackState ¶
func (s *STrack) GetSTrackState() STrackState
GetSTrackState returns the current state of the track
func (*STrack) GetStartFrameID ¶
GetStartFrameID returns the frame ID when the track started
func (*STrack) GetTrackID ¶
GetTrackID returns the unique ID for the track
func (*STrack) GetTrackletLength ¶
GetTrackletLength returns the length of the tracklet
func (*STrack) IsActivated ¶
IsActivated returns whether the track is activated
func (*STrack) MarkAsRemoved ¶
func (s *STrack) MarkAsRemoved()
MarkAsRemoved marks the track as removed
func (*STrack) ReActivate ¶
ReActivate reinitializes the track with a new detection
type STrackState ¶
type STrackState int
STrackState represents the state of a tracked object
const ( // Object is newly detected New STrackState = 0 // Object is currently being tracked Tracked STrackState = 1 // Object has been lost Lost STrackState = 2 // Object has been removed Removed STrackState = 3 )
type StateHMean ¶
type StateHMean []float32
StateHMean represents a 1x4 matrix using a slice of float32
type StateMean ¶
type StateMean []float32
StateMean represents a 1x8 matrix using a slice of float32
type Track ¶
type Track struct {
// contains filtered or unexported fields
}
Track represents a track history
type Trail ¶
Trail is the struct to keep a history of Track results used for drawing a trail
func NewTrail ¶
NewTrail returns a new trail history track instance. Size is the number of most recent trails to keep and specifies the maximum length of the trail to maintain