add *.jpeg support
This commit is contained in:
parent
40bc015b75
commit
1a757524bf
|
@ -1,5 +1,5 @@
|
||||||
# pip3 install -U -r requirements.txt
|
# 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
|
numpy
|
||||||
opencv-python
|
opencv-python
|
||||||
torch >= 1.0.0
|
torch >= 1.0.0
|
||||||
|
|
|
@ -139,9 +139,11 @@ class LoadImagesAndLabels(Dataset): # for training/testing
|
||||||
assert n > 0, 'No images found in %s' % path
|
assert n > 0, 'No images found in %s' % path
|
||||||
self.img_size = img_size
|
self.img_size = img_size
|
||||||
self.augment = augment
|
self.augment = augment
|
||||||
self.label_files = [
|
self.label_files = [x.replace('images', 'labels').
|
||||||
x.replace('images', 'labels').replace('.bmp', '.txt').replace('.jpg', '.txt').replace('.png', '.txt')
|
replace('.jpeg', '.txt').
|
||||||
for x in self.img_files]
|
replace('.jpg', '.txt').
|
||||||
|
replace('.bmp', '.txt').
|
||||||
|
replace('.png', '.txt') for x in self.img_files]
|
||||||
|
|
||||||
# Rectangular Training https://github.com/ultralytics/yolov3/issues/232
|
# Rectangular Training https://github.com/ultralytics/yolov3/issues/232
|
||||||
self.pad_rectangular = rect
|
self.pad_rectangular = rect
|
||||||
|
|
Loading…
Reference in New Issue