Skip to content

Commit 9448f39

Browse files
committed
feat: Integrate FakeSTormer model with updated configuration, download instructions, and a new config verification script.
1 parent 14a9655 commit 9448f39

File tree

6 files changed

+94
-4
lines changed

6 files changed

+94
-4
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ frontend/.DS_Store
99
.DS_Store
1010
.DS_Store
1111
models/audio/vocoder_artifacts/models/librifake_pretrained_lambda0.5_epoch_25.pth
12+
deepsafe_utils/__pycache__/visualizer.cpython-313.pyc
13+
.gitignore
14+
#ignore all .pyc files
15+
*.pyc

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<div align="center">
66

77
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8-
[![CI Status](https://github.com/yourusername/DeepSafe/actions/workflows/ci.yml/badge.svg)](https://github.com/yourusername/DeepSafe/actions)
8+
[![CI Status](https://github.com/siddharthksah/DeepSafe/actions/workflows/ci.yml/badge.svg)](https://github.com/siddharthksah/DeepSafe/actions)
99
[![Python 3.9](https://img.shields.io/badge/python-3.9-blue.svg)](https://www.python.org/downloads/release/python-390/)
1010
[![Docker](https://img.shields.io/badge/docker-ready-blue.svg)](https://www.docker.com/)
1111

@@ -62,7 +62,7 @@ graph TD
6262

6363
1. **Clone the repository**:
6464
```bash
65-
git clone https://github.com/yourusername/DeepSafe.git
65+
git clone https://github.com/siddharthksah/DeepSafe.git
6666
cd DeepSafe
6767
```
6868

@@ -85,6 +85,7 @@ graph TD
8585
| **NPR Deepfake** | Image | ✅ Active | Neural Pattern Recognition for subtle artifact detection. |
8686
| **Universal Fake Detect** | Image | ✅ Active | Generalizable detection for unseen deepfake types. |
8787
| **Cross Efficient ViT** | Video | ✅ Active | High-efficiency video analysis using Vision Transformers. |
88+
| **FakeSTormer** | Video | ✅ Active | Vulnerability-Aware Spatio-Temporal Learning for Generalizable Deepfake Video Detection. |
8889

8990
## 🧪 Testing & Verification
9091

@@ -102,3 +103,14 @@ We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.
102103
## 📄 License
103104

104105
Distributed under the MIT License. See `LICENSE` for more information.
106+
107+
## 🏆 Credits
108+
109+
DeepSafe integrates and builds upon the following excellent open-source research:
110+
111+
- **NPR Deepfake**: [GitHub](https://github.com/chuangchuangtan/NPR-Deepfake)
112+
- **Universal Fake Detect**: [GitHub](https://github.com/ojha11/UniversalFakeDetect)
113+
- **Cross Efficient ViT**: [GitHub](https://github.com/nicolia/CrossEfficientViT)
114+
- **FakeSTormer**: [GitHub](https://github.com/10Ring/FakeSTormer)
115+
116+
We thank the original authors for their contributions to the community.

config/deepsafe_config.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@
2323
},
2424
"video": {
2525
"model_endpoints": {
26-
"cross_efficient_vit": "http://cross_efficient_vit:7001/predict"
26+
"cross_efficient_vit": "http://cross_efficient_vit:7001/predict",
27+
"fake_stormer": "http://fake_stormer:7002/predict"
2728
},
2829
"health_endpoints": {
29-
"cross_efficient_vit": "http://cross_efficient_vit:7001/health"
30+
"cross_efficient_vit": "http://cross_efficient_vit:7001/health",
31+
"fake_stormer": "http://fake_stormer:7002/health"
3032
},
3133
"supported_extensions": [
3234
"*.mp4",

health_check_output.txt

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Results for this run will be saved in:
2+
/Users/sidd/Desktop/Personal/Projects/DeepSafe/deepsafe_test_results/20251201_203609
3+
╭──────────────────────────────────────────────────╮
4+
│ DeepSafe System Health Check (Media Type: VIDEO) │
5+
╰──────────────────────────────────────────────────╯
6+
Error checking main API
7+
health at
8+
http://localhost:8000/h
9+
ealth:
10+
HTTPConnectionPool(host
11+
='localhost',
12+
port=8000): Max retries
13+
exceeded with url:
14+
/health (Caused by
15+
NewConnectionError('<ur
16+
llib3.connection.HTTPCo
17+
nnection object at
18+
0x113dc2fd0>: Failed to
19+
establish a new
20+
connection: [Errno 61]
21+
Connection refused'))
22+
DeepSafe System Status
23+
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
24+
┃ Component ┃ Status ┃ Details ┃
25+
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
26+
│ API Gateway Overall │ UNKNOWN (KEY 'OVERALL_API_STATUS' │ │
27+
│ │ MISSING) │ │
28+
│ 'VIDEO' Processing Status │ UNKNOWN (MEDIA TYPE DETAILS MISSING │ │
29+
│ │ OR STATUS KEY MISSING) │ │
30+
├───────────────────────────────────────┼───────────────────────────────────────┼──────────────────────────────────────┤
31+
│ Individual Models for 'VIDEO' (Status │ │ │
32+
│ via API Gateway) │ │ │
33+
│ No model statuses reported by API for │ - │ Check API health endpoint response │
34+
│ 'video'. │ │ structure. │
35+
├───────────────────────────────────────┼───────────────────────────────────────┼──────────────────────────────────────┤
36+
│ Stacking Ensemble for 'VIDEO' │ Unavailable │ │
37+
└───────────────────────────────────────┴───────────────────────────────────────┴──────────────────────────────────────┘

scripts/download_weights.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,16 @@ echo "CrossEfficientViT weights are typically handled by the Docker build."
2828
echo "If build fails, download from: https://drive.google.com/drive/folders/19bNOs8_rZ7LmPP3boDS3XvZcR1iryHR1"
2929
echo "Place in: models/video/cross_efficient_vit/model_code/gdrive_weights/"
3030

31+
# FakeSTormer Weights
32+
echo "------------------------------------------------"
33+
echo "Checking FakeSTormer weights..."
34+
if [ -f "models/video/fake_stormer/model_code/weights/best.pth" ]; then
35+
echo "FakeSTormer weights already exist."
36+
else
37+
echo "Please download the weights from the following Dropbox link:"
38+
echo "Link: https://www.dropbox.com/scl/fo/elk2szqf0du4l6zm5job9/AAdVmNH--6ywHBZGNQJlR5o?rlkey=5kde7vj4wklrx1jwdul0m6g46&e=1&st=czw4szw0&dl=0"
39+
echo "Place the 'best.pth' file in: models/video/fake_stormer/model_code/weights/"
40+
fi
41+
3142
echo "------------------------------------------------"
3243
echo "Download check complete."

verify_config_load.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import sys
2+
import os
3+
4+
# Add current directory to path so we can import deepsafe_utils
5+
sys.path.append(os.getcwd())
6+
7+
from deepsafe_utils.config_manager import ConfigManager
8+
9+
def verify_config():
10+
cm = ConfigManager()
11+
if not cm.is_config_loaded_successfully():
12+
print("Failed to load config.")
13+
sys.exit(1)
14+
15+
video_models = cm.get_model_endpoints("video")
16+
print(f"Configured Video Models: {list(video_models.keys())}")
17+
18+
if "fake_stormer" in video_models:
19+
print("SUCCESS: 'fake_stormer' is found in video models configuration.")
20+
else:
21+
print("FAILURE: 'fake_stormer' NOT found in video models configuration.")
22+
23+
if __name__ == "__main__":
24+
verify_config()

0 commit comments

Comments
 (0)