andres.salguero commited on
Commit
c4dea26
1 Parent(s): 4ca50f1
Files changed (3) hide show
  1. README.md +32 -15
  2. best_resnet50_model.bin +2 -2
  3. config.json +6 -6
README.md CHANGED
@@ -1,28 +1,45 @@
1
-
2
  ---
3
  license: mit
4
  tags:
5
  - image-classification
6
  - resnet50
 
 
7
  task:
8
  - image-classification
9
  output:
10
- - label: "Class Name"
11
- score: 0.95
12
  widget:
13
- - text: "path_to_image.jpg"
14
  output:
15
- - label: "Class Name"
16
- score: 0.95
17
  ---
18
- # Model Card for Your Model
19
 
20
- This is a pre-trained ResNet-50 model for image classification. It has been trained on [your dataset description].
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
- ## Model Usage
23
- You can use this model with the Hugging Face API as follows:
24
- ```python
25
- from transformers import pipeline
26
- classifier = pipeline("image-classification", model="username/model_name")
27
- result = classifier("path_to_image.jpg")
28
- print(result)
 
 
1
  ---
2
  license: mit
3
  tags:
4
  - image-classification
5
  - resnet50
6
+ - medical
7
+ - acne-detection
8
  task:
9
  - image-classification
10
  output:
11
+ - label: "level1"
12
+ score: 0.98
13
  widget:
14
+ - text: "example_image.jpg"
15
  output:
16
+ - label: "level3"
17
+ score: 0.85
18
  ---
 
19
 
20
+ # ResNet-50 Model for Acne Severity Classification
21
+
22
+ This is a fine-tuned ResNet-50 model designed to classify the severity of acne from medical images into five categories (Severity 1 to Severity 5). The model leverages transfer learning on ResNet-50 pre-trained on ImageNet and adapts it for acne severity classification tasks.
23
+
24
+ ## Model Details
25
+
26
+ ### Training Details
27
+ - **Framework:** PyTorch
28
+ - **Base Model:** ResNet-50 (pretrained on ImageNet)
29
+ - **Dataset:** A balanced dataset of acne images annotated with severity levels (Severity 1 to 5).
30
+ - **Preprocessing:** Images resized to 224x224 pixels, normalized using ImageNet statistics (mean: `[0.485, 0.456, 0.406]`, std: `[0.229, 0.224, 0.225]`).
31
+ - **Optimizer:** Adam with a learning rate of 0.001.
32
+ - **Loss Function:** CrossEntropyLoss.
33
+ - **Epochs:** 10.
34
+ - **Validation Accuracy:** 0.85 (on a held-out validation set).
35
+
36
+ ## Intended Use
37
+
38
+ This model is intended for educational purposes and demonstrates image classification for medical images. It should not be used for clinical decision-making without further validation.
39
+
40
+ ## Example Usage
41
+
42
+ You can use this model via the Hugging Face Transformers pipeline for inference. Ensure you have the `transformers` library installed:
43
 
44
+ ```bash
45
+ pip install transformers
 
 
 
 
 
best_resnet50_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:92c6efd57eb3544751fd948665c1fc2fded645ec4eaa829186c989fe5f882505
3
- size 94386402
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:71a9075d20e585c4182626846ac0343ae23050bbf52be62b4d393ccc41ac5b24
3
+ size 94379978
config.json CHANGED
@@ -1,7 +1,7 @@
1
  {
2
- "model_type": "resnet",
3
- "architectures": ["ResNet"],
4
- "num_labels": 4,
5
- "image_size": 224,
6
- "input_size": [3, 224, 224]
7
- }
 
1
  {
2
+ "num_labels": 4,
3
+ "model_type": "resnet",
4
+ "architectures": ["ResNetForImageClassification"],
5
+ "hidden_size": 2048,
6
+ "labels": ["level0", "level1", "level2", "level3"]
7
+ }