Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Hyuto/yolo-nas-onnx
Inference YOLO-NAS ONNX model
https://github.com/Hyuto/yolo-nas-onnx
cpp javascript object-detection onnx onnxruntime opencv opencv-dnn python yolo-nas
Last synced: 3 months ago
JSON representation
Inference YOLO-NAS ONNX model
- Host: GitHub
- URL: https://github.com/Hyuto/yolo-nas-onnx
- Owner: Hyuto
- License: mit
- Created: 2023-05-11T17:12:12.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-18T07:43:06.000Z (about 1 year ago)
- Last Synced: 2024-08-02T01:19:41.072Z (6 months ago)
- Topics: cpp, javascript, object-detection, onnx, onnxruntime, opencv, opencv-dnn, python, yolo-nas
- Language: C++
- Homepage: https://hyuto.github.io/yolo-nas-onnx/
- Size: 65.7 MB
- Stars: 60
- Watchers: 3
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-yolo-object-detection - Hyuto/yolo-nas-onnx - nas-onnx?style=social"/> : Inference YOLO-NAS ONNX model. [hyuto.github.io/yolo-nas-onnx/](https://hyuto.github.io/yolo-nas-onnx/) (Lighter and Deployment Frameworks)
- awesome-yolo-object-detection - Hyuto/yolo-nas-onnx - nas-onnx?style=social"/> : Inference YOLO-NAS ONNX model. [hyuto.github.io/yolo-nas-onnx/](https://hyuto.github.io/yolo-nas-onnx/) (Lighter and Deployment Frameworks)
README
# YOLO-NAS ONNX
![]()
**_Image Source_**: https://www.pinterest.com/pin/784752303797219490/
---
![love](https://img.shields.io/badge/Made%20with-🖤-white)
![onnxruntime-web](https://img.shields.io/badge/onnxruntime--web-white?logo=onnx&logoColor=black)
![opencv](https://img.shields.io/badge/OpenCV-4.7.0-white?logo=opencv)
![python](https://img.shields.io/badge/Python-darkgreen?logo=python)
![c++](https://img.shields.io/badge/C++-red?logo=cplusplus)
![javascript](https://img.shields.io/badge/JavaScript-green?logo=javascript)Run YOLO-NAS models with ONNX **without using Pytorch**. Inferencing YOLO-NAS ONNX models with ONNXRUNTIME or OpenCV DNN.
## Generate ONNX Model
Generate YOLO-NAS ONNX model **without preprocessing and postprocessing within the model**.
You can convert the model using the following code after installing `super_gradients` library.**Example: Exporting YOLO-NAS S**
```python
from super_gradients.training import models
from super_gradients.common.object_names import Modelsmodel = models.get(Models.YOLO_NAS_S, pretrained_weights="coco")
model.eval()
model.prep_model_for_conversion(input_size=[1, 3, 640, 640])
model.export("yolo_nas_s.onnx", postprocessing=None, preprocessing=None)
```## Custom Model
To run custom trained YOLO-NAS model in this project you need to generate custom model metadata.
Custom model metadata generated from [custom-nas-model-metadata.py](https://gist.github.com/Hyuto/f3db1c0c2c36308284e101f441c2555f)
to provide additional information from torch model.**Usage**
```bash
python custom-nas-model-metadata.py -m \ # Custom trained YOLO-NAS checkpoint path
-t \ # Custom trained YOLO-NAS model type
-n # Number of classes
```After running that it'll generate metadata (json formated) for you
## References
- https://github.com/Deci-AI/super-gradients