Skip to content
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

mobilenetv2_yolov3 caffe2ncnn转出的模型不能运行 #272

Open
vicwer opened this issue Sep 28, 2020 · 4 comments
Open

mobilenetv2_yolov3 caffe2ncnn转出的模型不能运行 #272

vicwer opened this issue Sep 28, 2020 · 4 comments

Comments

@vicwer
Copy link

vicwer commented Sep 28, 2020

hello,大佬,我用github.com/eric612/MobileNet-YOLO/blob/master/models/mobilenetv2_voc/yolo_lite/yolov3_m2.prototxt的caffe模型,通过caffe2ncnn做转换,转换生成了parambin,load_model的时候报错: layer load_model 3 failed

请问您在转化这个caffemodel的时候,做了一些什么预处理吗,我需要做什么改动才能转换成功呢?请指教,多谢~

@eric612
Copy link
Owner

eric612 commented Sep 28, 2020

你看看是不是這個問題 input layer
layer {
name: "data"
type: "Input"
top: "data"
input_param { shape: { dim: 1 dim: 3 dim: 227 dim: 227 } }
}
https://github.com/Tencent/ncnn/blob/8d984f105b1b8f816654ffa7719e96fbd5885971/docs/how-to-use-and-FAQ/use-ncnn-with-alexnet.md

@vicwer
Copy link
Author

vicwer commented Sep 28, 2020

input layer是这样的,我看我的param文件,是ConvolutionDepthWise层后面没有参数。
我把您原始prototxt文件中的DepthWiseConv改成了ConvolutionDepthWise,不改的话无法转换,这样改有没有什么错误?

@eric612
Copy link
Owner

eric612 commented Sep 28, 2020

其實改成一般的convolution即可,當group = channel 時,Convolution , DepthWiseConv 與 ConvolutionDepthWise 這三種輸出的結果基本沒有差別或差異小到可以忽視,只差在Caffe traing 和 inference的速度。

@vicwer
Copy link
Author

vicwer commented Sep 28, 2020

好的,多谢,我看了一下caffe2ncnn.cpp,应该是ConvolutionDepthwise,而不是ConvolutionDepthWise...大小写改完就转换正常啦

感谢您的工作!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants