UI はローカライズ済みです。スキルの紹介と説明文書は選択した言語へ AI が自動翻訳し、コード・コマンド・パス・専門用語は原文のままです。原作者の文書が優先されます。
スキルを探す
データ・研究 · SKILL.md

data-preparation

data-preparation

Guides Mask_RCNN dataset subclassing, mask formats, sample dataset layouts, validation, resizing, and synthetic fixtures.

Independent GitHub snapshot · Automated classification · Original documentation governs

スキルの説明

GitHub

name: data-preparation description: "Guides Mask_RCNN dataset subclassing, mask formats, sample dataset layouts, validation, resizing, and synthetic fixtures." disable-model-invocation: true metadata: disco-role: operating license: NOASSERTION

Data Preparation

Use this sub-skill when a task asks how to prepare images, masks, polygons, COCO annotations, VIA JSON, nucleus challenge folders, or custom mrcnn.utils.Dataset subclasses for Mask_RCNN.

Read first by need

Dataset preparation workflow

  1. Subclass mrcnn.utils.Dataset.

  2. In a loader method, call add_class(source, class_id, class_name) and add_image(source, image_id, path, **metadata) for each image.

  3. Implement load_mask(image_id) to return:

    mask: np.ndarray  # shape [height, width, instance_count], bool or 0/1
    class_ids: np.ndarray  # shape [instance_count], dtype int32
    
  4. Override load_image() only when images are generated or not stored as ordinary files.

  5. Call dataset.prepare() before using dataset.image_ids, class_names, source_class_ids, load_image_gt, training, or visualization.

  6. Use mrcnn.model.load_image_gt(dataset, config, image_id, augmentation=..., use_mini_mask=...) to check the full preprocessing path.

Data-specific routes

  • VIA polygons / Balloon-style one-class dataset: validate folder split and via_region_data.json; read data-formats.md.
  • COCO: validate annotations/instances_<subset><year>.json plus <subset><year>/ images; pycocotools is required for actual loading and evaluation.
  • Nucleus / Data Science Bowl: validate <image_id>/images/<image_id>.png and optional <image_id>/masks/*.png; RLE output is owned by inference-evaluation.
  • Synthetic Shapes: use generated shapes for quick data-pipeline checks; do not treat them as proof of real dataset quality.

Boundary notes

This sub-skill validates and explains data. For training schedules, layer choices, checkpoints, and weight loading, route to training. For prediction outputs, COCO AP, visualization, color splash, or RLE submission files, route to inference-evaluation.

保存したスキル