karta0807913 / caffe-yolo-9000

caffe-yolo-9000
Other
48 stars 16 forks source link

bug in CPP netforward code #14

Open zhengstake opened 6 years ago

zhengstake commented 6 years ago

out of shear luck, the python inference code I wrote gave me significantly better detection results. So I did a big more debugging on the C++ netforward code under examples/yolo_9000_test.

I found one bug in yolo_v2_output.h in getResult function where the class label scores are compared. The best_score variable is currently declared as int. But it must be float. Otherwise any score less than 1 will treated as 0 and wrong class of object will be selected.

shabnamghadar commented 6 years ago

@zhengstake would you mind sharing your python inference code?

zhengstake commented 6 years ago

You should have seen my reply to aaron0813.

I did a fork to zhengstake/caffe-yolo-9000 and a branch cadence2018. I added a python inference script under caffe-yolo-9000/examples/yolo/voc_mode/yolo_v2_test.py. The script performs inference just as netforward.cpp. But I added visualization step. You can check it out.

I filed a pull request for it to be merged.

shabnamghadar commented 6 years ago

Thanks

shabnamghadar commented 6 years ago

@zhengstake I have looked at your prototxt and it seems like if we get rid of route and reorg layer there is nothing out of ordinary there. Can we train the weights in darknet and convert them to caffe?

zhengstake commented 6 years ago

I have specific reasons to utilize Caffe flow. So I haven't explored much on the Darknet code base. I suspect if you don't want to make any change to the network, then training with Darknet would be just fine. However, previously I had issues getting the models converted to Caffe for Yolo V1. I'd like to avoid dealing with multiple frameworks.

karta0807913 commented 6 years ago

thanks I fixed that and I merge your pull request I'm sorry I so long to reply