getitune-preparing-datasets

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Preparing datasets for getitune

为getitune准备数据集

When you pass a filesystem path to
data=
(Python API) or
--data_root
(CLI),
getitune
uses Datumaro to auto-detect the dataset format — you point at the dataset root and the same call works regardless of the underlying format.
Run everything from
library/
.
当你将文件系统路径传递给
data=
(Python API)或
--data_root
(CLI)时,
getitune
会使用Datumaro自动检测数据集格式——你只需指向数据集根目录,无论底层格式是什么, 同一个调用都能生效。
所有操作请在
library/
目录下执行。

Supported formats and how they are detected

支持的格式及其检测方式

FormatDetected by
COCOan
annotations/
directory with COCO JSON files
YOLOa
data.yaml
file (Ultralytics layout)
Pascal VOC
JPEGImages/
,
Annotations/
,
ImageSets/
directories
Datumaro (native)
metadata.json
+
data.parquet
at the root
  • Zip archives are accepted too; Datumaro extracts them on import.
  • Point
    data=
    at the dataset root — the directory that directly contains the marker files/folders above, not a parent of it.
格式检测依据
COCO包含COCO JSON文件的
annotations/
目录
YOLO
data.yaml
文件(Ultralytics布局)
Pascal VOC
JPEGImages/
Annotations/
ImageSets/
目录
Datumaro(原生)根目录下的
metadata.json
+
data.parquet
文件
  • 也支持Zip归档文件;Datumaro会在导入时自动解压。
  • data=
    指向数据集根目录——即直接包含上述标记文件/文件夹的目录,而非其父目录。

Workflow

工作流程

python
from getitune.engine import create_engine
python
from getitune.engine import create_engine

Same call for any supported format — just point at the root

任何支持格式都可使用相同调用——只需指向根目录

engine = create_engine( model="src/getitune/recipe/detection/yolox_s.yaml", data="/path/to/dataset_root", ) engine.train()

1. **Lay the dataset out as one supported format** and confirm the marker
   files/folders sit at the root you will pass.
   - Done when: the root matches exactly one row in the table above.
2. **Match the dataset to the task.** A detection dataset needs bounding-box
   annotations; segmentation needs masks; classification needs per-image labels.
   Task and labels must agree with the model you choose in the
   `getitune-training-a-model` skill.
   - Done when: `create_engine(...)` builds a datamodule without a
     feature/label mismatch error.
3. **Smoke-test loading** with a tiny run (`engine.train(max_epochs=1)`) before a
   full run.
   - Done when: one train + one validation batch load without shape errors.
engine = create_engine( model="src/getitune/recipe/detection/yolox_s.yaml", data="/path/to/dataset_root", ) engine.train()

1. **按照一种支持的格式布局数据集**,并确认标记文件/文件夹位于你要传递的根目录下。
   - 完成标志:根目录与上表中的某一行完全匹配。
2. **使数据集与任务匹配**。检测数据集需要边界框标注;分割数据集需要掩码;分类数据集需要逐图像标签。任务和标签必须与你在`getitune-training-a-model`技能中选择的模型一致。
   - 完成标志:`create_engine(...)`构建数据模块时未出现特征/标签不匹配错误。
3. **通过小型运行进行加载冒烟测试**(`engine.train(max_epochs=1)`),再进行完整运行。
   - 完成标志:一个训练批次和一个验证批次加载时未出现形状错误。

Ultralytics YOLO datasets

Ultralytics YOLO数据集

If you train an Ultralytics YOLO model, pass the Ultralytics
data.yaml
file directly as
data=
(or
--data_root
). Ultralytics support requires an install from source with the
ultralytics
extra (it is not in the PyPI package).
如果你训练Ultralytics YOLO模型,请直接将Ultralytics的
data.yaml
文件作为
data=
(或
--data_root
)传递。Ultralytics支持需要从源码安装并添加
ultralytics
扩展(该扩展未包含在PyPI包中)。

Debugging auto-detection

自动检测调试

  • Wrong/failed format detection: the root probably has extra nesting or a missing marker. Verify the exact marker files (
    annotations/
    for COCO,
    data.yaml
    for YOLO, the three VOC dirs,
    metadata.json
    +
    data.parquet
    for native) are directly under the path you pass.
  • Feature/label mismatch during training: the dataset's annotation type does not match the task — cross-check with
    getitune-training-a-model
    and pass an explicit
    task=
    .
  • Backend dataset conversion: the Geti application converts Geti-internal datasets to/from COCO/VOC via
    application/backend/app/datumaro_converter/
    ; that is a separate, app-side path from library
    data=
    usage.
  • 格式检测错误/失败:根目录可能存在额外嵌套或缺少标记文件。请验证你传递的路径下是否直接存在确切的标记文件(COCO对应
    annotations/
    ,YOLO对应
    data.yaml
    ,VOC对应三个目录,原生格式对应
    metadata.json
    +
    data.parquet
    )。
  • 训练期间特征/标签不匹配:数据集的标注类型与任务不匹配——请与
    getitune-training-a-model
    交叉核对,并显式传递
    task=
    参数。
  • 后端数据集转换:Geti应用通过
    application/backend/app/datumaro_converter/
    在Geti内部数据集与COCO/VOC之间进行转换;这是应用端的独立路径,与库的
    data=
    使用方式无关。

Related skills

相关技能

  • getitune-training-a-model
    — consumes the prepared dataset via
    data=
    .
  • getitune-discovering-models
    — pick a model that matches the dataset's task.
  • getitune-training-a-model
    — 通过
    data=
    使用已准备好的数据集。
  • getitune-discovering-models
    — 选择与数据集任务匹配的模型。