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:
parent
ef16c56c99
commit
f7b9009c91
15 changed files with 52 additions and 50 deletions
|
|
@ -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/).
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue