HiddenLayer - AI-Powered Deepfake Detection
Real-time deepfake detection Android application using advanced multi-modal fusion techniques for identifying AI-generated or manipulated media.
- ๐ฅ Real-time Camera Analysis - Live deepfake detection through device camera
- ๐บ Screen Share Detection - Analyze screen content in real-time
- ๐ Media File Scanner - Batch analysis of local images and videos
- ๐ง Multi-Modal Fusion - Combines CNN inference, artifact detection, and provenance analysis
- โก Optimized Performance - TensorFlow Lite with XNNPACK CPU acceleration
- ๐ Privacy-First Design - 100% on-device processing, zero cloud uploads
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Presentation Layer โ
โ Jetpack Compose + Material3 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Domain Layer (Business Logic) โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ CNN Model โ โ Artifact Detector โ โ
โ โ (TFLite) โ โ (Signal Processing) โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Detection Fusion Engine โ โ
โ โ (Multi-modal Decision Making) โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Data Layer (Sources) โ
โ CameraX โข MediaProjection โข Storage โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- Custom trained model (88MB)
- Input: 299x299 RGB images
- Binary classification: Real vs Fake
- Banding detection (compression artifacts)
- Edge inconsistency analysis
- Frequency domain analysis
- EXIF metadata inspection
- AI signature detection
- Creation tool identification
- Combines all signals with weighted confidence
- Adaptive thresholding
- Temporal consistency validation
| Component | Technology |
|---|---|
| Language | Kotlin |
| UI Framework | Jetpack Compose + Material3 |
| ML Inference | TensorFlow Lite 2.14 |
| Camera | CameraX 1.3 |
| Architecture | Clean Architecture (MVVM) |
| Async | Kotlin Coroutines + Flow |
| DI | Manual (lightweight) |
- File:
app/src/main/assets/deepfake_net.tflite - Size: 88MB
- Architecture: Custom CNN with 105 operations
- Delegation: XNNPACK (CPU optimized)
- Input Shape:
[1, 299, 299, 3] - Output Shape:
[1, 2](fake_probability, real_probability)
- Android Studio Hedgehog or newer
- JDK 17+
- Android SDK 34
- Gradle 8.2+
# Clone repository
git clone git@github.com:sreenathyadavk/HiddenLayer.git
cd HiddenLayer
# Build debug APK
./gradlew assembleDebug
# Output location
# app/build/outputs/apk/debug/app-debug.apk
# Install via ADB
adb install -r app/build/outputs/apk/debug/app-debug.apk./gradlew assembleRelease
# APK: app/build/outputs/apk/release/app-release.apk- OS: Android 8.0 (API 26) or higher
- RAM: 4GB+ recommended (2GB minimum)
- Storage: 150MB for app + models
- Permissions:
- Camera (for live analysis)
- Storage (for media file scanning)
- Open app โ Select "Camera" mode
- Grant camera permissions
- Point camera at subject
- Real-time confidence score displayed
- Select "Media File" mode
- Choose image/video from gallery
- View detailed analysis results
- Select "Screen Share" mode
- Grant screen recording permission
- Share any app screen for analysis
| Feature | Status |
|---|---|
| Screen Share Detection | โ Operational |
| Media File Analysis | โ Operational |
| Live Camera Detection | ๐ง Under Optimization |
| Batch Processing | ๐ Planned |
- Frame Processing: ~150-200ms per frame
- Throughput: 5-7 FPS (real-time camera)|
- Memory Usage: ~256MB peak
- Battery Impact: Moderate (camera + ML inference)
- โ All processing happens on-device
- โ No internet connection required
- โ No data uploaded to servers
- โ No user tracking or analytics
- โ Full source code transparency
HiddenLayer/
โโโ app/ # Android application module
โโโ core/ # Shared utilities and constants
โโโ data/ # Data layer (frame sources)
โโโ domain/ # Business logic
โ โโโ models/ # Data models
โ โโโ pipeline/ # Processing pipeline
โ โโโ usecases/ # Detection algorithms
โโโ presentation/ # UI layer (Compose)
โโโ apks/ # Versioned APK releases
Versioned APKs are available in the /apks folder:
apks/v1.0.0.apk- Initial releaseapks/v1.1.0.apk- Camera optimization- Check folder for latest versions
This is an academic/research project. Contributions, issues, and feature requests are welcome!
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open a Pull Request
MIT License
Copyright (c) 2026 Sreenath Yadav K
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED.
Sreenath Yadav K
GitHub: @sreenathyadavk
This project implements concepts from:
- DeepFake detection research papers
- CNN-based image forensics
- Multi-modal fusion techniques
- Artifact analysis in compressed media
This is an academic/research project for educational purposes. For production use in critical applications, additional validation, testing, and certifications are recommended.
Made with โค๏ธ for a safer digital world