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

Method __init__

tutorials/jde/tracker.py:157–175  ·  view source on GitHub ↗
(self, opt, frame_rate=30)

Source from the content-addressed store, hash-verified

155
156class JDETracker(object):
157 def __init__(self, opt, frame_rate=30):
158 self.opt = opt
159 self.model = Darknet(opt.cfg, nID=14455)
160 # load_darknet_weights(self.model, opt.weights)
161 self.model.load_state_dict(torch.load(opt.weights, map_location='cpu')['model'], strict=False)
162 self.model.cuda().eval()
163
164 self.tracked_stracks = [] # type: list[STrack]
165 self.lost_stracks = [] # type: list[STrack]
166 self.removed_stracks = [] # type: list[STrack]
167
168 self.frame_id = 0
169 self.det_thresh = opt.conf_thres
170 self.init_thresh = self.det_thresh + 0.2
171 self.low_thresh = 0.4
172 self.buffer_size = int(frame_rate / 30.0 * opt.track_buffer)
173 self.max_time_lost = self.buffer_size
174
175 self.kalman_filter = KalmanFilter()
176
177 def update(self, im_blob, img0):
178 """

Callers

nothing calls this directly

Calls 3

KalmanFilterClass · 0.90
DarknetClass · 0.85
evalMethod · 0.45

Tested by

no test coverage detected