-
Notifications
You must be signed in to change notification settings - Fork 34
Description
Hello,
I want to augment my dataset using the code "Augmenting a dataset for object detection in YOLO". However, I am getting the following error during "Applying the augmentation process". I have multiple label boxes on an image in my dataset. So there is more than one data in xml file too. Can't I use Clodsa on this dataset?
Exception Traceback (most recent call last)
in ()
----> 1 augmentor.applyAugmentation()
1 frames
/usr/local/lib/python3.7/dist-packages/clodsa/augmentors/yoloLinearDetectionAugmentor.py in applyAugmentation(self)
86
87 def applyAugmentation(self):
---> 88 self.readImagesAndAnnotations()
89 if not(os._exists(self.outputPath)):
90 os.makedirs(self.outputPath)
/usr/local/lib/python3.7/dist-packages/clodsa/augmentors/yoloLinearDetectionAugmentor.py in readImagesAndAnnotations(self)
83 self.labelPaths = list(paths.list_files(self.inputPath,validExts=(".txt")))
84 if (len(self.imagePaths) != len(self.labelPaths)):
---> 85 raise Exception("The number of images is different to the number of annotations")
86
87 def applyAugmentation(self):
Exception: The number of images is different to the number of annotations
EDIT: I found the solution. The problem was that the existing jpg-png files in the folder were together and the file named classes.txt was skipped. The problem was solved by running the jpg and their txt files separately. :)