Logo Yolo Datasets

Yolo Datasets

Tổ chức
ultralytics
yolo-datasets

Use when uploading, annotating, building, converting, analyzing, or debugging datasets in Ultralytics Platform or local YOLO — Platform dataset management and Smart Annotation, data.yaml, YOLO label .txt formats, COCO/DOTA/mask conversion, auto-labeling, splits, validation, and errors like "no labels found" or mAP near 0. Covers detect, segment, semantic, depth, classify, pose, and OBB data.

Tổng quan

Nhà phát hànhultralytics
Kho mãskills
Tên kỹ năngyolo-datasets
Sao
38
Bản fork
0
Tệp đi kèm
2
Giấy phépAGPL-3.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 2 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được ultralytics công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Yolo Datasets trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/ultralytics/skills/tree/main/skills/yolo-datasets
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ultralytics/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/yolo-datasets .claude/skills/yolo-datasets
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Yolo Datasets trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Yolo Datasets ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Yolo Datasets với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Ultralytics YOLO datasets

The #1 cause of silent training failure is a malformed dataset — validate before training.

Fastest route: prepare data in Platform

  1. Open Platform, create a dataset under Annotate, and choose its task.
  2. Upload images, videos, ZIP/TAR archives, or NDJSON. Existing YOLO labels and COCO JSON can be imported; cloud-storage integrations can keep supported data in place.
  3. Open an image in the fullscreen editor. Use manual tools for detect, segment, semantic, classify, pose, or OBB. Switch to Smart mode to label with SAM (detect, segment, semantic, OBB) or a compatible official/custom YOLO model (those tasks plus pose).
  4. Review the Classes, Charts, and Errors tabs, fix the split, and create a numbered dataset version before important runs.

Platform datasets cover all seven YOLO tasks. Depth targets are imported rather than drawn in the editor. See Platform Data and the Annotation Editor.

To train on the same dataset from local code, create an API key under Settings > API Keys, set ULTRALYTICS_API_KEY, and pass the dataset's ul:// URI as data:

bash
yolo train model=yolo26n.pt data=ul://username/datasets/dataset-slug epochs=100

Export NDJSON when you need a portable snapshot instead of live Platform access.

The images → labels mirror rule

Ultralytics finds a label file by replacing the last /images/ path segment with /labels/ and the image extension with .txt:

dataset/
├── data.yaml
├── images/train/  img001.jpg ...     ├── images/val/  ...
└── labels/train/  img001.txt ...     └── labels/val/  ...
  • Labels next to images in an images/ dir, or in a dir not named labels, are not found → training stops with No labels found; if only some are missing, those images train as backgrounds.
  • Filenames must match stems exactly (case-sensitive on Linux).
  • An image with no/empty label file trains as a background image. A few percent of true backgrounds reduce false positives; accidentally missing labels destroy recall.

data.yaml anatomy

yaml
path: /abs/dataset/root # absolute, or omit to use this yaml's folder; a relative value (even `.`) resolves from the CWD (datasets_dir if missing there)
train: images/train # dir, .txt file of image paths, or list of dirs
val: images/val
test: images/test # optional
names: # 0-based, contiguous indices
  0: person
  1: helmet
