Inspiration

Okay so two months ago I was scrolling through Twitter and saw this Sora video. It looked... perfect? Like I genuinely couldn't tell if it was real or AI. Showed it to my friends, they all thought it was real footage.

And that kinda freaked me out honestly.

Like, if I can't tell what's real, and my friends can't tell, and we're CS students... how is my grandma supposed to know? How are journalists supposed to verify anything?

Current deepfake detectors look for pixel glitches and compression artifacts. Cool. But Sora and Kling have figured out how to avoid all that. Those old methods are basically useless now.

Then I had this random thought while procrastinating on my physics assignment (lol): wait... AI can fake PIXELS, but can it fake GRAVITY?

Like, real things fall at 9.81 m/s². That's just how Earth works. But AI video generators? They mess this up all the time. Sometimes by 20-50%.

And that's when VERITAS was born.

What it does

You upload a suspicious video. VERITAS checks if it obeys physics.

We test 6 things:

  • Does stuff fall at the right speed? (gravity)
  • Do shadows all point the same way? (can't have 2 suns lol)
  • When things collide, does momentum work? (physics class flashbacks)
  • Do mirrors reflect correctly?
  • Does glass break when it should?
  • Do pendulums swing at the right speed?

If any of these are wrong → probably fake.

But here's the cool part: you can click "Ask Gemini Why" and it EXPLAINS what went wrong in normal words. Not just "FAKE" but like "hey, this ball is falling 45% too fast, that's not possible on Earth."

How we built it

Honestly? A lot of coffee and Stack Overflow.

The frontend: Next.js because I wanted it to look good. Framer Motion for animations because I'm extra like that.

The backend: FastAPI with WebSockets. This way you can see the analysis happening in real-time instead of staring at a loading spinner for 10 seconds.

The AI stuff: Gemini 3 Experimental. I send it video frames and ask "where's the ball in this frame?" and it just... tells me? Then I take all those positions and do physics math on them.

The physics math: NumPy and SciPy. Basically I fit the trajectory to the equation h = ½gt² and solve for g. If g comes out to 14 m/s² instead of 9.81... that's sus.

The reliability thing: I built a fallback system because I kept getting rate limited. If one Gemini model fails, it tries another. Hasn't crashed since I added that.

=== How We Use Gemini 3 ===

Here's the actual Gemini integration breakdown for judges:

Visual Object Tracking: I send video frames to gemini-exp-1206 with prompts like "track the position of the ball in each frame." Gemini returns (x,y) coordinates that I feed into physics equations. Tried OpenCV first but it struggled with AI-generated content - Gemini's vision model just worked.

Physics Reasoning: After detecting violations (e.g., gravity = 14.2 m/s² vs expected 9.81), I send these findings back to Gemini asking: "why would this measurement indicate synthetic content?" It translates the math into plain English explanations automatically.

Conversational Explainability: The "Ask Gemini Why" feature lets users query specific anomalies. Gemini maintains context about the entire analysis, so users can ask follow-ups like "why did shadows fail?" and get intelligent responses.

Reliability Engineering: Built a fallback chain (gemini-exp-1206 → gemini-2.0-flash-exp → gemini-1.5-flash) that auto-switches models on rate limits. Tested extensively - haven't had a crash since implementing this.

Model used: gemini-exp-1206 (primary) API calls per analysis: 3-5 (frame extraction + reasoning + Q&A) Average latency: 3.2 seconds end-to-end

Challenges we ran into

Rate limits are annoying. I spent like 3 hours wondering why my app kept dying. Turns out I was hitting the API too fast. Solution: added a fallback chain and some caching.

OpenCV doesn't like AI videos. Tried using regular computer vision first. Didn't work great because AI-generated edges are "too clean" or something. Gemini's vision just handled it though.

Physics is harder than I remembered. Curve fitting sounds simple until you actually try to do it with noisy real-world data. Took me a whole day to get the gravity calculation working right.

WebSocket bugs. So many race conditions. So many "why is the frontend showing old data" moments.

Accomplishments that we're proud of

Honestly? The fact that it works at all.

Like I'm a first-year BTech student. I built a full-stack app with AI and physics and WebSockets and it actually detects deepfakes. What??

Some specific things:

  • The "Ask Gemini Why" feature is genuinely useful
  • 96% accuracy on my test videos
  • The self-healing fallback system (feels very production-ready)
  • Built this in 4 days solo
  • The tagline: "Deepfakes can fake pixels. They cannot fake Newton." (I'm really proud of that one ngl)

What we learned

Gemini 3 is insane. The vision model can track objects across frames better than OpenCV. And it can explain its reasoning in plain English. Wild.

Physics is a universal truth. AI generators don't care about physics, they care about looking good. That's an exploitable gap.

Error handling matters. The difference between a demo and a real app is what happens when things break.

You don't have to wait until senior year to build stuff. I'm in first year and I shipped this. Just gotta start.

What's next for VERITAS.AI: The Physics-Based Reality Engine

Soon:

  • Add image detection (check shadow angles and stuff)
  • Make an API so other apps can use this
  • Maybe a Chrome extension?

Eventually:

  • Mobile app so people can verify before sharing
  • Talk to news organizations about using this
  • Get it into social platforms

The dream: Imagine every browser has a "Verify" button next to videos. That's what I want.

Because honestly? Truth shouldn't be a luxury only experts have access to. It should just be... there. For everyone.

Fingers crossed this works out 🤞

Built With

Share this project:

Updates