Skip to content

Fix: Resolves No face detected issue and Improves face detection reliability for low-resolution and blurry videos#15

Open
Aditi0522 wants to merge 2 commits intoruxailab:mainfrom
Aditi0522:videoProcess
Open

Fix: Resolves No face detected issue and Improves face detection reliability for low-resolution and blurry videos#15
Aditi0522 wants to merge 2 commits intoruxailab:mainfrom
Aditi0522:videoProcess

Conversation

@Aditi0522
Copy link
Copy Markdown

Summary:

This PR improves the robustness of the face detection pipeline used for emotion analysis. The previous implementation occasionally failed to detect faces in low-resolution or blurry videos, resulting in logs showing "no face detected" for many frames. To address this, the face detection model has been updated and preprocessing improvements have been introduced.

Key Changes:

1. Switched face detector to SCRFD

  • Replaced the existing detector with SCRFD, which provides stronger performance for challenging conditions such as:

    • low-resolution frames
    • blurry inputs
    • partially visible faces
  • SCRFD offers a good balance between accuracy and computational cost.

2. Model selection reasoning

  • RetinaFace was considered but not used because it is computationally heavier and more expensive to run in this pipeline.
  • SCRFD provides comparable detection robustness while remaining lightweight, making it a better fit for the current API setup.

3. Frame preprocessing improvements

  • Added frame upscaling before running detection.
  • Used interpolation-based resizing to enhance facial details in low-resolution frames.

4. Improved detection success rate

  • These changes significantly reduce cases where the pipeline logs "no face detected", especially in:

    • low-quality recordings

    • compressed videos

    • distant subjects

Impact:

  • Better face detection across difficult video conditions.
  • More reliable emotion prediction pipeline.
  • Reduced frame drops due to missed detections.

Testing:

Tested with:

  • high-resolution videos
  • low-resolution recordings
  • blurry / compressed video samples

Face detection now works consistently across these scenarios.

Closes #4

@Aditi0522
Copy link
Copy Markdown
Author

@jvJUCA Kindly review the PR when free and if this doesn't align with the future goals of the organization, I would be happy to close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(sentiment): frequent "face not detected" results

1 participant