PyCharm Docs Inspect fixes (#18432)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Muhammad Rizwan Munawar 2024-12-29 23:19:05 +05:00 committed by GitHub
parent ef16c56c99
commit f7b9009c91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 52 additions and 50 deletions

View file

@ -195,22 +195,22 @@ Performing inference with a trained Ultralytics YOLO model is straightforward:
1. Load the Model:
```python
from ultralytics import YOLO
```python
from ultralytics import YOLO
model = YOLO("path/to/your/model.pt")
```
model = YOLO("path/to/your/model.pt")
```
2. Run Inference:
```python
results = model("path/to/image.jpg")
```python
results = model("path/to/image.jpg")
for r in results:
print(r.boxes) # print bounding box predictions
print(r.masks) # print mask predictions
print(r.probs) # print class probabilities
```
for r in results:
print(r.boxes) # print bounding box predictions
print(r.masks) # print mask predictions
print(r.probs) # print class probabilities
```
For advanced inference techniques, including batch processing, video inference, and custom preprocessing, refer to the detailed [prediction guide](https://docs.ultralytics.com/modes/predict/).