Open GoyalAnkit16 opened 4 years ago
Check if your path to the images are correct and if the xml's link correctly to the images. A correct path could be "data/images". I had the same error because my paths were formatted like "/data/images" which indicates the root folder.
While trying to train the model with my custom dataset and annotations, it shows this error AttributeError: 'NoneType' object has no attribute 'shape' I suppose this error occurs when an invalid image path is passed to cv2.imread If that's correct, in which file should I correct the path i.e. In which line of the code darkflow is reading the images using cv2.imread?
Check the path and name of the image. Remember that the path is taken from the command line argument "dataset" and the name is read from the corresponding annotation xml file (in pascal voc format)
@SW0BBR could you show me the xml format for your case. I have the same problem when I use the available dataset at https://github.com/datitran/raccoon_dataset
@phatsp you can have a look at my xml format
I'm still unable to get rid of the error.
@GoyalAnkit16 Hi your 9.xml shows < filename >Capture< filename > in the third line. In your case, it should be < filename >9.jpg< filename >.
While trying to train the model with my custom dataset and annotations, it shows this error AttributeError: 'NoneType' object has no attribute 'shape' I suppose this error occurs when an invalid image path is passed to cv2.imread If that's correct, in which file should I correct the path i.e. In which line of the code darkflow is reading the images using cv2.imread?