diff --git a/utils/datasets.py b/utils/datasets.py index 35890c81..42b154fc 100755 --- a/utils/datasets.py +++ b/utils/datasets.py @@ -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' else: 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) assert nf > 0, 'No labels found. Recommend correcting image and label paths.'