-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to transform yolov3 model to caffemodel #1
Comments
This link includes yolov2 weights to caffemodel.If you want to convert yolov3 weights to caffemodel,you need change some code.The code is below.
` |
thx a lot and I will try. |
I have modify the Cross-compiler to x86_64 and compiled,tested your model and got some errors. |
I have tried your model and worked ! Traceback (most recent call last): except darknet2caffe.py ,do other files need to be modified ? |
It worked on yolov3.cfg,yolov3.weight now. |
@Gotta-C You need change the classes value in my projects,which is 80. |
I used grep checked,only detect.py has classes 80,not that problem.In training,i have modify all the filters to 18,because 1 class,and the weights is only 505k,compared to yolov3.weights is 248M,I have no idea whether its a problem. |
where the error happens,weights convert to caffemodel or others? |
weight to caffemodel .May I have your Q number or wechat? |
I have tried your python code which could transform yolov3 model to caffemodel. But there are some errors: |
How did you slove the yolo layer [yolo] in yolov3.cfg? thanks |
@vvmex For unsample layer ,you should add it into caffe and i post the link in the previous content.For yolo layer,I have rewrite it in my projetcs. |
Hi,Chen! However,after trying out your code ,I have some errors which are the same with the other two guys when converting my darknet model and cfg file to caffemodel and prototxt : |
@zbw4034 Can you post the detail of error? |
my error is this: [libprotobuf ERROR google/protobuf/text_format.cc:245] Error parsing text-format caffe.NetParameter: 2622:20: Message type "caffe.LayerParameter" has no field named "upsample_param". and i have followed your link which add upsample layer to caffe,and modified caffe.proto,then recompile caffe,but it still said can`t parse upsample_param |
and in darknet2caffe.py,i just modified the python path of caffe. |
From error you said, i guess you didn't add upsample layer into caffe successfully,Go Baidu or Google it! Give you the link.Good luck! |
FINALLY I SUCCEED ! Thank you all !!! |
@zbw4034 is there a reason why one should convert weights on their own instead of using the weights provided in the README? |
@aaronduino |
@Gotta-C Hello, did you successfully convert the weights to caffemodel? My dataset also has 1 class, but I failed in converting weight. |
The repo is excellent, I have run yolov3 model succefully and get right result with caffe-yolo. In other words, I suggest @ChenYingpeng add darknet2caffe.py in this repo, and revise the scripts format. |
@ChenYingpeng hello , i hope that you are doing well , i followed your repository that regards conversion between pytorch,darknet and caffe. but i got this error :"[libprotobuf ERROR google/protobuf/text_format.cc:274] Error parsing text-format caffe.NetParameter: 2622:20: Message type "caffe.LayerParameter" has no field named "upsample_param". |
@adouwitti Hi,please make sure that you have added upsample layer into caffe and remember make it.Look for link from above.Good luck for you! |
thanks for response @ChenYingpeng . i have added the upsample layer . when i tried to compile it again by running "make all" and " make ". another error has occurred :"PROTOC src/caffe/proto/caffe.proto |
Please look this “Field number 148 has already been used in "caffe.LayerParameter" by field "clip_param"”.You should change this number 148,such as 149,150 etc and make it.Good luck! |
yeah i change the id numbers 149 ,150 and it works nice. thanks |
@ChenYingpeng hi, I failed to use script transformation model.My datasets only one class |
@ycdhqzhiai Hi, please post your cfg file and running details. |
add your q number just now,but i don't know the answer,can you add my q number (657621579)? thx |
@liubianting 我和你遇到一样的问题,解决了吗? |
@gttiankai Please check these code in darknet2caffe.py.
You should check whether your weights format is the same with me.You should change this code.
Good luck! |
No description provided.
The text was updated successfully, but these errors were encountered: