multisource-docs-fix
UltralyticsAssistant 3 months ago
parent 5fa8f65797
commit 7b40b55e01
  1. 5
      docs/en/modes/predict.md

@ -113,7 +113,7 @@ YOLOv8 can process different types of input sources for inference, as shown in t
| OpenCV | `cv2.imread('im.jpg')` | `np.ndarray` | HWC format with BGR channels `uint8 (0-255)`. | | OpenCV | `cv2.imread('im.jpg')` | `np.ndarray` | HWC format with BGR channels `uint8 (0-255)`. |
| numpy | `np.zeros((640,1280,3))` | `np.ndarray` | HWC format with BGR channels `uint8 (0-255)`. | | numpy | `np.zeros((640,1280,3))` | `np.ndarray` | HWC format with BGR channels `uint8 (0-255)`. |
| torch | `torch.zeros(16,3,320,640)` | `torch.Tensor` | BCHW format with RGB channels `float32 (0.0-1.0)`. | | torch | `torch.zeros(16,3,320,640)` | `torch.Tensor` | BCHW format with RGB channels `float32 (0.0-1.0)`. |
| CSV | `'sources.csv'` | `str` or `Path` | CSV file containing paths to images, videos, or directories. | CSV | `'sources.csv'` | `str` or `Path` | CSV file containing paths to images, videos, or directories. |
| TXT | `'sources.txt'` | `str` or `Path` | TXT file containing paths to images, videos, or directories. | | TXT | `'sources.txt'` | `str` or `Path` | TXT file containing paths to images, videos, or directories. |
| video ✅ | `'video.mp4'` | `str` or `Path` | Video file in formats like MP4, AVI, etc. | | video ✅ | `'video.mp4'` | `str` or `Path` | Video file in formats like MP4, AVI, etc. |
| directory ✅ | `'path/'` | `str` or `Path` | Path to a directory containing images or videos. | | directory ✅ | `'path/'` | `str` or `Path` | Path to a directory containing images or videos. |
@ -260,8 +260,7 @@ Below are code examples for using each source type:
# Run inference on the source # Run inference on the source
results = model(source) # list of Results objects results = model(source) # list of Results objects
"TXT"
=== "TXT"
Run inference on a collection of images, videos and directories listed in a TXT file. Run inference on a collection of images, videos and directories listed in a TXT file.
```python ```python

Loading…
Cancel
Save