Model save
Browse files
README.md
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: microsoft/swin-tiny-patch4-window7-224
|
| 4 |
+
tags:
|
| 5 |
+
- generated_from_trainer
|
| 6 |
+
datasets:
|
| 7 |
+
- imagefolder
|
| 8 |
+
metrics:
|
| 9 |
+
- accuracy
|
| 10 |
+
- precision
|
| 11 |
+
- recall
|
| 12 |
+
- f1
|
| 13 |
+
model-index:
|
| 14 |
+
- name: batch-size16_DFDC_opencv-1FPS_faces-expand50-aligned_unaugmentation
|
| 15 |
+
results:
|
| 16 |
+
- task:
|
| 17 |
+
name: Image Classification
|
| 18 |
+
type: image-classification
|
| 19 |
+
dataset:
|
| 20 |
+
name: imagefolder
|
| 21 |
+
type: imagefolder
|
| 22 |
+
config: default
|
| 23 |
+
split: test
|
| 24 |
+
args: default
|
| 25 |
+
metrics:
|
| 26 |
+
- name: Accuracy
|
| 27 |
+
type: accuracy
|
| 28 |
+
value: 0.9796104469388703
|
| 29 |
+
- name: Precision
|
| 30 |
+
type: precision
|
| 31 |
+
value: 0.9855379233795052
|
| 32 |
+
- name: Recall
|
| 33 |
+
type: recall
|
| 34 |
+
value: 0.9902568023582036
|
| 35 |
+
- name: F1
|
| 36 |
+
type: f1
|
| 37 |
+
value: 0.987891727713915
|
| 38 |
+
---
|
| 39 |
+
|
| 40 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 41 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 42 |
+
|
| 43 |
+
# batch-size16_DFDC_opencv-1FPS_faces-expand50-aligned_unaugmentation
|
| 44 |
+
|
| 45 |
+
This model is a fine-tuned version of [microsoft/swin-tiny-patch4-window7-224](https://huggingface.co/microsoft/swin-tiny-patch4-window7-224) on the imagefolder dataset.
|
| 46 |
+
It achieves the following results on the evaluation set:
|
| 47 |
+
- Loss: 0.0529
|
| 48 |
+
- Accuracy: 0.9796
|
| 49 |
+
- Precision: 0.9855
|
| 50 |
+
- Recall: 0.9903
|
| 51 |
+
- F1: 0.9879
|
| 52 |
+
- Roc Auc: 0.9965
|
| 53 |
+
|
| 54 |
+
## Model description
|
| 55 |
+
|
| 56 |
+
More information needed
|
| 57 |
+
|
| 58 |
+
## Intended uses & limitations
|
| 59 |
+
|
| 60 |
+
More information needed
|
| 61 |
+
|
| 62 |
+
## Training and evaluation data
|
| 63 |
+
|
| 64 |
+
More information needed
|
| 65 |
+
|
| 66 |
+
## Training procedure
|
| 67 |
+
|
| 68 |
+
### Training hyperparameters
|
| 69 |
+
|
| 70 |
+
The following hyperparameters were used during training:
|
| 71 |
+
- learning_rate: 5e-05
|
| 72 |
+
- train_batch_size: 16
|
| 73 |
+
- eval_batch_size: 16
|
| 74 |
+
- seed: 42
|
| 75 |
+
- gradient_accumulation_steps: 4
|
| 76 |
+
- total_train_batch_size: 64
|
| 77 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 78 |
+
- lr_scheduler_type: linear
|
| 79 |
+
- lr_scheduler_warmup_ratio: 0.1
|
| 80 |
+
- num_epochs: 1
|
| 81 |
+
|
| 82 |
+
### Training results
|
| 83 |
+
|
| 84 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1 | Roc Auc |
|
| 85 |
+
|:-------------:|:-----:|:-----:|:---------------:|:--------:|:---------:|:------:|:------:|:-------:|
|
| 86 |
+
| 0.0568 | 1.0 | 18831 | 0.0529 | 0.9796 | 0.9855 | 0.9903 | 0.9879 | 0.9965 |
|
| 87 |
+
|
| 88 |
+
|
| 89 |
+
### Framework versions
|
| 90 |
+
|
| 91 |
+
- Transformers 4.41.2
|
| 92 |
+
- Pytorch 2.3.1
|
| 93 |
+
- Datasets 2.20.0
|
| 94 |
+
- Tokenizers 0.19.1
|
config.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "microsoft/swin-tiny-patch4-window7-224",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"SwinForImageClassification"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.0,
|
| 7 |
+
"depths": [
|
| 8 |
+
2,
|
| 9 |
+
2,
|
| 10 |
+
6,
|
| 11 |
+
2
|
| 12 |
+
],
|
| 13 |
+
"drop_path_rate": 0.1,
|
| 14 |
+
"embed_dim": 96,
|
| 15 |
+
"encoder_stride": 32,
|
| 16 |
+
"hidden_act": "gelu",
|
| 17 |
+
"hidden_dropout_prob": 0.0,
|
| 18 |
+
"hidden_size": 768,
|
| 19 |
+
"id2label": {
|
| 20 |
+
"0": "Fake",
|
| 21 |
+
"1": "Real"
|
| 22 |
+
},
|
| 23 |
+
"image_size": 224,
|
| 24 |
+
"initializer_range": 0.02,
|
| 25 |
+
"label2id": {
|
| 26 |
+
"Fake": 0,
|
| 27 |
+
"Real": 1
|
| 28 |
+
},
|
| 29 |
+
"layer_norm_eps": 1e-05,
|
| 30 |
+
"mlp_ratio": 4.0,
|
| 31 |
+
"model_type": "swin",
|
| 32 |
+
"num_channels": 3,
|
| 33 |
+
"num_heads": [
|
| 34 |
+
3,
|
| 35 |
+
6,
|
| 36 |
+
12,
|
| 37 |
+
24
|
| 38 |
+
],
|
| 39 |
+
"num_layers": 4,
|
| 40 |
+
"out_features": [
|
| 41 |
+
"stage4"
|
| 42 |
+
],
|
| 43 |
+
"out_indices": [
|
| 44 |
+
4
|
| 45 |
+
],
|
| 46 |
+
"patch_size": 4,
|
| 47 |
+
"path_norm": true,
|
| 48 |
+
"problem_type": "single_label_classification",
|
| 49 |
+
"qkv_bias": true,
|
| 50 |
+
"stage_names": [
|
| 51 |
+
"stem",
|
| 52 |
+
"stage1",
|
| 53 |
+
"stage2",
|
| 54 |
+
"stage3",
|
| 55 |
+
"stage4"
|
| 56 |
+
],
|
| 57 |
+
"torch_dtype": "float32",
|
| 58 |
+
"transformers_version": "4.41.2",
|
| 59 |
+
"use_absolute_embeddings": false,
|
| 60 |
+
"window_size": 7
|
| 61 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:786cc30fc44c8bba93e97ce16f337e4d3d93a51b6420a9e5a477194f61d0d8af
|
| 3 |
+
size 110342832
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_valid_processor_keys": [
|
| 3 |
+
"images",
|
| 4 |
+
"do_resize",
|
| 5 |
+
"size",
|
| 6 |
+
"resample",
|
| 7 |
+
"do_rescale",
|
| 8 |
+
"rescale_factor",
|
| 9 |
+
"do_normalize",
|
| 10 |
+
"image_mean",
|
| 11 |
+
"image_std",
|
| 12 |
+
"return_tensors",
|
| 13 |
+
"data_format",
|
| 14 |
+
"input_data_format"
|
| 15 |
+
],
|
| 16 |
+
"do_normalize": true,
|
| 17 |
+
"do_rescale": true,
|
| 18 |
+
"do_resize": true,
|
| 19 |
+
"image_mean": [
|
| 20 |
+
0.485,
|
| 21 |
+
0.456,
|
| 22 |
+
0.406
|
| 23 |
+
],
|
| 24 |
+
"image_processor_type": "ViTImageProcessor",
|
| 25 |
+
"image_std": [
|
| 26 |
+
0.229,
|
| 27 |
+
0.224,
|
| 28 |
+
0.225
|
| 29 |
+
],
|
| 30 |
+
"resample": 3,
|
| 31 |
+
"rescale_factor": 0.00392156862745098,
|
| 32 |
+
"size": {
|
| 33 |
+
"height": 224,
|
| 34 |
+
"width": 224
|
| 35 |
+
}
|
| 36 |
+
}
|
runs/Jun25_16-09-21_Lab4/events.out.tfevents.1719302968.Lab4.10336.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:044753659a4d8c6d477d5ae99540390a3aabe00a66a060d66bfabc0bec4f1816
|
| 3 |
+
size 374280
|
runs/Jun25_23-16-43_Lab4/events.out.tfevents.1719329216.Lab4.7600.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4b5a27e91e97832ee96823c9090088a19bbcc25e4d4566ac0b762d3ca3dfcab0
|
| 3 |
+
size 404413
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:24bc5ee0f8aab11a5524fd543c0c14f1378f7ef5f90a95bdd16a8536118cd734
|
| 3 |
+
size 5176
|