Transigent commited on
Commit
c9bda11
1 Parent(s): ace3e02

Update utils/datasets.py to support .webp files (#2174)

Browse files

Simply added 'webp' as an image format to the img_formats array so that webp image files can be used as training data.

Files changed (1) hide show
  1. utils/datasets.py +1 -1
utils/datasets.py CHANGED
@@ -25,7 +25,7 @@ from utils.torch_utils import torch_distributed_zero_first
25
 
26
  # Parameters
27
  help_url = 'https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data'
28
- img_formats = ['bmp', 'jpg', 'jpeg', 'png', 'tif', 'tiff', 'dng'] # acceptable image suffixes
29
  vid_formats = ['mov', 'avi', 'mp4', 'mpg', 'mpeg', 'm4v', 'wmv', 'mkv'] # acceptable video suffixes
30
  logger = logging.getLogger(__name__)
31
 
 
25
 
26
  # Parameters
27
  help_url = 'https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data'
28
+ img_formats = ['bmp', 'jpg', 'jpeg', 'png', 'tif', 'tiff', 'dng', 'webp'] # acceptable image suffixes
29
  vid_formats = ['mov', 'avi', 'mp4', 'mpg', 'mpeg', 'm4v', 'wmv', 'mkv'] # acceptable video suffixes
30
  logger = logging.getLogger(__name__)
31