a pytorch to caffe && tensorrt model converter, it learns from MMdnn && PytorchConverter. MMdnn only provides tools for pytorch to onnx conversion, but our tool provides direct conversion from pytorch to caffe && tensorrt
- git clone https://github.com/inisis/caffe (only for valiation if u don't need verify your results, skip this)
- cd caffe && (revise your dependency to caffe 3) && make pycaffe
- pip3 install torch==0.4.0 torchvision==0.2.0
- export PYTHONPATH=$PYTHONPATH:/your/path/to/brocolli/
- put your pytorch model in tests/pytorch_model folder
- python3 pytorch_model_converter.py
- python3 ssd_layer.py example.json pytorch_model/best.pth.prototxt new.prototxt
- python3 caffe_test.py
- python3 pytorch_test.py
- docker pull yaphets4desmond/pytorch_converter_stable
Curently supported layers
- Conv
- PRelu
- MaxPooling
- Sigmoid
- BatchNormalization
- Relu
- LeakyRelu
- Add
- AvgPool
- Flatten
- FullyConnected
- Dropout
- Softmax
- Upsample
- Permute
- Concat
Curently supported network
- SSD Pretrained Weights 提取码:kiaf
- ResNet
- MTCNN Pretrained Weights
- YOLOV3
- retinanet
- Desmond [email protected]
- qq group: 597059928