zyxciss commited on
Commit
036cad6
·
verified ·
1 Parent(s): d859932

Upload folder using huggingface_hub

Browse files
README.md CHANGED
@@ -1,3 +1,163 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ base_model:
6
+ - google/siglip-so400m-patch14-384
7
+ pipeline_tag: image-classification
8
+ library_name: transformers
9
+ tags:
10
+ - deepfakedetection
11
+ - image-authenticity
12
+ - image-classification
13
+ ---
14
+ ![bXfKBT3LQkbeLzPCBHTGT.png](https://cas-bridge.xethub.hf.co/xet-bridge-us/68206a8f14f1230be619fde3/27a2411a7aabcf28ea23c565d031a53b7e5e2fca4c0dfc17cbc0ed3fb32ec2fa?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=cas%2F20250511%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250511T104120Z&X-Amz-Expires=3600&X-Amz-Signature=fb917f3ab607b8042bdf3c6a95fec4315d23d907d1705aef14cfdda11532dab7&X-Amz-SignedHeaders=host&X-Xet-Cas-Uid=675d3ca88d0f15d76e49d5ea&response-content-disposition=inline%3B+filename*%3DUTF-8%27%27Gemini_Generated_Image_3sc2d03sc2d03sc2.jpeg%3B+filename%3D%22Gemini_Generated_Image_3sc2d03sc2d03sc2.jpeg%22%3B&response-content-type=image%2Fjpeg&x-id=GetObject&Expires=1746963680&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTc0Njk2MzY4MH19LCJSZXNvdXJjZSI6Imh0dHBzOi8vY2FzLWJyaWRnZS54ZXRodWIuaGYuY28veGV0LWJyaWRnZS11cy82ODIwNmE4ZjE0ZjEyMzBiZTYxOWZkZTMvMjdhMjQxMWE3YWFiY2YyOGVhMjNjNTY1ZDAzMWE1M2I3ZTVlMmZjYTRjMGRmYzE3Y2JjMGVkM2ZiMzJlYzJmYSoifV19&Signature=TkLl8ndIUD3coiaY3Ujgj98hdF2K0DVRn4L2LH1SMCZ6NVSaoDsWkgv5jOlGkzp-8Gwv1240BeUkNqJ759UWZY6%7Egr4DJMxQVR15pW0OCTwbWlj6XzT2UgEtYyWwxMfN5yeirKdXAvbPVikaUjUEcqYOu7sshvu7fK7W4iTaap2FuRVt%7EhqPpjRBiGrPRMCrZmY1jpwNHzu34iUhbfg4uWngoXuobviWgBhfXzBG-0GvLf%7EOFwNsYOq3PHYtz9kDeKiNLCaMx0unxke8FHSjzquQ6bnD0uNltmnN-aXZjSiNC-qW4U-%7EQeocdZybMglZiKq1%7E%7Eb5LDnOsG2cafNWSA__&Key-Pair-Id=K2L8F4GPSG1IFC)
15
+ ### Satyadrishti-V1 Large
16
+ ## 🔭 Model Overview
17
+
18
+ **Satyadrishti-V1** is an open-source image classification model by [AIRAS INC](https://www.airas.ai), fine-tuned for deepfake detection. It is designed to classify images, determining if they are "Real" or "Fake". This model is part of the Satyadrishti series and leverages Google's `google/siglip-so400m-patch14-384` image classification architecture.
19
+
20
+ This specific variant, **Satyadrishti-V1 Large**, has been fine-tuned for robust performance with its 840 million parameters.
21
+
22
+ ---
23
+
24
+ ## 📦 General Information
25
+
26
+ | Metadata | Value |
27
+ |---------|-------|
28
+ | **Model Name** | Satyadrishti-V1 Large |
29
+ | **Model ID** | AirasInnovations/Satyadrishti-V1-LARGE |
30
+ | **License** | Apache-2.0 |
31
+ | **Language** | English |
32
+ | **Library** | Transformers |
33
+ | **Base Model** | google/siglip-so400m-patch14-384 |
34
+ | **Pipeline Tag** | image-classification |
35
+ | **Tags** | image-classification, deepfakedetection, image-authenticity |
36
+
37
+ ---
38
+
39
+ ## 🧠 Model Architecture
40
+
41
+ - **Architecture**: Fine-tuned SigLIP Vision Transformer
42
+ - **Task**: Binary Image Classification (Real vs Fake)
43
+ - **Classes**:
44
+ - `Class 0`: Fake (Deepfake / AI-generated / Manipulated)
45
+ - `Class 1`: Real (Authentic)
46
+
47
+ ---
48
+
49
+ ## 📈 Training Details
50
+
51
+ ### Dataset
52
+ - **Datasets**: Utilizes over 50 diverse datasets, including selections from prithivMLmods, Kaggle, and other sources.
53
+ - **Content**: Includes a wide variety of real photos and synthetic images, covering outputs from models like DALL-E 3, Imagen, and others.
54
+ - **Data Augmentation**: Horizontal flips, rotations, color jittering
55
+
56
+ ### Hyperparameters
57
+ | Parameter | Value |
58
+ |---------|-------|
59
+ | **Base Model** | google/siglip-so400m-patch14-384 (~400M params) |
60
+ | **Fine-Tuned Model Size** | ~840 million parameters |
61
+ | **Optimizer** | AdamW |
62
+ | **Learning Rate** | 5e-5 |
63
+ | **Loss Function** | Cross-Entropy Loss |
64
+ | **Epochs** | 10 |
65
+ | **Hardware** | 2x NVIDIA T4 GPUs |
66
+ | **Training Time** | ~36 hours |
67
+
68
+ ---
69
+
70
+ ## ✅ Evaluation Metrics
71
+
72
+ | Metric | Score |
73
+ |--------|-------|
74
+ | **Accuracy** | 96% |
75
+ | **Precision** | 98% |
76
+ | **Recall** | 98% |
77
+ | **F1-Score** | 97% |
78
+
79
+ > ⚠️ Note: These metrics were computed on a dedicated validation set. Performance may vary depending on real-world input distribution and image quality.
80
+
81
+ ---
82
+
83
+ ## 📌 Intended Use
84
+
85
+ The model is intended for detecting whether an image is **real (authentic)** or **fake (manipulated or AI-generated)**. It can be applied in various domains:
86
+
87
+ - **Social Media Moderation**
88
+ - **Digital Forensics**
89
+ - **Journalism & Fact-Checking**
90
+ - **Authentication Systems**
91
+ - **Research & Development**
92
+
93
+ ---
94
+
95
+ ## 🛠️ How to Use
96
+
97
+ ### Requirements
98
+
99
+ ```bash
100
+ pip install transformers torch pillow gradio
101
+ ```
102
+
103
+ ### Code Example
104
+
105
+ ```python
106
+ from transformers import AutoImageProcessor, SiglipForImageClassification
107
+ from PIL import Image
108
+ import torch
109
+
110
+ model_name = "AirasInnovations/Satyadrishti-V1-LARGE"
111
+ model = SiglipForImageClassification.from_pretrained(model_name)
112
+ processor = AutoImageProcessor.from_pretrained(model_name)
113
+
114
+ def detect_authenticity(image):
115
+ image = image.convert("RGB")
116
+ inputs = processor(images=image, return_tensors="pt")
117
+ with torch.no_grad():
118
+ logits = model(**inputs).logits
119
+ probs = torch.nn.functional.softmax(logits, dim=1).squeeze().tolist()
120
+ labels = model.config.id2label
121
+ return {labels[i]: round(probs[i], 3) for i in range(len(probs))}
122
+ ```
123
+
124
+ You can also use it directly via Gradio interface as shown in the example script.
125
+
126
+ ---
127
+
128
+ ## 🆚 Comparison with Vatsav Deepfake Detection
129
+
130
+ | Feature | Vatsav Deepfake Detection | Satyadrishti-V1 Large |
131
+ |--------|----------------------------|------------------------|
132
+ | **Training Data Age** | 3 years old | Jan–April 2025 |
133
+ | **Evaluation Data** | Kaggle dataset | Multiple datasets including prithivMLmods Deepfake-vs-Real-v2 |
134
+ | **Open Source?** | ❌ No | ✅ Yes |
135
+ | **Accuracy** | 75% | 96% |
136
+ | **Precision** | 75% | 98% |
137
+ | **Recall** | 100% | 98% |
138
+ | **F1-Score** | ~86% | 97% |
139
+
140
+ ---
141
+
142
+ ## 📚 Citation & Acknowledgments
143
+
144
+ We thank [Google Research](https://ai.googleblog.com/) for open-sourcing the SigLIP architecture and [Prithiv MLMods](https://huggingface.co/prithivMLmods) for providing updated datasets for training.
145
+
146
+ If you use this model in your work, please cite:
147
+
148
+ ```
149
+ @misc{airas-satyadrishti-large,
150
+ author = {AIRAS INC},
151
+ title = {Satyadrishti-V1 Large: An Open-Source Image Classification Model for Deepfake Detection},
152
+ year = {2025},
153
+ publisher = {Hugging Face},
154
+ journal = {Model Card},
155
+ howpublished = {\url{https://huggingface.co/AirasInnovations/Satyadrishti-V1-LARGE}}
156
+ }
157
+ ```
158
+
159
+ ---
160
+
161
+ ## 📬 Contact
162
+
163
+ For support, feedback, or collaboration opportunities, please visit [AIRAS INC Website](https://www.airas.ai) or reach out to us at [email protected].
config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "SiglipModel"
4
+ ],
5
+ "initializer_factor": 1.0,
6
+ "model_type": "siglip",
7
+ "text_config": {
8
+ "hidden_size": 1152,
9
+ "intermediate_size": 4304,
10
+ "model_type": "siglip_text_model",
11
+ "num_attention_heads": 16,
12
+ "num_hidden_layers": 27
13
+ },
14
+ "torch_dtype": "float32",
15
+ "transformers_version": "4.37.0.dev0",
16
+ "vision_config": {
17
+ "hidden_size": 1152,
18
+ "image_size": 384,
19
+ "intermediate_size": 4304,
20
+ "model_type": "siglip_vision_model",
21
+ "num_attention_heads": 16,
22
+ "num_hidden_layers": 27,
23
+ "patch_size": 14
24
+ }
25
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ea2abad2b7f8a9c1aa5e49a244d5d57ffa71c56f720c94bc5d240ef4d6e1d94a
3
+ size 3511950624
preprocessor_config.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_normalize": true,
3
+ "do_rescale": true,
4
+ "do_resize": true,
5
+ "image_mean": [
6
+ 0.5,
7
+ 0.5,
8
+ 0.5
9
+ ],
10
+ "image_processor_type": "SiglipImageProcessor",
11
+ "image_std": [
12
+ 0.5,
13
+ 0.5,
14
+ 0.5
15
+ ],
16
+ "processor_class": "SiglipProcessor",
17
+ "resample": 3,
18
+ "rescale_factor": 0.00392156862745098,
19
+ "size": {
20
+ "height": 384,
21
+ "width": 384
22
+ }
23
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "eos_token": {
3
+ "content": "</s>",
4
+ "lstrip": true,
5
+ "normalized": false,
6
+ "rstrip": true,
7
+ "single_word": false
8
+ },
9
+ "pad_token": {
10
+ "content": "</s>",
11
+ "lstrip": true,
12
+ "normalized": false,
13
+ "rstrip": true,
14
+ "single_word": false
15
+ },
16
+ "unk_token": {
17
+ "content": "<unk>",
18
+ "lstrip": true,
19
+ "normalized": false,
20
+ "rstrip": true,
21
+ "single_word": false
22
+ }
23
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "1": {
4
+ "content": "</s>",
5
+ "lstrip": true,
6
+ "normalized": false,
7
+ "rstrip": true,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "2": {
12
+ "content": "<unk>",
13
+ "lstrip": true,
14
+ "normalized": false,
15
+ "rstrip": true,
16
+ "single_word": false,
17
+ "special": true
18
+ }
19
+ },
20
+ "additional_special_tokens": [],
21
+ "clean_up_tokenization_spaces": true,
22
+ "do_lower_case": true,
23
+ "eos_token": "</s>",
24
+ "model_input_names": [
25
+ "input_ids"
26
+ ],
27
+ "model_max_length": 64,
28
+ "pad_token": "</s>",
29
+ "processor_class": "SiglipProcessor",
30
+ "sp_model_kwargs": {},
31
+ "tokenizer_class": "SiglipTokenizer",
32
+ "unk_token": "<unk>"
33
+ }