muneebnadeem1870 commited on
Commit
e72d287
Β·
verified Β·
1 Parent(s): 4af23f3

Upload 2 files

Browse files
Files changed (2) hide show
  1. README.md +59 -14
  2. app.py +4 -4
README.md CHANGED
@@ -1,14 +1,59 @@
1
- ---
2
- title: Deep Fake Detection Model
3
- emoji: πŸ“ˆ
4
- colorFrom: green
5
- colorTo: indigo
6
- sdk: streamlit
7
- sdk_version: 1.42.2
8
- app_file: app.py
9
- pinned: false
10
- license: apache-2.0
11
- short_description: Machine Learning Model used to detect the deep fake for user
12
- ---
13
-
14
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DeepFake Detection Model
2
+
3
+ This repository hosts a **DeepFake Detection Model** deployed using **Streamlit** on Hugging Face Spaces. The model is trained to classify images as **REAL or FAKE** using Convolutional Neural Networks (CNNs).
4
+
5
+ ## πŸš€ Live Demo
6
+ Check out the deployed model: [DeepFake Detector on Hugging Face](https://huggingface.co/spaces/your-username/deepfake-detection)
7
+
8
+ ## πŸ“Œ Features
9
+ - **Deep Learning-Based Detection**: Uses a pre-trained CNN model to detect DeepFake images.
10
+ - **User-Friendly UI**: Built with Streamlit for a simple and interactive experience.
11
+ - **Easy API Integration**: Allows users to upload images and get predictions.
12
+
13
+ ## πŸ›  Installation & Setup
14
+ To run the project locally, follow these steps:
15
+
16
+ ### 1️⃣ Clone the Repository
17
+ git clone https://huggingface.co/spaces/your-username/deepfake-detection
18
+ cd deepfake-detection
19
+
20
+ ### 2️⃣ Install Dependencies
21
+ Ensure you have **Python 3.8+** installed. Install dependencies using:
22
+ pip install -r requirements.txt
23
+
24
+ ### 3️⃣ Run the Application
25
+ streamlit run app.py
26
+
27
+ ## πŸ“ Project Structure
28
+ ```
29
+ πŸ“‚ deepfake-detection
30
+ β”œβ”€β”€ πŸ“œ app.py # Main Streamlit app
31
+ β”œβ”€β”€ πŸ“œ requirements.txt # Dependencies
32
+ β”œβ”€β”€ πŸ“œ README.md # Documentation
33
+ β”œβ”€β”€ πŸ“œ deep-fake-detection-on-image-fyp.ipynb
34
+
35
+ ## 🧠 Model Details
36
+ - **Model Used**: Xception-based CNN
37
+ - **Input Shape**: (256, 256, 3)
38
+ - **Output**: Binary classification (REAL or FAKE)
39
+
40
+ ## πŸ–ΌοΈ How to Use
41
+ 1. Upload an image of a face.
42
+ 2. The model will process the image and classify it as **REAL** or **FAKE**.
43
+ 3. The result will be displayed on the screen.
44
+
45
+ ## 🌐 Deploying on Hugging Face
46
+ If you want to deploy your own version:
47
+ 1. Create a new Space on Hugging Face.
48
+ 2. Upload `app.py`, `requirements.txt`, and your model file.
49
+ 3. Set the Space **Runtime** to `Streamlit`.
50
+ 4. Click **Restart** to launch the app.
51
+
52
+ ## 🀝 Contributing
53
+ Feel free to fork this repository and improve the model! Pull requests are welcome. 😊
54
+
55
+ ## πŸ“œ License
56
+ This project is licensed under the MIT License.
57
+
58
+
59
+ Developed by **Muneeb Nadeem** | Contact: [muneebnadeem1870@gmail.com]
app.py CHANGED
@@ -1,7 +1,7 @@
1
- import streamlit as st
2
- import numpy as np
3
- from tensorflow.keras.models import load_model
4
- from PIL import Image
5
 
6
  # Model Load
7
  model = load_model("xception_deepfake_image.h5")
 
1
+ import streamlit as st # type: ignore
2
+ import numpy as np # type: ignore
3
+ from tensorflow.keras.models import load_model # type: ignore
4
+ from PIL import Image # type: ignore
5
 
6
  # Model Load
7
  model = load_model("xception_deepfake_image.h5")