Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vadimkantorov/caffemodel2json
A small tool to dump Caffe's *.caffemodel to JSON for inspection
https://github.com/vadimkantorov/caffemodel2json
caffe json protobuf
Last synced: 3 months ago
JSON representation
A small tool to dump Caffe's *.caffemodel to JSON for inspection
- Host: GitHub
- URL: https://github.com/vadimkantorov/caffemodel2json
- Owner: vadimkantorov
- Created: 2015-08-13T15:16:21.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-02-12T16:47:13.000Z (almost 7 years ago)
- Last Synced: 2024-04-14T03:11:50.233Z (10 months ago)
- Topics: caffe, json, protobuf
- Language: Python
- Homepage:
- Size: 21.5 KB
- Stars: 41
- Watchers: 3
- Forks: 24
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](https://raw.githubusercontent.com/BVLC/caffe/master/src/caffe/proto/caffe.proto) from the official Caffe repository is used. Python and protobuf with Python bindings are dependencies.# Usage
```shell
# 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