ultralytics 8.0.48
Edge TPU fix and Metrics updates (#1171)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: majid nasiri <majnasai@gmail.com>
This commit is contained in:
@ -28,6 +28,29 @@ predictor's call method.
|
||||
probs = r.probs # Class probabilities for classification outputs
|
||||
```
|
||||
|
||||
## Sources
|
||||
|
||||
YOLOv8 can run inference on a variety of sources. The table below lists the various sources that can be used as input
|
||||
for YOLOv8, along with the required format and notes. Sources include images, URLs, PIL images, OpenCV, numpy arrays,
|
||||
torch tensors, CSV files, videos, directories, globs, YouTube videos, and streams. The table also indicates whether each
|
||||
source can be used as a stream and the model argument required for that source.
|
||||
|
||||
| source | stream | model(arg) | type | notes |
|
||||
|------------|---------|--------------------------------------------|----------------|------------------|
|
||||
| image | | `'im.jpg'` | `str`, `Path` | |
|
||||
| URL | | `'https://ultralytics.com/images/bus.jpg'` | `str` | |
|
||||
| screenshot | | `'screen'` | `str` | |
|
||||
| PIL | | `Image.open('im.jpg')` | `PIL.Image` | HWC, RGB |
|
||||
| OpenCV | | `cv2.imread('im.jpg')[:,:,::-1]` | `np.ndarray` | HWC, BGR to RGB |
|
||||
| numpy | | `np.zeros((640,1280,3))` | `np.ndarray` | HWC |
|
||||
| torch | | `torch.zeros(16,3,320,640)` | `torch.Tensor` | BCHW, RGB |
|
||||
| CSV | | `'sources.csv'` | `str`, `Path` | RTSP, RTMP, HTTP |
|
||||
| video | ✓ | `'vid.mp4'` | `str`, `Path` | |
|
||||
| directory | ✓ | `'path/'` | `str`, `Path` | |
|
||||
| glob | ✓ | `path/*.jpg'` | `str` | Use `*` operator |
|
||||
| YouTube | ✓ | `'https://youtu.be/Zgi9g1ksQHc'` | `str` | |
|
||||
| stream | ✓ | `'rtsp://example.com/media.mp4'` | `str` | RTSP, RTMP, HTTP |
|
||||
|
||||
## Working with Results
|
||||
|
||||
Results object consists of these component objects:
|
||||
|
Reference in New Issue
Block a user