ultralytics 8.0.42 DDP fix and Docs updates (#1065)

Co-authored-by: Laughing <61612323+Laughing-q@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ayush Chaurasia <ayush.chaurarsia@gmail.com>
Co-authored-by: Noobtoss <96134731+Noobtoss@users.noreply.github.com>
Co-authored-by: Laughing-q <1185102784@qq.com>
This commit is contained in:
Glenn Jocher 2023-02-20 12:56:20 +01:00 committed by GitHub
parent f6e393c1d2
commit f2a7a29e53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 196 additions and 93 deletions

View file

@ -32,10 +32,11 @@ predictor's call method.
Results object consists of these component objects:
- `Results.boxes` : `Boxes` object with properties and methods for manipulating bboxes
- `Results.masks` : `Masks` object used to index masks or to get segment coordinates.
- `Results.probs` : `torch.Tensor` containing the class probabilities/logits.
- `Results.orig_shape` : `tuple` containing the original image size as (height, width).
- `Results.boxes`: `Boxes` object with properties and methods for manipulating bboxes
- `Results.masks`: `Masks` object used to index masks or to get segment coordinates.
- `Results.probs`: `torch.Tensor` containing the class probabilities/logits.
- `Results.orig_img`: Original image loaded in memory.
- `Results.path`: `Path` containing the path to input image
Each result is composed of torch.Tensor by default, in which you can easily use following functionality:
@ -94,18 +95,18 @@ results[0].probs # cls prob, (num_class, )
Class reference documentation for `Results` module and its components can be found [here](reference/results.md)
## Visualizing results
## Plotting results
You can use `visualize()` function of `Result` object to get a visualization. It plots all components(boxes, masks,
You can use `plot()` function of `Result` object to plot results on in image object. It plots all components(boxes, masks,
classification logits, etc) found in the results object
```python
res = model(img)
res_plotted = res[0].visualize()
cv2.imshow("result", res_plotted)
res = model(img)
res_plotted = res[0].plot()
cv2.imshow("result", res_plotted)
```
!!! example "`visualize()` arguments"
!!! example "`plot()` arguments"
`show_conf (bool)`: Show confidence