LukeJacob2023
commited on
Commit
•
237f1fa
1
Parent(s):
2f797a3
Model save
Browse files- README.md +71 -9
- model.safetensors +1 -1
README.md
CHANGED
@@ -1,24 +1,86 @@
|
|
1 |
---
|
|
|
|
|
2 |
tags:
|
3 |
-
-
|
4 |
-
|
5 |
-
-
|
6 |
metrics:
|
7 |
- accuracy
|
8 |
model-index:
|
9 |
-
- name: nsfw-
|
10 |
results:
|
11 |
- task:
|
12 |
name: Image Classification
|
13 |
type: image-classification
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
metrics:
|
15 |
- name: Accuracy
|
16 |
type: accuracy
|
17 |
-
value: 0.
|
18 |
-
datasets:
|
19 |
-
- deepghs/nsfw_detect
|
20 |
---
|
21 |
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
-
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
license: apache-2.0
|
3 |
+
base_model: google/vit-base-patch16-224-in21k
|
4 |
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
datasets:
|
7 |
+
- imagefolder
|
8 |
metrics:
|
9 |
- accuracy
|
10 |
model-index:
|
11 |
+
- name: nsfw-image-detector
|
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.9315615772103526
|
|
|
|
|
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 |
+
# nsfw-image-detector
|
32 |
+
|
33 |
+
This model is a fine-tuned version of [google/vit-base-patch16-224-in21k](https://huggingface.co/google/vit-base-patch16-224-in21k) on the imagefolder dataset.
|
34 |
+
It achieves the following results on the evaluation set:
|
35 |
+
- Loss: 0.8138
|
36 |
+
- Accuracy: 0.9316
|
37 |
+
- Accuracy K: 0.9887
|
38 |
+
|
39 |
+
## Model description
|
40 |
+
|
41 |
+
More information needed
|
42 |
+
|
43 |
+
## Intended uses & limitations
|
44 |
+
|
45 |
+
More information needed
|
46 |
+
|
47 |
+
## Training and evaluation data
|
48 |
+
|
49 |
+
More information needed
|
50 |
+
|
51 |
+
## Training procedure
|
52 |
+
|
53 |
+
### Training hyperparameters
|
54 |
+
|
55 |
+
The following hyperparameters were used during training:
|
56 |
+
- learning_rate: 2e-05
|
57 |
+
- train_batch_size: 32
|
58 |
+
- eval_batch_size: 32
|
59 |
+
- seed: 42
|
60 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
61 |
+
- lr_scheduler_type: linear
|
62 |
+
- lr_scheduler_warmup_steps: 500
|
63 |
+
- num_epochs: 10
|
64 |
+
- mixed_precision_training: Native AMP
|
65 |
+
|
66 |
+
### Training results
|
67 |
+
|
68 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy | Accuracy K |
|
69 |
+
|:-------------:|:-----:|:----:|:---------------:|:--------:|:----------:|
|
70 |
+
| 0.7836 | 1.0 | 720 | 0.3188 | 0.9085 | 0.9891 |
|
71 |
+
| 0.2441 | 2.0 | 1440 | 0.2382 | 0.9257 | 0.9936 |
|
72 |
+
| 0.1412 | 3.0 | 2160 | 0.2334 | 0.9335 | 0.9932 |
|
73 |
+
| 0.0857 | 4.0 | 2880 | 0.2934 | 0.9347 | 0.9934 |
|
74 |
+
| 0.0569 | 5.0 | 3600 | 0.4500 | 0.9307 | 0.9927 |
|
75 |
+
| 0.0371 | 6.0 | 4320 | 0.5524 | 0.9357 | 0.9910 |
|
76 |
+
| 0.0232 | 7.0 | 5040 | 0.6691 | 0.9347 | 0.9913 |
|
77 |
+
| 0.02 | 8.0 | 5760 | 0.7408 | 0.9335 | 0.9917 |
|
78 |
+
| 0.0154 | 9.0 | 6480 | 0.8138 | 0.9316 | 0.9887 |
|
79 |
+
|
80 |
+
|
81 |
+
### Framework versions
|
82 |
|
83 |
+
- Transformers 4.36.2
|
84 |
+
- Pytorch 2.0.0
|
85 |
+
- Datasets 2.15.0
|
86 |
+
- Tokenizers 0.15.0
|
model.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 343233204
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:54d25f4f8fe459481c52a7edfdde251a1211bfc62cf05102ea435c001610fa1f
|
3 |
size 343233204
|