Reference for ultralytics/models/yolo/segment/predict.py
Note
This file is available at https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/segment/predict.py. If you spot a problem please help fix it by contributing a Pull Request 🛠️. Thank you 🙏!
ultralytics.models.yolo.segment.predict.SegmentationPredictor
Bases: DetectionPredictor
A class extending the DetectionPredictor class for prediction based on a segmentation model.
Example
Source code in ultralytics/models/yolo/segment/predict.py
__init__(cfg=DEFAULT_CFG, overrides=None, _callbacks=None)
Initializes the SegmentationPredictor with the provided configuration, overrides, and callbacks.
Source code in ultralytics/models/yolo/segment/predict.py
postprocess(preds, img, orig_imgs)
Applies non-max suppression and processes detections for each image in an input batch.