yolo-vision-tools

👤 ruoyu05 📦 v1.2.3 ⭐ 4.4 ⬇️ 1.3K 下載
🎨 設計多媒體 免費

📖 技能介紹


name: yolo-vision-tools description: Use Ultralytics YOLO to perform computer vision tasks, such as detecting people or objects in images and videos, classifying images, estimating human poses, and tracking cars, people, or animals in videos. argument-hint: | Use this tool when the user asks to analyze images or videos using YOLO computer vision models (YOLO26, YOLO11, etc.).

## Supported Tasks & Trigger Keywords

### 1. Object Detection (目標檢測) English Triggers: - detect objects in this image/video - what objects are in this picture/video - find [object] in this image/video - identify objects in the photo - locate objects in the image - show me what's in this picture - analyze this image for objects - object detection on this video - yolo detection on this image - run yolo on this picture

中文觸發詞: - 檢測圖片/影片中的物體 - 圖片/影片裡有什麼東西 - 找到圖片中的[物體] - 識別圖片中的物體 - 定點陣圖片中的物體 - 顯示圖片中的內容 - 分析圖片中的物體 - 對影片進行目標檢測 - 用yolo檢測這張圖片 - 執行yolo分析圖片

小蔥技能站7w4.net,專業的AI技能分享平臺。

### 2. Instance Segmentation (例項分割) English Triggers: - segment objects in this image - extract object masks - highlight object contours - separate objects from background - instance segmentation - object segmentation - mask detection - pixel-level segmentation

中文觸發詞: - 分割圖片中的物體 - 提取物體掩碼 - 標出物體輪廓 - 將物體從背景分離 - 例項分割 - 物體分割 - 掩碼檢測 - 畫素級分割

### 3. Image Classification (影像分類) English Triggers: - classify this image - what category is this image - recognize image type - determine image label - image classification - categorize this picture

中文觸發詞: - 對圖片進行分類 - 圖片屬於哪一類 - 識別圖片型別 - 確定圖片標籤 - 影像分類 - 分類這張圖片

### 4. Pose Estimation (姿態估計) English Triggers: - detect human poses - find skeleton/keypoints - recognize body posture - analyze human movements - pose estimation - body pose detection - human keypoints

中文觸發詞: - 檢測人體姿態 - 找出人體骨架/關鍵點 - 識別身體姿勢 - 分析人物動作 - 姿態估計 - 人體姿態檢測 - 人體關鍵點

### 5. Object Tracking (物體跟蹤) English Triggers: - track objects in this video - follow movement of objects - monitor object trajectories - track multiple objects - video object tracking - follow cars/people/animals

中文觸發詞: - 跟蹤影片中的物體 - 追蹤物體移動 - 監測物體軌跡 - 跟蹤多個物體 - 影片物體跟蹤 - 追蹤汽車/行人/動物

### 6. Model & Environment (模型與環境) English Triggers: - install yolo - setup yolo environment - check yolo installation - which yolo model to use - compare yolo models - yolo model selection - troubleshoot yolo

中文觸發詞: - 安裝yolo - 設定yolo環境 - 檢查yolo安裝 - 使用哪個yolo模型 - 比較yolo模型 - yolo模型選擇 - yolo故障排除

### 7. Specific Model Requests (特定模型請求) English Triggers: - use yolo26/yolo11/yolov8 - run yolo26 on this - yolo11 detection - latest yolo model - yolo nano/small/medium/large

中文觸發詞: - 使用yolo26/yolo11/yolov8 - 用yolo26執行 - yolo11檢測 - 最新yolo模型 - yolo nano/small/medium/large版本

### 8. General Analysis (通用分析) English Triggers: - analyze this image with yolo - yolo vision analysis - computer vision analysis - vision ai detection - ai image analysis

中文觸發詞: - 用yolo分析這張圖片 - yolo視覺分析 - 計算機視覺分析 - 視覺AI檢測 - AI圖片分析

## Quick Examples: - "Detect objects in this image" → 觸發 - "檢測這張圖片中的物體" → 觸發 - "Segment the cars in this video" → 觸發 - "跟蹤影片中的人體姿態" → 觸發


Ultralytics YOLO Vision Tools

