Browse Source

datasets.py vid_formats updated

5.0
Glenn Jocher 4 years ago
parent
commit
024a42f4fd
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      utils/datasets.py

+ 3
- 2
utils/datasets.py View File

@@ -18,7 +18,7 @@ from utils.utils import xyxy2xywh, xywh2xyxy

help_url = 'https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data'
img_formats = ['.bmp', '.jpg', '.jpeg', '.png', '.tif', '.dng']
vid_formats = ['.mov', '.avi', '.mp4', '.mpg']
vid_formats = ['.mov', '.avi', '.mp4', '.mpg', '.mpeg', '.m4v', '.wmv', '.mkv']

# Get orientation exif tag
for orientation in ExifTags.TAGS.keys():
@@ -63,7 +63,8 @@ class LoadImages: # for inference
self.new_video(videos[0]) # new video
else:
self.cap = None
assert self.nF > 0, 'No images or videos found in ' + path
assert self.nF > 0, 'No images or videos found in %s. Supported formats are:\nimages: %s\nvideos: %s' % \
(path, img_formats, vid_formats)

def __iter__(self):
self.count = 0

Loading…
Cancel
Save