egrace479 commited on
Commit
d527680
·
1 Parent(s): 30a94bb

Update README.md

Browse files

Initializing model card based on supplemental information.

Files changed (1) hide show
  1. README.md +250 -0
README.md CHANGED
@@ -1,3 +1,253 @@
1
  ---
2
  license: mit
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ tags:
4
+ - biology
5
+ - fish
6
+ - images
7
+ - traits
8
+ pipeline_tag: image-segmentation
9
  ---
10
+ # Model Card for Model ID
11
+
12
+ This model takes in an image of a fish and segments out traits, as described [below](#Trait-List)
13
+
14
+ ## Model Details
15
+
16
+ `Trained_model_SM.pth` is the fish segmentation model.
17
+
18
+ `se_resnext50_32x4d-a260b3a4.pth` is a pretrained ConvNets for pytorch ResNeXt used by BGNN-trait-segmentation.
19
+ See [github.com/Cadene/pretrained-models.pytorch#resnext](https://github.com/Cadene/pretrained-models.pytorch#resnext) for documentation about the source.
20
+
21
+ The segmentation model was first trained on ImageNet ([Deng et al., 2009](10.1109/CVPR.2009.5206848)), and then the model was fine-tuned on a specific set of image data relevant to the domain: [Illinois Natural History Survey Fish Collection](https://fish.inhs.illinois.edu/) (INHS Fish).
22
+ The Feature Pyramid Network (FPN) architecture was used for fine-tuning, since it is a CNN-based architecture designed to handle multi-scale feature maps (Lin et al., 2017: [IEEE]](10.1109/CVPR.2017.106), [arXiv](arXiv:1612.03144)).
23
+ The FPN uses SE-ResNeXt as the base network (Hu et al., 2018: [IEEE](10.1109/CVPR.2018.00745), [arXiv](arXiv:1709.01507)).
24
+
25
+
26
+ ### Model Description
27
+
28
+ PyTorch implementation of Fish trait segmentation model.
29
+ This segmentation model is based on pretrained model using the [segementation models torch](https://github.com/qubvel/segmentation_models.pytorch).
30
+ Then the model is fine tuned on fish images in order to identify (segment) the different traits.
31
+
32
+ #### Trait list:
33
+ ```
34
+ background
35
+ dorsal_fin
36
+ adipos_fin
37
+ caudal_fin
38
+ anal_fin
39
+ pelvic_fin
40
+ pectoral_fin
41
+ head
42
+ eye
43
+ caudal_fin_ray
44
+ alt_fin_ray
45
+ trunk
46
+ ```
47
+
48
+
49
+ - **Developed by:** M. Maruf and Anuj Karpatne
50
+ - **Shared by [optional]:** [More Information Needed]
51
+ - **Model type:** [More Information Needed]
52
+ - **Language(s) (NLP):** [More Information Needed]
53
+ - **License:** [More Information Needed]
54
+ - **Finetuned from model [optional]:** [More Information Needed]
55
+
56
+ ### Model Sources [optional]
57
+
58
+ <!-- Provide the basic links for the model. -->
59
+
60
+ - **Repository:** [BGNN-trait-segmentation](https://github.com/hdr-bgnn/BGNN-trait-segmentation)
61
+ - **Paper [optional]:** [More Information Needed]
62
+ - **Demo [optional]:** [More Information Needed]
63
+
64
+ ## Uses
65
+
66
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
67
+
68
+ ### Direct Use
69
+
70
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
71
+
72
+ [More Information Needed]
73
+
74
+ ### Downstream Use [optional]
75
+
76
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
77
+
78
+ [More Information Needed]
79
+
80
+ ### Out-of-Scope Use
81
+
82
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
83
+
84
+ [More Information Needed]
85
+
86
+ ## Bias, Risks, and Limitations
87
+
88
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
89
+
90
+ [More Information Needed]
91
+
92
+ ### Recommendations
93
+
94
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
95
+
96
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
97
+
98
+ ## How to Get Started with the Model
99
+
100
+ <!--Use the code below to get started with the model.-->
101
+
102
+ See instructions for use [here](https://github.com/hdr-bgnn/BGNN-trait-segmentation/blob/main/Segment_mini/README.md)
103
+
104
+ ## Training Details
105
+
106
+ The image data were annotated using [SlicerMorph](https://slicermorph.github.io/) (Rolfe et al., 2021) by collaborators W. Dahdul and K. Diamond.
107
+
108
+ ### Training Data
109
+
110
+ <!-- This should link to a Data 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. -->
111
+
112
+ <!--We only have 295 training images, 99 testing images, and 98 validation images. -->
113
+ To increase the size and diversity of the training dataset (originally 295 images), we employed data augmentation techniques such as flipping, shifting, rotating, scaling, and adding noise to the original image data to increase the dataset 10-fold.
114
+ We developed 12 target classes, or trait masks, for our segmentation problem, each representing different morphological traits of a fish specimen.
115
+ The segmentation classes are: dorsal fin, adipose fin, caudal fin, anal fin, pelvic fin, pectoral fin, head minus the eye, eye, caudal fin-ray, alt fin-ray, alt fin-spine, and trunk.
116
+ Although minnows do not have adipose fins, the segmentation model was trained on a variety of fish image data, some of which had adipose fins.
117
+ We retained this class because the segmentation model may erroneously assign an adipose fin to a minnow (Fig. S1), and a domain scientist examining these outputs may want to analyze the accuracy of the model.
118
+
119
+
120
+ ### Training Procedure
121
+
122
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
123
+
124
+ We prepared the model by using the [Segmentation Model PyTorch library](https://segmentation-modelspytorch.readthedocs.io/en/latest/) (Iakubovskii, 2019) to load an FPN segmentation model that was pretrained on the Imagenet dataset.
125
+ We used SE-ResNeXt as the base network/encoder to extract features (embedding) from the input image data and replaced the last decoder layer with 12 target classes.
126
+ During the fine-tuning procedure, the encoder of the pre-trained model was frozen as these layers already contain useful features that we can leverage.
127
+ We only tuned the decoder weights of our segmentation model during this fine-tuning procedure.
128
+
129
+ We then trained the prepared model for 120 epochs, updating the weights using dice loss as a measure of similarity between the predicted and ground-truth segmentation.
130
+ The Adam optimizer (Kingma & Ba, 2014) with a small learning rate (1e-4) was used to update the model weights.
131
+
132
+
133
+ #### Preprocessing [optional]
134
+
135
+ [More Information Needed]
136
+
137
+
138
+ #### Training Hyperparameters
139
+
140
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
141
+
142
+ #### Speeds, Sizes, Times [optional]
143
+
144
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
145
+
146
+ [More Information Needed]
147
+
148
+ ## Evaluation
149
+
150
+ <!-- This section describes the evaluation protocols and provides the results. -->
151
+ We evaluated the performance of the fine-tuned segmentation model on the test set using the Intersection over Union (IoU) score with a 0.5 threshold.
152
+ (The IoU score ranges from 0 to 1, with 1 indicating a perfect overlap between the predicted segmentation and the ground-truth segmentation and 0 indicating no overlap.)
153
+ Our segmentation model achieved a 0.90 mIoU score on the test dataset.
154
+
155
+ ### Testing Data, Factors & Metrics
156
+
157
+ We had 99 testing images and 98 validation images.
158
+
159
+ #### Testing Data
160
+
161
+ <!-- This should link to a Data Card if possible. -->
162
+
163
+ [More Information Needed]
164
+
165
+ #### Factors
166
+
167
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
168
+
169
+ [More Information Needed]
170
+
171
+ #### Metrics
172
+
173
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
174
+
175
+ [More Information Needed]
176
+
177
+ ### Results
178
+
179
+ [More Information Needed]
180
+
181
+
182
+
183
+ #### Summary
184
+
185
+
186
+
187
+ ## Model Examination [optional]
188
+
189
+ <!-- Relevant interpretability work for the model goes here -->
190
+
191
+ [More Information Needed]
192
+
193
+ ## Environmental Impact
194
+
195
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
196
+
197
+ 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).
198
+
199
+ - **Hardware Type:** [More Information Needed]
200
+ - **Hours used:** [More Information Needed]
201
+ - **Cloud Provider:** [More Information Needed]
202
+ - **Compute Region:** [More Information Needed]
203
+ - **Carbon Emitted:** [More Information Needed]
204
+
205
+ ## Technical Specifications [optional]
206
+
207
+ ### Model Architecture and Objective
208
+
209
+ [More Information Needed]
210
+
211
+ ### Compute Infrastructure
212
+
213
+ [More Information Needed]
214
+
215
+ #### Hardware
216
+
217
+ [More Information Needed]
218
+
219
+ #### Software
220
+
221
+ [More Information Needed]
222
+
223
+ ## Citation [optional]
224
+
225
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
226
+
227
+ **BibTeX:**
228
+
229
+ [More Information Needed]
230
+
231
+ **APA:**
232
+
233
+ [More Information Needed]
234
+
235
+ ## Glossary [optional]
236
+
237
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
238
+
239
+ [More Information Needed]
240
+
241
+ ## More Information [optional]
242
+
243
+ [More Information Needed]
244
+
245
+ ## Model Card Authors [optional]
246
+
247
+ [More Information Needed]
248
+
249
+ ## Model Card Contact
250
+
251
+ [More Information Needed]
252
+
253
+