Ultralytics YOLO is a state-of-the-art computer vision framework supporting multiple tasks including object detection, instance segmentation, image classification, pose estimation, and oriented bounding box detection. This skill provides comprehensive guidance for using YOLO effectively.

Latest Model: YOLO26 (released January 2026) features end-to-end NMS-free inference and optimized edge deployment. For stable production workloads, both YOLO26 and YOLO11 are recommended.

Quick Start

1. Installation & Environment Check

# Install/update Ultralytics
pip install -U ultralytics

# Verify 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 YOLO

# Load a model (YOLO automatically infers task from model)
model = YOLO("yolo26n.pt")  # or your custom model path

# Predict 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: - Detection: yolo26n.pt (nano), yolo26s.pt (small), yolo26m.pt (medium) - Segmentation: yolo26n-seg.pt, yolo26s-seg.pt, yolo26m-seg.pt - Classification: yolo26n-cls.pt, yolo26s-cls.pt, yolo26m-cls.pt - Pose Estimation: yolo26n-pose.pt, yolo26s-pose.pt, yolo26m-pose.pt - Oriented Detection: yolo26n-obb.pt, yolo26s-obb.pt, yolo26m-obb.pt

For complete model list and selection guidance: Model Names | Model Selection

Core Workflow

Step 1: Understand YOLO Tasks

YOLO supports five main computer vision tasks. Choose the right task for your application: - Detection: Identify and localize objects with bounding boxes - Segmentation: Generate pixel-level masks for objects - Classification: Categorize entire images - Pose Estimation: Detect keypoints for pose analysis - Oriented Detection: Detect rotated objects with angle parameter

Detailed comparison: Task Types

Step 2: Select Appropriate Model

Consider these factors when selecting a model: - Speed vs. Accuracy: Nano (fastest) → X (most accurate) - Hardware Constraints: GPU memory, CPU performance - Application Requirements: Real-time vs. batch processing

Guidance: Model Selection

Step 3: Configure Parameters

Common configuration parameters: - conf: Confidence threshold (default: 0.25) - iou: IoU threshold for NMS (default: 0.7) - imgsz: Input image size (default: 640) - device: Device ID (0 for first GPU, cpu for CPU) - save: Save results to disk - show: Display results in real-time

Complete examples: Configuration Samples

Step 4: Process Results

YOLO returns Results objects containing: - boxes: Bounding boxes, confidence scores, class labels - masks: Segmentation masks (for segmentation tasks) - keypoints: Pose keypoints (for pose estimation) - probs: Classification probabilities (for classification) - obb: Oriented bounding boxes (for OBB tasks)

Advanced Topics

Training Custom Models

from ultralytics import YOLO

# Load a model
model = YOLO("yolo26n.pt")

# Train on custom dataset
results = model.train(data="dataset.yaml", epochs=100, imgsz=640)

Training guide: Training Basics | Dataset Preparation

Installation Options

Multiple installation methods available: - pip: pip install -U ultralytics - Conda: conda install -c conda-forge ultralytics - Docker: Pre-built images for GPU/CPU environments - From Source: For development and customization

Detailed instructions: Installation Guide

Performance Optimization

  • Streaming Mode: Use stream=True for videos/long sequences to reduce memory
  • Batch Processing: Process multiple images together for efficiency
  • Hardware Acceleration: Configure CUDA, TensorRT, or OpenVINO for optimal performance

Reference Documentation

Document Description
Environment Check Comprehensive environment validation and troubleshooting
Installation Guide All installation methods (pip, Conda, Docker, source)
Task Types Detailed comparison of YOLO tasks and use cases
Model Names Complete YOLO26 model list with specifications
Model Selection Strategy for choosing models based on requirements
Configuration Samples Parameter configuration examples for various scenarios
Dataset Preparation Guide for preparing custom datasets for training
Training Basics Fundamentals of training YOLO models on custom data
Parameter Reference Complete reference for all YOLO configuration parameters

Utility Scripts

To save token usage and provide ready-to-use tools, the following Python scripts are available in the scripts/ directory:

