296 - Converting keras trained model to ONNX format - Image Classification example

preview_player
Показать описание
Code generated in the video can be downloaded from here:

All other code:

This tutorial covers the following topics...
1. Training a keras model for multiclass classification using the cifar10 dataset.
2. Saving the keras model as .h5
3. Classification using the saved keras .h5 model
4. Converting the keras model to onnx format
5.Classification using the onnx model (and comparison to the keras results)

pip install keras2onnx #For older tensorflow (up to 2.3.1)
pip install tf2onnx #For newer tensorflow (I tested on 2.4.4)
pip install onnxruntime
pip install h5py
Рекомендации по теме
Комментарии
Автор

Skip to 13:52 for learning how to use the ONNX model for inference.

hasnainkhan
Автор

15:05 is there a reason you are using python 3.7? Version 3.8 introduced pickle protocol version 5 implementing PEP 574, that I think might help with this specific error you see in reduce().

Thank you for this video series! I did not know anything about ONNX before but it's a wonderful concept— providing not only interchangeable formats but also an optimized runtime.

As always with binary data there are some elusive versioning gotchas

aajas
Автор

Hello, I would recommend you that you should make a series of tutorial on performing semantic segmentation using transformers, and explaining various mechanisms such as attention, self-attention, positional encoding based mechanisms etc.

puranjitsingh
Автор

Hi, excellent topic. Look forward to next. I am interested in step after onnx, the actual deployment when acquiring microscope images and making the analyses. My missing step is from onnx to make a dll in C# which can be imported by IronPython. Any help/guide would be highly appreciated. Thanks.

FredrikOLSSON-swsn
Автор

Hello sir,
I would like to extract data from an image which has tabular data with colours in background.can you please provide your suggestions like which procedure I can take

randomworld
Автор

I have the prediction result from loading *.ONNX file has different with result from AutoML C#. Could you please help me this case ?

HoaNguyen-dwhm
Автор

Unfortunately, this implementation from the git repository only saves the weights of the MaskRCNN, and not the entire model. So if anyone wants to take the .h5 file change to ONNX to port into an edge device like a Camera it will not work.

neoblackcyptron
Автор

dear Dr. can you make a video about siamese network?

rashahaggag
Автор

onnx_model, _ =

AttributeError: 'Sequential' object has no attribute 'output_names'

cgyh