JeVoisBase
1.22
JeVois Smart Embedded Machine Vision Toolkit Base Modules
Share this page:
Tweet
Loading...
Searching...
No Matches
tracking.py
Go to the documentation of this file.
1
import
cv2
as
cv
2
3
from
.base_metric
import
BaseMetric
4
from
..factory
import
METRICS
5
6
@METRICS.register
7
class
Tracking
(
BaseMetric
):
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
()
utils.metrics.base_metric.BaseMetric
Definition
base_metric.py:5
utils.metrics.base_metric.BaseMetric._warmup
_warmup
Definition
base_metric.py:7
utils.metrics.base_metric.BaseMetric._repeat
_repeat
Definition
base_metric.py:8
utils.metrics.base_metric.BaseMetric._getResult
_getResult(self)
Definition
base_metric.py:32
utils.metrics.base_metric.BaseMetric._timer
_timer
Definition
base_metric.py:11
utils.metrics.tracking.Tracking
Definition
tracking.py:7
utils.metrics.tracking.Tracking.forward
forward(self, model, *args, **kwargs)
Definition
tracking.py:14
utils.metrics.tracking.Tracking.__init__
__init__(self, **kwargs)
Definition
tracking.py:8
opencv_zoo
benchmark
utils
metrics
tracking.py
Please help us improve this page: Edit it on
GitHub
or
email us your edits and suggestions.
Generated by
1.9.8