dronefreak/VisDrone-dataset-python-toolkit

Opencv error when i run convertVis_to_xml.py

Closed this issue · 3 comments

Opencv error when i run convertVis_to_xml.py

When I run convertVis_to_xml.py, I get AttributeError: 'NoneType' object has no attribute 'shape' error on line 75.

Hi @enesyildirim7
This means that the code is unable to find the images in the expected location.
Please make sure you have a consistent directory structure for the dataset. You could simply print the path in the .py code which is being used by the code to look for the dataset, that will give you a good idea. Hope this helps!

@dronefreak
I solved the error using the Pillow module instead of Opencv. I could not find the picture depth in Pillow, so I fixed the picture depth to 3 manually.