Update FastSAM and SAM docs (#14499)

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Laughing 2024-07-18 06:10:48 +08:00 committed by GitHub
parent 81544c6d71
commit c87600037d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 7 deletions

View file

@ -56,10 +56,10 @@ The Segment Anything Model can be employed for a multitude of downstream tasks t
model.info()
# Run inference with bboxes prompt
model("ultralytics/assets/zidane.jpg", bboxes=[439, 437, 524, 709])
results = model("ultralytics/assets/zidane.jpg", bboxes=[439, 437, 524, 709])
# Run inference with points prompt
model("ultralytics/assets/zidane.jpg", points=[900, 370], labels=[1])
results = model("ultralytics/assets/zidane.jpg", points=[900, 370], labels=[1])
```
!!! Example "Segment everything"
@ -128,6 +128,10 @@ The Segment Anything Model can be employed for a multitude of downstream tasks t
results = predictor(source="ultralytics/assets/zidane.jpg", crop_n_layers=1, points_stride=64)
```
!!! Note
All the returned `results` in above examples are [Results](../modes/predict.md#working-with-results) object which allows access predicted masks and source image easily.
- More additional args for `Segment everything` see [`Predictor/generate` Reference](../reference/models/sam/predict.md).
## SAM comparison vs YOLOv8