glenn-jocher commited on
Commit
024a42f
1 Parent(s): 5c2cd71

datasets.py vid_formats updated

Browse files
Files changed (1) hide show
  1. utils/datasets.py +3 -2
utils/datasets.py CHANGED
@@ -18,7 +18,7 @@ from utils.utils import xyxy2xywh, xywh2xyxy
18
 
19
  help_url = 'https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data'
20
  img_formats = ['.bmp', '.jpg', '.jpeg', '.png', '.tif', '.dng']
21
- vid_formats = ['.mov', '.avi', '.mp4', '.mpg']
22
 
23
  # Get orientation exif tag
24
  for orientation in ExifTags.TAGS.keys():
@@ -63,7 +63,8 @@ class LoadImages: # for inference
63
  self.new_video(videos[0]) # new video
64
  else:
65
  self.cap = None
66
- assert self.nF > 0, 'No images or videos found in ' + path
 
67
 
68
  def __iter__(self):
69
  self.count = 0
 
18
 
19
  help_url = 'https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data'
20
  img_formats = ['.bmp', '.jpg', '.jpeg', '.png', '.tif', '.dng']
21
+ vid_formats = ['.mov', '.avi', '.mp4', '.mpg', '.mpeg', '.m4v', '.wmv', '.mkv']
22
 
23
  # Get orientation exif tag
24
  for orientation in ExifTags.TAGS.keys():
 
63
  self.new_video(videos[0]) # new video
64
  else:
65
  self.cap = None
66
+ assert self.nF > 0, 'No images or videos found in %s. Supported formats are:\nimages: %s\nvideos: %s' % \
67
+ (path, img_formats, vid_formats)
68
 
69
  def __iter__(self):
70
  self.count = 0