thtrieu / darkflow

Translate darknet to tensorflow. Load trained weights, retrain/fine-tune using tensorflow, export constant graph def to mobile devices
GNU General Public License v3.0
6.13k stars 2.08k forks source link

Train with imagenet #434

Open lusiliang93 opened 7 years ago

lusiliang93 commented 7 years ago

Hi all, I have to train 7 classes with imagenet. However, I always get an error called "NoneType" object has no attribute 'shape'. I put all the images in the folder called "image" and all the annotations in the folder called "annotations". The folder "image" is inside the folder "annotations". In each .xml, I changed folder field into "image" and filename into "image ID. jpg". When I call "flow --model cfg/tiny-yolo-voc-7c.cfg --load bin/tiny-yolo-voc.weights --train --annotation annotations/ --dataset annotations/image" , it doesn't work. I have been trying methods discussed in the group. However, it still doesn't work. Is there any insights into it? Thanks a lot!

joaopalma5 commented 6 years ago

the xml of imagenet don't have ".jpg" in the end of filename, you can edit your xmls and add .jpg