Spaces:
Runtime error
Download README.md from ZenithsArch/MOCKMATE: direct link, hf CLI and curl.
- Browser
- Download file 10.3 kB
-
https://huggingface.co/spaces/ZenithsArch/MOCKMATE/resolve/main/README.md
- Command line
-
hf download hf://spaces/ZenithsArch/MOCKMATE/README.md
-
curl -L -o README.md https://huggingface.co/spaces/ZenithsArch/MOCKMATE/resolve/main/README.md
A newer version of the Gradio SDK is available: 6.30.0
title: MockMate AI - AI Interview Coach
emoji: π€
colorFrom: blue
colorTo: indigo
sdk: gradio
sdk_version: 4.40.0
app_file: app.py
pinned: false
license: mit
short_description: End-to-end AI-powered interview assessment platform.
π€ AI Interview Analyzer
An end-to-end AI-powered interview assessment platform that evaluates a candidate's communication, confidence, facial expressions, eye contact, posture, gestures, and overall body language using Computer Vision and Machine Learning.
π Overview
Traditional mock interviews provide little objective feedback beyond the interviewer's opinion. This project aims to automate interview analysis using Computer Vision, Human Pose Estimation, Facial Landmark Detection, and AI-based scoring.
The system records (or uploads) an interview video and analyzes every aspect of the candidate's visual behavior.
Instead of simply saying
"Maintain eye contact."
the system provides measurable metrics like
Eye Contact : 81%
Face Visibility : 98%
Head Stability : 90%
Posture Score : 86%
Gesture Score : 79%
Overall Score : 84/100
and personalized coaching recommendations.
π― Project Goals
The objective is to create an AI assistant capable of evaluating a candidate's non-verbal communication during interviews.
The project focuses on
- Face Visibility
- Eye Contact
- Head Pose
- Facial Expressions
- Body Posture
- Hand Gestures
- Body Stability
- Video Quality
- Personalized Feedback
The final goal is to generate an AI Interview Report.
π High Level Architecture
User
β
βΌ
Video Recording
β
βββββββββββββ΄ββββββββββββ
β β
βΌ βΌ
Live Webcam Uploaded Video
β β
βββββββββββββ¬ββββββββββββ
β
Frame Source
β
βΌ
Video Processing
β
βΌ
Computer Vision Pipeline
β
ββββββββββββββββββββββββββββββββββββ
β Face Detection β
β Face Mesh β
β Pose Estimation β
β Hand Tracking β
β Video Quality β
ββββββββββββββββββββββββββββββββββββ
β
βΌ
Behavioral Analysis
β
ββββββββββββββββββββββββββββββββββββ
β Eye Contact β
β Facial Emotion β
β Head Pose β
β Body Stability β
β Hand Gestures β
β Posture β
ββββββββββββββββββββββββββββββββββββ
β
βΌ
Scoring Engine
β
βΌ
Report Generation
β
βΌ
Interactive Dashboard
---
# π Project Structure
AI-Interview/
βββ backend/
β
βββ frontend/
β
βββ uploads/
β
βββ reports/
β
βββ temp/
β
βββ README.md
β
βββ .gitignore
Backend Structure
backend/
β βββ api/ β βββ upload.py β βββ analyze.py β βββ report.py β βββ services/ β β βββ video/ β β extractor.py β β β βββ vision/ β β β β detector.py β β landmarks.py β β β β face/ β β visibility.py β β eye_contact.py β β expression.py β β head_pose.py β β β β body/ β β posture.py β β stability.py β β β β hands/ β β gestures.py β β β β quality/ β β blur.py β β lighting.py β β camera_angle.py β β βββ scoring/ β β scorer.py β β β βββ reporting/ β report_generator.py β βββ models/ β βββ utils/ β βββ core/ β βββ main.py
---
# πΉ Input Sources
The system supports multiple input sources.
## Live Webcam
Laptop Webcam
β
Real-time Analysis
Uploaded Video
Interview.mp4
β
Offline Analysis
---
## IP Camera (Future)
RTSP Stream
β
Analysis
π₯ Video Processing Pipeline
Instead of extracting every frame and storing thousands of images,
the system processes the video as a stream.
Video
β
VideoCapture
β
Frame
β
Analysis
β
Discard
β
Next Frame
Advantages
- Low memory usage
- Faster processing
- Real-time compatible
---
# πΌ Frame Source
Every frame enters the pipeline through a common interface.
Video
β
FrameSource
β
Generator
β
Frame 1
β
Frame 2
β
Frame 3
This abstraction allows the same analysis code to work for
- webcam
- recorded video
- RTSP streams
without modification.
π€ Face Detection
Purpose
Determine whether a face is visible throughout the interview.
Output
Face Found
Bounding Box
Confidence
Face Visibility %
Technologies
- MediaPipe Face Detection
---
# π Face Mesh
The most important module.
Instead of returning only a face,
MediaPipe Face Mesh returns
468 Facial Landmarks
Each landmark contains
x y z
These landmarks are shared across multiple downstream modules.
Face Mesh
β
Landmarks
βββ Eye Contact
βββ Head Pose
βββ Expression
βββ Face Visibility
The Face Mesh model is executed once per frame, and all modules reuse its output to avoid redundant computation.
π Eye Contact Analysis
Using facial landmarks, the system estimates
- Looking Left
- Looking Right
- Looking Up
- Looking Down
- Looking At Camera
Output
Eye Contact
82%
Looking Away
18%
---
# π Facial Expression Analysis
Emotion recognition estimates
- Neutral
- Happy
- Smile
- Nervous
- Sad
- Angry
- Surprise
Future improvements
- FER
- Hume AI
- Azure Face API
---
# π§ Head Pose Estimation
The head orientation is represented using
- Pitch
- Yaw
- Roll
Up
β²
Left βββββββΌβββββΊ Right
βΌ
Down
Metrics
- Head Stability
- Sudden Turns
- Frequent Looking Down
π§ Pose Estimation
MediaPipe Pose estimates
- Neck
- Shoulders
- Elbows
- Hips
The system determines
- Upright
- Leaning
- Slouching
β Hand Tracking
Tracks
- Hand Visibility
- Gesture Count
- Natural Gestures
- Excessive Gestures
πΆ Body Stability
The body is compared across consecutive frames.
Frame i
β
Pose
β
Frame i+1
β
Pose
β
Distance
Small distance
β
Stable
Large distance
β
Excessive movement
---
# πΈ Video Quality
Checks
- Brightness
- Blur
- Camera Angle
- Resolution
- FPS
- Background
---
# π Scoring Engine
Every module outputs metrics.
Example
Eye Contact
78%
Head Stability
90%
Posture
85%
These are combined into
Overall Interview Score
Possible weighting
Eye Contact 30%
Posture 20%
Expression 20%
Hand Movement 15%
Body Stability 10%
Video Quality 5%
π Report Generation
The report contains
- Overall Score
- Face Analysis
- Eye Contact
- Head Pose
- Body Language
- Video Quality
- Personalized Coaching
- Recommendations
Output formats
- JSON
- Dashboard
π Frontend
Responsibilities
- Record webcam
- Upload interview
- Live preview
- Dashboard
- Display metrics
- Download report
Technologies
- React
- React Webcam
- Tailwind CSS
β Backend
Responsibilities
- Receive uploads
- Process video
- Run MediaPipe
- Calculate metrics
- Generate reports
Technologies
- FastAPI
- OpenCV
- MediaPipe
- NumPy
π Technologies
| Category | Technology |
|---|---|
| Backend | FastAPI |
| Frontend | React |
| Video | OpenCV |
| Face Detection | MediaPipe |
| Face Landmarks | MediaPipe Face Mesh |
| Pose Estimation | MediaPipe Pose |
| Hand Tracking | MediaPipe Hands |
| Numerical Computing | NumPy |
| Reporting | Python |
π Future Improvements
- Speech Analysis
- Voice Emotion Recognition
- Lip Synchronization
- Object Detection
- Eye Blink Rate
- Attention Detection
- Stress Detection
- Real-time Dashboard
- Multi-person Detection
- Interview Difficulty Estimation
- LLM-powered Coaching
- Historical Performance Tracking
- Resume-aware Feedback
- Personalized Practice Sessions
π‘ Design Philosophy
The system follows a streaming pipeline architecture.
Instead of repeatedly running expensive AI models for each analysis task, each frame is processed once, producing reusable intermediate representations (such as facial landmarks and body keypoints). These intermediate results are then shared across specialized analysis modules.
This design provides:
- High performance
- Low memory consumption
- Modular components
- Easy extensibility
- Support for both live and recorded interviews
- Separation of concerns
- Production-ready architecture
The goal is to build an extensible Computer Vision platform rather than a collection of independent scripts, making it straightforward to integrate new models, replace existing algorithms, or support additional input sources in the future.