VerifAI is an Android application that detects AI-generated and deepfake images using a multimodal large language model backend. Users upload an image directly from their device; the app returns a verdict (real or fake) along with a natural-language explanation of the specific visual artifacts that indicate manipulation.
The proliferation of synthetic media has made it increasingly difficult to distinguish real photographs from AI-generated content. VerifAI addresses this problem by combining a production-grade Android client with a vision-language model inference backend, providing both a binary classification and an interpretable explanation for every image analysed.
The model powering the backend is FakeVLM (NeurIPS 2025), a multimodal large language model fine-tuned specifically for synthetic image detection across categories including human faces, animals, scenery, and documents.
User (Android App)
│
│ HTTPS (image upload)
▼
FastAPI Server ──► FakeVLM Model (HuggingFace Transformers)
│
│ JSON response (verdict + explanation)
▼
User (Android App)
| Layer | Technology |
|---|---|
| Mobile client | Android (Kotlin) |
| Authentication | Firebase Auth |
| API server | FastAPI (Python) |
| ML inference | FakeVLM via HuggingFace Transformers |
| Model | lingcco/fakeVLM (LLaVA-based, 7B parameters) |
- Upload any image from your Android device for AI/deepfake detection
- Receive a plain-language explanation of detected visual artifacts
- Firebase authentication for secure user access
- REST API backend compatible with future GCP deployment
- 4-bit quantized inference for consumer GPU compatibility
team-tj/
├── android/ # Android application (Kotlin)
│ └── app/
│ └── src/main/ # Kotlin source, layouts, resources
├── backend/ # FastAPI inference server
│ ├── server.py # Entry point (python server.py)
│ └── app/ # API routes, model handler, config
└── README.md
- Python 3.10
- NVIDIA GPU (12 GB VRAM minimum; 16 GB recommended for production)
- CUDA 12.x
- WSL2 (if running on Windows) or native Linux
# Clone the repository
git clone https://github.com/hcp-uw/team-tj.git
cd team-tj
# Create and activate the conda environment
conda create -n fakevlm python=3.10 -y
conda activate fakevlm
# Install CUDA toolkit (required for compilation)
conda install -c nvidia cuda-toolkit cuda-runtime cuda-nvcc -y
# Install Python dependencies
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128
pip install transformers accelerate bitsandbytes
pip install fastapi uvicorn python-multipart Pillow
# Download the FakeVLM model weights
cd backend
huggingface-cli download lingcco/fakeVLM --local-dir ./FakeVLM/fakeVLM_modelconda activate fakevlm
cd backend
python server.pyThe server starts on http://0.0.0.0:8080.
Accepts a multipart image upload and returns a detection result.
Request
curl -X POST http://localhost:8080/analyze \
-F "file=@image.jpg"Response
{
"status": "success",
"result": "This is a fake image. The image exhibits underlying characteristic inconsistencies in its features that suggest it is artificially created."
}Returns server status.
{ "status": "ok" }- Android Studio (latest stable)
- Android SDK 26+
- A Firebase project with Authentication enabled
- Create a Firebase project at console.firebase.google.com
- Enable Email/Password authentication
- Enable Cloud Storage and Firestore Database
- Deploy security rules from
firebase/storage.rulesandfirebase/firestore.rules(Firebase Console → Rules) - Download
google-services.jsonand place it inandroid/app/ - Set your backend URL in
android/local.properties(optional; defaults to emulator host):For a physical device, use your computer's LAN IP, e.g.api.base.url=http://10.0.2.2:8080http://192.168.1.10:8080
If the app shows PERMISSION_DENIED: Missing or insufficient permissions, the signed-in user is fine but Firestore or Storage is rejecting writes. Typical causes:
- Rules not published — In Firebase Console, open Firestore → Rules and Storage → Rules, then paste the contents of
firebase/firestore.rulesandfirebase/storage.rulesfrom this repo and Publish. - Firestore or Storage not enabled — Create a default database and default bucket if the console prompts you.
Until rules allow users/{uid}/…, cloud history may stay empty; the app still runs inference if the Python backend is up.
Open the project in Android Studio and run on a device or emulator (API 26+).
VerifAI uses FakeVLM, a multimodal large language model presented at NeurIPS 2025 by OpenDataLab. It is built on the LLaVA architecture and fine-tuned on the FakeClue dataset, which contains fine-grained natural-language annotations of visual artifacts across multiple image categories.
- Paper: FakeVLM — NeurIPS 2025
- Model weights: lingcco/fakeVLM on HuggingFace
- Evaluated on FakeClue, LOKI, and DD-VQA benchmarks
- GCP deployment with vLLM for production throughput
- Priority request queueing for concurrent users
- Confidence score in API response
- In-app image history and result storage
- Support for video frame analysis
This project is for academic and research purposes. See LICENSE for details.