Skip to content

Commit

Permalink
Update dataset_stats() to cv2.INTER_AREA (#5821)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher authored Nov 29, 2021
1 parent 8277033 commit 5ca5dd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ def hub_ops(f, max_dim=1920):
im_height, im_width = im.shape[:2]
r = max_dim / max(im_height, im_width) # ratio
if r < 1.0: # image too large
im = cv2.resize(im, (int(im_width * r), int(im_height * r)), interpolation=cv2.INTER_LINEAR)
im = cv2.resize(im, (int(im_width * r), int(im_height * r)), interpolation=cv2.INTER_AREA)
cv2.imwrite(str(f_new), im)

zipped, data_dir, yaml_path = unzip(Path(path))
Expand Down

0 comments on commit 5ca5dd4

Please sign in to comment.