yolo-vision-tools
by @ruoyu05
Use Ultralytics YOLO to perform computer vision tasks, such as detecting people or objects in images and videos, classifying images, estimating human poses,...
1. Installation & Environment Check
# Install/update Ultralytics
pip install -U ultralyticsVerify installation and check environment
yolo checks
The yolo checks command validates Python version, PyTorch, CUDA, GPU availability, and all dependencies. For detailed environment troubleshooting, see Environment Check or use the provided environment check script: python scripts/check_environment.py.
2. Basic Usage Examples
#### Python Interface
from ultralytics import YOLOLoad a model (YOLO automatically infers task from model)
model = YOLO("yolo26n.pt") # or your custom model pathPredict on various sources
By default, outputs are saved to workspace/yolo-vision folder
results = model("image.jpg") # image file → saved to yolo-vision/outputs/images/
results = model("video.mp4", stream=True) # video with streaming → saved to yolo-vision/outputs/videos/
results = model("https://example.com/image.jpg") # URL → saved to yolo-vision/outputs/images/
results = model(0, show=True) # webcam with display → saved to yolo-vision/outputs/videos/Custom output directory (optional)
results = model("image.jpg", project="/custom/path") # save to custom directory
#### CLI Interface
# Basic syntax: yolo TASK MODE ARGS
By default, outputs are saved to workspace/yolo-vision folder
yolo predict model=yolo26n.pt source="image.jpg" # → saved to yolo-vision/runs/detect/predict/Task-specific examples
yolo detect predict model=yolo26n.pt source="video.mp4" # → saved to yolo-vision/runs/detect/predict/
yolo segment predict model=yolo26n-seg.pt source="image.jpg" # → saved to yolo-vision/runs/segment/predict/
yolo pose predict model=yolo26n-pose.pt source="image.jpg" # → saved to yolo-vision/runs/pose/predict/Custom output directory (optional)
yolo predict model=yolo26n.pt source="image.jpg" project="/custom/path" # save to custom directory
3. Model Selection
For quick start, use these default models:
yolo26n.pt (nano), yolo26s.pt (small), yolo26m.pt (medium)yolo26n-seg.pt, yolo26s-seg.pt, yolo26m-seg.ptyolo26n-cls.pt, yolo26s-cls.pt, yolo26m-cls.ptyolo26n-pose.pt, yolo26s-pose.pt, yolo26m-pose.ptyolo26n-obb.pt, yolo26s-obb.pt, yolo26m-obb.ptFor complete model list and selection guidance: Model Names | Model Selection
Common Issues
Q: yolo command not found after installation?
A: Try python -m ultralytics yolo or check Python environment PATH.
Q: How to use specific GPU?
A: Set device=0 (first GPU) or device=cpu for CPU-only mode.
Q: Model downloads slowly?
A: Set ULTRALYTICS_HOME environment variable to control cache location.
Q: How to filter specific classes?
A: Use classes parameter: classes=[0, 2, 5] (class indices).
Q: Memory issues with long videos?
A: Use stream=True to process videos as generators.
Q: Real-time webcam support?
A: Yes, use source=0 (default camera) with show=True for live display.
Getting Help
yolo checks to diagnose environment issuesclawhub install yolo-vision-tools