Skip to content

Rijul-Tandon/native-vs-recaptured-classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Š Native vs Recaptured Classifier A deep learning-powered binary image classifier built with TensorFlow (MobileNetV2) and deployed using Streamlit. It predicts whether an image is Native (original) or Recaptured (re-captured from another device/screen). πŸ”— Live : https://native-vs-recaptured-classifier-ygnlsemkvowpfc4jcy6j59.streamlit.app/ πŸš€ Features

Upload multiple images simultaneously. Predicts probabilities for: prob_native: Likelihood of an image being original/native. prob_recaptured: Likelihood of an image being recaptured.

Generates a downloadable CSV file with predictions for all uploaded images. Uses MobileNetV2’s preprocess_input for consistent preprocessing. Optimized for fast inference with a lightweight model.

πŸ› οΈ Installation & Setup

  1. Clone the Repository git clone https://github.com/Rijul-Tandon/native-vs-recaptured-classifier.git cd native-vs-recaptured-classifier

  2. Create a Virtual Environment (Optional but Recommended) python -m venv venv

On Linux/Mac

source venv/bin/activate

On Windows

venv\Scripts\activate

  1. Install Dependencies pip install -r requirements.txt

  2. Run the Streamlit App Locally python -m streamlit run app.py

πŸ“‚ Project Structure . β”œβ”€β”€ app.py # Streamlit web app β”œβ”€β”€ requirements.txt # Dependencies β”œβ”€β”€ Mewat/ β”‚ └── model_checkpoints/ β”‚ └── best_model.weights.h5 # Trained model weights └── README.md # Project documentation

πŸ“Š Example Output After uploading images, a table like the following is displayed:

Filename prob_native prob_recaptured

img1.png 0.82 0.18

img2.jpg 0.15 0.85

Results can be downloaded as a CSV file. 🧠 Model Details

Base Model: MobileNetV2 (pre-trained on ImageNet, frozen during training) Input Size: 224Γ—224Γ—3 Preprocessing: tf.keras.applications.mobilenet_v2.preprocess_input Output: Sigmoid layer providing the probability of an image being recaptured

🌐 Deployment Hosted on Streamlit Cloud:πŸ‘‰ Live Demo πŸ“œ License This project is licensed under the MIT License. Feel free to use and modify for your work.

About

A CNN based Classifier model to predict recaptured Images

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages