JeVoisBase  1.22
JeVois Smart Embedded Machine Vision Toolkit Base Modules
Share this page:
Loading...
Searching...
No Matches
base.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 def forward(self, model, *args, **kwargs):
12 img = args[0]
13
14 # warmup
15 for _ in range(self._warmup_warmup):
16 model.infer(img)
17 # repeat
18 self._timer.reset()
19 for _ in range(self._repeat_repeat):
20 self._timer.start()
21 model.infer(img)
22 self._timer.stop()
23
24 return self._getResult()
forward(self, model, *args, **kwargs)
Definition base.py:11
__init__(self, **kwargs)
Definition base.py:8