Skip to content

Commit 5b0ad48

Browse files
📝 Add assets to README"
1 parent 67d9bc6 commit 5b0ad48

File tree

1 file changed

+94
-2
lines changed

1 file changed

+94
-2
lines changed

README.md

Lines changed: 94 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@
1717
Mukh (मुख, meaning "face" in Sanskrit) is a comprehensive face analysis library that provides unified APIs for various face-related tasks. It simplifies the process of working with multiple face analysis models through a consistent interface.
1818

1919
## Features
20-
20+
- 🥸 **Ensemble DeepFake Detector** The first python package featuring an Ensemble DeepFake Detector
2121
- 🎯 **Unified API**: Single, consistent interface for multiple face analysis tasks
2222
- 🔄 **Model Flexibility**: Support for multiple models per task
2323
- 🛠️ **Custom Pipelines**: Optimized preprocessing and model combinations
24-
- 🚀 **Easy to Use**: Simple, intuitive APIs for quick integration
2524

2625

2726
## Documentation
@@ -66,6 +65,18 @@ detections = detector.detect(
6665
```python
6766
python examples/face_detection/basic_detection.py --detection_model mediapipe
6867
```
68+
69+
### Input Image
70+
<img src = "https://github.com/ishandutta0098/mukh/blob/main/assets/images/img1.jpg" width=200>
71+
72+
### Output Annotated Image
73+
<img src = "https://github.com/ishandutta0098/mukh/blob/main/assets/demos/face_detection/img1_detected.jpg" width=200>
74+
Annotated image with the bounding box and confidence
75+
76+
```python
77+
image_name | x1 | y1 | x2 | y2 | confidence
78+
img1.jpg | 62 | 228 | 453 | 619 | 0.9381868243217468
79+
```
6980

7081
## Face Reenactment
7182

@@ -94,6 +105,18 @@ python examples/reenactment/basic_reenactment.py \
94105
--driving_video_path assets/videos/video_1sec.mp4 \
95106
--output_folder output
96107
```
108+
109+
### Input
110+
#### Source Image
111+
<img src = "https://github.com/ishandutta0098/mukh/blob/main/assets/images/img1.jpg" width=200>
112+
113+
#### Driving Video
114+
115+
https://github.com/user-attachments/assets/8bfba67e-abb6-45a3-809f-bde58cce8b11
116+
117+
### Output
118+
119+
https://github.com/user-attachments/assets/875ba692-ea78-42e3-9e03-d1f4703930be
97120

98121
## Deepfake Detection
99122

@@ -132,6 +155,17 @@ python examples/deepfake_detection/detection.py \
132155
--media_path assets/images/img1.jpg \
133156
--confidence_threshold 0.5
134157
```
158+
159+
### Input
160+
#### Source Image
161+
<img src = "https://github.com/ishandutta0098/mukh/blob/main/assets/images/img1.jpg" width=200>
162+
163+
### Output
164+
```python
165+
media_name | frame_number | is_deepfake | confidence | model_name
166+
img1.jpg | 0 | False | 0.99 | ResNetInception
167+
```
168+
135169

136170
### Videos
137171
```python
@@ -170,6 +204,29 @@ python examples/deepfake_detection/detection.py \
170204
--confidence_threshold 0.5 \
171205
--num_frames 11
172206
```
207+
208+
### Input
209+
210+
https://github.com/user-attachments/assets/7a3b85de-d3cb-4c5f-90a7-3900a6132a00
211+
212+
### Output
213+
```python
214+
media_name | frame_number |is_deepfake|confidence| model_name
215+
deepfake_elon_musk.mp4 | 0 | True | 0.99 |EfficientNetAutoAttB4
216+
deepfake_elon_musk.mp4 | 43 | True | 0.69 |EfficientNetAutoAttB4
217+
deepfake_elon_musk.mp4 | 86 | False | 0.73 |EfficientNetAutoAttB4
218+
deepfake_elon_musk.mp4 | 172 | True | 0.95 |EfficientNetAutoAttB4
219+
deepfake_elon_musk.mp4 | 215 | True | 0.98 |EfficientNetAutoAttB4
220+
deepfake_elon_musk.mp4 | 129 | True | 0.96 |EfficientNetAutoAttB4
221+
deepfake_elon_musk.mp4 | 258 | True | 0.53 |EfficientNetAutoAttB4
222+
deepfake_elon_musk.mp4 | 301 | True | 0.77 |EfficientNetAutoAttB4
223+
deepfake_elon_musk.mp4 | 344 | False | 0.83 |EfficientNetAutoAttB4
224+
deepfake_elon_musk.mp4 | 387 | True | 0.62 |EfficientNetAutoAttB4
225+
deepfake_elon_musk.mp4 | 431 | False | 0.79 |EfficientNetAutoAttB4
226+
```
227+
```python
228+
| deepfake_elon_musk.mp4 | EfficientNetAutoAttB4 | 8/11 deepfake frames | Final: DEEPFAKE
229+
```
173230

174231
## Deepfake Detection Pipeline
175232

@@ -202,6 +259,41 @@ python examples/pipelines/deepfake_detection.py \
202259
--media_path assets/videos/deepfake_elon_musk.mp4 \
203260
--output_folder output/deepfake_detection_pipeline
204261
```
262+
263+
### Output
264+
**Ensemble confidence score**
265+
```python
266+
frame_number|is_deepfake|confidence
267+
0 | True | 0.5
268+
43 | True | 0.84
269+
86 | True | 0.635
270+
129 | True | 0.98
271+
172 | True | 0.975
272+
215 | True | 0.99
273+
258 | True | 0.765
274+
301 | True | 0.885
275+
344 | True | 0.585
276+
387 | True | 0.81
277+
431 | True | 0.605
278+
```
279+
280+
**Result from the respective models**
281+
```python
282+
| deepfake_elon_musk.mp4 | ResNetInception | 10/11 deepfake frames | Final: DEEPFAKE
283+
| deepfake_elon_musk.mp4 | EfficientNetAutoAttB4 | 8/11 deepfake frames | Final: DEEPFAKE
284+
```
285+
286+
**Final Pipeline Output**
287+
```python
288+
Final Ensemble Result: DEEPFAKE
289+
Deepfake frames: 11/11
290+
Average confidence: 0.7791
291+
Model configurations: {
292+
'resnet_inception': 0.5,
293+
'efficientnet': 0.5
294+
}
295+
```
296+
205297
## Contact
206298

207299
For questions and feedback, please open an issue on GitHub.

0 commit comments

Comments
 (0)