diff --git a/mmpose/visualization/local_visualizer_3d.py b/mmpose/visualization/local_visualizer_3d.py index e8be974ebc..444edae738 100644 --- a/mmpose/visualization/local_visualizer_3d.py +++ b/mmpose/visualization/local_visualizer_3d.py @@ -608,9 +608,8 @@ def add_datasample(self, det_img_data = cv2.copyMakeBorder( det_img_data, height // 2, - height // 2, - width // 2, - width // 2, + (height // 2 + 1) if height % 2 == 1 else height // 2, + width // 2, (width // 2 + 1) if width % 2 == 1 else width // 2, cv2.BORDER_CONSTANT, value=(255, 255, 255)) drawn_img = np.concatenate((det_img_data, pred_img_data), axis=1)