Skip to content

Commit

Permalink
Update utils/datasets.py to support .webp files (ultralytics#2174)
Browse files Browse the repository at this point in the history
Simply added 'webp' as an image format to the img_formats array so that webp image files can be used as training data.
  • Loading branch information
Transigent authored Feb 10, 2021
1 parent 1055f96 commit 8163ad9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

# 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__)

Expand Down

0 comments on commit 8163ad9

Please sign in to comment.