MCPcopy Create free account
hub / github.com/DeepLabCut/DeepLabCut / __init__

Method __init__

deeplabcut/core/trackingutils.py:312–340  ·  view source on GitHub ↗
(self, bbox)

Source from the content-addressed store, hash-verified

310
311class BoxTracker(BaseTracker):
312 def __init__(self, bbox):
313 super().__init__(dim=4, dim_z=4)
314 self.kf = KalmanFilter(dim_x=7, dim_z=4)
315 self.kf.F = np.array(
316 [
317 [1, 0, 0, 0, 1, 0, 0],
318 [0, 1, 0, 0, 0, 1, 0],
319 [0, 0, 1, 0, 0, 0, 1],
320 [0, 0, 0, 1, 0, 0, 0],
321 [0, 0, 0, 0, 1, 0, 0],
322 [0, 0, 0, 0, 0, 1, 0],
323 [0, 0, 0, 0, 0, 0, 1],
324 ]
325 )
326 self.kf.H = np.array(
327 [
328 [1, 0, 0, 0, 0, 0, 0],
329 [0, 1, 0, 0, 0, 0, 0],
330 [0, 0, 1, 0, 0, 0, 0],
331 [0, 0, 0, 1, 0, 0, 0],
332 ]
333 )
334 self.kf.R[2:, 2:] *= 10.0
335 # Give high uncertainty to the unobservable initial velocities
336 self.kf.P[4:, 4:] *= 1000.0
337 self.kf.P *= 10.0
338 self.kf.Q[-1, -1] *= 0.01
339 self.kf.Q[4:, 4:] *= 0.01
340 self.state = bbox
341
342 def update(self, bbox):
343 super().update(self.convert_bbox_to_z(bbox))

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected