π 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
-
Clone the Repository git clone https://github.com/Rijul-Tandon/native-vs-recaptured-classifier.git cd native-vs-recaptured-classifier
-
Create a Virtual Environment (Optional but Recommended) python -m venv venv
source venv/bin/activate
venv\Scripts\activate
-
Install Dependencies pip install -r requirements.txt
-
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.