updates
This commit is contained in:
parent
759d275017
commit
0219eb094e
|
@ -283,7 +283,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing
|
||||||
|
|
||||||
# Rectangular Training https://github.com/ultralytics/yolov3/issues/232
|
# Rectangular Training https://github.com/ultralytics/yolov3/issues/232
|
||||||
if self.rect:
|
if self.rect:
|
||||||
# Read image shapes
|
# Read image shapes (wh)
|
||||||
sp = path.replace('.txt', '.shapes') # shapefile path
|
sp = path.replace('.txt', '.shapes') # shapefile path
|
||||||
try:
|
try:
|
||||||
with open(sp, 'r') as f: # read existing shapefile
|
with open(sp, 'r') as f: # read existing shapefile
|
||||||
|
@ -299,7 +299,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing
|
||||||
i = ar.argsort()
|
i = ar.argsort()
|
||||||
self.img_files = [self.img_files[i] for i in i]
|
self.img_files = [self.img_files[i] for i in i]
|
||||||
self.label_files = [self.label_files[i] for i in i]
|
self.label_files = [self.label_files[i] for i in i]
|
||||||
self.shapes = s[i]
|
self.shapes = s[i] # wh
|
||||||
ar = ar[i]
|
ar = ar[i]
|
||||||
|
|
||||||
# Set training image shapes
|
# Set training image shapes
|
||||||
|
|
Loading…
Reference in New Issue