diff --git a/requirements.txt b/requirements.txt index aa74abd4..28380bd1 100755 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ # pip3 install -U -r requirements.txt -# conda install numpy opencv matplotlib tqdm && conda install pytorch torchvision -c pytorch +# conda install numpy opencv matplotlib tqdm pillow && conda install pytorch torchvision -c pytorch numpy opencv-python torch >= 1.0.0 diff --git a/utils/datasets.py b/utils/datasets.py index 22b6c4ba..a1f435f2 100755 --- a/utils/datasets.py +++ b/utils/datasets.py @@ -139,9 +139,11 @@ class LoadImagesAndLabels(Dataset): # for training/testing assert n > 0, 'No images found in %s' % path self.img_size = img_size self.augment = augment - self.label_files = [ - x.replace('images', 'labels').replace('.bmp', '.txt').replace('.jpg', '.txt').replace('.png', '.txt') - for x in self.img_files] + self.label_files = [x.replace('images', 'labels'). + replace('.jpeg', '.txt'). + replace('.jpg', '.txt'). + replace('.bmp', '.txt'). + replace('.png', '.txt') for x in self.img_files] # Rectangular Training https://github.com/ultralytics/yolov3/issues/232 self.pad_rectangular = rect