| 11 | |
| 12 | |
| 13 | class BaseTrack(object): |
| 14 | _count = 0 |
| 15 | |
| 16 | track_id = 0 |
| 17 | is_activated = False |
| 18 | state = TrackState.New |
| 19 | |
| 20 | history = OrderedDict() |
| 21 | features = [] |
| 22 | curr_feature = None |
| 23 | score = 0 |
| 24 | start_frame = 0 |
| 25 | frame_id = 0 |
| 26 | time_since_update = 0 |
| 27 | |
| 28 | # multi-camera |
| 29 | location = (np.inf, np.inf) |
| 30 | |
| 31 | @property |
| 32 | def end_frame(self): |
| 33 | return self.frame_id |
| 34 | |
| 35 | @staticmethod |
| 36 | def next_id(): |
| 37 | BaseTrack._count += 1 |
| 38 | return BaseTrack._count |
| 39 | |
| 40 | def activate(self, *args): |
| 41 | raise NotImplementedError |
| 42 | |
| 43 | def predict(self): |
| 44 | raise NotImplementedError |
| 45 | |
| 46 | def update(self, *args, **kwargs): |
| 47 | raise NotImplementedError |
| 48 | |
| 49 | def mark_lost(self): |
| 50 | self.state = TrackState.Lost |
| 51 | |
| 52 | def mark_removed(self): |
| 53 | self.state = TrackState.Removed |
| 54 | |
| 55 | def mark_replaced(self): |
| 56 | self.state = TrackState.Replaced |
nothing calls this directly
no outgoing calls
no test coverage detected