Inspiration
The initial spark came from a highly relatable academic struggle: trying to extract notes from recorded technical lectures where the camera is handheld, and the professor constantly blocks the equations on the board. However, we realized this specific issue highlights a much larger, real-world computer vision problem: transient visual obstructions.
Whether it's a pacing professor blocking a formula, or a speeding car in India evading a traffic camera because another vehicle briefly crossed the line of sight, standard AI "magic erasers" aren't the solution. They use generative inpainting to hallucinate what might be behind the obstruction. This is useless for factual academic notes and legally invalid for traffic enforcement. We wanted to build a system that extracts the actual ground truth.
What it does
FAORE (Frame Aware Obstruction Remover and Explainer) is an end-to-end pipeline that aligns, cleans, and summarizes video content.
- Intelligent Segmentation: It analyzes raw video feeds to detect natural breakpoints—such as a professor finishing a board wipe—using Canny edge density gradient analysis, slicing the video into logical, concept-based segments.
- Obstruction Removal (The FAOR Model): It takes unstable, obstructed video clips and uses matrix transformations and ORB keypoints to perfectly align the frames. By fusing the aligned frames, it computationally eliminates moving obstructions (like people or crossing vehicles) to output a single, crystal-clear image of the true background.
- AI Explanation: It then passes this factual, cleaned image to a Vision-Language Model (VLM) to generate structured text descriptions, turning raw visual data into readable, searchable knowledge.
How we built it
We orchestrated a hybrid pipeline combining classic computer vision with modern LLM infrastructure:
- Detection & Segmentation: We built a Gradio Space on HuggingFace that samples video frames, applies Gaussian blur and Canny edge detection, and computes edge pixel density. We applied signal smoothing and gradient inflection detection to find local minima (wipe recovery points), cutting the video precisely using FFmpeg.
- The FAOR Model: Hosted as a custom HuggingFace model (
imperiusrex/FAOR). Instead of relying on generative AI to fill in blanks, we used ORB (Oriented FAST and Rotated BRIEF) descriptors to track keypoints across moving footage, calculating homography matrices to warp and align frames before executing temporal fusion. - The Explainer: We utilized the Databricks AI Gateway, sending base64-encoded clean images via an OpenAI-compatible client to a Gemma 3 12b model to generate natural language summaries of the concepts shown.
Challenges we ran into
- Aligning Unstable Footage: Naive frame blending turns shaky camera footage into a blurry, unusable mess. Implementing robust ORB keypoint matching to stabilize the footage before fusion was computationally heavy and required significant tuning to handle dynamic foregrounds.
- Tuning the Wipe Detector: Distinguishing between an actual board wipe and someone simply standing in front of the board was tricky. We had to implement specific quality filters, like minimum drop depth and duration, to filter out brief flickers and shallow dips in edge density.
- Cross-Platform Integration: Ensuring smooth data handoffs across local processing, HuggingFace Spaces, and the Databricks ML environment while maintaining exact frame-and-audio alignment during FFmpeg segmentation.
Accomplishments that we're proud of
- Successfully moving away from the "generative AI band-aid" (inpainting) to an algorithmically factual approach for restoring obscured data.
- Building an end-to-end automated pipeline that requires zero human intervention—from raw
lecture_video.mp4all the way to a structured VLM text output. - Developing a highly mathematical approach to video segmentation (edge density signal processing) that finds the exact optimal cut point where a board is at its cleanest.
What we learned
- Deepened our knowledge in classic computer vision (ORB, Homography, Canny) and proved how it can actually outperform modern generative diffusion models in scenarios requiring strict factual accuracy.
- Mastered navigating the Databricks AI Gateway and integrating it seamlessly with custom HuggingFace inference endpoints.
- Learned advanced signal processing techniques (rolling averages, gradient inflection detection) to extract meaningful triggers from noisy time-series video data.
What's next for FAORE : Frame Aware Obstruction Remover and Explainer
- Expanding Real-World Use Cases: Scaling the FAOR core from academic settings to real-time traffic monitoring systems in India to prevent toll/fine evasion due to line-of-sight obstructions.
- Enhanced Explainer Formatting: Fine-tuning the VLM pipeline to directly output structured formats like LaTeX or Markdown tables based on the mathematical concepts detected on the boards.
- Edge Deployment: Optimizing the frame fusion algorithm to run locally on edge devices (like the traffic cameras themselves) using lighter implementations, reducing reliance on cloud-heavy processing.