Skip to content

Mayur-Shashidhar/Pixel-Truth

 
 

Repository files navigation

🔍 PixelTruth — AI-Powered Deepfake Detector

PixelTruth is an AI-powered deepfake detection system for social media images. It uses a custom Convolutional Neural Network (CNN) with advanced preprocessing to classify images as real or AI-generated with 95% accuracy.


📌 Table of Contents


🧠 About

With the rise of AI-generated media, detecting deepfakes has become critical for media integrity and combating misinformation. PixelTruth addresses this by providing a fast, accurate, and accessible deepfake detection tool built on deep learning.

It analyzes visual artifacts introduced during image synthesis and classifies images in real-time through an intuitive web dashboard.


✨ Features

  • 🖼️ Real-time image analysis — supports JPG, PNG, WebP formats
  • 📊 Confidence scores — shows probability of real vs. fake
  • 🎨 Modern Streamlit dashboard — glassmorphism UI with visual feedback
  • Fast inference — lightweight model optimized for speed
  • 🔬 Custom preprocessing pipeline — enhanced artifact detection

🛠️ Tech Stack

Tool Purpose
Python Core language
TensorFlow / Keras CNN model training & inference
OpenCV Image preprocessing
Streamlit Web dashboard
NumPy / Matplotlib Data handling & visualization

📊 Performance

Metric Value
Accuracy 95%
Input Size 96 x 96 px
Supported Formats JPG, PNG, WebP

⚙️ Installation

⚠️ Prerequisites:

  • Python Version: This project strictly requires Python 3.11. (Newer versions like Python 3.12 are currently incompatible with the required TensorFlow dependencies).
  • Windows Users:
    • You must have the Microsoft Visual C++ Redistributable installed to run TensorFlow.
    • If the app crashes on launch with a DLL error, install tensorflow-cpu instead of standard tensorflow.
# 1. Clone the repository
git clone https://github.com/Piyush-Sharma788/PixelTruth.git
cd PixelTruth

# 2. Create a virtual environment (recommended)
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# 3. Install dependencies
pip install -r requirements.txt

🚀 Usage

# Run the Streamlit dashboard
streamlit run app.py

Then open your browser at http://localhost:8501, upload an image, and get instant results.


📁 Project Structure

PixelTruth/
├── app.py              # Streamlit dashboard
├── predict.py          # Inference logic
├── train.py            # Model training (v1)
├── train_v2.py         # Model training (v2)
├── train_v3.py         # Model training (v3)
├── requirements.txt    # Dependencies
├── Figure_1.png        # Training result plot
├── Figure_2.png        # Evaluation plot
└── README.md

🤝 Contributing

We welcome contributions of all kinds! Whether you're fixing a bug, improving the UI, or adding new features — you're welcome here.

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

Please read CONTRIBUTING.md for detailed guidelines.


🌸 GSSoC 2026

PixelTruth is participating in GirlScript Summer of Code 2026!

We have beginner-friendly issues ready. Look for issues labelled:

  • good-first-issue
  • beginner-friendly
  • documentation
  • enhancement

Feel free to explore open issues and start contributing!


📄 License

This project is licensed under the MIT License — see the LICENSE file for details.


Built with ❤️ for media integrity by Piyush Sharma
If you found this useful, please ⭐ star the repo!

```

About

An AI-powered deepfake detector for social media images. Uses CNN with custom preprocessing to analyze artifacts & classify real/fake (95% accuracy).

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages