Update prediction Results docs (#4139)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Glenn Jocher
2023-08-03 18:44:40 +02:00
committed by GitHub
parent 8870084645
commit 11d0488bf1
107 changed files with 1451 additions and 1317 deletions

View File

@ -40,9 +40,11 @@ def spaces_in_path(path):
Yields:
(Path): Temporary path with spaces replaced by underscores if spaces were present, otherwise the original path.
Examples:
Example:
```python
with spaces_in_path('/path/with spaces') as new_path:
# your code here
```
"""
# If path has spaces, replace them with underscores

View File

@ -61,10 +61,12 @@ def coco80_to_coco91_class(): #
For details see https://tech.amikelive.com/node-718/what-object-categories-labels-are-in-coco-dataset/.
Example:
```python
a = np.loadtxt('data/coco.names', dtype='str', delimiter='\n')
b = np.loadtxt('data/coco_paper.names', dtype='str', delimiter='\n')
x1 = [list(a[i] == b).index(True) + 1 for i in range(80)] # darknet to coco
x2 = [list(b[i] == a).index(True) if any(b[i] == a) else None for i in range(91)] # coco to darknet
```
"""
return [
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 31, 32, 33, 34,

View File

@ -332,7 +332,7 @@ def save_one_box(xyxy, im, file=Path('im.jpg'), gain=1.02, pad=10, square=False,
Returns:
(numpy.ndarray): The cropped image.
Examples:
Example:
```python
from ultralytics.utils.plotting import save_one_box