Git Product home page Git Product logo

caffe2onnx's Introduction

caffe2onnx

This tool converts Caffe models to ONNX via command line (without Caffe environment).

Installation

Install from pypi

pip install caffe2onnx

Install latest from github

pip install git+https://github.com/asiryan/caffe2onnx

Build and install latest from source

git clone https://github.com/asiryan/caffe2onnx
python setup.py install

Usage

To get started with caffe2onnx, run the caffe2onnx.convert command, providing:

  • the path to your caffe prototxt,
  • the path to your caffe model (not required),
  • the output path of the onnx model (not required),
  • frozen graph or not (not required).
python -m caffe2onnx.convert
    --prototxt          caffe prototxt file path
    [--caffemodel       caffe caffemodel file path]
    [--onnx             output onnx file path]
    [--frozen           frozen graph or not]

Operators

See the documentation of caffe supported operators.

References

caffe-onnx by htshinichi
TNN by Tencent

License

BSD-3

caffe2onnx's People

Contributors

asiryan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

caffe2onnx's Issues

Potentially Incorrect Output?

Hi!

Thank you for creating this repo, this was exactly what I was looking for!

I am trying to convert a caffe model to onnx, however, it seems that when I test the model with the same input, the output of the onnx model is different to the original caffe model.

I have attached a link to the .caffemodel and .prototxt that I am working with (as well as the produced onnx model) - github would not allow me to upload a zip file containing the models :( --> https://1drv.ms/u/s!AsfDc4tZ90mEmHlnImwWfaC1asOM
When passing an input image (the input_name is "data_input") of size (1,3,500,500), the caffe model produces the correct output with size (1,21,500, 500) (this is the shape of net.blobs['score'].data.shape), whereas the onnx model produces an output with size (1,3, 500,500). I am using the latest version of caffe2onnx.

Any assistance would be highly appreciated.

Thanks!

Error in converting caffe_xilinx model to onnx

Hi @asiryan
I am trying to convert a caffe_xilinx yolov3 model to onnx.I got this error during conversion

google.protobuf.text_format.ParseError: 2027:3 : Message type "caffe.LayerParameter" has no field named "deephi_resize_param"

I think this deephi_resize_param would be a custom layer built in caffe-xilinx.Can u add support for custom layers ?

SSD Model support

Hi,
Addition of SSD models support would be useful. Do you have any plans to add support for the same?
Example of caffe SSD model can be found here
https://github.com/chuanqi305/MobileNet-SSD

Also Argmax layer support is missing, this would be useful to support segmentation models

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.