Upgrade deprecated caffemodel to latest caffemodel (V1LayerParameters to LayerParameters) without installing caffe
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



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.


  1. Ubuntu 16.04
  2. CMake 2.8 or newer download
  3. Install the Protobuf library.

Build Instructions

  1. Install the respective pre-requisites if not present. Make sure to install libprotobuf-dev and protobuf-compiler
  2. Navigate to the caffe-net-upgrade folder.
  3. mkdir build
  4. cd build
  5. cmake ../
  6. make

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