From 5ca5dd4c87fcc62491173b393fd51cf244805313 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 29 Nov 2021 13:15:36 +0100 Subject: [PATCH] Update `dataset_stats()` to `cv2.INTER_AREA` (#5821) --- utils/datasets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/datasets.py b/utils/datasets.py index 68b1e634bebf..ac81603c7d34 100755 --- a/utils/datasets.py +++ b/utils/datasets.py @@ -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))