MCPcopy Create free account
hub / github.com/FoundationVision/ByteTrack / __init__

Method __init__

tutorials/jde/byte_tracker.py:138–156  ·  view source on GitHub ↗
(self, opt, frame_rate=30)

Source from the content-addressed store, hash-verified

136
137class BYTETracker(object):
138 def __init__(self, opt, frame_rate=30):
139 self.opt = opt
140 self.model = Darknet(opt.cfg, nID=14455)
141 # load_darknet_weights(self.model, opt.weights)
142 self.model.load_state_dict(torch.load(opt.weights, map_location='cpu')['model'], strict=False)
143 self.model.cuda().eval()
144
145 self.tracked_stracks = [] # type: list[STrack]
146 self.lost_stracks = [] # type: list[STrack]
147 self.removed_stracks = [] # type: list[STrack]
148
149 self.frame_id = 0
150 self.det_thresh = opt.conf_thres
151 self.init_thresh = self.det_thresh + 0.2
152 self.low_thresh = 0.3
153 self.buffer_size = int(frame_rate / 30.0 * opt.track_buffer)
154 self.max_time_lost = self.buffer_size
155
156 self.kalman_filter = KalmanFilter()
157
158 def update(self, im_blob, img0):
159 """

Callers

nothing calls this directly

Calls 3

KalmanFilterClass · 0.90
DarknetClass · 0.85
evalMethod · 0.45

Tested by

no test coverage detected