diff --git a/utils/datasets.py b/utils/datasets.py index 3504998..68b1e63 100755 --- a/utils/datasets.py +++ b/utils/datasets.py @@ -35,7 +35,7 @@ HELP_URL = 'https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data' IMG_FORMATS = ['bmp', 'jpg', 'jpeg', 'png', 'tif', 'tiff', 'dng', 'webp', 'mpo'] # acceptable image suffixes VID_FORMATS = ['mov', 'avi', 'mp4', 'mpg', 'mpeg', 'm4v', 'wmv', 'mkv'] # acceptable video suffixes WORLD_SIZE = int(os.getenv('WORLD_SIZE', 1)) # DPP -NUM_THREADS = min(8, os.cpu_count()) # number of multiprocessing threads +NUM_THREADS = min(8, max(1, os.cpu_count() - 1)) # number of multiprocessing threads # Get orientation exif tag for orientation in ExifTags.TAGS.keys():