(bbox, width, height)
| 3 | import cv2 |
| 4 | |
| 5 | def scale_bbox(bbox, width, height): |
| 6 | return (np.array(bbox[0]) / 1000) * np.array([width, height, width, height]) |
| 7 | |
| 8 | def scale_point(point, width, height): |
| 9 | return (np.array(point[0]) / 1000) * np.array([width, height]) |