
    FPhI                     @    d dl mZ d dlZ G d d      Z G d d      Zy)    )OrderedDictNc                        e Zd ZdZdZdZdZdZy)
TrackStatez/Enumeration of possible object tracking states.r            N)__name__
__module____qualname____doc__NewTrackedLostRemoved     iC:\Users\daisl\Desktop\realtime-object-detection\venv\Lib\site-packages\ultralytics/trackers/basetrack.pyr   r      s    9
CGDGr   r   c                       e Zd ZdZdZdZdZej                  Z	 e
       Zg ZdZdZdZdZdZej&                  ej&                  fZed        Zed        Zd Zd Zd	 Zd
 Zd Zed        Zy)	BaseTrackzOBase class for object tracking, handling basic track attributes and operations.r   FNc                     | j                   S )z&Return the last frame ID of the track.)frame_idselfs    r   	end_framezBaseTrack.end_frame%   s     }}r   c                  T    t         xj                  dz  c_        t         j                  S )z1Increment and return the global track ID counter.r   r   _countr   r   r   next_idzBaseTrack.next_id*   s!     	Ar   c                     t         )z/Activate the track with the provided arguments.NotImplementedError)r   argss     r   activatezBaseTrack.activate0       !!r   c                     t         )z$Predict the next state of the track.r    r   s    r   predictzBaseTrack.predict4   r$   r   c                     t         )z'Update the track with new observations.r    )r   r"   kwargss      r   updatezBaseTrack.update8   r$   r   c                 .    t         j                  | _        y)zMark the track as lost.N)r   r   stater   s    r   	mark_lostzBaseTrack.mark_lost<   s    __
r   c                 .    t         j                  | _        y)zMark the track as removed.N)r   r   r+   r   s    r   mark_removedzBaseTrack.mark_removed@   s    ''
r   c                      dt         _        y)z"Reset the global track ID counter.r   Nr   r   r   r   reset_idzBaseTrack.reset_idD   s     	r   )r	   r
   r   r   r   track_idis_activatedr   r   r+   r   historyfeaturescurr_featurescorestart_framer   time_since_updatenpinflocationpropertyr   staticmethodr   r#   r&   r)   r,   r.   r0   r   r   r   r   r      s    YFHLNNEmGHLEKH H     
"""%(  r   r   )collectionsr   numpyr9   r   r   r   r   r   <module>r@      s!    $  6 6r   