# pose only:
kpt_shape: [17, 3] # [num_keypoints, dims]; dims 2 (x,y) or 3 (x,y,visibility)
flip_idx: [0, 2, 1, ...] # L/R keypoint swap map — without it, flip augs are auto-disabled
# semantic only (optional — polygon .txt labels in labels/ also work):
masks_dir: masks # per-pixel PNG mask images
# depth only (replace names above; pair depth/{train,val}/*.png or float .npy maps):
# nc: 1
# names: {0: depth}
# depth_scale: 1000 # PNG units per meter; default millimeters
  • Classification datasets use no yaml: folder structure is the label (dataset/train/<class>/*.jpg, dataset/val/<class>/*.jpg); train with data=path/to/dataset.
  • Per-task label line formats and their gotchas: read label-formats.md (this folder) whenever writing or debugging label files.

Converting from other formats — use built-ins first

python
from ultralytics.data.converter import convert_coco

convert_coco(labels_dir="coco/annotations/", use_segments=True, cls91to80=False)  # → segment
convert_coco(labels_dir="coco/annotations/", use_keypoints=True, cls91to80=False)  # → pose

Omit use_segments for detect labels. cls91to80=False keeps custom category IDs (as category_id - 1); leave the default True only for the official COCO 91-class IDs.

Also in ultralytics.data.converter: convert_dota_to_yolo_obb(dota_root_path) (DOTA → OBB), convert_segment_masks_to_yolo_seg(masks_dir, output_dir, classes) (index PNGs → polygons), yolo_bbox2segment(im_dir) (upgrade detect labels to segment via SAM), convert_to_multispectral(path, n_channels).

Auto-label a raw image folder (detector proposes boxes, SAM refines masks):

python
from ultralytics.data.annotator import auto_annotate

auto_annotate(
    data="dataset/images/train", det_model="yolo26x.pt", sam_model="sam_b.pt", output_dir="dataset/labels/train"
)

For VOC XML/CSV there is no converter — write a small script emitting the per-task line format (normalize coords, center-based boxes).

Splitting

python
from ultralytics.data.split import autosplit

autosplit(path="dataset/images", weights=(0.9, 0.1, 0.0))  # writes autosplit_*.txt lists

Point train:/val: at the generated .txt files. Keep frames from the same video/scene in ONE split — per-image random splits of video frames leak near-duplicates into val and inflate mAP. For classify: split_classify_dataset(source_dir, 0.8).

Validate before training (use the task-relevant steps in order)

  1. YAML/path check (non-classification) — validates required fields, resolves configured paths, checks the requested split (default val), and may auto-download a known dataset. It does not count or parse individual images and targets:

    python
    from ultralytics.data.utils import check_det_dataset
    
    check_det_dataset("data.yaml")  # detect/segment/pose/obb/semantic/depth
  2. Detection-only visual spot check — this helper accepts five-column class cx cy w h rows; wrong normalization or swapped axes become visible:

    python
    from ultralytics.data.utils import visualize_image_annotations
    
    visualize_image_annotations(
        "images/train/img001.jpg",
        "labels/train/img001.txt",
        label_map={0: "person", 1: "helmet"},
    )

    Do not use this helper for segment, pose, OBB, semantic, depth, or classify targets; use their task-aware trainer plots instead.

  3. Task-loader smoke test — run one epoch with matching task/model/data; this builds the real dataset and produces task-aware training plots (detection example):

    bash
    yolo detect train data=data.yaml model=yolo26n.pt epochs=1 fraction=0.1
    # inspect runs/detect/train/train_batch0.jpg — boxes must sit on objects
  4. Distribution sanity — check task-appropriate class/target balance and split leakage. For box tasks, also inspect very small boxes at train imgsz and the background-image share.

Known-good tiny datasets for pipeline smoke tests: coco8.yaml, coco8-seg.yaml, coco8-pose.yaml, dota8.yaml, cityscapes8.yaml, depth8.yaml, imagenet10. Pass them by name (data=coco8.yaml); the first yolo train/yolo val or check_det_dataset("coco8.yaml") downloads them into datasets_dir, so never fetch the archive or write their data.yaml by hand.

Related pages

  • label-formats.md — exact per-task label line formats + symptom→cause table. Read when writing labels, converting formats, or any label-related error.

If the installed version rejects an argument or format here, trust its error message and yolo checks over this file.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Yolo Datasets làm được gì?

Use when uploading, annotating, building, converting, analyzing, or debugging datasets in Ultralytics Platform or local YOLO — Platform dataset management and Smart Annotation, data.yaml, YOLO label .txt formats, COCO/DOTA/mask conversion, auto-labeling, splits, validation, and errors like "no labels found" or mAP near 0. Covers detect, segment, semantic, depth, classify, pose, and OBB data.

Vì sao nên dùng Yolo Datasets trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Yolo Datasets là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Yolo Datasets trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/ultralytics/skills/tree/main/skills/yolo-datasets. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Yolo Datasets?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Yolo Datasets với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Yolo Datasets với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Yolo Datasets có miễn phí không?

Có. Kỹ năng này được ultralytics phát hành trên GitHub theo giấy phép AGPL-3.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