整个路线:
- darknet训练yolov3
- 编译支持upsample layer的caffe
- 将yolov3转成caffemodel
- caffemodel转wk文件
- 在Hi3519A上进行测试
转自 https://blog.csdn.net/avideointerfaces/article/details/89111955
1. 为caffe编译upsample拓展
-
下载code https://pan.baidu.com/s/13GpoYoqKSCeFX0m0ves_fQ#list/path=%2F 。密码:bwrd
-
按下面的步骤,添加upsample的代码
-
编译完成
2. 遇到的问题
- Makefile:594: recipe for target ‘.build_release/src/caffe/layers/upsample_layer.o’ failed
upsample_layer添加不成功,怀疑是caffe版本和参考博客的不一样
解决:
error: ‘class caffe::LayerParameter’ has no member named ‘upsample_param’
原来是upsample_param参数的位置写错了。
3. yolov3 - 2- caffe
- git clone https://github.com/ChenYingpeng/darknet2caffe.git
- 安装pytorch,我这里安装的是pytorch0.4.1,下载地址:https://pytorch.org/get-started/previous-versions/
- pip install ***.whl
- 转换模型
python darknet2caffe.py cfg/yolov3-voc_person.cfg cfg/yolov3-voc_person_900.weights output/yolov3.prototxt output/yolov3.caffemodel
- 结果
4. 测试
…