Skip to content

Real-time deepfake detection Android app using multi-modal AI fusion. Features CNN inference, artifact analysis & on-device ML. Built with Kotlin, Jetpack Compose & TensorFlow Lite.

Notifications You must be signed in to change notification settings

sreenathyadavk/HiddenLayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

HiddenLayer - AI-Powered Deepfake Detection

Android Kotlin TFLite Compose Status

Real-time deepfake detection Android application using advanced multi-modal fusion techniques for identifying AI-generated or manipulated media.

โœจ Key Features

  • ๐ŸŽฅ 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

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚          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   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐ŸŽฏ Detection Methods

1. CNN Deep Learning

  • Custom trained model (88MB)
  • Input: 299x299 RGB images
  • Binary classification: Real vs Fake

2. Artifact Analysis

  • Banding detection (compression artifacts)
  • Edge inconsistency analysis
  • Frequency domain analysis

3. Provenance Checking

  • EXIF metadata inspection
  • AI signature detection
  • Creation tool identification

4. Fusion Engine

  • Combines all signals with weighted confidence
  • Adaptive thresholding
  • Temporal consistency validation

๐Ÿš€ Tech Stack

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)

๐Ÿ“ฆ Model Details

  • 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)

๐Ÿ”ง Building from Source

Prerequisites

  • Android Studio Hedgehog or newer
  • JDK 17+
  • Android SDK 34
  • Gradle 8.2+

Build Steps

# 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

Release Build

./gradlew assembleRelease
# APK: app/build/outputs/apk/release/app-release.apk

๐Ÿ“ฑ System Requirements

  • 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)

๐ŸŽฎ Usage

Live Camera Detection

  1. Open app โ†’ Select "Camera" mode
  2. Grant camera permissions
  3. Point camera at subject
  4. Real-time confidence score displayed

Media File Analysis

  1. Select "Media File" mode
  2. Choose image/video from gallery
  3. View detailed analysis results

Screen Share Detection

  1. Select "Screen Share" mode
  2. Grant screen recording permission
  3. Share any app screen for analysis

๐Ÿ“Š Current Status

Feature Status
Screen Share Detection โœ… Operational
Media File Analysis โœ… Operational
Live Camera Detection ๐Ÿšง Under Optimization
Batch Processing ๐Ÿ“ Planned

๐Ÿ“ˆ Performance

  • Frame Processing: ~150-200ms per frame
  • Throughput: 5-7 FPS (real-time camera)|
  • Memory Usage: ~256MB peak
  • Battery Impact: Moderate (camera + ML inference)

๐Ÿ” Privacy & Security

  • โœ… All processing happens on-device
  • โœ… No internet connection required
  • โœ… No data uploaded to servers
  • โœ… No user tracking or analytics
  • โœ… Full source code transparency

๐Ÿ—‚๏ธ Project Structure

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

๐Ÿ“ฆ APK Releases

Versioned APKs are available in the /apks folder:

  • apks/v1.0.0.apk - Initial release
  • apks/v1.1.0.apk - Camera optimization
  • Check folder for latest versions

๐Ÿค Contributing

This is an academic/research project. Contributions, issues, and feature requests are welcome!

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add AmazingFeature')
  4. Push to branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“„ License

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.

๐Ÿ‘จโ€๐Ÿ’ป Author

Sreenath Yadav K
GitHub: @sreenathyadavk

๐Ÿ“š Research & References

This project implements concepts from:

  • DeepFake detection research papers
  • CNN-based image forensics
  • Multi-modal fusion techniques
  • Artifact analysis in compressed media

โš ๏ธ Disclaimer

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

About

Real-time deepfake detection Android app using multi-modal AI fusion. Features CNN inference, artifact analysis & on-device ML. Built with Kotlin, Jetpack Compose & TensorFlow Lite.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published