caffe-net-upgrade is a tool which takes a caffemodel or a prototxt file as an input that is defined with V1LayerParameters. (Caffe deprecated definition) . This implementation upgrades to the layer parameters.
Note: This tool doesn't require installation of caffe to upgrade your model.
- Install the respective pre-requisites if not present. Make sure to install libprotobuf-dev and protobuf-compiler
- Navigate to the caffe-net-upgrade folder.
- mkdir build
- cd build
- cmake ../
This automatically builds a executable in the build folder.
% upgrade_layer_parameters <net.caffemodel | net.prototxt> [output_file_prefix]
Example 1 : Upgrade VGG caffemodel
Download the VGG-Net 19 Layer caffemodel from the following site which is trained with V1LayerParameters here
Execute the following command :
% upgrade_layer_parameters VGG.caffemodel output
This upgrades the caffemodel and writes into a new caffemodel named output.caffemodel.
Example 2 : Upgrade VGG prototxt
Download the VGG-Net 19 Layers prototxt defenition from the following site defined with V1LayerParameters here
Execute the following command:
% upgrade_layer_parameters vgg.prototxt output
This upgrades the prototxt defenition and writes into a new file named output.prototxt