Files
frigate/notebooks/YOLO_NAS_Pretrained_Export.ipynb
T
Blake Blackshear 4313fd97aa Adds support for YOLO-NAS in OpenVino (#11645)
* update onnxruntime

* support for yolo-nas in openvino

* cleanup notebook

* update docs

* improve docs

* handle AUTO issue and update docs
2024-06-07 05:52:08 -06:00

1.8 KiB

In [ ]:
! pip install -q super_gradients==3.7.1
In [ ]:
from super_gradients.common.object_names import Models
from super_gradients.conversion import DetectionOutputFormatMode
from super_gradients.training import models

model = models.get(Models.YOLO_NAS_S, pretrained_weights="coco")
In [ ]:
# export the model for compatibility with Frigate

model.export("yolo_nas_s.onnx",
             output_predictions_format=DetectionOutputFormatMode.FLAT_FORMAT,
             max_predictions_per_image=20,
             confidence_threshold=0.4,
             input_image_shape=(320,320),
            )
In [ ]:
from google.colab import files

files.download('yolo_nas_s.onnx')