Script Description Usage Example
check_environment.py Comprehensive environment diagnostics python scripts/check_environment.py
config_templates.py Ready-to-use configuration templates from scripts.config_templates import get_production_config
dataset_tools.py Dataset preparation and conversion tools from scripts.dataset_tools import coco_to_yolo
training_helpers.py Training, evaluation, and model management from scripts.training_helpers import evaluate_model
quick_tests.py Quick functionality tests python scripts/quick_tests.py --test environment
model_utils.py Model selection and validation utilities from scripts.model_utils import select_model

Benefits of using scripts: - Save tokens: Large code blocks are extracted from documentation - Ready-to-use: No need to copy-paste code from documentation - Modular: Import only what you need - Maintainable: Scripts can be updated independently

Troubleshooting

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

  • Run yolo checks to diagnose environment issues
  • Check official documentation: https://docs.ultralytics.com
  • Review configuration reference: https://docs.ultralytics.com/usage/cfg/

Output Directory Convention

Default Output Location

When processing images or videos with YOLO, if the user does not specify an output directory, all generated files will be saved to the workspace's yolo-vision folder.

File Organization

The yolo-vision folder will be organized as follows:

yolo-vision/
├── inputs/            # Original input files (copied for reference)
├── outputs/           # Processed files with detection results
│   ├── images/        # Detected images
│   ├── videos/        # Detected videos  
│   └── previews/      # Preview images
├── reports/           # Analysis reports and statistics
│   ├── json/          # JSON format reports
│   ├── markdown/      # Markdown format reports
│   └── csv/           # CSV format data
├── models/            # Downloaded YOLO models
│   ├── yolo26/        # YOLO26 models
│   ├── yolo11/        # YOLO11 models
│   └── custom/        # Custom trained models
└── logs/              # Processing logs and debug information

Automatic Folder Creation

The skill will automatically: 1. Create the yolo-vision folder if it doesn't exist 2. Create all subdirectories as needed 3. Organize files by date and task type 4. Generate timestamp-based filenames for easy tracking

Example Usage

# Without specifying output directory - uses default yolo-vision folder
results = model("image.jpg")  # Output saved to yolo-vision/outputs/images/

# With custom output directory
results = model("image.jpg", save_dir="/custom/path")  # Uses specified path

Benefits

  1. Consistency: All YOLO outputs in one predictable location
  2. Organization: Files automatically categorized by type
  3. Backup: Input files are preserved for reference
  4. Reproducibility: Easy to find and compare previous analyses
  5. Clean Workspace: Prevents clutter in the main workspace directory

User Override

Users can still specify custom output directories when needed: - By providing a save_dir parameter in Python code - By using the --project flag in CLI commands - By setting the ULTRALYTICS_PROJECT environment variable


License Note: Ultralytics YOLO is available under AGPL-3.0 for open source use and Enterprise License for commercial applications. Review licensing at https://ultralytics.com/license.

🤖 AI 評測

這個 YOLO 視覺工具包質量較好,內容豐富實用。它完整覆蓋了目標檢測、影像分類、例項分割、姿態估計、物體跟蹤等多種視覺任務,配有詳細的中英文使用說明和豐富的程式碼示例。提供了安裝指南、模型選擇建議、環境檢查工具等實用功能,新手也能快速上手。美中不足的是,部分輔助文件和工具指令碼的內容深度還有提升空間。總體而言,這是一個值得信賴、功能全面的 YOLO 工具包。

📊 多維度評分

適應性4.4
規範性4.2
有效性4.7
可靠性4.3
可信度4.5

📁 包含檔案 (17 個)

📄 SKILL.md 15.2 KB
📄 _meta.json 136 B
📄 references/configuration_samples.md 9.4 KB
📄 references/dataset_preparation.md 17 KB
📄 references/environment_check.md 12.6 KB
📄 references/installation_guide.md 11.8 KB
📄 references/model_names.md 6.5 KB
📄 references/model_selection.md 9.9 KB
📄 references/parameter_reference.md 12.4 KB
📄 references/task_types.md 11 KB
📄 references/training_basics.md 15.4 KB
📄 scripts/check_environment.py 19.5 KB
📄 scripts/config_templates.py 13.5 KB
📄 scripts/dataset_tools.py 19.2 KB
📄 scripts/model_utils.py 20.3 KB
📄 scripts/quick_tests.py 18.5 KB
📄 scripts/training_helpers.py 18.3 KB