Skip to content

vadimkantorov/caffemodel2json

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 

Description

A small tool to dump Caffe's *.caffemodel and *.binaryproto files to JSON for inspection (*.prototxt files is not needed). By default caffe.proto from the official Caffe repository is used. Python and protobuf with Python bindings are dependencies.

Usage

# to dump model structure without weights (unless `--data` switch is used) to JSON, using default caffe.proto:
./caffemodel2json.py model.caffemodel > dump.json

# to dump model structure without weights (unless `--data` switch is used) to JSON:
./caffemodel2json.py model.caffemodel CAFFE_ROOT/src/caffe/proto/caffe.proto > dump.json

# to dump a binaryproto:
wget http://dl.caffe.berkeleyvision.org/caffe_ilsvrc12.tar.gz
mkdir -p imagenet_mean && tar -xf caffe_ilsvrc12.tar.gz -C imagenet_mean
./caffemodel2json.py imagenet_mean/imagenet_mean.binaryproto --data > imagenet_mean.json

License

MIT

About

A small tool to dump Caffe's *.caffemodel to JSON for inspection

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages