Instructions to use Pro-Coder/skin-condition-unified-v3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Pro-Coder/skin-condition-unified-v3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="Pro-Coder/skin-condition-unified-v3") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("Pro-Coder/skin-condition-unified-v3") model = AutoModelForImageClassification.from_pretrained("Pro-Coder/skin-condition-unified-v3", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Pro-Coder/skin-condition-unified-finetuned
Browse files- README.md +83 -0
- config.json +97 -0
- model.safetensors +3 -0
- preprocessor_config.json +22 -0
- training_args.bin +3 -0
README.md
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
base_model: facebook/convnext-base-224-22k
|
| 5 |
+
tags:
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
metrics:
|
| 8 |
+
- accuracy
|
| 9 |
+
model-index:
|
| 10 |
+
- name: skin-condition-unified-v3
|
| 11 |
+
results: []
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 15 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 16 |
+
|
| 17 |
+
# skin-condition-unified-v3
|
| 18 |
+
|
| 19 |
+
This model is a fine-tuned version of [facebook/convnext-base-224-22k](https://huggingface.co/facebook/convnext-base-224-22k) on the None dataset.
|
| 20 |
+
It achieves the following results on the evaluation set:
|
| 21 |
+
- Loss: 1.1323
|
| 22 |
+
- Accuracy: 0.8269
|
| 23 |
+
- F1 Macro: 0.7457
|
| 24 |
+
- Recall Melanoma Dermatoscopic Ham10000: 0.8088
|
| 25 |
+
- Recall Actinic Keratosis Dermatoscopic Ham10000: 0.925
|
| 26 |
+
- Recall Basal Cell Carcinoma Dermatoscopic Ham10: 0.9180
|
| 27 |
+
|
| 28 |
+
## Model description
|
| 29 |
+
|
| 30 |
+
More information needed
|
| 31 |
+
|
| 32 |
+
## Intended uses & limitations
|
| 33 |
+
|
| 34 |
+
More information needed
|
| 35 |
+
|
| 36 |
+
## Training and evaluation data
|
| 37 |
+
|
| 38 |
+
More information needed
|
| 39 |
+
|
| 40 |
+
## Training procedure
|
| 41 |
+
|
| 42 |
+
### Training hyperparameters
|
| 43 |
+
|
| 44 |
+
The following hyperparameters were used during training:
|
| 45 |
+
- learning_rate: 5e-05
|
| 46 |
+
- train_batch_size: 16
|
| 47 |
+
- eval_batch_size: 32
|
| 48 |
+
- seed: 42
|
| 49 |
+
- gradient_accumulation_steps: 2
|
| 50 |
+
- total_train_batch_size: 32
|
| 51 |
+
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 52 |
+
- lr_scheduler_type: cosine
|
| 53 |
+
- lr_scheduler_warmup_steps: 1029
|
| 54 |
+
- num_epochs: 15
|
| 55 |
+
- mixed_precision_training: Native AMP
|
| 56 |
+
|
| 57 |
+
### Training results
|
| 58 |
+
|
| 59 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 Macro | Recall Melanoma Dermatoscopic Ham10000 | Recall Actinic Keratosis Dermatoscopic Ham10000 | Recall Basal Cell Carcinoma Dermatoscopic Ham10 |
|
| 60 |
+
|:-------------:|:-----:|:-----:|:---------------:|:--------:|:--------:|:--------------------------------------:|:-----------------------------------------------:|:-----------------------------------------------:|
|
| 61 |
+
| 2.1917 | 1.0 | 686 | 1.6544 | 0.6001 | 0.4260 | 0.7721 | 0.725 | 0.8197 |
|
| 62 |
+
| 1.8492 | 2.0 | 1372 | 1.4693 | 0.6829 | 0.5384 | 0.6029 | 0.85 | 0.8033 |
|
| 63 |
+
| 1.6261 | 3.0 | 2058 | 1.3676 | 0.7268 | 0.6032 | 0.3676 | 0.85 | 0.8852 |
|
| 64 |
+
| 1.5171 | 4.0 | 2744 | 1.3227 | 0.7387 | 0.6489 | 0.8897 | 0.875 | 0.8689 |
|
| 65 |
+
| 1.3606 | 5.0 | 3430 | 1.2689 | 0.7633 | 0.6737 | 0.8603 | 0.9 | 0.9016 |
|
| 66 |
+
| 1.2200 | 6.0 | 4116 | 1.2079 | 0.7925 | 0.7014 | 0.7353 | 0.95 | 0.9016 |
|
| 67 |
+
| 1.2422 | 7.0 | 4802 | 1.2236 | 0.7961 | 0.7105 | 0.8456 | 0.875 | 0.9180 |
|
| 68 |
+
| 1.1893 | 8.0 | 5488 | 1.1745 | 0.8142 | 0.7310 | 0.8015 | 0.9 | 0.8852 |
|
| 69 |
+
| 1.1331 | 9.0 | 6174 | 1.1716 | 0.8150 | 0.7293 | 0.8456 | 0.925 | 0.9180 |
|
| 70 |
+
| 1.1910 | 10.0 | 6860 | 1.1494 | 0.8187 | 0.7302 | 0.8309 | 0.85 | 0.9344 |
|
| 71 |
+
| 0.9840 | 11.0 | 7546 | 1.1422 | 0.8257 | 0.7407 | 0.8824 | 0.875 | 0.9180 |
|
| 72 |
+
| 1.1288 | 12.0 | 8232 | 1.1372 | 0.8244 | 0.7379 | 0.8088 | 0.9 | 0.9180 |
|
| 73 |
+
| 1.1447 | 13.0 | 8918 | 1.1349 | 0.8261 | 0.7446 | 0.8015 | 0.925 | 0.9180 |
|
| 74 |
+
| 1.1192 | 14.0 | 9604 | 1.1318 | 0.8277 | 0.7471 | 0.8235 | 0.95 | 0.9180 |
|
| 75 |
+
| 1.1806 | 15.0 | 10290 | 1.1312 | 0.8277 | 0.7471 | 0.8088 | 0.925 | 0.9180 |
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
### Framework versions
|
| 79 |
+
|
| 80 |
+
- Transformers 5.23.0
|
| 81 |
+
- Pytorch 2.14.1+cu130
|
| 82 |
+
- Datasets 5.2.0
|
| 83 |
+
- Tokenizers 0.23.3
|
config.json
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"ConvNextForImageClassification"
|
| 4 |
+
],
|
| 5 |
+
"depths": [
|
| 6 |
+
3,
|
| 7 |
+
3,
|
| 8 |
+
27,
|
| 9 |
+
3
|
| 10 |
+
],
|
| 11 |
+
"drop_path_rate": 0.2,
|
| 12 |
+
"dtype": "float32",
|
| 13 |
+
"hidden_act": "gelu",
|
| 14 |
+
"hidden_sizes": [
|
| 15 |
+
128,
|
| 16 |
+
256,
|
| 17 |
+
512,
|
| 18 |
+
1024
|
| 19 |
+
],
|
| 20 |
+
"id2label": {
|
| 21 |
+
"0": "Acne and Rosacea Photos",
|
| 22 |
+
"1": "Atopic Dermatitis Photos",
|
| 23 |
+
"2": "Bullous Disease Photos",
|
| 24 |
+
"3": "Cellulitis Impetigo and other Bacterial Infections",
|
| 25 |
+
"4": "Eczema Photos",
|
| 26 |
+
"5": "Exanthems and Drug Eruptions",
|
| 27 |
+
"6": "Hair Loss Photos Alopecia and other Hair Diseases",
|
| 28 |
+
"7": "Herpes HPV and other STDs Photos",
|
| 29 |
+
"8": "Light Diseases and Disorders of Pigmentation",
|
| 30 |
+
"9": "Lupus and other Connective Tissue diseases",
|
| 31 |
+
"10": "Nail Fungus and other Nail Disease",
|
| 32 |
+
"11": "Poison Ivy Photos and other Contact Dermatitis",
|
| 33 |
+
"12": "Psoriasis pictures Lichen Planus and related diseases",
|
| 34 |
+
"13": "Scabies Lyme Disease and other Infestations and Bites",
|
| 35 |
+
"14": "Seborrheic Keratoses and other Benign Tumors",
|
| 36 |
+
"15": "Systemic Disease",
|
| 37 |
+
"16": "Tinea Ringworm Candidiasis and other Fungal Infections",
|
| 38 |
+
"17": "Urticaria Hives",
|
| 39 |
+
"18": "Vascular Tumors",
|
| 40 |
+
"19": "Vasculitis Photos",
|
| 41 |
+
"20": "Warts Molluscum and other Viral Infections",
|
| 42 |
+
"21": "Melanoma (dermatoscopic, HAM10000)",
|
| 43 |
+
"22": "Melanocytic Nevi (dermatoscopic, HAM10000)",
|
| 44 |
+
"23": "Actinic Keratosis (dermatoscopic, HAM10000)",
|
| 45 |
+
"24": "Basal Cell Carcinoma (dermatoscopic, HAM10000)"
|
| 46 |
+
},
|
| 47 |
+
"image_size": 224,
|
| 48 |
+
"initializer_range": 0.02,
|
| 49 |
+
"label2id": {
|
| 50 |
+
"Acne and Rosacea Photos": 0,
|
| 51 |
+
"Actinic Keratosis (dermatoscopic, HAM10000)": 23,
|
| 52 |
+
"Atopic Dermatitis Photos": 1,
|
| 53 |
+
"Basal Cell Carcinoma (dermatoscopic, HAM10000)": 24,
|
| 54 |
+
"Bullous Disease Photos": 2,
|
| 55 |
+
"Cellulitis Impetigo and other Bacterial Infections": 3,
|
| 56 |
+
"Eczema Photos": 4,
|
| 57 |
+
"Exanthems and Drug Eruptions": 5,
|
| 58 |
+
"Hair Loss Photos Alopecia and other Hair Diseases": 6,
|
| 59 |
+
"Herpes HPV and other STDs Photos": 7,
|
| 60 |
+
"Light Diseases and Disorders of Pigmentation": 8,
|
| 61 |
+
"Lupus and other Connective Tissue diseases": 9,
|
| 62 |
+
"Melanocytic Nevi (dermatoscopic, HAM10000)": 22,
|
| 63 |
+
"Melanoma (dermatoscopic, HAM10000)": 21,
|
| 64 |
+
"Nail Fungus and other Nail Disease": 10,
|
| 65 |
+
"Poison Ivy Photos and other Contact Dermatitis": 11,
|
| 66 |
+
"Psoriasis pictures Lichen Planus and related diseases": 12,
|
| 67 |
+
"Scabies Lyme Disease and other Infestations and Bites": 13,
|
| 68 |
+
"Seborrheic Keratoses and other Benign Tumors": 14,
|
| 69 |
+
"Systemic Disease": 15,
|
| 70 |
+
"Tinea Ringworm Candidiasis and other Fungal Infections": 16,
|
| 71 |
+
"Urticaria Hives": 17,
|
| 72 |
+
"Vascular Tumors": 18,
|
| 73 |
+
"Vasculitis Photos": 19,
|
| 74 |
+
"Warts Molluscum and other Viral Infections": 20
|
| 75 |
+
},
|
| 76 |
+
"layer_norm_eps": 1e-12,
|
| 77 |
+
"layer_scale_init_value": 1e-06,
|
| 78 |
+
"model_type": "convnext",
|
| 79 |
+
"num_channels": 3,
|
| 80 |
+
"num_stages": 4,
|
| 81 |
+
"out_features": [
|
| 82 |
+
"stage4"
|
| 83 |
+
],
|
| 84 |
+
"out_indices": [
|
| 85 |
+
4
|
| 86 |
+
],
|
| 87 |
+
"patch_size": 4,
|
| 88 |
+
"stage_names": [
|
| 89 |
+
"stem",
|
| 90 |
+
"stage1",
|
| 91 |
+
"stage2",
|
| 92 |
+
"stage3",
|
| 93 |
+
"stage4"
|
| 94 |
+
],
|
| 95 |
+
"transformers_version": "5.23.0",
|
| 96 |
+
"use_cache": false
|
| 97 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:050bac7a500294ec3749acd26c1c272ac6e51446441ad10b16660789121dfeca
|
| 3 |
+
size 350409548
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"crop_pct": 0.875,
|
| 3 |
+
"do_normalize": true,
|
| 4 |
+
"do_rescale": true,
|
| 5 |
+
"do_resize": true,
|
| 6 |
+
"image_mean": [
|
| 7 |
+
0.485,
|
| 8 |
+
0.456,
|
| 9 |
+
0.406
|
| 10 |
+
],
|
| 11 |
+
"image_processor_type": "ConvNextImageProcessor",
|
| 12 |
+
"image_std": [
|
| 13 |
+
0.229,
|
| 14 |
+
0.224,
|
| 15 |
+
0.225
|
| 16 |
+
],
|
| 17 |
+
"resample": 3,
|
| 18 |
+
"rescale_factor": 0.00392156862745098,
|
| 19 |
+
"size": {
|
| 20 |
+
"shortest_edge": 224
|
| 21 |
+
}
|
| 22 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:506decc09d9b8acc70c18c8a60740b59607972ed38aeb1668f81243b7abf1197
|
| 3 |
+
size 5329
|