JeVoisBase
1.23
JeVois Smart Embedded Machine Vision Toolkit Base Modules
Share this page:
Tweet
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
f
g
h
i
m
n
o
p
q
r
s
t
v
w
x
y
Functions
Variables
_
a
b
c
d
f
g
h
i
m
n
o
p
q
r
s
t
v
w
x
y
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Typedefs
Enumerator
i
w
Files
File List
File Members
All
a
b
c
d
e
f
h
i
j
l
n
o
p
s
t
u
w
x
Functions
a
c
d
e
j
n
o
p
Variables
Typedefs
Enumerations
Enumerator
Macros
a
b
c
d
e
h
i
l
o
p
s
t
w
x
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
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
8
def
__init__
(self, **kwargs):
…
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
()
14
def
forward
(self, model, *args, **kwargs):
…
7
class
Tracking
(
BaseMetric
):
…
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