Skip to content

Commit

Permalink
Merge pull request ifzhang#190 from dumbPy/patch-3
Browse files Browse the repository at this point in the history
Change BaseTrack attributes to Object attributes
  • Loading branch information
ifzhang authored Jun 21, 2022
2 parents cebffc8 + eb486ba commit d9504c1
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions yolox/tracker/basetrack.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,31 @@ class TrackState(object):


class BaseTrack(object):
_count = 0
def __init__(self):
self._count = 0

track_id = 0
is_activated = False
state = TrackState.New
self.track_id = 0
self.is_activated = False
self.state = TrackState.New

history = OrderedDict()
features = []
curr_feature = None
score = 0
start_frame = 0
frame_id = 0
time_since_update = 0
self.history = OrderedDict()
self.features = []
self.curr_feature = None
self.score = 0
self.start_frame = 0
self.frame_id = 0
self.time_since_update = 0

# multi-camera
location = (np.inf, np.inf)
# multi-camera
self.location = (np.inf, np.inf)

@property
def end_frame(self):
return self.frame_id

@staticmethod
def next_id():
BaseTrack._count += 1
return BaseTrack._count
def next_id(self):
self._count += 1
return self._count

def activate(self, *args):
raise NotImplementedError
Expand All @@ -49,4 +49,4 @@ def mark_lost(self):
self.state = TrackState.Lost

def mark_removed(self):
self.state = TrackState.Removed
self.state = TrackState.Removed

0 comments on commit d9504c1

Please sign in to comment.