Instructions to use sgonzalez2000/dermai-efficientnet-b0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sgonzalez2000/dermai-efficientnet-b0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="sgonzalez2000/dermai-efficientnet-b0") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("sgonzalez2000/dermai-efficientnet-b0") model = AutoModelForImageClassification.from_pretrained("sgonzalez2000/dermai-efficientnet-b0") - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files- README.md +14 -0
- config.json +107 -0
- model.safetensors +3 -0
- preprocessor_config.json +29 -0
README.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: google/efficientnet-b0
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
tags:
|
| 5 |
+
- image-classification
|
| 6 |
+
- skin-lesion
|
| 7 |
+
- ham10000
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# dermai-efficientnet-b0
|
| 11 |
+
|
| 12 |
+
Fine-tuned [google/efficientnet-b0](https://huggingface.co/google/efficientnet-b0) for 7-class
|
| 13 |
+
skin lesion classification on HAM10000. Part of the DermAI explainability
|
| 14 |
+
project comparing CNN and Vision Transformer explanations.
|
config.json
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"EfficientNetForImageClassification"
|
| 4 |
+
],
|
| 5 |
+
"batch_norm_eps": 0.001,
|
| 6 |
+
"batch_norm_momentum": 0.99,
|
| 7 |
+
"depth_coefficient": 1.0,
|
| 8 |
+
"depth_divisor": 8,
|
| 9 |
+
"depthwise_padding": [],
|
| 10 |
+
"drop_connect_rate": 0.2,
|
| 11 |
+
"dropout_rate": 0.2,
|
| 12 |
+
"dtype": "float32",
|
| 13 |
+
"expand_ratios": [
|
| 14 |
+
1,
|
| 15 |
+
6,
|
| 16 |
+
6,
|
| 17 |
+
6,
|
| 18 |
+
6,
|
| 19 |
+
6,
|
| 20 |
+
6
|
| 21 |
+
],
|
| 22 |
+
"hidden_act": "swish",
|
| 23 |
+
"hidden_dim": 1280,
|
| 24 |
+
"id2label": {
|
| 25 |
+
"0": "akiec",
|
| 26 |
+
"1": "bcc",
|
| 27 |
+
"2": "bkl",
|
| 28 |
+
"3": "df",
|
| 29 |
+
"4": "mel",
|
| 30 |
+
"5": "nv",
|
| 31 |
+
"6": "vasc"
|
| 32 |
+
},
|
| 33 |
+
"image_size": 224,
|
| 34 |
+
"in_channels": [
|
| 35 |
+
32,
|
| 36 |
+
16,
|
| 37 |
+
24,
|
| 38 |
+
40,
|
| 39 |
+
80,
|
| 40 |
+
112,
|
| 41 |
+
192
|
| 42 |
+
],
|
| 43 |
+
"initializer_range": 0.02,
|
| 44 |
+
"kernel_sizes": [
|
| 45 |
+
3,
|
| 46 |
+
3,
|
| 47 |
+
5,
|
| 48 |
+
3,
|
| 49 |
+
5,
|
| 50 |
+
5,
|
| 51 |
+
3
|
| 52 |
+
],
|
| 53 |
+
"label2id": {
|
| 54 |
+
"akiec": 0,
|
| 55 |
+
"bcc": 1,
|
| 56 |
+
"bkl": 2,
|
| 57 |
+
"df": 3,
|
| 58 |
+
"mel": 4,
|
| 59 |
+
"nv": 5,
|
| 60 |
+
"vasc": 6
|
| 61 |
+
},
|
| 62 |
+
"model_type": "efficientnet",
|
| 63 |
+
"num_block_repeats": [
|
| 64 |
+
1,
|
| 65 |
+
2,
|
| 66 |
+
2,
|
| 67 |
+
3,
|
| 68 |
+
3,
|
| 69 |
+
4,
|
| 70 |
+
1
|
| 71 |
+
],
|
| 72 |
+
"num_channels": 3,
|
| 73 |
+
"num_hidden_layers": 64,
|
| 74 |
+
"out_channels": [
|
| 75 |
+
16,
|
| 76 |
+
24,
|
| 77 |
+
40,
|
| 78 |
+
80,
|
| 79 |
+
112,
|
| 80 |
+
192,
|
| 81 |
+
320
|
| 82 |
+
],
|
| 83 |
+
"out_features": null,
|
| 84 |
+
"pooling_type": "mean",
|
| 85 |
+
"squeeze_expansion_ratio": 0.25,
|
| 86 |
+
"stage_names": [
|
| 87 |
+
"stem",
|
| 88 |
+
"stage1",
|
| 89 |
+
"stage2",
|
| 90 |
+
"stage3",
|
| 91 |
+
"stage4",
|
| 92 |
+
"stage5",
|
| 93 |
+
"stage6",
|
| 94 |
+
"stage7"
|
| 95 |
+
],
|
| 96 |
+
"strides": [
|
| 97 |
+
1,
|
| 98 |
+
2,
|
| 99 |
+
2,
|
| 100 |
+
2,
|
| 101 |
+
1,
|
| 102 |
+
2,
|
| 103 |
+
1
|
| 104 |
+
],
|
| 105 |
+
"transformers_version": "5.12.1",
|
| 106 |
+
"width_coefficient": 1.0
|
| 107 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:45941fb7e44ccaa2009be9c9ec01ad89fbed27e1a29eb78153bff3a481890779
|
| 3 |
+
size 16280748
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"crop_size": {
|
| 3 |
+
"height": 289,
|
| 4 |
+
"width": 289
|
| 5 |
+
},
|
| 6 |
+
"do_center_crop": false,
|
| 7 |
+
"do_normalize": true,
|
| 8 |
+
"do_rescale": true,
|
| 9 |
+
"do_resize": true,
|
| 10 |
+
"image_mean": [
|
| 11 |
+
0.485,
|
| 12 |
+
0.456,
|
| 13 |
+
0.406
|
| 14 |
+
],
|
| 15 |
+
"image_processor_type": "EfficientNetImageProcessor",
|
| 16 |
+
"image_std": [
|
| 17 |
+
0.47853944,
|
| 18 |
+
0.4732864,
|
| 19 |
+
0.47434163
|
| 20 |
+
],
|
| 21 |
+
"include_top": true,
|
| 22 |
+
"resample": 0,
|
| 23 |
+
"rescale_factor": 0.00392156862745098,
|
| 24 |
+
"rescale_offset": false,
|
| 25 |
+
"size": {
|
| 26 |
+
"height": 224,
|
| 27 |
+
"width": 224
|
| 28 |
+
}
|
| 29 |
+
}
|