Questions tagged [onnx]

ONNX is an open format to represent deep learning models and enable interoperability between different frameworks.

ONNX

The Open Neural Network Exchange (ONNX) is an open-source artificial intelligence ecosystem. With ONNX, AI developers can more easily move models between state-of-the-art tools and choose the combination that is best for them. ONNX is widely supported and can be found in many frameworks, tools, and hardware. It is developed and supported by a community of partners.

Official resources

809 questions
3
votes
1 answer

Using an onnx model to make predictions on an image using opencv

I'm trying to make real-time predictions on video frames using a pre-trained model (YOLOv5) saved in .onnx format through OpenCV. I keep getting the following error cv2.error: OpenCV(4.5.2)…
3
votes
1 answer

Parse an ONNX model using C++. Extract layers, input and output shape from an onnx model using c++

I'm trying to extract data like input layers, output layers and their shapes from an onnx model. I know there is python interface to do this. I want to do something similar to this code but in c++. I have also pasted the code from the link. I have…
Hitesh Kumar
  • 193
  • 3
  • 11
3
votes
0 answers

How to convert tensorflow model to TensorRT

I am looking for end-to-end tutorial, how to convert my trained tensorflow model to TensorRT to run it on Nvidia Jetson devices. I know how to do it in abstract (.pb -> ONNX - > [Onnx simplifyer] -> TRT engine), but I'd like to see how other do It,…
Pavlo Sharhan
  • 174
  • 2
  • 10
3
votes
1 answer

How insert data in an ONNX as float32[N,60,1] in ML.NET

I'm using ML.NET and I want to insert as input a float32[N, 60, 1](as in the picture). I don't figure how to pass the data. I'm trying with this class: public class OnnxInput { [ColumnName("lstm_input")] public float lstm_input { get; set;…
Marco Levarato
  • 203
  • 4
  • 16
3
votes
1 answer

Trying to incorporate ML onnx model to Android App

I have a trained onnx model that I want to incorporate into an android app. I'm actually working on a uni project, combining ML & Android development. After a long research, since I don't want to use a python private REST API, I came to the…
3
votes
0 answers

TensorFlow Lite VS Barracuda Object Detection In Unity's Augmented Reality

https://github.com/asus4/tf-lite-unity-sample I want to use this as a template to better understand this whole process as I am quite new to this area. Is there some kind of step-by-step guide on how to use TensorFlow Lite models in Unity for object…
3
votes
1 answer

Interpretation of yolov5 output

I am making a face mask detection project and I trained my model using ultralytics/yolov5.I saved the trained model as an onnx file, you can find the model file here model.onnx. Now I want you use this model.onnx with opencv to detect real time face…
3
votes
3 answers

How to include a OneHot in an ONNX coming from PyTorch

I'm using PyTorch to train neural-net and output them into ONNX. I use these models in a Vespa index, which loads ONNXs through TensorRT. I need one-hot-encoding for some features but this is really hard to achieve within the Vespa framework. Is it…
fweber
  • 355
  • 1
  • 2
  • 10
3
votes
1 answer

How to use ONNX model in C++ code on Linux?

I train some Unet-based model in Pytorch. It take an image as an input, and return a mask. After training i save it to ONNX format, run it with onnxruntime python module and it worked like a charm. Now, i want to use this model in C++ code in…
Anton Ganichev
  • 2,184
  • 1
  • 18
  • 17
3
votes
0 answers

Convert Pytorch Yolact (.pth) model for deployment in C++

I am using YOLACT++ and I want to deploy it using C++. Originally the model is saved as yolact.pth file and I realized from the issues that I couldn't directly convert .pth to .pt file that can be called in C++ see this issue and I would need to do…
Areeb Muzaffar
  • 197
  • 2
  • 15
3
votes
1 answer

Error on running Super Resolution Model from ONNX

Testing ONNX model for super resolution model, I have error running this sample program. My ONNX version is 1.5.0 with onnxruntime 1.4.0. Onnxruntime was installed using pip. Pytorch version is 1.6.0 Error is at ort_session =…
batuman
  • 7,066
  • 26
  • 107
  • 229
3
votes
1 answer

Best Way to Obfuscate My DL Models and Python?

So I'll be licensing my deep learning model with pre-trained weights for deployment to a customer. The usage of this deep learning model will be done over this customer's servers. For security reasons, I was wondering what I could do to obfuscate my…
Shawn Zhang
  • 1,719
  • 2
  • 14
  • 20
3
votes
0 answers

onnxjs opset versions and MaxPool

I'm trying to export an FCN from torchvision using the following code: model= models.segmentation.fcn_resnet101(pretrained=True, progress=True, num_classes=21, aux_loss=None) model.eval() x = torch.randn(1,3,512,512) torch_out =…
Theolodus
  • 2,004
  • 1
  • 23
  • 30
3
votes
2 answers

Setting up ONNX Runtime on Ubuntu 20.04 (C++ API)

I am currently in the midst of trying to get my image processing programs to work on Ubuntu (coming from windows). I have successfully built and linked the OpenCV and Boost libraries to work with my cpp programs but I have yet to find any…
ApluUAlberta
  • 105
  • 1
  • 9
3
votes
2 answers

Error converting FaceNet model into ONNX format

System information OS Platform and Distribution: Linux Ubuntu 19.10 Tensorflow Version: 1.15 Python version: 3.7 Issue I downloaded a tensorflow model of FaceNet from this page, and I'm trying to convert it from .pb into a .onnx file, however it…
Xesk
  • 31
  • 6