brucewayne0459 commited on
Commit
4bfde6f
1 Parent(s): e27602a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +37 -123
README.md CHANGED
@@ -1,187 +1,101 @@
1
  ---
2
  license: apache-2.0
3
  ---
4
-
5
- # Model Card for Model ID
6
-
7
- <!-- Provide a quick summary of what the model is/does. -->
8
-
9
- This modelcard aims to be a base template for new models. It has been generated using [this raw template](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/templates/modelcard_template.md?plain=1).
10
 
11
  ## Model Details
12
 
13
  ### Model Description
14
 
15
- <!-- Provide a longer summary of what this model is. -->
16
-
17
 
18
 
19
  - **Developed by:** Bruce_Wayne
20
  - **Funded by [optional]:** Jhonny and koti
21
  - **Model type:** vision model
22
  - **Finetuned from model [optional]:** https://huggingface.co/google/paligemma-3b-pt-224
23
-
 
 
24
  ## Uses
25
-
26
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
27
-
28
  ### Direct Use
29
 
30
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
31
 
32
- [More Information Needed]
33
-
34
- ### Downstream Use [optional]
35
-
36
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
37
-
38
- [More Information Needed]
39
-
40
- ### Out-of-Scope Use
41
-
42
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
43
-
44
- [More Information Needed]
45
 
46
  ## Bias, Risks, and Limitations
47
 
48
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
49
-
50
- [More Information Needed]
51
-
52
- ### Recommendations
53
-
54
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
55
-
56
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
57
 
58
  ## How to Get Started with the Model
59
 
60
- Use the code below to get started with the model.
61
 
62
- [More Information Needed]
63
 
 
 
 
 
64
  ## Training Details
65
 
66
  ### Training Data
67
 
68
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
69
-
70
- [More Information Needed]
71
 
72
  ### Training Procedure
73
 
74
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
75
-
76
- #### Preprocessing [optional]
77
-
78
- [More Information Needed]
79
-
80
 
81
  #### Training Hyperparameters
82
 
83
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
 
 
 
 
84
 
85
- #### Speeds, Sizes, Times [optional]
86
-
87
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
88
-
89
- [More Information Needed]
90
 
91
  ## Evaluation
92
 
93
- <!-- This section describes the evaluation protocols and provides the results. -->
94
-
95
  ### Testing Data, Factors & Metrics
96
 
97
  #### Testing Data
98
 
99
- <!-- This should link to a Dataset Card if possible. -->
100
-
101
- [More Information Needed]
102
-
103
- #### Factors
104
-
105
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
106
-
107
- [More Information Needed]
108
 
109
  #### Metrics
110
-
111
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
112
-
113
- [More Information Needed]
114
-
115
  ### Results
116
 
117
- [More Information Needed]
118
 
119
  #### Summary
120
 
121
 
122
-
123
- ## Model Examination [optional]
124
-
125
- <!-- Relevant interpretability work for the model goes here -->
126
-
127
- [More Information Needed]
128
-
129
  ## Environmental Impact
130
 
131
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
132
-
133
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
134
 
135
- - **Hardware Type:** [More Information Needed]
136
- - **Hours used:** [More Information Needed]
137
- - **Cloud Provider:** [More Information Needed]
138
- - **Compute Region:** [More Information Needed]
139
- - **Carbon Emitted:** [More Information Needed]
140
 
141
- ## Technical Specifications [optional]
142
 
143
  ### Model Architecture and Objective
144
 
145
- [More Information Needed]
 
146
 
147
  ### Compute Infrastructure
148
 
149
- [More Information Needed]
150
-
151
  #### Hardware
152
 
153
- [More Information Needed]
154
-
155
- #### Software
156
-
157
- [More Information Needed]
158
-
159
- ## Citation [optional]
160
-
161
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
162
-
163
- **BibTeX:**
164
-
165
- [More Information Needed]
166
-
167
- **APA:**
168
-
169
- [More Information Needed]
170
-
171
- ## Glossary [optional]
172
-
173
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
174
-
175
- [More Information Needed]
176
-
177
- ## More Information [optional]
178
-
179
- [More Information Needed]
180
-
181
- ## Model Card Authors [optional]
182
-
183
- [More Information Needed]
184
-
185
- ## Model Card Contact
186
-
187
- [More Information Needed]
 
