itsLeen commited on
Commit
9389aab
1 Parent(s): 1a0e2bf

Model save

Browse files
README.md ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: dima806/deepfake_vs_real_image_detection
4
+ tags:
5
+ - generated_from_trainer
6
+ datasets:
7
+ - imagefolder
8
+ metrics:
9
+ - accuracy
10
+ model-index:
11
+ - name: realFake-img
12
+ results:
13
+ - task:
14
+ name: Image Classification
15
+ type: image-classification
16
+ dataset:
17
+ name: imagefolder
18
+ type: imagefolder
19
+ config: default
20
+ split: train
21
+ args: default
22
+ metrics:
23
+ - name: Accuracy
24
+ type: accuracy
25
+ value: 0.8654545454545455
26
+ ---
27
+
28
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
29
+ should probably proofread and complete it, then remove this comment. -->
30
+
31
+ # realFake-img
32
+
33
+ This model is a fine-tuned version of [dima806/deepfake_vs_real_image_detection](https://huggingface.co/dima806/deepfake_vs_real_image_detection) on the imagefolder dataset.
34
+ It achieves the following results on the evaluation set:
35
+ - Loss: 0.4350
36
+ - Accuracy: 0.8655
37
+
38
+ ## Model description
39
+
40
+ More information needed
41
+
42
+ ## Intended uses & limitations
43
+
44
+ More information needed
45
+
46
+ ## Training and evaluation data
47
+
48
+ More information needed
49
+
50
+ ## Training procedure
51
+
52
+ ### Training hyperparameters
53
+
54
+ The following hyperparameters were used during training:
55
+ - learning_rate: 0.0002
56
+ - train_batch_size: 16
57
+ - eval_batch_size: 8
58
+ - seed: 42
59
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
60
+ - lr_scheduler_type: linear
61
+ - num_epochs: 4
62
+ - mixed_precision_training: Native AMP
63
+
64
+ ### Training results
65
+
66
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy |
67
+ |:-------------:|:------:|:----:|:---------------:|:--------:|
68
+ | 0.4892 | 0.2564 | 100 | 0.5756 | 0.7227 |
69
+ | 0.683 | 0.5128 | 200 | 0.6742 | 0.6373 |
70
+ | 0.3737 | 0.7692 | 300 | 0.5462 | 0.7555 |
71
+ | 0.3554 | 1.0256 | 400 | 0.4354 | 0.8009 |
72
+ | 0.2368 | 1.2821 | 500 | 0.4046 | 0.8309 |
73
+ | 0.3696 | 1.5385 | 600 | 0.5547 | 0.7809 |
74
+ | 0.2824 | 1.7949 | 700 | 0.3329 | 0.8518 |
75
+ | 0.2366 | 2.0513 | 800 | 0.4582 | 0.8255 |
76
+ | 0.2212 | 2.3077 | 900 | 0.4885 | 0.8255 |
77
+ | 0.2031 | 2.5641 | 1000 | 0.4282 | 0.8564 |
78
+ | 0.1717 | 2.8205 | 1100 | 0.4373 | 0.85 |
79
+ | 0.1303 | 3.0769 | 1200 | 0.3659 | 0.8718 |
80
+ | 0.0889 | 3.3333 | 1300 | 0.3663 | 0.8736 |
81
+ | 0.1157 | 3.5897 | 1400 | 0.4588 | 0.8436 |
82
+ | 0.1215 | 3.8462 | 1500 | 0.4350 | 0.8655 |
83
+
84
+
85
+ ### Framework versions
86
+
87
+ - Transformers 4.42.4
88
+ - Pytorch 2.4.0+cu121
89
+ - Datasets 2.21.0
90
+ - Tokenizers 0.19.1
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "dima806/deepfake_vs_real_image_detection",
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
+ "id2label": {
12
+ "0": "AiArtData",
13
+ "1": "RealArt"
14
+ },
15
+ "image_size": 224,
16
+ "initializer_range": 0.02,
17
+ "intermediate_size": 3072,
18
+ "label2id": {
19
+ "AiArtData": "0",
20
+ "RealArt": "1"
21
+ },
22
+ "layer_norm_eps": 1e-12,
23
+ "model_type": "vit",
24
+ "num_attention_heads": 12,
25
+ "num_channels": 3,
26
+ "num_hidden_layers": 12,
27
+ "patch_size": 16,
28
+ "problem_type": "single_label_classification",
29
+ "qkv_bias": true,
30
+ "torch_dtype": "float32",
31
+ "transformers_version": "4.42.4"
32
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6117692cdc1f7f9d4df4e0157ae89b660794059f08686bfe7ea2acee9bb72297
3
+ size 343223968
preprocessor_config.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "ViTFeatureExtractor",
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
+ }
runs/Sep04_16-25-43_eec317420151/events.out.tfevents.1725467165.eec317420151.967.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b474ef1b80abbf5f670ff8f418796b0490fc2abdfec0154109dc916c7c3cf52f
3
+ size 42975
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7f170978f3e0b7b6312fe562b8268fb5e8464ea44029c27506135d1446e5018a
3
+ size 5112