Video
Video
Train YOLO-NAS - SOTA Object Detection Model - on Custom Dataset
Learn how to use YOLO-NAS in our comprehensive video guide.
YOLO-NAS is an object detection model developed by Deci that achieves SOTA performances compared to YOLOv5, v7, and v8.
Model | mAP | Latency (ms) |
YOLO-NAS S | 47.5 | 3.21 |
YOLO-NAS M | 51.55 | 5.85 |
YOLO-NAS L | 52.22 | 7.87 |
YOLO-NAS S INT-8 | 47.03 | 2.36 |
YOLO-NAS M INT-8 | 51.0 | 3.78 |
YOLO-NAS L INT-8 | 52.1 | 4.78 |
mAP numbers in table reported for Coco 2017 Val dataset and latency benchmarked for 640x640 images on Nvidia T4 GPU.
First, install Inference:
pip install inference
To try a demo with a model trained on the Microsoft COCO dataset, use:
import inference
model = inference.load_roboflow_model("yolo-nas-s-640")
results = model.infer(image="YOUR_IMAGE.jpg")
Above, replace:
YOUR_IMAGE.jpg
with the path to your image.You can also run fine-tuned models with Inference.
Retrieve your Roboflow API key and save it in an environment variable called ROBOFLOW_API_KEY
:
export ROBOFLOW_API_KEY="your-api-key"
To use your model, run the following code:
import inference
model = inference.load_roboflow_model("model-name/version")
results = model.infer(image="YOUR_IMAGE.jpg")
Above, replace:
YOUR_IMAGE.jpg
with the path to your image.model_id/version
with the YOLO-NAS model ID and version you want to use. Learn how to retrieve your model and version ID.