mirror of
https://github.com/deepinsight/insightface.git
synced 2025-12-30 08:02:27 +00:00
38 lines
636 B
Markdown
38 lines
636 B
Markdown
# Convert ONNX to Caffe
|
|
|
|
This tool is modified from [onnx2caffe](https://github.com/MTlab/onnx2caffe) by MTlab.
|
|
|
|
We added some OPs to support one-stage mmdetection models.
|
|
|
|
### Dependencies
|
|
* pycaffe (with builtin Upsample and Permute layers)
|
|
* onnx
|
|
|
|
|
|
### How to use
|
|
To convert onnx model to caffe:
|
|
```
|
|
python convertCaffe.py ./model/mmdet.onnx ./model/a.prototxt ./model/a.caffemodel
|
|
```
|
|
|
|
### Current support operation
|
|
* Conv
|
|
* ConvTranspose
|
|
* BatchNormalization
|
|
* MaxPool
|
|
* AveragePool
|
|
* Relu
|
|
* Sigmoid
|
|
* Dropout
|
|
* Gemm (InnerProduct only)
|
|
* Add
|
|
* Mul
|
|
* Reshape
|
|
* Upsample
|
|
* Concat
|
|
* Flatten
|
|
* **Resize**
|
|
* **Permute**
|
|
* **Scale**
|
|
|