Comments (5)
Hey @SiR0N, thanks for your interest in the project. Unfortunately, I haven't played around with ONNX or their conversion script. However, I think your problem might be related to using a Frozen Graph Def as a SavedModel (since you mention you just rename). Although they are similar, the formats are different.
Taking a quick look - the conversion tool seems to allow a Frozen Graph Def as an input, you just need to modify the flags you're using. Or, you can always convert the the model to a SavedModel.
Hope this helps! Will close this issue for now but let me know if you have any issues with the checkpoints.
from fast-semantic-segmentation.
Hello!
thanks for your reply, it was really useful, I thought that a SavedModel and Frozen were the same, I should have checked deeply the tool before asking.
I could convert it with this:
python -m tf2onnx.convert --graphdef .\0818_icnet_0.5_1025_resnet_v1\frozen_inference_graph.pb --output frozen.onnx --fold_const --opset 10 --inputs inputs:0 --outputs predictions:0
I attach the file in case you want to have a look. (Have not checked it yet)
ICNET_0.5.onnx.zip
from fast-semantic-segmentation.
Awesome I'm glad that it was helpful! The input and output tensors look correct so sounds like it would work. Good luck!
from fast-semantic-segmentation.
@SiR0N Hi,
How can I use the onnx model in C++ or python? Can you share the evolution code?
from fast-semantic-segmentation.
Hi @zpmmehrdad ,
unfortunately, I have no access to the code anymore.
I could make it running in python, check this for pre/postprocessing: https://modeldepot.io/oandrienko/icnet-for-fast-segmentation
The only part to change is the inference, to do that I would recommend having a look here (step 3): https://github.com/microsoft/onnxruntime/blob/master/docs/python/tutorial.rst in the sess.run you should include your inputs and output names, to do so open the onnx file with netron: netron. It is really useful when working with onnx, it shows all the info about the computational graph.
Hope it helps you!
from fast-semantic-segmentation.
Related Issues (20)
- For c++ pb HOT 6
- I'd like to inference pictures with a different size, what should I do? HOT 1
- How to execute the sample code? HOT 2
- ImportError HOT 2
- Using multi-modal data for training HOT 1
- I cannot compress the model HOT 7
- Could not find pipeline.config in Pre-trained ICNet and PSPNet Models archives HOT 1
- ImportError: cannot import name 'hyperparams_pb2'
- MORE INFO ON LICENSE
- Consult for help HOT 2
- For running and using the inference.py script, the model.ckpt file is needed but it is not available. can you help me here with this issue?
- Error during evaluation - used PASCAL VOC dataset HOT 1
- ImportError: cannot import name 'pipeline_pb2'
- How to increase the frame rate HOT 1
- where is create_cityscapes_tfrecord.py HOT 1
- could anybody share a working setup please?
- Cannot import name 'input_reader_pb2' from 'protos'
- Error while loading checkpoint when training
- License info
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fast-semantic-segmentation.