Skip to content
Tutorials4 Min. Lesezeit

Video-Annotation mit Steuerung Bild für Bild

So richtest du Video-Annotation in Potato ein: Navigation Bild für Bild, Marker mit Zeitstempeln, zeitliches Labeln von Ereignissen und Klassifikation je Segment über Radio- oder Span-Schemata.

Potato Team

Über Video-Annotation entstehen die Trainingsdaten für Dinge wie Aktivitätserkennung, Objektverfolgung und die Erkennung zeitlicher Ereignisse. Dieses Tutorial behandelt die Frame-Navigation, das Zerlegen eines Clips in der Zeit und Wege, das Labeln zügig zu halten. Die vollständige Referenz der Video-Schemata steht in der Quelldokumentation.

Was Video-Annotation leisten kann

Potato verarbeitet Video sowohl für Label- als auch für Klassifikationsaufgaben:

  • Videoklassifikation: ganze Videoclips labeln
  • Mehrfach-Tagging: mehrere Tags an ein Video vergeben
  • Zeitliche Annotation: Ereignisse im Video markieren

Einfacher Videoaufbau

yaml
annotation_task_name: "Video Action Recognition"
task_dir: "."
 
data_files:
  - "data/videos.json"
 
item_properties:
  id_key: id
  text_key: video_url
 
output_annotation_dir: "annotation_output/"
export_annotation_format: "jsonl"
 
annotation_schemes:
  - annotation_type: video_annotation
    name: action
    description: "Mark each stretch of video where one action is happening"
    mode: segment
    labels:
      - name: walking
        color: "#4ECDC4"
        key_value: "1"
      - name: running
        color: "#FF6B6B"
        key_value: "2"
      - name: jumping
        color: "#45B7D1"
        key_value: "3"
      - name: sitting
        color: "#FFEAA7"
        key_value: "4"
 
user_config:
  allow_all_users: true
yaml
    min_segments: 1
    label_requirement:
      required: true

Zeitliche Segmente annotieren

Ereignisse mit Start- und Endzeit markieren:

yaml
annotation_schemes:
  - annotation_type: video_annotation
    name: frame_label
    description: "Classify the current frame"
    mode: frame
    frame_stepping: true
    show_timecode: true
    video_fps: 30
    labels:
      - name: action
        color: "#FF6B6B"
        key_value: "1"
      - name: no_action
        color: "#9CA3AF"
        key_value: "2"

Segmente anlegen

  1. An den Anfang eines Ereignisses navigieren
  2. [ drücken oder auf Mark Start klicken
  3. An das Ende des Ereignisses navigieren
  4. ] drücken oder auf Mark End klicken
  5. Das Label für das Ereignis wählen
  6. Für alle weiteren Ereignisse wiederholen

Wichtige Momente markieren

Einzelne Momente innerhalb eines Clips taggen:

yaml
annotation_schemes:
  - annotation_type: video_annotation
    name: key_moments
    description: "Mark the moment each action begins, peaks, and ends"
    mode: keyframe
    labels:
      - name: action_start
        color: "#22C55E"
        key_value: "1"
      - name: action_peak
        color: "#EF4444"
        key_value: "2"
      - name: action_end
        color: "#3B82F6"
        key_value: "3"

Klassifikation je Video

Ein ganzes Video mit den Standard-Annotationstypen klassifizieren:

yaml
annotation_schemes:
  - annotation_type: video_annotation
    name: plays
    description: "Mark each play and describe it"
    mode: segment
    labels:
      - name: attack
        color: "#EF4444"
      - name: defense
        color: "#3B82F6"
    segment_schemes:
      - annotation_type: radio
        name: outcome
        description: "How did this play end?"
        labels: ["scored", "turnover", "out of play"]

Video mit Kategorielabels

Videos mit Kategorielabels annotieren:

yaml
annotation_schemes:
  - annotation_type: multiselect
    name: clip_tags
    description: "Tags that apply to this clip as a whole"
    labels:
      - Highlight worthy
      - Good camera angle
      - Multiple players
      - Close-up
      - Wide shot
      - Slow motion available

Eine vollständige Konfiguration

yaml
annotation_task_name: "Sports Video Analysis"
task_dir: "."
 
data_files:
  - "data/sports_clips.json"
 
item_properties:
  id_key: id
  text_key: video_url
 
output_annotation_dir: "annotations/"
export_annotation_format: "jsonl"
 
annotation_instructions: |
  ## Event marking
 
  - Mark an event from the frame it **starts**, not from the frame it becomes obvious.
  - Include the full play sequence in the segment.
  - For a goal, run the segment from the shot to the ball crossing the line.
 
  ## Navigation
 
  - `Space` plays and pauses, `,` and `.` step one frame.
  - `[` and `]` set the segment boundaries, `Enter` creates the segment.
 
annotation_schemes:
  - annotation_type: video_annotation
    name: game_events
    description: "Mark every game event and its duration"
    mode: segment
    frame_stepping: true
    show_timecode: true
    playback_rate_control: true
    video_fps: 30
    min_segments: 1
    label_requirement:
      required: true
    labels:
      - name: goal
        color: "#22C55E"
        key_value: "1"
      - name: foul
        color: "#EF4444"
        key_value: "2"
      - name: corner_kick
        color: "#3B82F6"
        key_value: "3"
      - name: free_kick
        color: "#F59E0B"
        key_value: "4"
      - name: penalty
        color: "#EC4899"
        key_value: "5"
      - name: offside
        color: "#8B5CF6"
        key_value: "6"
 
  - annotation_type: multiselect
    name: clip_tags
    description: "Tags that apply to this clip as a whole"
    labels:
      - Highlight worthy
      - Good camera angle
      - Multiple players
      - Close-up
      - Wide shot
      - Slow motion available
 
user_config:
  allow_all_users: true

Ausgabeformat

json
{
    "video_metadata": {
        "duration": 120.5,
        "fps": 30,
        "width": 1920,
        "height": 1080
    },
    "segments": [
        {
            "id": "segment_1",
            "start_time": 0.0,
            "end_time": 10.5,
            "start_frame": 0,
            "end_frame": 315,
            "label": "goal"
        }
    ],
    "frame_annotations": {
        "450": {
            "frame": 450,
            "time": 15.0,
            "label": "scene_change"
        }
    },
    "keyframes": [
        {
            "id": "kf_1",
            "frame": 900,
            "time": 30.0,
            "label": "important_moment",
            "note": "Key dialogue"
        }
    ],
    "tracking": {}
}

Hinweise zur Video-Annotation

  1. Erster Durchgang zum Überblick: den Clip zuerst in normaler Geschwindigkeit ansehen
  2. Zeitlupe für Genauigkeit: 0.25x für exakte Zeitstempel
  3. Tastenkürzel: deutlich schneller als die Maus
  4. Pausen machen: Video-Annotation strengt die Augen an
  5. Einheitliche Kriterien: Grenzfälle klar dokumentieren

Nächste Schritte


Vollständige Dokumentation unter Bildannotation (Abschnitt zu Video).