Skip to main content

Author

Aditya Sundar - Waseda University

Abstract

ဤ project သည် video နှင့် audio data များကို preprocess လုပ်ပြီး video generation models များ train ရန် key information extract လုပ်သည့် automated pipeline တစ်ခု ဖန်တီးပါသည်။ Pipeline သည် face detection, emotion classification, pose estimation နှင့် audio processing များကို handle လုပ်ပါသည်။ အဓိက Features များ:
  • Automatic unique face detection နှင့် isolation
  • Head pose estimation (yaw, pitch, roll)
  • Deep learning အသုံးပြုသော Emotion classification
  • Audio classification နှင့် speech isolation
  • Clip generation (3-10 second segments)

1. Introduction

Video-based generative models ၏ တိုးတက်လာမှုသည် robust preprocessed video datasets များအတွက် လိုအပ်ချက် ဖန်တီးခဲ့ပါသည်။ ဤ project သည် video နှင့် audio data preprocessing ကို automate လုပ်ပြီး:
  • Unique faces များကို automatically classify ပြီး recognize လုပ်သည်
  • Time တစ်လျှောက် facial emotions နှင့် head poses များကို detect လုပ်သည်
  • Background music အတွက် audio classify လုပ်ပြီး speech isolate လုပ်သည်
  • Generative models များတွင် အသုံးပြုရန် videos များကို trim ပြီး refine လုပ်သည်

2. Methodology

Pipeline Overview

Pipeline Workflow

Video preprocessing pipeline workflow

Preprocessing pipeline တွင် main stages ငါးခု ပါဝင်ပါသည်:
StageFunction
Audio ClassificationSpeech identify ပြီး background noise မှ isolate လုပ်သည်
Face DetectionVideo တွင် unique faces detect ပြီး identify လုပ်သည်
Face CroppingFace-focused clips (3-10 seconds) generate လုပ်သည်
Pose EstimationHead orientation (yaw, pitch, roll) estimate လုပ်သည်
Emotion ClassificationFrame တစ်ခုချင်းစီတွင် emotions detect လုပ်သည်

Audio Classification

Audio ကို Audio Spectrogram Transformer model အသုံးပြု၍ classify လုပ်ပါသည်:
  • Audio ကို spectrogram အဖြစ် convert လုပ်သည်
  • Classification အတွက် Vision Transformer apply လုပ်သည်
  • Background noise detect ရန် ~20% threshold အသုံးပြုသည်

Face Detection နှင့် Cropping

YuNet face detection model အသုံးပြုပြီး:
  1. Frame တစ်ခုချင်းစီတွင် faces အားလုံး detect လုပ်သည်
  2. အကြီးဆုံး face ကို subject အဖြစ် select လုပ်သည်
  3. Consistent dimensions အဖြစ် crop ပြီး resize လုပ်သည်
  4. 3-10 second clips generate လုပ်သည်

Pose Estimation

68 facial landmarks အသုံးပြု၍ Head pose estimate လုပ်ပါသည်:
  • Yaw: Left-right rotation (>10 degrees = looking right/left)
  • Pitch: Up-down rotation (>10 degrees = looking up/down)
  • Roll: Head tilt

Emotion Classification

Hugging Face မှ facial_emotions_image_detection အသုံးပြုပြီး:
  • Detect လုပ်နိုင်သည်: happy, sad, angry, neutral, fear, disgust, surprise
  • Scores များကို 100% ဖြစ်အောင် normalize လုပ်သည်
  • Summary အတွက် video တစ်ခုလုံးတွင် average ပြုလုပ်သည်

3. Results

Example Video Analysis

Test video: “Hacksaw Ridge Interview - Andrew Garfield” (4 min 11 sec)
MetricValue
Total frames6,024
FPS23.97
Face detection rate98.26%
Average faces per frame1.0
Clips generated26

Pose Estimation Examples

Forward-facing clip:
  • Yaw: 0.65 degrees, Pitch: 4.07 degrees
  • Direction: “Forward”
Forward Pose

Forward-facing pose detection

4. Future Directions

  1. Additional classifications: Lip reading, gesture detection
  2. GPU acceleration: Resource limits ကြောင့် လက်ရှိ CPU-only ဖြစ်သည်
  3. Fine-tuned models: Specific tasks အတွက် custom models
  4. Advanced emotion detection: Static images များထက် ကျော်လွန်သော multi-modal approaches

References

  1. 1adrianb/face-alignment - 2D and 3D Face alignment library
  2. ageitgey/face_recognition - Face recognition API for Python
  3. danielgatis/rembg - Background removal tool
  4. MIT/ast-finetuned-audioset - Audio Spectrogram Transformer