Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Dataset Training Error - "AttributeError: 'NoneType' object has no attribute 'shape'" #45

Open
karan6100 opened this issue Nov 25, 2019 · 0 comments

Comments

@karan6100
Copy link

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant