未验证 提交 c090b5ee 编写于 作者: Z zhiboniu 提交者: GitHub

fix time count while less than warmupframe (#7092)

上级 b9632a82
......@@ -495,6 +495,7 @@ class PipePredictor(object):
# det -> attr
batch_loop_cnt = math.ceil(
float(len(input)) / self.det_predictor.batch_size)
self.warmup_frame = min(10, len(input)//2) - 1
for i in range(batch_loop_cnt):
start_index = i * self.det_predictor.batch_size
end_index = min((i + 1) * self.det_predictor.batch_size, len(input))
......
......@@ -378,7 +378,7 @@ def visualize_action(im,
im = cv2.imread(im) if isinstance(im, str) else im
im_h, im_w = im.shape[:2]
text_scale = max(1, im.shape[1] / 1600.)
text_scale = max(1, im.shape[1] / 400.)
text_thickness = 2
if action_visual_collector:
......@@ -418,7 +418,7 @@ def visualize_vehicleplate(im, results, boxes=None):
im = np.ascontiguousarray(np.copy(im))
im_h, im_w = im.shape[:2]
text_scale = max(1.0, im.shape[0] / 1600.)
text_scale = max(1.0, im.shape[0] / 400.)
text_thickness = 2
line_inter = im.shape[0] / 40.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册