experiencor / keras-yolo3

Training and Detecting Objects with YOLO3
MIT License
1.6k stars 862 forks source link

Something strange occurred when training and evaluating #33

Open Jasonsun1993 opened 6 years ago

Jasonsun1993 commented 6 years ago

I just trained my dataset for 50 epochs, but when it almost completed, it stopped early. And it couldn't be evaluated when I ran evaluate.py. Like this: 2 3 Can anybody tell me what the problem is and how to solve it? @experiencor

Jasonsun1993 commented 6 years ago

Now, I trained it for one more epoch. The model could be saved. The mAP is still Zero. But why was the mAP zero? And I tested my images, got great results in bounding box and score. Sooo strange! How to explain it???

shensheng27 commented 6 years ago

you might check your val data label , xmin xmax ymin ymax could be pixel index or pixel index / image height or width. try print the detection result and label result

Jasonsun1993 commented 6 years ago

@shensheng27 I used the labelImg tool to make my dataset. And the xmin ymin xmax ymax should be relative positions of the image. Besides, the author said we could use labelImg tool to make xml file #25

shensheng27 commented 6 years ago

it's ok to using labellmg because it save annotaion in pascal voc xml. Did you mean predict.py is ok to draw correct box but evaluate.py fail to calculate map? I could not see too much difference between two file. I would suggest just draw both detection and label in result pic and see where is wrong. Or do print in 84line of utils.py

Jasonsun1993 commented 6 years ago

@shensheng27 I mean the test results (predict.py file) are good with bouding boxes and AP scores (the object can be correctly detected). But I got zero mAP after running evaluate.py. I guess that there is something wrong with calculating mAP. Do you know in which file the mAP calculating process is??

shensheng27 commented 6 years ago

keras-yolo3/utils/utils.py do print in 84line would be helpful try pycharm or other IDE...

Jasonsun1993 commented 6 years ago

@shensheng27 Hi, there is another problem. The predict.py cannot read the video which is MP4 format. But I check the code, it shows that it can detect video, right? Did you ever test video?

experiencor commented 6 years ago

@shensheng27 Yes, it does. I make the videos in the readme using predict.py on mp4.

Jasonsun1993 commented 6 years ago

@experiencor but it is so strange, when I ran the predict.py, I found that the code couldn't read my mp4 format file. The images could be read correctly without any error tip. Why did it happen?

yuyijie1995 commented 6 years ago

@Jasonsun1993 Hello,Can you tell me about how to use the evaluate? image I used my testdata to evaluate but the code can not extract the raw image. image This is my config doc,can you help me figure out what is wrong about it? Thank you very much!

experiencor commented 6 years ago

@yuyijie1995 Try to order your labels alphabetically. There's a bug but I have yet to fix.

yuyijie1995 commented 6 years ago

Thanks a lot @experiencor

yuyijie1995 commented 6 years ago

@experiencor Can I just remove the .pkl file and the code with it?Because I founded that the .pkl file was something wrong always.