دروس تعليميةمدة القراءة 4 دقيقة
توصيف الفيديو مع عناصر تحكم إطار بإطار
أعدّ مهام توصيف الفيديو مع تنقل دقيق بين الإطارات وعلامات الطوابع الزمنية ووسم الأحداث الزمنية.
Potato Team
يتيح توصيف الفيديو إنشاء بيانات تدريب للتعرف على الأفعال وتتبع الأجسام وكشف الأحداث الزمنية. يغطي هذا الدرس التنقل بين الإطارات والتجزئة الزمنية وسير عمل توسيم الفيديو الفعّال.
إمكانيات توصيف الفيديو
يدعم Potato توصيف الفيديو لمهام التوسيم والتصنيف:
- تصنيف الفيديو: وسم مقاطع فيديو كاملة
- الوسم متعدد التسميات: تطبيق عدة وسوم على الفيديو
- التوصيف الزمني: تحديد الأحداث في الفيديو
إعداد الفيديو الأساسي
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توصيف المقاطع الزمنية
حدد الأحداث بأوقات البداية والنهاية:
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"إنشاء المقاطع
- انتقل إلى بداية الحدث
- اضغط
[أو انقر "تحديد البداية" - انتقل إلى نهاية الحدث
- اضغط
]أو انقر "تحديد النهاية" - اختر تسمية الحدث
- كرر لجميع الأحداث
تصنيف الفيديو
صنّف محتوى الفيديو بالتسميات:
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"تصنيف لكل فيديو
صنّف الفيديوهات بأنواع التوصيف القياسية:
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"]فيديو مع تسميات
وصّف الفيديوهات بتسميات الفئات:
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إعداد توصيف الفيديو الكامل
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تنسيق المخرجات
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": {}
}نصائح لتوصيف الفيديو
- نظرة عامة أولى: شاهد بالسرعة العادية أولاً
- حركة بطيئة للدقة: استخدم سرعة 0.25x للطوابع الزمنية الدقيقة
- اختصارات لوحة المفاتيح: أسرع بكثير من الفأرة
- خذ استراحات: توصيف الفيديو مُرهق بصرياً
- معايير متسقة: وثّق الحالات الحدية بوضوح
الخطوات التالية
- تعرّف على مقارنة الصور لتقييم جودة الفيديو
- أعدّ التعهيد الجماعي لتوصيف فيديو واسع النطاق
التوثيق الكامل في التعليق التوضيحي للصور (قسم الفيديو).