画像アノテーション
バウンディングボックス、ポリゴン、フリーハンド描画、ランドマークポイントによる画像アノテーション。
画像アノテーション
Potatoの画像アノテーションシステムは、物体検出、セグメンテーション、キーポイントアノテーションなどのコンピュータビジョンタスク向けの複数のアノテーション手法をサポートしています。
サポートされるツール
| ツール | 説明 | ユースケース |
|---|---|---|
bbox | 矩形バウンディングボックス | 物体検出 |
polygon | 多点ポリゴン | インスタンスセグメンテーション |
freeform | フリーハンド描画 | 不規則な形状 |
landmark | ポイントマーカー | キーポイント検出 |
fill | ピクセルレベルの塗りつぶしツール | セグメンテーションマスク |
eraser | 描画領域の消去 | セグメンテーションマスクの修正 |
brush | ペイントブラシツール | 細粒度セグメンテーション |
基本設定
yaml
annotation_schemes:
- name: "objects"
description: "Draw boxes around all objects"
annotation_type: "image_annotation"
tools:
- bbox
labels:
- person
- car
- bicycle設定オプション
| フィールド | タイプ | デフォルト | 説明 |
|---|---|---|---|
name | string | 必須 | アノテーションの一意識別子 |
description | string | 必須 | アノテーターに表示される指示 |
annotation_type | string | 必須 | "image_annotation"でなければならない |
tools | list | 必須 | 有効なアノテーションツール(bbox、polygon、freeform、landmark、fill、eraser、brush) |
labels | list | 必須 | アノテーション用のカテゴリラベル |
zoom_enabled | boolean | true | ズームコントロールを有効化 |
pan_enabled | boolean | true | ドラッグナビゲーションを有効化 |
min_annotations | integer | 0 | 最小必須アノテーション数 |
max_annotations | integer | null | 最大許容アノテーション数(null = 無制限) |
freeform_brush_size | integer | 5 | フリーハンド描画のブラシサイズ |
freeform_simplify | float | 2.0 | パス簡略化係数 |
ラベル設定
ラベルはシンプルな文字列または詳細なオブジェクトとして定義できます:
yaml
# Simple labels (auto-colored)
labels:
- person
- car
- tree
# Detailed labels with custom colors and shortcuts
labels:
- name: "person"
color: "#FF6B6B"
key_value: "1"
- name: "car"
color: "#4ECDC4"
key_value: "2"
- name: "bicycle"
color: "#45B7D1"
key_value: "3"例
物体検出(バウンディングボックス)
yaml
annotation_schemes:
- name: "detection"
description: "Draw bounding boxes around all vehicles"
annotation_type: "image_annotation"
tools:
- bbox
labels:
- name: "car"
color: "#3B82F6"
key_value: "1"
- name: "truck"
color: "#10B981"
key_value: "2"
- name: "motorcycle"
color: "#F59E0B"
key_value: "3"
min_annotations: 1
zoom_enabled: trueインスタンスセグメンテーション(ポリゴン)
yaml
annotation_schemes:
- name: "segmentation"
description: "Draw polygons around each object"
annotation_type: "image_annotation"
tools:
- polygon
labels:
- name: "building"
color: "#8B5CF6"
- name: "road"
color: "#64748B"
- name: "vegetation"
color: "#22C55E"
zoom_enabled: true
pan_enabled: trueキーポイントアノテーション(ランドマーク)
yaml
annotation_schemes:
- name: "facial_landmarks"
description: "Mark facial keypoints"
annotation_type: "image_annotation"
tools:
- landmark
labels:
- name: "left_eye"
color: "#3B82F6"
- name: "right_eye"
color: "#3B82F6"
- name: "nose"
color: "#10B981"
- name: "left_mouth"
color: "#F59E0B"
- name: "right_mouth"
color: "#F59E0B"複数ツール
yaml
annotation_schemes:
- name: "mixed_annotation"
description: "Use boxes for objects and polygons for regions"
annotation_type: "image_annotation"
tools:
- bbox
- polygon
labels:
- name: "object"
color: "#3B82F6"
- name: "region"
color: "#10B981"キーボードショートカット
| キー | アクション |
|---|---|
b | バウンディングボックスツールを有効化 |
p | ポリゴンツールを有効化 |
f | フリーハンドツールを有効化 |
l | ランドマークツールを有効化 |
1-9 | ラベルを選択 |
Delete | 選択したアノテーションを削除 |
Ctrl+Z | 元に戻す |
Ctrl+Y | やり直し |
+ / - | ズームイン/アウト |
データ形式
入力データ
データファイルには画像パスまたはURLを含める必要があります:
json
[
{
"id": "img_001",
"image_url": "https://example.com/images/photo1.jpg"
},
{
"id": "img_002",
"image_url": "/data/images/photo2.png"
}
]設定で画像フィールドを指定します:
yaml
item_properties:
id_key: id
text_key: image_url出力形式
アノテーションには各アノテーションのジオメトリデータが含まれます:
json
{
"id": "img_001",
"annotations": {
"objects": [
{
"id": "ann_1",
"type": "bbox",
"label": "car",
"geometry": {
"x": 100,
"y": 150,
"width": 200,
"height": 100
}
},
{
"id": "ann_2",
"type": "polygon",
"label": "building",
"geometry": {
"points": [
[50, 50],
[150, 50],
[150, 200],
[50, 200]
]
}
}
]
}
}サポートされる画像形式
- JPEG / JPG
- PNG
- GIF
- WebP
セグメンテーションマスク
v2.2.0の新機能
fill、eraser、brushツールにより、ピクセルレベルのセグメンテーションマスクアノテーションが可能になります。これらのツールは、正確な領域境界が必要なセマンティックセグメンテーションタスクに最適です。
yaml
annotation_schemes:
- name: "segmentation"
description: "Paint segmentation masks"
annotation_type: "image_annotation"
tools:
- fill
- eraser
- brush
labels:
- name: "foreground"
color: "#3B82F6"
- name: "background"
color: "#6B7280"
freeform_brush_size: 10| キー | アクション |
|---|---|
i | 塗りつぶしツールを有効化 |
e | 消しゴムツールを有効化 |
r | ブラシツールを有効化 |
PDF/ドキュメントバウンディングボックス
v2.2.0の新機能
PDFページやドキュメント画像にバウンディングボックスを描画できます。instance_displayのpdf表示タイプと組み合わせると、アノテーターはPDFドキュメントの個々のページにボックスを描画できます。
yaml
instance_display:
fields:
- key: pdf_url
type: pdf
annotation_schemes:
- name: "document_regions"
description: "Draw boxes around figures and tables"
annotation_type: "image_annotation"
tools:
- bbox
labels:
- name: "figure"
color: "#3B82F6"
- name: "table"
color: "#10B981"
- name: "equation"
color: "#F59E0B"ベストプラクティス
- 適切なツールを使用 - 素早い検出にはバウンディングボックス、精密な境界にはポリゴン、セグメンテーションには塗りつぶし/ブラシ
- 明確なラベルを定義 - 区別しやすく重複しないカテゴリを使用
- アノテーション制限を設定 -
min_annotationsで完全性を確保 - ズームを有効化 - 高解像度画像の詳細なアノテーションに不可欠
- キーボードショートカットを使用 - アノテーション速度を大幅に向上
- ラベルカラーを指定 - アノテーションの視覚的な区別を容易にする