This commit is contained in:
Glenn Jocher 2019-11-20 16:02:57 -08:00
parent 3a4ed8b3ab
commit 74b57500c7
1 changed files with 1 additions and 0 deletions

View File

@ -368,6 +368,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing
assert cv2.imwrite(f, img[b[1]:b[3], b[0]:b[2]]), 'Failure extracting classifier boxes' assert cv2.imwrite(f, img[b[1]:b[3], b[0]:b[2]]), 'Failure extracting classifier boxes'
else: else:
ne += 1 # print('empty labels for image %s' % self.img_files[i]) # file empty ne += 1 # print('empty labels for image %s' % self.img_files[i]) # file empty
# os.system("rm '%s' '%s'" % (self.img_files[i], self.label_files[i])) # remove
pbar.desc = 'Reading labels (%g found, %g missing, %g empty for %g images)' % (nf, nm, ne, n) pbar.desc = 'Reading labels (%g found, %g missing, %g empty for %g images)' % (nf, nm, ne, n)
assert nf > 0, 'No labels found. Recommend correcting image and label paths.' assert nf > 0, 'No labels found. Recommend correcting image and label paths.'