caffe-yolo-9000 icon indicating copy to clipboard operation
caffe-yolo-9000 copied to clipboard

bug in CPP netforward code

Open zhengstake opened this issue 7 years ago • 6 comments

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.

zhengstake avatar Jan 18 '18 17:01 zhengstake

@zhengstake would you mind sharing your python inference code?

shabnamghadar avatar Jan 19 '18 19:01 shabnamghadar

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.

zhengstake avatar Jan 20 '18 00:01 zhengstake

Thanks

shabnamghadar avatar Jan 22 '18 21:01 shabnamghadar

@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?

shabnamghadar avatar Jan 24 '18 03:01 shabnamghadar

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.

zhengstake avatar Jan 30 '18 06:01 zhengstake

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

karta0807913 avatar Feb 03 '18 18:02 karta0807913