1
  ---
2
  license: apache-2.0
3
  ---
4
+ # Model Card for PaliGemma Dermatology Model
 
 
 
 
 
5
 
6
  ## Model Details
7
 
8
  ### Model Description
9
 
10
+ This model, based on the PaliGemma-3B architecture, has been fine-tuned for dermatology-related image and text processing tasks. The model is designed to assist in the identification of various skin conditions using a combination of image analysis and natural language processing.
 
11
 
12
 
13
  - **Developed by:** Bruce_Wayne
14
  - **Funded by [optional]:** Jhonny and koti
15
  - **Model type:** vision model
16
  - **Finetuned from model [optional]:** https://huggingface.co/google/paligemma-3b-pt-224
17
+ - **LoRa Adaptors used:** Yes
18
+ - **Intended use:** Medical image analysis, specifically for dermatology
19
+ **
20
  ## Uses
 
 
 
21
  ### Direct Use
22
 
23
+ The model can be directly used for analyzing dermatology images, providing insights into potential skin conditions.
24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
 
26
  ## Bias, Risks, and Limitations
27
 
28
+ **Skin Tone Bias:** The model may have been trained on a dataset that does not adequately represent all skin tones, potentially leading to biased results.
29
+ **Geographic Bias:** The model's performance may vary depending on the prevalence of certain conditions in different geographic regions.
 
 
 
 
 
 
 
30
 
31
  ## How to Get Started with the Model
32
 
33
+ ** python
34
 
35
+ from transformers import AutoProcessor, PaliGemmaForConditionalGeneration
36
 
37
+ model_id = "brucewayne0459/paligemma_derm"
38
+ processor = AutoProcessor.from_pretrained(model_id)
39
+ model = PaliGemmaForConditionalGeneration.from_pretrained(model_id)
40
+ **
41
  ## Training Details
42
 
43
  ### Training Data
44
 
45
+ The model was fine-tuned on a dataset of dermatological images combined with disease names
 
 
46
 
47
  ### Training Procedure
48
 
49
+ The model was fine-tuned using LoRA (Low-Rank Adaptation) for more efficient training. Mixed precision (bfloat16) was used to speed up training and reduce memory usage.
 
 
 
 
 
50
 
51
  #### Training Hyperparameters
52
 
53
+ - **Training regime:** Mixed precision (bfloat16)
54
+ - **Epochs:** 10
55
+ - **Learning rate:** 2e-5
56
+ - **Batch size:** 6
57
+ - **Gradient accumulation steps:** 4
58
 
 
 
 
 
 
59
 
60
  ## Evaluation
61
 
 
 
62
  ### Testing Data, Factors & Metrics
63
 
64
  #### Testing Data
65
 
66
+ The model was evaluated on a separate validation set of dermatological images and Disease Names, distinct from the training data.
 
 
 
 
 
 
 
 
67
 
68
  #### Metrics
69
+ - **Validation Loss:** The loss was tracked throughout the training process to evaluate model performance.
70
+ - **Accuracy:** The primary metric for assessing model predictions.
 
 
 
71
  ### Results
72
 
73
+ The model achieved a final validation loss of approximately 0.2214, indicating reasonable performance in predicting skin conditions based on the dataset used.
74
 
75
  #### Summary
76
 
77
 
 
 
 
 
 
 
 
78
  ## Environmental Impact
79
 
 
 
 
80
 
81
+ - **Hardware Type:** 1 x L4 GPU
82
+ - **Hours used:** ~22 HOURS
83
+ - **Cloud Provider:** LIGHTNING AI
84
+ - **Compute Region:** USA
85
+ - **Carbon Emitted:** 0.9 kg eq. CO2
86
 
87
+ ## Technical Specifications
88
 
89
  ### Model Architecture and Objective
90
 
91
+ - **Architecture:** Vision-Language model based on PaliGemma-3B
92
+ - **Objective:** To classify and diagnose dermatological conditions from images and text
93
 
94
  ### Compute Infrastructure
95
 
 
 
96
  #### Hardware
97
 
98
+ - **GPU:** 1xL4 GPU
99
+ -
100
+ ## Model Card Authors
101
+ Bruce_Wayne