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

Simply added 'webp' as an image format to the img_formats array so that webp image files can be used as training data.
This commit is contained in:
Transigent authored and GitHub committed 2021-02-10 00:16:38 -08:00
1 parent ace3e02e40
commit c9bda112ae
1 file changed
+1 -1
+1 -1
View File
@@ -25,7 +25,7 @@ from utils.torch_utils import torch_distributed_zero_first
# Parameters
help_url = 'https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data'
img_formats = ['bmp', 'jpg', 'jpeg', 'png', 'tif', 'tiff', 'dng'] # acceptable image suffixes
img_formats = ['bmp', 'jpg', 'jpeg', 'png', 'tif', 'tiff', 'dng', 'webp'] # acceptable image suffixes
vid_formats = ['mov', 'avi', 'mp4', 'mpg', 'mpeg', 'm4v', 'wmv', 'mkv'] # acceptable video suffixes
logger = logging.getLogger(__name__)