Reference for ultralytics/models/nas/predict.py
Note
This file is available at https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/nas/predict.py. If you spot a problem please help fix it by contributing a Pull Request 🛠️. Thank you 🙏!
ultralytics.models.nas.predict.NASPredictor
Bases: BasePredictor
Ultralytics YOLO NAS Predictor for object detection.
This class extends the BasePredictor
from Ultralytics engine and is responsible for post-processing the
raw predictions generated by the YOLO NAS models. It applies operations like non-maximum suppression and
scaling the bounding boxes to fit the original image dimensions.
Attributes:
Name | Type | Description |
---|---|---|
args |
Namespace
|
Namespace containing various configurations for post-processing. |
Example
Note
Typically, this class is not instantiated directly. It is used internally within the NAS
class.
Source code in ultralytics/models/nas/predict.py
postprocess(preds_in, img, orig_imgs)
Postprocess predictions and returns a list of Results objects.