PATRONUS
Unmasking the Shadows of the Digital Realm
Created on 26th July 2026
•
PATRONUS
Unmasking the Shadows of the Digital Realm
The problem PATRONUS solves
PATRONUS
What problem does this project solve?
In an era where generative AI can synthesize hyper-realistic deepfakes, clone voices, craft sophisticated phishing emails, and forge documents with mathematical precision, the boundary between truth and digital deception has never been more blurred.
PATRONUS is a comprehensive, multi-modal forensic analysis platform designed to combat this exact problem. It acts as an advanced digital truth-detector, rigorously analyzing media to identify hidden artificial manipulation.
PATRONUS solves the growing crisis of digital trust by detecting:
- Video Deepfakes: Analyzes spatial anomalies and manipulation artifacts in video frames.
- Image Forgery: Uses frequency domain scanning and semantic logic auditing to catch AI-generated images and edits.
- Audio Spoofing & Voice Clones: Scans vocal spectrograms for unnatural phase discontinuities and synthetic vocoder fingerprints.
- AI-Generated Text & Phishing: Employs linguistic forensic metrics (perplexity/burstiness) and behavioral analysis to flag AI-written text and social engineering threats.
- Document Forgery: Deconstructs PDFs and Word documents to find mathematical inconsistencies, structural template anomalies, and forged embedded assets.
By fusing local hardware neural networks with cloud-based cognitive reasoning, PATRONUS exposes hidden digital seams that are imperceptible to human senses—providing a definitive answer to the question: "Is this real?"
Challenges we ran into
1. The VRAM Bottleneck (Single GPU Constraints)
The Hurdle: Our biggest challenge was running multiple heavy neural networks—like ConvNeXt V2 for spatial video analysis and Wav2Vec2 for acoustic dissection—on a single laptop GPU (an RTX 4050) without encountering CUDA Out-Of-Memory (OOM) fatal crashes.
How we got over it: We designed a "VRAM Hot-Swap Sequence." Instead of trying to keep models loaded simultaneously, we built an asynchronous state machine. Once the video frame analysis finishes, the backend explicitly deletes the model, runs Python garbage collection (gc.collect()), and executes torch.cuda.empty_cache() to completely purge the GPU memory before rapidly loading the next model for the audio track. We used a localized SQLite DB to preserve the tracking coordinates during this handoff.
2. Database Race Conditions and Write Locks
The Hurdle: Because PATRONUS runs highly concurrent, multi-modal asynchronous tracks (analyzing video frames, audio frequencies, and API responses at the same time), using a single monolithic database resulted in massive write-locks, race conditions, and corrupted forensic logs.
How we got over it: We completely decentralized our data storage. We implemented an isolated micro-database architecture. Each forensics module writes strictly to its own dedicated SQLite instance (vid.db, img_forensics.db, text_forensics.db, etc.). This guaranteed parallel, zero-lock transactions and allowed all asynchronous tracks to save data safely.
3. High Latency During Live Inference
The Hurdle: Deepfake detection is computationally expensive. Running OCR, spatial bounding, and frequency analysis sequentially was taking too long, which would ruin the pacing of a live "Hacker Theatre" presentation. We needed execution times under 2 seconds.
How we got over it: We implemented a Hybrid Dual-Track Framework. We decoupled the workload: pure mathematical matrix transformations (like 2D-Discrete Cosine Transforms and STFT audio mapping) run locally on the RTX 4050, while simultaneously, the semantic reasoning and logic auditing (like analyzing document structures or phishing intent) are dispatched to the cloud via the Gemini 2.5 Flash API. Fusing local hardware with cloud cognitive reasoning dropped our execution latency to ~1.2 - 1.8 seconds per module.
4. Visualizing Complex Data (The "Hacker Theatre" UI)
The Hurdle: Returning raw JSON coordinates, NLP Perplexity scores, and Grad-CAM matrices to the user is visually boring and hard to understand for a non-technical audience.
How we got over it: We built a highly dynamic React frontend that translates math into intuition. Instead of showing raw numbers, we mapped Grad-CAM matrix weights to draw live, glowing neon heatmaps directly over manipulated faces in the video player. For NLP analysis, sentences with mathematically low perplexity (AI-generated text) are rendered with a dynamic, cascading text-shadow glow. We made the math beautiful and interactive.
Tracks Applied (3)
Best Use of Gemini API
Google Cloud
Best Use of Gemini API
Major League Hacking
Best Beginner's team
Technologies used

