New Dataset Training Error - "AttributeError: 'NoneType' object has no attribute 'shape'"
karan6100 opened this issue · 0 comments
karan6100 commented
Hi, I am trying to train custom object detection to detect my company-logo, everything went well until this error, I also deleted and annotated images again but it no change in the outcome. Can someone please help me with this
Thank You
cfg/tiny-yolo-voc-1c.cfg parsing annotations_clean
Parsing for ['vodafone']
[====================>]100% Image9.xml
Statistics:
vodafone: 28
Dataset size: 28
Dataset of 28 instance(s)
Image12.jpg
Traceback (most recent call last):
File "flow", line 6, in <module>
cliHandler(sys.argv)
File "C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\cli.py", line 33, in cliHandler
print('Enter training ...'); tfnet.train()
File "C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\net\flow.py", line 39, in train
for i, (x_batch, datum) in enumerate(batches):
File "C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\net\yolo\data.py", line 114, in shuffle
inp, new_feed = self._batch(train_instance)
File "C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\net\yolov2\data.py", line 28, in _batch
img = self.preprocess(path, allobj)
File "C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\net\yolo\predict.py", line 62, in preprocess
result = imcv2_affine_trans(im)
File "C:\Users\karanbari\Desktop\YOLO\darkflow-master\darkflow\utils\im_transform.py", line 20, in imcv2_affine_trans
h, w, c = im.shape
AttributeError: 'NoneType' object has no attribute 'shape'
This is the corresponding .xml file:
<annotation>
<folder>images\train_clean</folder>
<filename>Image12.jpg</filename>
<segmented>0</segmented>
<size>
<width>446</width>
<height>113</height>
<depth>3</depth>
</size>
<object>
<name>vodafone</name>
<pose>Unspecified</pose>
<truncated>0</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>0</xmin>
<ymin>0</ymin>
<xmax>115</xmax>
<ymax>111</ymax>
</bndbox>
</object>
</annotation>