Zmu commited on
Commit
5f1f22a
1 Parent(s): 36e77c4

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+ tags:
4
+ - autotrain
5
+ - image-classification
6
+ widget:
7
+ - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/tiger.jpg
8
+ example_title: Tiger
9
+ - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/teapot.jpg
10
+ example_title: Teapot
11
+ - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/palace.jpg
12
+ example_title: Palace
13
+ datasets:
14
+ - Zmu/autotrain-data-xcd_classification
15
+ ---
16
+
17
+ # Model Trained Using AutoTrain
18
+
19
+ - Problem type: Image Classification
20
+
21
+ ## Validation Metricsg
22
+ loss: 0.044754352420568466
23
+
24
+ f1: 0.9852413242919825
25
+
26
+ precision: 0.9975767366720517
27
+
28
+ recall: 0.9732072498029944
29
+
30
+ auc: 0.9994751008188858
31
+
32
+ accuracy: 0.9864568081991215
checkpoint-1026/config.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "Falconsai/nsfw_image_detection",
3
+ "_num_labels": 2,
4
+ "architectures": [
5
+ "ViTForImageClassification"
6
+ ],
7
+ "attention_probs_dropout_prob": 0.0,
8
+ "encoder_stride": 16,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.0,
11
+ "hidden_size": 768,
12
+ "id2label": {
13
+ "0": "normal",
14
+ "1": "nsfw"
15
+ },
16
+ "image_size": 224,
17
+ "initializer_range": 0.02,
18
+ "intermediate_size": 3072,
19
+ "label2id": {
20
+ "normal": 0,
21
+ "nsfw": 1
22
+ },
23
+ "layer_norm_eps": 1e-12,
24
+ "model_type": "vit",
25
+ "num_attention_heads": 12,
26
+ "num_channels": 3,
27
+ "num_hidden_layers": 12,
28
+ "patch_size": 16,
29
+ "problem_type": "single_label_classification",
30
+ "qkv_bias": true,
31
+ "torch_dtype": "float32",
32
+ "transformers_version": "4.36.1"
33
+ }
checkpoint-1026/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:95f614c565d449da2d2916798be7633e2c0167d050e474cb1f36a5094f97f5ec
3
+ size 343223968
checkpoint-1026/optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ad7ebe1df9a7bb344427fb05c68b205c747b79cdb591a93d4e27faccc200d1bc
3
+ size 686568890
checkpoint-1026/rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ea21d688983434dd59a915b5fc4afa68a8980aa3466c9fb757021460255fb556
3
+ size 14180
checkpoint-1026/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bdfafd46911f4676099fd35d7873f346bd7ea2701b8f38b73b99142f041cbcfe
3
+ size 1064
checkpoint-1026/trainer_state.json ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 0.044754352420568466,
3
+ "best_model_checkpoint": "/tmp/model/checkpoint-1026",
4
+ "epoch": 3.0,
5
+ "eval_steps": 500,
6
+ "global_step": 1026,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "epoch": 0.2,
13
+ "learning_rate": 3.155339805825243e-05,
14
+ "loss": 1.2096,
15
+ "step": 68
16
+ },
17
+ {
18
+ "epoch": 0.4,
19
+ "learning_rate": 4.837486457204768e-05,
20
+ "loss": 0.2349,
21
+ "step": 136
22
+ },
23
+ {
24
+ "epoch": 0.6,
25
+ "learning_rate": 4.469122426868906e-05,
26
+ "loss": 0.3095,
27
+ "step": 204
28
+ },
29
+ {
30
+ "epoch": 0.8,
31
+ "learning_rate": 4.1007583965330447e-05,
32
+ "loss": 0.2824,
33
+ "step": 272
34
+ },
35
+ {
36
+ "epoch": 0.99,
37
+ "learning_rate": 3.7323943661971835e-05,
38
+ "loss": 0.2215,
39
+ "step": 340
40
+ },
41
+ {
42
+ "epoch": 1.0,
43
+ "eval_accuracy": 0.9751098096632503,
44
+ "eval_auc": 0.9967504189228713,
45
+ "eval_f1": 0.9735202492211837,
46
+ "eval_loss": 0.07951382547616959,
47
+ "eval_precision": 0.962278675904542,
48
+ "eval_recall": 0.9850275807722616,
49
+ "eval_runtime": 50.4793,
50
+ "eval_samples_per_second": 54.121,
51
+ "eval_steps_per_second": 3.388,
52
+ "step": 342
53
+ },
54
+ {
55
+ "epoch": 1.19,
56
+ "learning_rate": 3.3640303358613216e-05,
57
+ "loss": 0.1574,
58
+ "step": 408
59
+ },
60
+ {
61
+ "epoch": 1.39,
62
+ "learning_rate": 2.9956663055254608e-05,
63
+ "loss": 0.1602,
64
+ "step": 476
65
+ },
66
+ {
67
+ "epoch": 1.59,
68
+ "learning_rate": 2.6273022751895993e-05,
69
+ "loss": 0.1773,
70
+ "step": 544
71
+ },
72
+ {
73
+ "epoch": 1.79,
74
+ "learning_rate": 2.258938244853738e-05,
75
+ "loss": 0.1794,
76
+ "step": 612
77
+ },
78
+ {
79
+ "epoch": 1.99,
80
+ "learning_rate": 1.8905742145178766e-05,
81
+ "loss": 0.1738,
82
+ "step": 680
83
+ },
84
+ {
85
+ "epoch": 2.0,
86
+ "eval_accuracy": 0.9838945827232797,
87
+ "eval_auc": 0.9987853795244613,
88
+ "eval_f1": 0.9824281150159744,
89
+ "eval_loss": 0.04984632134437561,
90
+ "eval_precision": 0.9959514170040485,
91
+ "eval_recall": 0.9692671394799054,
92
+ "eval_runtime": 52.4203,
93
+ "eval_samples_per_second": 52.117,
94
+ "eval_steps_per_second": 3.262,
95
+ "step": 684
96
+ },
97
+ {
98
+ "epoch": 2.19,
99
+ "learning_rate": 1.5222101841820153e-05,
100
+ "loss": 0.0957,
101
+ "step": 748
102
+ },
103
+ {
104
+ "epoch": 2.39,
105
+ "learning_rate": 1.153846153846154e-05,
106
+ "loss": 0.1417,
107
+ "step": 816
108
+ },
109
+ {
110
+ "epoch": 2.58,
111
+ "learning_rate": 7.854821235102926e-06,
112
+ "loss": 0.0833,
113
+ "step": 884
114
+ },
115
+ {
116
+ "epoch": 2.78,
117
+ "learning_rate": 4.171180931744313e-06,
118
+ "loss": 0.0681,
119
+ "step": 952
120
+ },
121
+ {
122
+ "epoch": 2.98,
123
+ "learning_rate": 4.875406283856988e-07,
124
+ "loss": 0.103,
125
+ "step": 1020
126
+ },
127
+ {
128
+ "epoch": 3.0,
129
+ "eval_accuracy": 0.9864568081991215,
130
+ "eval_auc": 0.9994751008188858,
131
+ "eval_f1": 0.9852413242919825,
132
+ "eval_loss": 0.044754352420568466,
133
+ "eval_precision": 0.9975767366720517,
134
+ "eval_recall": 0.9732072498029944,
135
+ "eval_runtime": 52.4079,
136
+ "eval_samples_per_second": 52.13,
137
+ "eval_steps_per_second": 3.263,
138
+ "step": 1026
139
+ }
140
+ ],
141
+ "logging_steps": 68,
142
+ "max_steps": 1026,
143
+ "num_input_tokens_seen": 0,
144
+ "num_train_epochs": 3,
145
+ "save_steps": 500,
146
+ "total_flos": 6.35124346881196e+17,
147
+ "train_batch_size": 8,
148
+ "trial_name": null,
149
+ "trial_params": null
150
+ }
checkpoint-1026/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9ab95df77aa73436641b5dbaf01dcf96ea93d00d8466ef621e283d5d829c6944
3
+ size 4728
config.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "Falconsai/nsfw_image_detection",
3
+ "_num_labels": 2,
4
+ "architectures": [
5
+ "ViTForImageClassification"
6
+ ],
7
+ "attention_probs_dropout_prob": 0.0,
8
+ "encoder_stride": 16,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.0,
11
+ "hidden_size": 768,
12
+ "id2label": {
13
+ "0": "normal",
14
+ "1": "nsfw"
15
+ },
16
+ "image_size": 224,
17
+ "initializer_range": 0.02,
18
+ "intermediate_size": 3072,
19
+ "label2id": {
20
+ "normal": 0,
21
+ "nsfw": 1
22
+ },
23
+ "layer_norm_eps": 1e-12,
24
+ "model_type": "vit",
25
+ "num_attention_heads": 12,
26
+ "num_channels": 3,
27
+ "num_hidden_layers": 12,
28
+ "patch_size": 16,
29
+ "problem_type": "single_label_classification",
30
+ "qkv_bias": true,
31
+ "torch_dtype": "float32",
32
+ "transformers_version": "4.36.1"
33
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:95f614c565d449da2d2916798be7633e2c0167d050e474cb1f36a5094f97f5ec
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": "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
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9ab95df77aa73436641b5dbaf01dcf96ea93d00d8466ef621e283d5d829c6944
3
+ size 4728
training_params.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "data_path": "Zmu/autotrain-data-xcd_classification",
3
+ "model": "Falconsai/nsfw_image_detection",
4
+ "username": "Zmu",
5
+ "lr": 5e-05,
6
+ "epochs": 3,
7
+ "batch_size": 8,
8
+ "warmup_ratio": 0.1,
9
+ "gradient_accumulation": 1,
10
+ "optimizer": "adamw_torch",
11
+ "scheduler": "linear",
12
+ "weight_decay": 0.0,
13
+ "max_grad_norm": 1.0,
14
+ "seed": 42,
15
+ "train_split": "train",
16
+ "valid_split": "validation",
17
+ "logging_steps": -1,
18
+ "project_name": "/tmp/model",
19
+ "auto_find_batch_size": false,
20
+ "mixed_precision": "fp16",
21
+ "save_total_limit": 1,
22
+ "save_strategy": "epoch",
23
+ "push_to_hub": true,
24
+ "repo_id": "Zmu/xcd_classification",
25
+ "evaluation_strategy": "epoch",
26
+ "image_column": "autotrain_image",
27
+ "target_column": "autotrain_label",
28
+ "log": "none"
29
+ }