Skip to content
Tutoriales4 min de lectura

Anotación de Video con Controles Fotograma a Fotograma

Configura tareas de anotación de video con navegación precisa de fotogramas, marcadores de tiempo y etiquetado temporal de eventos.

Potato Team

La anotación de video permite la creación de datos de entrenamiento para reconocimiento de acciones, seguimiento de objetos y detección temporal de eventos. Este tutorial cubre la navegación de fotogramas, segmentación temporal y flujos de trabajo eficientes de etiquetado de video.

Capacidades de Anotación de Video

Potato soporta anotación de video para tareas de etiquetado y clasificación:

  • Clasificación de video: Etiquetar clips de video completos
  • Etiquetado multi-etiqueta: Aplicar múltiples etiquetas a videos
  • Anotación temporal: Marcar eventos en videos

Configuración Básica de Video

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

Anotación de Segmentos Temporales

Marca eventos con tiempos de inicio y fin:

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"

Creación de Segmentos

  1. Navega al inicio de un evento
  2. Presiona [ o haz clic en "Mark Start"
  3. Navega al final del evento
  4. Presiona ] o haz clic en "Mark End"
  5. Selecciona la etiqueta del evento
  6. Repite para todos los eventos

Clasificación de Video

Clasifica el contenido del video con etiquetas:

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"

Clasificación por Video

Clasifica videos con tipos de anotación estándar:

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 con Etiquetas

Anota videos con etiquetas de categoría:

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

Configuración Completa de Anotación de Video

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

Formato de Salida

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": {}
}

Consejos para la Anotación de Video

  1. Primera pasada general: Mira a velocidad normal primero
  2. Cámara lenta para precisión: Usa 0.25x para marcas de tiempo exactas
  3. Atajos de teclado: Mucho más rápido que el ratón
  4. Toma descansos: La anotación de video es visualmente exigente
  5. Criterios consistentes: Documenta los casos límite claramente

Próximos Pasos


Documentación completa en Anotación de Imágenes (sección de video).