diff --git a/utils/open_model_zoo/yolov3/interp.py b/utils/open_model_zoo/yolov3/interp.py index 025438535e4e..4be203dfd0cb 100644 --- a/utils/open_model_zoo/yolov3/interp.py +++ b/utils/open_model_zoo/yolov3/interp.py @@ -150,5 +150,11 @@ def parse_yolo_region(self, blob: 'np.ndarray', original_shape: list, params: di xmax = obj['xmax'] ymin = obj['ymin'] ymax = obj['ymax'] + + # Enforcing checks + xmin = max(0,xmin) + ymin = max(0,ymin) + xmax = min(xmax,width) + ymax = min(ymax,height) results.add_box(xmin, ymin, xmax, ymax, label, frame_number)