/Caffe-Converter

Just a simple converter that transforms MMDetection model weights from Caffe-style to PyTorch-style

Primary LanguagePython

Caffe Converter

Just a simple converter that transforms MMDetection model weights from Caffe-style to PyTorch-style. I write this because I need to unify the image pre-processing pipeline in MMDetection.

Usage

python convert.py --source ${CAFFE_WEIGHTS} --target ${PYTORCH_WEIGHTS}

Make sure PyTorch and MMDetection are installed. Check test.sh to verify this conversion is valid.

Differences between Caffe-style and PyTorch-style

Some model configs/weights are marked with a tag like caffe. The differences between Caffe-style and PyTorch-style models are (comparing tool/caffe_config.py and tool/pytorch_config.py):