Reference for ultralytics/models/sam/model.py
Note
Full source code for this file is available at https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/model.py. Help us fix any issues you see by submitting a Pull Request 🛠️. Thank you 🙏!
ultralytics.models.sam.model.SAM
Bases: Model
SAM model interface.
Source code in ultralytics/models/sam/model.py
__call__(source=None, stream=False, bboxes=None, points=None, labels=None, **kwargs)
Calls the 'predict' function with given arguments to perform object detection.
Source code in ultralytics/models/sam/model.py
info(detailed=False, verbose=True)
Logs model info.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
detailed |
bool
|
Show detailed information about model. |
False
|
verbose |
bool
|
Controls verbosity. |
True
|
Source code in ultralytics/models/sam/model.py
predict(source, stream=False, bboxes=None, points=None, labels=None, **kwargs)
Predicts and returns segmentation masks for given image or video source.