JeVoisBase  1.22
JeVois Smart Embedded Machine Vision Toolkit Base Modules
Share this page:
Loading...
Searching...
No Matches
tracking.py
Go to the documentation of this file.
1import cv2 as cv
2
3from .base_metric import BaseMetric
4from ..factory import METRICS
5
6@METRICS.register
8 def __init__(self, **kwargs):
9 super().__init__(**kwargs)
10
11 if self._warmup or self._repeat:
12 print('warmup and repeat in metric for tracking do not function.')
13
14 def forward(self, model, *args, **kwargs):
15 stream, first_frame, rois = args
16
17 for roi in rois:
18 stream.reload()
19 model.init(first_frame, tuple(roi))
20 self._timer.reset()
21 for frame in stream:
22 self._timer.start()
23 model.infer(frame)
24 self._timer.stop()
25
26 return self._getResult()
forward(self, model, *args, **kwargs)
Definition tracking.py:14