Upload 6 files
Browse files- README.md +23 -0
- config.json +34 -0
- model.safetensors +3 -0
- preprocessor_config.json +22 -0
- training_args.bin +3 -0
README.md
CHANGED
|
@@ -1,3 +1,26 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
metrics:
|
| 4 |
+
- accuracy
|
| 5 |
+
- f1
|
| 6 |
---
|
| 7 |
+
Detects the skin type (dry, normal, oily) based on facial image.
|
| 8 |
+
|
| 9 |
+
See https://www.kaggle.com/code/dima806/skin-types-image-detection-vit for details.
|
| 10 |
+
|
| 11 |
+
```
|
| 12 |
+
Classification report:
|
| 13 |
+
|
| 14 |
+
precision recall f1-score support
|
| 15 |
+
|
| 16 |
+
dry 0.6471 0.5402 0.5888 224
|
| 17 |
+
normal 0.6031 0.7054 0.6502 224
|
| 18 |
+
oily 0.6054 0.6027 0.6040 224
|
| 19 |
+
|
| 20 |
+
accuracy 0.6161 672
|
| 21 |
+
macro avg 0.6185 0.6161 0.6143 672
|
| 22 |
+
weighted avg 0.6185 0.6161 0.6143 672
|
| 23 |
+
```
|
| 24 |
+
|
| 25 |
+

|
| 26 |
+
|
config.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "dima806/skin_types_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": "dry",
|
| 13 |
+
"1": "normal",
|
| 14 |
+
"2": "oily"
|
| 15 |
+
},
|
| 16 |
+
"image_size": 224,
|
| 17 |
+
"initializer_range": 0.02,
|
| 18 |
+
"intermediate_size": 3072,
|
| 19 |
+
"label2id": {
|
| 20 |
+
"dry": 0,
|
| 21 |
+
"normal": 1,
|
| 22 |
+
"oily": 2
|
| 23 |
+
},
|
| 24 |
+
"layer_norm_eps": 1e-12,
|
| 25 |
+
"model_type": "vit",
|
| 26 |
+
"num_attention_heads": 12,
|
| 27 |
+
"num_channels": 3,
|
| 28 |
+
"num_hidden_layers": 12,
|
| 29 |
+
"patch_size": 16,
|
| 30 |
+
"problem_type": "single_label_classification",
|
| 31 |
+
"qkv_bias": true,
|
| 32 |
+
"torch_dtype": "float32",
|
| 33 |
+
"transformers_version": "4.38.1"
|
| 34 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9397cb2aeeaab33045bec457de517d1a562964fb40f842d66a37327429fffa07
|
| 3 |
+
size 343227052
|
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:9b6a8060e7a79d40685bf1a1624c5a18aa9b77e00528dfdd9686df38363359be
|
| 3 |
+
size 4856
|