diff --git a/deploy/pipeline/pipeline.py b/deploy/pipeline/pipeline.py index e13afeb0a28aee77ca2ad190b17dee19dea0d478..54bbc78e5a85858073e0adadd4976cbf6a93eaa2 100644 --- a/deploy/pipeline/pipeline.py +++ b/deploy/pipeline/pipeline.py @@ -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)) diff --git a/deploy/python/visualize.py b/deploy/python/visualize.py index 4bc2e17832bcfc7450e7c1704bb8064824734565..120b85d1614dfefd4cc1d26330c4d5b4dce00906 100644 --- a/deploy/python/visualize.py +++ b/deploy/python/visualize.py @@ -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.