glenn-jocher commited on
Commit
5ca5dd4
·
unverified ·
1 Parent(s): 8277033

Update `dataset_stats()` to `cv2.INTER_AREA` (#5821)

Browse files
Files changed (1) hide show
  1. utils/datasets.py +1 -1
utils/datasets.py CHANGED
@@ -974,7 +974,7 @@ def dataset_stats(path='coco128.yaml', autodownload=False, verbose=False, profil
974
  im_height, im_width = im.shape[:2]
975
  r = max_dim / max(im_height, im_width) # ratio
976
  if r < 1.0: # image too large
977
- im = cv2.resize(im, (int(im_width * r), int(im_height * r)), interpolation=cv2.INTER_LINEAR)
978
  cv2.imwrite(str(f_new), im)
979
 
980
  zipped, data_dir, yaml_path = unzip(Path(path))
 
974
  im_height, im_width = im.shape[:2]
975
  r = max_dim / max(im_height, im_width) # ratio
976
  if r < 1.0: # image too large
977
+ im = cv2.resize(im, (int(im_width * r), int(im_height * r)), interpolation=cv2.INTER_AREA)
978
  cv2.imwrite(str(f_new), im)
979
 
980
  zipped, data_dir, yaml_path = unzip(Path(path))