YOLO-NAS is an object detection model pre-trained on COCO, and Objects365, and evaluated on COCO and RF100 dataset.
Deci AI Team
May 3, 2023
The animation below shows different potential models, and the three of them are YOLO-NAS-S, YOLO-NAS-M, YOLO-NAS-L.
The architectures of YOLO-NAS models were found using Deci’s proprietary Neural Architecture Search (NAS) technology, AutoNAC. AutoNAC was used to ascertain the optimal sizes and structures of stages, encompassing block type, the number of blocks, and the number of channels in each stage. Throughout the NAS process, Quantization-Aware RepVGG (QA-RepVGG) blocks are incorporated into the model architecture, guaranteeing the model’s compatibility with Post-Training Quantization (PTQ). Using quantization-aware “QSP” and “QCI” modules consisting of QA-RepVGG blocks provides 8-bit quantization and reparameterization benefits, enabling minimal accuracy loss during PTQ. A hybrid quantization method is also used that selectively quantizes specific layers to optimize accuracy and latency tradeoffs while maintaining overall performance.
YOLO-NAS offers three different model sizes: YOLO-NAS-S, YOLO-NAS-M, YOLO-NAS-L. Each model variant is designed to offer a balance between Mean Average Precision (mAP) and latency. The YOLO-NAS-S model is the smallest and fastest, but it is not as accurate as the larger models. Conversely, the YOLO-NAS-L model is the largest, most accurate, and slowest.
The YOLO-NAS-M model offers a middle ground between the two. Table 1 details the comparison of each of these models in terms of Mean Average Precision (mAP) and latency. The mAP numbers in the table are reported for the Coco 2017 Val dataset and latency benchmarked for 640×640 images on the Nvidia T4 GPU.
YOLO-NAS S INT-8
YOLO-NAS M INT-8
YOLO-NAS L INT-8
YOLO-NAS takes an image as an input.
YOLO-NAS outputs bounding boxes, labels and confidence scores and using the predict function we can draw these bounding boxes around each of the detected objects and add the labels and the confidence scores.
Invented in 2015, YOLO is a state-of-the-art object detection algorithm. Thanks to its speed, it has now become a standard way of detecting objects in the field of Computer Vision. Previously, people were using Sliding Window Object Detection, then faster versions were invented, which include RCNN, Fast RCNN, and Faster RCNN. YOLO outperforms these previous object detection algorithms.
YOLO-NAS was released by DeciAI on May 03, 2023. YOLO-NAS outperforms other YOLO models by achieving a better trade-off between speed and accuracy than its counterparts, including PPYOLOE, YOLOv5, YOLOv6, YOLOv7, and YOLOv8.
Some real-world applications of YOLO-NAS include:
from transformers import AutoFeatureExtractor, AutoModelForImageClassification extractor = AutoFeatureExtractor.from_pretrained("microsoft/resnet-50") model = AutoModelForImageClassification.from_pretrained("microsoft/resnet-50")