duangenquan / YoloV2NCS

This project shows how to run tiny yolo v2 with movidius stick.
148 stars 63 forks source link

Converting YoloV3 weights to caffe #20

Open cpagravel opened 6 years ago

cpagravel commented 6 years ago

I'm using your script from create_yolo_caffemodel.py to convert the new YoloV3 model to a caffemodel and prepare it for the Movidius stick, but I'm getting the following error: "ERROR: size mismatch: 61771997"

Would you know why I'm getting this error? I took the model from here as described on the author's website. Then I took the yolov3.cfg file from his repo.

duangenquan commented 6 years ago

I am afraid that some layers in yolov3 are not supported, such as "route","upsample" etc. You might need to update create_yolo_caffemodel.py.

cpagravel commented 6 years ago

I found an implementation for converting from darknet to caffe here. It doesn't have a definition for the "Yolo" type layers. I could work on porting that code to modify "create_yolo_caffemodel.py", but I'm not sure how to go about converting the Yolo layers over. Would you be able to help?

duangenquan commented 6 years ago

If NCSDK shows the sources codes of layers and they way to compile APIs, we can try to convert the customized layers in Yolo to NCSD. But I could not find them in their repo.

How urgent and important do you need to support the customized layers in yolov3 for NCSDK?

If you really need to support yolov3, you can try to separate one yolov3 model into several parts by the 'YOLO' layer. But this will be hard to maintain different models in future.

cpagravel commented 6 years ago

I would really like to run yolov3 on NCS. I think a lot of people would like it since the results shown in the yolov3 paper are very promising. The Tiny-YOLO network isn't super accurate. I am most interested in seeing how many FPS can be obtained on a full sized YOLOv3 network on the NCS.

anguoyang commented 6 years ago

can anyone turn yolo v3 models into caffe? I could pay for it

shartoo commented 6 years ago

@anguoyang this repo can make darknet ran faster on ARM with cpu only,which may help.