Adieee5 commited on
Commit
f3d6383
·
verified ·
1 Parent(s): c8a80fd

Upload folder using huggingface_hub

Browse files
Files changed (5) hide show
  1. README.md +22 -0
  2. config.json +24 -0
  3. model.safetensors +3 -0
  4. output.png +0 -0
  5. preprocessor_config.json +22 -0
README.md ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ metrics:
4
+ - accuracy
5
+ base_model:
6
+ - google/vit-base-patch16-224-in21k
7
+ pipeline_tag: image-classification
8
+ ---
9
+ # Deepfake Image Detection Using Fine-Tuned Vision Transformer (ViT)
10
+ This project focuses on detecting **deepfake images** using a fine-tuned version of the pre-trained model `google/vit-base-patch16-224-in21k`. The approach leverages the power of Vision Transformers (ViT) to classify images as real or fake.
11
+
12
+ ## **Model Overview**
13
+ - **Base Model**: [google/vit-base-patch16-224-in21k](https://huggingface.co/google/vit-base-patch16-224-in21k)
14
+ - **Dataset**: [DFDC](https://ai.meta.com/datasets/dfdc).
15
+ - **Classes**: Deepfake and Real
16
+ - **Performance**:
17
+ - **Validation Accuracy**: 95%
18
+ - **Test Accuracy**: 91%
19
+
20
+ *Figure : Confusion matrix for test data*
21
+
22
+ ![image/png](output.png)
config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "google/vit-base-patch16-224-in21k",
3
+ "architectures": [
4
+ "ViTForImageClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.0,
7
+ "encoder_stride": 16,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.0,
10
+ "hidden_size": 768,
11
+ "image_size": 224,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 3072,
14
+ "layer_norm_eps": 1e-12,
15
+ "model_type": "vit",
16
+ "num_attention_heads": 12,
17
+ "num_channels": 3,
18
+ "num_hidden_layers": 12,
19
+ "patch_size": 16,
20
+ "problem_type": "single_label_classification",
21
+ "qkv_bias": true,
22
+ "torch_dtype": "float32",
23
+ "transformers_version": "4.45.1"
24
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:de8db0d232f5adda3bbe0a8c3697cb1cda35739373f2b3dea92a570388f34da7
3
+ size 343223968
output.png ADDED
preprocessor_config.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_normalize": true,
3
+ "do_rescale": true,
4
+ "do_resize": "google/vit-base-patch16-224-in21k",
5
+ "image_mean": [
6
+ 0.5,
7
+ 0.5,
8
+ 0.5
9
+ ],
10
+ "image_processor_type": "ViTImageProcessor",
11
+ "image_std": [
12
+ 0.5,
13
+ 0.5,
14
+ 0.5
15
+ ],
16
+ "resample": 2,
17
+ "rescale_factor": 0.00392156862745098,
18
+ "size": {
19
+ "height": 224,
20
+ "width": 224
21
+ }
22
+ }