High-throughput media fingerprinting and piracy detection engine — Google Solution Challenge 2026
Live API: https://verifai-672474041041.us-central1.run.app/docs
VerifAI is a content piracy detection engine. A media owner registers their asset — image or video — and VerifAI generates a perceptual fingerprint using a custom C++ hashing engine. When a potentially stolen copy appears, VerifAI scans it against the registry and detects matches even after compression, cropping, or color shifting. Matched assets trigger an AI-generated threat report powered by Google Gemini.
Think of it as Shazam for stolen media.
Upload -> C++ Hash Engine(pHash + dHash) -> PostgreSQL + pgvector -> Scan -> Hamming Distance Search -> Match Results + Gemini Threat Report
| Engine | Speed |
|---|---|
| C++ (pybind11) | 289 FPS |
| Pure Python (imagehash) | ~4.4 FPS |
| Speedup | 65× |
Tested on a single CPU core. The C++ hot path mirrors the boundary targeted by CUDA kernel offload in production GPU pipelines.
| Method | Endpoint | Description |
|---|---|---|
| GET | /health | Service status |
| POST | /assets/register | Register and fingerprint a media asset |
| POST | /scan | Scan a file against the registry |
| GET | /alerts | List all registered fingerprints |
| GET | /report/{asset_id} | Gemini AI threat intelligence report |
- C++17 — perceptual hash engine (pHash, dHash)
- pybind11 — zero-copy Python bindings
- FastAPI — REST API
- PostgreSQL 16 + pgvector — fingerprint storage and vector search
- Google Gemini 2.0 Flash — AI threat analysis
- Docker + Google Cloud Run — containerized cloud deployment
- SQLAlchemy — ORM
- Python 3.12
- CMake 4.x
- MSVC 2019 or g++
- Docker
- PostgreSQL 16
git clone https://github.com/Anu13lol/VerifAI.git cd VerifAI
mkdir build && cd build cmake .. make cp verifai_engine*.pyd../python/
pip install fastapi uvicorn python-multipart sqlalchemy psycopg2-binary pgvector opencv-python google-generativeai python-dotenv
Create a .env file in the root:
DATABASE_URL=postgresql://admin:root@localhost:5433/mediaguard
GEMINI_API_KEY=your_key_here
uvicorn api.main:app --reload Visit http://localhost:8000/docs
docker build -t verifai . docker run -p 8000:8000 --env-file .env verifai
Deployed on Google Cloud Run with Cloud SQL PostgreSQL 16 + pgvector. https://verifai-672474041041.us-central1.run.app
- Competition: Google Solution Challenge 2026
- Track: Digital Asset Protection
- Team: @Anu13lol