Skip to content

影像標註

使用分類、邊界框和區域標註來標註影像。

Potato 支援影像標註,包括分類、目標檢測和區域標註任務。

啟用影像顯示

yaml
image:
  enabled: true
  max_width: 800
  max_height: 600

資料格式

在資料中引用影像:

json
{
  "id": "img_1",
  "image_path": "images/photo_001.jpg",
  "description": "Optional description"
}

配置影像欄位:

yaml
data_files:
  - path: data/image_tasks.json
    image_field: image_path

影像分類

對整張影像進行分類:

yaml
annotation_schemes:
  - annotation_type: radio
    name: category
    description: "What is shown in this image?"
    labels:
      - Cat
      - Dog
      - Bird
      - Other
 
  - annotation_type: multiselect
    name: attributes
    description: "Select all that apply"
    labels:
      - Indoor
      - Outdoor
      - Multiple animals
      - Human present

多標籤分類

yaml
annotation_schemes:
  - annotation_type: multiselect
    name: objects
    description: "What objects are visible?"
    labels:
      - Person
      - Car
      - Building
      - Tree
      - Animal
      - Furniture
      - Food
      - Electronic device

影像品質評估

yaml
annotation_schemes:
  - annotation_type: likert
    name: quality
    description: "Overall image quality"
    size: 5
    min_label: "Very poor"
    max_label: "Excellent"
 
  - annotation_type: multiselect
    name: issues
    description: "Select any quality issues"
    labels:
      - Blurry
      - Overexposed
      - Underexposed
      - Noisy
      - Low resolution
      - Watermark visible

邊界框標註

在物體周圍繪製框:

yaml
annotation_schemes:
  - annotation_type: image_annotation
    tools: [bbox]
    name: objects
    description: "Draw boxes around objects"
    labels:
      - Person
      - Car
      - Bicycle
      - Traffic sign

邊界框輸出

json
{
  "id": "img_1",
  "objects": [
    {
      "label": "Person",
      "x": 100,
      "y": 50,
      "width": 80,
      "height": 200
    },
    {
      "label": "Car",
      "x": 300,
      "y": 150,
      "width": 150,
      "height": 100
    }
  ]
}

預載入邊界框

載入現有標註用於稽核:

json
{
  "id": "img_1",
  "image_path": "images/photo_001.jpg",
  "predictions": [
    {"label": "Person", "x": 100, "y": 50, "width": 80, "height": 200, "confidence": 0.95}
  ]
}
yaml
annotation_schemes:
  - annotation_type: image_annotation
    tools: [bbox]
    name: objects

區域/多邊形標註

用於非矩形區域:

yaml
annotation_schemes:
  - annotation_type: image_annotation
    tools: [polygon]
    name: regions
    description: "Outline regions of interest"
    labels:
      - Building
      - Road
      - Vegetation
      - Water

影像比較

比較兩張影像:

yaml
data_files:
  - path: data/image_pairs.json
    item_a_field: image_original
    item_b_field: image_edited
 
annotation_schemes:
  - annotation_type: pairwise
    name: preference
    description: "Which image looks better?"
    labels:
      - label: "Original"
        value: "A"
      - label: "Edited"
        value: "B"
      - label: "Same"
        value: "tie"

影像描述

yaml
annotation_schemes:
  - annotation_type: text
    name: caption
    description: "Write a caption for this image"
    rows: 4
    placeholder: "Describe what you see..."

描述品質稽核

yaml
data_files:
  - path: data/captions.json
    image_field: image_path
    text_field: generated_caption
 
annotation_schemes:
  - annotation_type: likert
    name: accuracy
    description: "How accurate is this caption?"
    size: 5
    min_label: "Very inaccurate"
    max_label: "Very accurate"
 
  - annotation_type: likert
    name: fluency
    description: "How natural is the language?"
    size: 5
    min_label: "Very awkward"
    max_label: "Very natural"
 
  - annotation_type: text
    name: improved_caption
    description: "Suggest a better caption (optional)"
    rows: 4

顯示選項

影像尺寸

yaml
image:
  max_width: 800
  max_height: 600
  preserve_aspect_ratio: true

縮放控制元件

yaml
image:
  zoom_enabled: true
  initial_zoom: fit  # 'fit', 'actual', or percentage

全屏模式

yaml
image:
  fullscreen_enabled: true

內容稽核

yaml
annotation_schemes:
  - annotation_type: radio
    name: safe_for_work
    description: "Is this image safe for work?"
    labels:
      - Safe
      - Questionable
      - Not Safe
 
  - annotation_type: multiselect
    name: violation_types
    description: "Select all violations (if any)"
    labels:
      - Violence
      - Adult content
      - Hate symbols
      - Graphic content
      - Spam/advertisement

支援的格式

支援的常見影像格式:

  • JPEG/JPG
  • PNG
  • GIF
  • WebP
  • BMP
yaml
image:
  allowed_formats: ["jpg", "jpeg", "png", "webp"]

完整示例:目標檢測稽核

yaml
task_name: "Object Detection Verification"
 
image:
  enabled: true
  max_width: 1000
  zoom_enabled: true
 
data_files:
  - path: data/detections.json
    image_field: image_path
 
annotation_schemes:
  # Review pre-loaded predictions
  - annotation_type: image_annotation
    tools: [bbox]
    name: objects
    description: "Verify and correct object boxes"
    labels:
      - Person
      - Vehicle
      - Animal
      - Object
  # Overall assessment
  - annotation_type: radio
    name: prediction_quality
    description: "How accurate were the predictions?"
    labels:
      - All correct
      - Minor corrections needed
      - Major corrections needed
      - Mostly incorrect
 
  - annotation_type: number
    name: missed_objects
    description: "How many objects were missed?"
    min: 0
    max: 50
 
  - annotation_type: text
    name: notes
    description: "Any issues or comments?"
    rows: 4
    label_requirement:
      required: false

效能提示

  1. 最佳化影像大小 - 標註前調整大影像的大小
  2. 照片使用 JPEG - 檔案更小,載入更快
  3. 圖形使用 PNG - 圖表/截圖品質更好
  4. 啟用懶載入 - 大數據集適用
  5. 考慮縮圖 - 在列表檢視中顯示預覽
  6. 統一預處理 - 標準化尺寸和格式