Soccer-Ball-Detection-YOLOv2
Soccer-Ball-Detection-YOLOv2 copied to clipboard
Dataset Size: 0 ZeroDivision error
Hey, I'm training my custom dataset of four classes and for some reason .train() throws the following error cfg/yolo_custom.cfg parsing /home/iot/darkflow/data/ann/ Parsing for ['Apple', 'Cucumber', 'Tomato', 'Carrot']
Statistics: Dataset size: 0 Dataset of 0 instance(s)
ZeroDivisionError Traceback (most recent call last)
~/darkflow/darkflow/net/flow.py in train(self) 37 loss_op = self.framework.loss 38 ---> 39 for i, (x_batch, datum) in enumerate(batches): 40 if not i: self.say(train_stats.format( 41 self.FLAGS.lr, self.FLAGS.batch,
~/darkflow/darkflow/net/yolo/data.py in shuffle(self) 100 print('Dataset of {} instance(s)'.format(size)) 101 if batch > size: self.FLAGS.batch = batch = size --> 102 batch_per_epoch = int(size / batch) 103 104 for i in range(self.FLAGS.epoch):
ZeroDivisionError: division by zero
I've rechecked my dataset and all the jpg files have a corresponding text file. My options dictionary looks like this options = {"model": "cfg/yolo_custom.cfg", "load": "bin/yolo.weights", "batch": 8, "epoch": 100, "gpu": 0, "train": True, "verbalize":True, "annotation":"/home/iot/darkflow/data/ann/", "dataset": "/home/iot/darkflow/data/images/"}
I figured that the my annotation file format is different from yours. While my is as
Hi If you made .txt format, you have to convert to .xml with same parameter
After convert, if raise same problem, you also change some DarkNet code.
See this link, https://github.com/thtrieu/darkflow/issues/879
That's why, most of people occured Zero division error
thanks for the big help!