caffe model to darknet model

来源:互联网 发布:如何查看淘宝宝贝类目 编辑:程序博客网 时间:2024/06/05 18:04

代码:

https://github.com/marvis/pytorch-caffe-darknet-convert

运行时下载OneDrieve上的网络模型需要翻墙。

运行后出现 没有torch 模块,可以参考下面操作,从github下载 pytorch的代码,编译安装。

The installing way is written as follows:
git clone https://github.com/pytorch/pytorch
pip install -r requirements.txt
sudo python setup.py install


安装好后,

python

import torch

一切就可以了

在 pytorch-caffe-darknet-convert目录下运行

python caffe2darknet.py ResNet-50-deploy.prototxt ResNet-50-model.caffe
model ResNet-50-model.cfg ResNet-50-model.weights

将caffe model 和prototxt 转换成了darknet的weights和cfg.