项目作者: conanhujinming

项目描述 :
Convert a matcaffe model (column major) to a pycaffe or c++ caffe (row major) model
高级语言: Python
项目地址: git://github.com/conanhujinming/matcaffe2caffe.git
创建时间: 2018-08-16T03:09:00Z
项目社区:https://github.com/conanhujinming/matcaffe2caffe

开源协议:BSD 2-Clause "Simplified" License

下载


matcaffe2caffe

Convert a matcaffe model (column major) to a pycaffe or c++ caffe (row major) model.

In most cases you do not need to do this as you can just transpose the input image to get the same result.
However, in some cases, for example when you need to use ncnn, the offical
script to convert a caffe model to ncnn model can only apply on a row major model, so you may need this tool
to convert the matcaffe model first. I write this tool when I need to convert the MTCNN model to a ncnn model. I do not do many tests so
if you meet any problem please open an issue.

HowTo

  1. $ python matcaffe2caffe.py --help
  2. usage: matcaffe2caffe.py [-h] [--proto PROTO] [--model MODEL]
  3. [--output OUTPUT]
  4. convert a matcaffe model(column major) to a normal caffe model(row major)
  5. optional arguments:
  6. -h, --help show this help message and exit
  7. --proto PROTO path to deploy prototxt.
  8. --model MODEL path to pretrained weights
  9. --output OUTPUT path to output model
  10. $ python matcaffe2caffe.py --proto det1.prototxt --model det1.caffemodel --output det1_py.caffemodel

Dependencies

pycaffe, numpy.