Fix bus.jpg path in predict.md (#19203)

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Muhammad Rizwan Munawar 2025-02-13 09:08:30 +05:00 committed by GitHub
parent 897043f98a
commit fa393926af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -404,7 +404,7 @@ Below are code examples for using each source type:
model = YOLO("yolo11n.pt")
# Run inference on 'bus.jpg' with arguments
model.predict("bus.jpg", save=True, imgsz=320, conf=0.5)
model.predict("https://ultralytics.com/images/bus.jpg", save=True, imgsz=320, conf=0.5)
```
Inference arguments:
@ -473,8 +473,10 @@ All Ultralytics `predict()` calls will return a list of `Results` objects:
model = YOLO("yolo11n.pt")
# Run inference on an image
results = model("bus.jpg") # list of 1 Results object
results = model(["bus.jpg", "zidane.jpg"]) # list of 2 Results objects
results = model("https://ultralytics.com/images/bus.jpg") # list of 1 Results object
results = model(
["https://ultralytics.com/images/bus.jpg", "https://ultralytics.com/images/zidane.jpg"]
) # list of 2 Results objects
```
`Results` objects have the following attributes:
@ -530,7 +532,7 @@ For more details see the [`Results` class documentation](../reference/engine/res
model = YOLO("yolo11n.pt")
# Run inference on an image
results = model("bus.jpg") # results list
results = model("https://ultralytics.com/images/bus.jpg") # results list
# View results
for r in results:
@ -568,7 +570,7 @@ For more details see the [`Boxes` class documentation](../reference/engine/resul
model = YOLO("yolo11n-seg.pt")
# Run inference on an image
results = model("bus.jpg") # results list
results = model("https://ultralytics.com/images/bus.jpg") # results list
# View results
for r in results:
@ -601,7 +603,7 @@ For more details see the [`Masks` class documentation](../reference/engine/resul
model = YOLO("yolo11n-pose.pt")
# Run inference on an image
results = model("bus.jpg") # results list
results = model("https://ultralytics.com/images/bus.jpg") # results list
# View results
for r in results:
@ -635,7 +637,7 @@ For more details see the [`Keypoints` class documentation](../reference/engine/r
model = YOLO("yolo11n-cls.pt")
# Run inference on an image
results = model("bus.jpg") # results list
results = model("https://ultralytics.com/images/bus.jpg") # results list
# View results
for r in results:
@ -670,7 +672,7 @@ For more details see the [`Probs` class documentation](../reference/engine/resul
model = YOLO("yolo11n-obb.pt")
# Run inference on an image
results = model("boats.jpg") # results list
results = model("https://ultralytics.com/images/boats.jpg") # results list
# View results
for r in results:
@ -710,7 +712,7 @@ The `plot()` method in `Results` objects facilitates visualization of prediction
model = YOLO("yolo11n.pt")
# Run inference on 'bus.jpg'
results = model(["bus.jpg", "zidane.jpg"]) # results list
results = model(["https://ultralytics.com/images/bus.jpg", "https://ultralytics.com/images/zidane.jpg"]) # results list
# Visualize the results
for i, r in enumerate(results):