model
Browse files- Enet-ep19-val0.210.pth +3 -0
- LICENSE +21 -0
- README.md +10 -195
- README_template.md +199 -0
- enet-colab.ipynb +0 -0
- enet-kaggle.ipynb +937 -0
- kaggle_submission.csv +0 -0
Enet-ep19-val0.210.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:93d59e12f99d900c4b99fdcccc682f1b89e9175c1342c38884e3aa778397c155
|
3 |
+
size 243581695
|
LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
MIT License
|
2 |
+
|
3 |
+
Copyright (c) 2022 Belle
|
4 |
+
|
5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6 |
+
of this software and associated documentation files (the "Software"), to deal
|
7 |
+
in the Software without restriction, including without limitation the rights
|
8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9 |
+
copies of the Software, and to permit persons to whom the Software is
|
10 |
+
furnished to do so, subject to the following conditions:
|
11 |
+
|
12 |
+
The above copyright notice and this permission notice shall be included in all
|
13 |
+
copies or substantial portions of the Software.
|
14 |
+
|
15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21 |
+
SOFTWARE.
|
README.md
CHANGED
@@ -1,199 +1,14 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
---
|
4 |
|
5 |
-
|
6 |
|
7 |
-
|
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:** [More Information Needed]
|
20 |
-
- **Shared by [optional]:** [More Information Needed]
|
21 |
-
- **Model type:** [More Information Needed]
|
22 |
-
- **Language(s) (NLP):** [More Information Needed]
|
23 |
-
- **License:** [More Information Needed]
|
24 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
25 |
-
|
26 |
-
### Model Sources [optional]
|
27 |
-
|
28 |
-
<!-- Provide the basic links for the model. -->
|
29 |
-
|
30 |
-
- **Repository:** [More Information Needed]
|
31 |
-
- **Paper [optional]:** [More Information Needed]
|
32 |
-
- **Demo [optional]:** [More Information Needed]
|
33 |
-
|
34 |
-
## Uses
|
35 |
-
|
36 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
37 |
-
|
38 |
-
### Direct Use
|
39 |
-
|
40 |
-
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
41 |
-
|
42 |
-
[More Information Needed]
|
43 |
-
|
44 |
-
### Downstream Use [optional]
|
45 |
-
|
46 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
47 |
-
|
48 |
-
[More Information Needed]
|
49 |
-
|
50 |
-
### Out-of-Scope Use
|
51 |
-
|
52 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
53 |
-
|
54 |
-
[More Information Needed]
|
55 |
-
|
56 |
-
## Bias, Risks, and Limitations
|
57 |
-
|
58 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
59 |
-
|
60 |
-
[More Information Needed]
|
61 |
-
|
62 |
-
### Recommendations
|
63 |
-
|
64 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
65 |
-
|
66 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
67 |
-
|
68 |
-
## How to Get Started with the Model
|
69 |
-
|
70 |
-
Use the code below to get started with the model.
|
71 |
-
|
72 |
-
[More Information Needed]
|
73 |
-
|
74 |
-
## Training Details
|
75 |
-
|
76 |
-
### Training Data
|
77 |
-
|
78 |
-
<!-- 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. -->
|
79 |
-
|
80 |
-
[More Information Needed]
|
81 |
-
|
82 |
-
### Training Procedure
|
83 |
-
|
84 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
85 |
-
|
86 |
-
#### Preprocessing [optional]
|
87 |
-
|
88 |
-
[More Information Needed]
|
89 |
-
|
90 |
-
|
91 |
-
#### Training Hyperparameters
|
92 |
-
|
93 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
94 |
-
|
95 |
-
#### Speeds, Sizes, Times [optional]
|
96 |
-
|
97 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
98 |
-
|
99 |
-
[More Information Needed]
|
100 |
-
|
101 |
-
## Evaluation
|
102 |
-
|
103 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
104 |
-
|
105 |
-
### Testing Data, Factors & Metrics
|
106 |
-
|
107 |
-
#### Testing Data
|
108 |
-
|
109 |
-
<!-- This should link to a Data Card if possible. -->
|
110 |
-
|
111 |
-
[More Information Needed]
|
112 |
-
|
113 |
-
#### Factors
|
114 |
-
|
115 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
116 |
-
|
117 |
-
[More Information Needed]
|
118 |
-
|
119 |
-
#### Metrics
|
120 |
-
|
121 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
122 |
-
|
123 |
-
[More Information Needed]
|
124 |
-
|
125 |
-
### Results
|
126 |
-
|
127 |
-
[More Information Needed]
|
128 |
-
|
129 |
-
#### Summary
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
## Model Examination [optional]
|
134 |
-
|
135 |
-
<!-- Relevant interpretability work for the model goes here -->
|
136 |
-
|
137 |
-
[More Information Needed]
|
138 |
-
|
139 |
-
## Environmental Impact
|
140 |
-
|
141 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
142 |
-
|
143 |
-
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).
|
144 |
-
|
145 |
-
- **Hardware Type:** [More Information Needed]
|
146 |
-
- **Hours used:** [More Information Needed]
|
147 |
-
- **Cloud Provider:** [More Information Needed]
|
148 |
-
- **Compute Region:** [More Information Needed]
|
149 |
-
- **Carbon Emitted:** [More Information Needed]
|
150 |
-
|
151 |
-
## Technical Specifications [optional]
|
152 |
-
|
153 |
-
### Model Architecture and Objective
|
154 |
-
|
155 |
-
[More Information Needed]
|
156 |
-
|
157 |
-
### Compute Infrastructure
|
158 |
-
|
159 |
-
[More Information Needed]
|
160 |
-
|
161 |
-
#### Hardware
|
162 |
-
|
163 |
-
[More Information Needed]
|
164 |
-
|
165 |
-
#### Software
|
166 |
-
|
167 |
-
[More Information Needed]
|
168 |
-
|
169 |
-
## Citation [optional]
|
170 |
-
|
171 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
172 |
-
|
173 |
-
**BibTeX:**
|
174 |
-
|
175 |
-
[More Information Needed]
|
176 |
-
|
177 |
-
**APA:**
|
178 |
-
|
179 |
-
[More Information Needed]
|
180 |
-
|
181 |
-
## Glossary [optional]
|
182 |
-
|
183 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
184 |
-
|
185 |
-
[More Information Needed]
|
186 |
-
|
187 |
-
## More Information [optional]
|
188 |
-
|
189 |
-
[More Information Needed]
|
190 |
-
|
191 |
-
## Model Card Authors [optional]
|
192 |
-
|
193 |
-
[More Information Needed]
|
194 |
-
|
195 |
-
## Model Card Contact
|
196 |
-
|
197 |
-
[More Information Needed]
|
198 |
|
|
|
|
|
199 |
|
|
|
|
|
|
|
|
|
|
1 |
+
# Multi-Label classification using Chest X-rays
|
2 |
+
Using dataset from [Kaggle](https://www.kaggle.com/competitions/ranzcr-clip-catheter-line-classification/overview)
|
|
|
3 |
|
4 |
+
First attempt at Pytorch
|
5 |
|
6 |
+
At first, tried running on Kaggle GPU100 - very slow
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
+
* Kaggle notebook [](https://colab.research.google.com/github/yxmauw/cxr-multilabel-clf/blob/main/enet-kaggle.ipynb)
|
9 |
+
* Google colab notebook [](https://colab.research.google.com/github/yxmauw/cxr-multilabel-clf/blob/main/enet-colab.ipynb)
|
10 |
|
11 |
+
## References:
|
12 |
+
1. [Debugger cafe](https://debuggercafe.com/multi-label-image-classification-with-pytorch-and-deep-learning/)
|
13 |
+
1. [StackOverflow](https://stackoverflow.com/questions/71404067/using-more-than-1-metric-in-pytorch)
|
14 |
+
1. [Debugger cafe - model checkpoints](https://debuggercafe.com/saving-and-loading-the-best-model-in-pytorch/)
|
README_template.md
ADDED
@@ -0,0 +1,199 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
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:** [More Information Needed]
|
20 |
+
- **Shared by [optional]:** [More Information Needed]
|
21 |
+
- **Model type:** [More Information Needed]
|
22 |
+
- **Language(s) (NLP):** [More Information Needed]
|
23 |
+
- **License:** [More Information Needed]
|
24 |
+
- **Finetuned from model [optional]:** [More Information Needed]
|
25 |
+
|
26 |
+
### Model Sources [optional]
|
27 |
+
|
28 |
+
<!-- Provide the basic links for the model. -->
|
29 |
+
|
30 |
+
- **Repository:** [More Information Needed]
|
31 |
+
- **Paper [optional]:** [More Information Needed]
|
32 |
+
- **Demo [optional]:** [More Information Needed]
|
33 |
+
|
34 |
+
## Uses
|
35 |
+
|
36 |
+
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
37 |
+
|
38 |
+
### Direct Use
|
39 |
+
|
40 |
+
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
41 |
+
|
42 |
+
[More Information Needed]
|
43 |
+
|
44 |
+
### Downstream Use [optional]
|
45 |
+
|
46 |
+
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
47 |
+
|
48 |
+
[More Information Needed]
|
49 |
+
|
50 |
+
### Out-of-Scope Use
|
51 |
+
|
52 |
+
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
53 |
+
|
54 |
+
[More Information Needed]
|
55 |
+
|
56 |
+
## Bias, Risks, and Limitations
|
57 |
+
|
58 |
+
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
59 |
+
|
60 |
+
[More Information Needed]
|
61 |
+
|
62 |
+
### Recommendations
|
63 |
+
|
64 |
+
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
65 |
+
|
66 |
+
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
67 |
+
|
68 |
+
## How to Get Started with the Model
|
69 |
+
|
70 |
+
Use the code below to get started with the model.
|
71 |
+
|
72 |
+
[More Information Needed]
|
73 |
+
|
74 |
+
## Training Details
|
75 |
+
|
76 |
+
### Training Data
|
77 |
+
|
78 |
+
<!-- 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. -->
|
79 |
+
|
80 |
+
[More Information Needed]
|
81 |
+
|
82 |
+
### Training Procedure
|
83 |
+
|
84 |
+
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
85 |
+
|
86 |
+
#### Preprocessing [optional]
|
87 |
+
|
88 |
+
[More Information Needed]
|
89 |
+
|
90 |
+
|
91 |
+
#### Training Hyperparameters
|
92 |
+
|
93 |
+
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
94 |
+
|
95 |
+
#### Speeds, Sizes, Times [optional]
|
96 |
+
|
97 |
+
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
98 |
+
|
99 |
+
[More Information Needed]
|
100 |
+
|
101 |
+
## Evaluation
|
102 |
+
|
103 |
+
<!-- This section describes the evaluation protocols and provides the results. -->
|
104 |
+
|
105 |
+
### Testing Data, Factors & Metrics
|
106 |
+
|
107 |
+
#### Testing Data
|
108 |
+
|
109 |
+
<!-- This should link to a Data Card if possible. -->
|
110 |
+
|
111 |
+
[More Information Needed]
|
112 |
+
|
113 |
+
#### Factors
|
114 |
+
|
115 |
+
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
116 |
+
|
117 |
+
[More Information Needed]
|
118 |
+
|
119 |
+
#### Metrics
|
120 |
+
|
121 |
+
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
122 |
+
|
123 |
+
[More Information Needed]
|
124 |
+
|
125 |
+
### Results
|
126 |
+
|
127 |
+
[More Information Needed]
|
128 |
+
|
129 |
+
#### Summary
|
130 |
+
|
131 |
+
|
132 |
+
|
133 |
+
## Model Examination [optional]
|
134 |
+
|
135 |
+
<!-- Relevant interpretability work for the model goes here -->
|
136 |
+
|
137 |
+
[More Information Needed]
|
138 |
+
|
139 |
+
## Environmental Impact
|
140 |
+
|
141 |
+
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
142 |
+
|
143 |
+
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).
|
144 |
+
|
145 |
+
- **Hardware Type:** [More Information Needed]
|
146 |
+
- **Hours used:** [More Information Needed]
|
147 |
+
- **Cloud Provider:** [More Information Needed]
|
148 |
+
- **Compute Region:** [More Information Needed]
|
149 |
+
- **Carbon Emitted:** [More Information Needed]
|
150 |
+
|
151 |
+
## Technical Specifications [optional]
|
152 |
+
|
153 |
+
### Model Architecture and Objective
|
154 |
+
|
155 |
+
[More Information Needed]
|
156 |
+
|
157 |
+
### Compute Infrastructure
|
158 |
+
|
159 |
+
[More Information Needed]
|
160 |
+
|
161 |
+
#### Hardware
|
162 |
+
|
163 |
+
[More Information Needed]
|
164 |
+
|
165 |
+
#### Software
|
166 |
+
|
167 |
+
[More Information Needed]
|
168 |
+
|
169 |
+
## Citation [optional]
|
170 |
+
|
171 |
+
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
172 |
+
|
173 |
+
**BibTeX:**
|
174 |
+
|
175 |
+
[More Information Needed]
|
176 |
+
|
177 |
+
**APA:**
|
178 |
+
|
179 |
+
[More Information Needed]
|
180 |
+
|
181 |
+
## Glossary [optional]
|
182 |
+
|
183 |
+
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
184 |
+
|
185 |
+
[More Information Needed]
|
186 |
+
|
187 |
+
## More Information [optional]
|
188 |
+
|
189 |
+
[More Information Needed]
|
190 |
+
|
191 |
+
## Model Card Authors [optional]
|
192 |
+
|
193 |
+
[More Information Needed]
|
194 |
+
|
195 |
+
## Model Card Contact
|
196 |
+
|
197 |
+
[More Information Needed]
|
198 |
+
|
199 |
+
|
enet-colab.ipynb
ADDED
The diff for this file is too large to render.
See raw diff
|
|
enet-kaggle.ipynb
ADDED
@@ -0,0 +1,937 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"metadata": {
|
3 |
+
"kernelspec": {
|
4 |
+
"language": "python",
|
5 |
+
"display_name": "Python 3",
|
6 |
+
"name": "python3"
|
7 |
+
},
|
8 |
+
"language_info": {
|
9 |
+
"name": "python",
|
10 |
+
"version": "3.7.12",
|
11 |
+
"mimetype": "text/x-python",
|
12 |
+
"codemirror_mode": {
|
13 |
+
"name": "ipython",
|
14 |
+
"version": 3
|
15 |
+
},
|
16 |
+
"pygments_lexer": "ipython3",
|
17 |
+
"nbconvert_exporter": "python",
|
18 |
+
"file_extension": ".py"
|
19 |
+
},
|
20 |
+
"colab": {
|
21 |
+
"provenance": [],
|
22 |
+
"include_colab_link": true
|
23 |
+
}
|
24 |
+
},
|
25 |
+
"nbformat_minor": 0,
|
26 |
+
"nbformat": 4,
|
27 |
+
"cells": [
|
28 |
+
{
|
29 |
+
"cell_type": "markdown",
|
30 |
+
"metadata": {
|
31 |
+
"id": "view-in-github",
|
32 |
+
"colab_type": "text"
|
33 |
+
},
|
34 |
+
"source": [
|
35 |
+
"<a href=\"https://colab.research.google.com/github/yxmauw/cxr-multilabel-clf/blob/main/enet-kaggle.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
|
36 |
+
]
|
37 |
+
},
|
38 |
+
{
|
39 |
+
"cell_type": "code",
|
40 |
+
"source": [
|
41 |
+
"# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n",
|
42 |
+
"# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session\n",
|
43 |
+
"\n",
|
44 |
+
"import numpy as np \n",
|
45 |
+
"import pandas as pd "
|
46 |
+
],
|
47 |
+
"metadata": {
|
48 |
+
"_uuid": "8f2839f25d086af736a60e9eeb907d3b93b6e0e5",
|
49 |
+
"_cell_guid": "b1076dfc-b9ad-4769-8c92-a6c4dae69d19",
|
50 |
+
"execution": {
|
51 |
+
"iopub.status.busy": "2022-10-28T02:46:40.023210Z",
|
52 |
+
"iopub.execute_input": "2022-10-28T02:46:40.024111Z",
|
53 |
+
"iopub.status.idle": "2022-10-28T02:46:40.047013Z",
|
54 |
+
"shell.execute_reply.started": "2022-10-28T02:46:40.024018Z",
|
55 |
+
"shell.execute_reply": "2022-10-28T02:46:40.046119Z"
|
56 |
+
},
|
57 |
+
"trusted": true,
|
58 |
+
"id": "V06UUnQa1Cjt"
|
59 |
+
},
|
60 |
+
"execution_count": null,
|
61 |
+
"outputs": []
|
62 |
+
},
|
63 |
+
{
|
64 |
+
"cell_type": "code",
|
65 |
+
"source": [
|
66 |
+
"train_df = pd.read_csv('../input/ranzcr-clip-catheter-line-classification/train.csv')\n",
|
67 |
+
"display(len(train_df))\n",
|
68 |
+
"display(train_df.head(3))\n",
|
69 |
+
"train_annot_df = pd.read_csv('../input/ranzcr-clip-catheter-line-classification/train_annotations.csv')\n",
|
70 |
+
"display(len(train_annot_df))\n",
|
71 |
+
"display(train_annot_df.head(3))"
|
72 |
+
],
|
73 |
+
"metadata": {
|
74 |
+
"execution": {
|
75 |
+
"iopub.status.busy": "2022-10-28T02:46:44.475857Z",
|
76 |
+
"iopub.execute_input": "2022-10-28T02:46:44.476564Z",
|
77 |
+
"iopub.status.idle": "2022-10-28T02:46:44.724851Z",
|
78 |
+
"shell.execute_reply.started": "2022-10-28T02:46:44.476517Z",
|
79 |
+
"shell.execute_reply": "2022-10-28T02:46:44.723861Z"
|
80 |
+
},
|
81 |
+
"trusted": true,
|
82 |
+
"id": "McQ0e-rw1Cjv",
|
83 |
+
"outputId": "c0aa2a6f-d842-4a3d-fb22-3b6ae1470b5f"
|
84 |
+
},
|
85 |
+
"execution_count": null,
|
86 |
+
"outputs": [
|
87 |
+
{
|
88 |
+
"output_type": "display_data",
|
89 |
+
"data": {
|
90 |
+
"text/plain": "30083"
|
91 |
+
},
|
92 |
+
"metadata": {}
|
93 |
+
},
|
94 |
+
{
|
95 |
+
"output_type": "display_data",
|
96 |
+
"data": {
|
97 |
+
"text/plain": " StudyInstanceUID ETT - Abnormal \\\n0 1.2.826.0.1.3680043.8.498.26697628953273228189... 0 \n1 1.2.826.0.1.3680043.8.498.46302891597398758759... 0 \n2 1.2.826.0.1.3680043.8.498.23819260719748494858... 0 \n\n ETT - Borderline ETT - Normal NGT - Abnormal NGT - Borderline \\\n0 0 0 0 0 \n1 0 1 0 0 \n2 0 0 0 0 \n\n NGT - Incompletely Imaged NGT - Normal CVC - Abnormal CVC - Borderline \\\n0 0 1 0 0 \n1 1 0 0 0 \n2 0 0 0 1 \n\n CVC - Normal Swan Ganz Catheter Present PatientID \n0 0 0 ec89415d1 \n1 1 0 bf4c6da3c \n2 0 0 3fc1c97e5 ",
|
98 |
+
"text/html": "<div>\n<style scoped>\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\n .dataframe tbody tr th {\n vertical-align: top;\n }\n\n .dataframe thead th {\n text-align: right;\n }\n</style>\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>StudyInstanceUID</th>\n <th>ETT - Abnormal</th>\n <th>ETT - Borderline</th>\n <th>ETT - Normal</th>\n <th>NGT - Abnormal</th>\n <th>NGT - Borderline</th>\n <th>NGT - Incompletely Imaged</th>\n <th>NGT - Normal</th>\n <th>CVC - Abnormal</th>\n <th>CVC - Borderline</th>\n <th>CVC - Normal</th>\n <th>Swan Ganz Catheter Present</th>\n <th>PatientID</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>1.2.826.0.1.3680043.8.498.26697628953273228189...</td>\n <td>0</td>\n <td>0</td>\n <td>0</td>\n <td>0</td>\n <td>0</td>\n <td>0</td>\n <td>1</td>\n <td>0</td>\n <td>0</td>\n <td>0</td>\n <td>0</td>\n <td>ec89415d1</td>\n </tr>\n <tr>\n <th>1</th>\n <td>1.2.826.0.1.3680043.8.498.46302891597398758759...</td>\n <td>0</td>\n <td>0</td>\n <td>1</td>\n <td>0</td>\n <td>0</td>\n <td>1</td>\n <td>0</td>\n <td>0</td>\n <td>0</td>\n <td>1</td>\n <td>0</td>\n <td>bf4c6da3c</td>\n </tr>\n <tr>\n <th>2</th>\n <td>1.2.826.0.1.3680043.8.498.23819260719748494858...</td>\n <td>0</td>\n <td>0</td>\n <td>0</td>\n <td>0</td>\n <td>0</td>\n <td>0</td>\n <td>0</td>\n <td>0</td>\n <td>1</td>\n <td>0</td>\n <td>0</td>\n <td>3fc1c97e5</td>\n </tr>\n </tbody>\n</table>\n</div>"
|
99 |
+
},
|
100 |
+
"metadata": {}
|
101 |
+
},
|
102 |
+
{
|
103 |
+
"output_type": "display_data",
|
104 |
+
"data": {
|
105 |
+
"text/plain": "17999"
|
106 |
+
},
|
107 |
+
"metadata": {}
|
108 |
+
},
|
109 |
+
{
|
110 |
+
"output_type": "display_data",
|
111 |
+
"data": {
|
112 |
+
"text/plain": " StudyInstanceUID label \\\n0 1.2.826.0.1.3680043.8.498.12616281126973421762... CVC - Normal \n1 1.2.826.0.1.3680043.8.498.12616281126973421762... CVC - Normal \n2 1.2.826.0.1.3680043.8.498.72921907356394389969... CVC - Borderline \n\n data \n0 [[1487, 1279], [1477, 1168], [1472, 1052], [14... \n1 [[1328, 7], [1347, 101], [1383, 193], [1400, 2... \n2 [[801, 1207], [812, 1112], [823, 1023], [842, ... ",
|
113 |
+
"text/html": "<div>\n<style scoped>\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\n .dataframe tbody tr th {\n vertical-align: top;\n }\n\n .dataframe thead th {\n text-align: right;\n }\n</style>\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>StudyInstanceUID</th>\n <th>label</th>\n <th>data</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>1.2.826.0.1.3680043.8.498.12616281126973421762...</td>\n <td>CVC - Normal</td>\n <td>[[1487, 1279], [1477, 1168], [1472, 1052], [14...</td>\n </tr>\n <tr>\n <th>1</th>\n <td>1.2.826.0.1.3680043.8.498.12616281126973421762...</td>\n <td>CVC - Normal</td>\n <td>[[1328, 7], [1347, 101], [1383, 193], [1400, 2...</td>\n </tr>\n <tr>\n <th>2</th>\n <td>1.2.826.0.1.3680043.8.498.72921907356394389969...</td>\n <td>CVC - Borderline</td>\n <td>[[801, 1207], [812, 1112], [823, 1023], [842, ...</td>\n </tr>\n </tbody>\n</table>\n</div>"
|
114 |
+
},
|
115 |
+
"metadata": {}
|
116 |
+
}
|
117 |
+
]
|
118 |
+
},
|
119 |
+
{
|
120 |
+
"cell_type": "code",
|
121 |
+
"source": [
|
122 |
+
"# value counts\n",
|
123 |
+
"train_df.drop(columns=['StudyInstanceUID','PatientID']).agg(['sum'])\n",
|
124 |
+
"# unbalanced dataset"
|
125 |
+
],
|
126 |
+
"metadata": {
|
127 |
+
"execution": {
|
128 |
+
"iopub.status.busy": "2022-10-28T02:46:59.167135Z",
|
129 |
+
"iopub.execute_input": "2022-10-28T02:46:59.167596Z",
|
130 |
+
"iopub.status.idle": "2022-10-28T02:46:59.208167Z",
|
131 |
+
"shell.execute_reply.started": "2022-10-28T02:46:59.167559Z",
|
132 |
+
"shell.execute_reply": "2022-10-28T02:46:59.207260Z"
|
133 |
+
},
|
134 |
+
"trusted": true,
|
135 |
+
"id": "NdNcRIOP1Cjx",
|
136 |
+
"outputId": "e602d509-882f-4f7b-a237-eb0f5a2af756"
|
137 |
+
},
|
138 |
+
"execution_count": null,
|
139 |
+
"outputs": [
|
140 |
+
{
|
141 |
+
"execution_count": 3,
|
142 |
+
"output_type": "execute_result",
|
143 |
+
"data": {
|
144 |
+
"text/plain": " ETT - Abnormal ETT - Borderline ETT - Normal NGT - Abnormal \\\nsum 79 1138 7240 279 \n\n NGT - Borderline NGT - Incompletely Imaged NGT - Normal \\\nsum 529 2748 4797 \n\n CVC - Abnormal CVC - Borderline CVC - Normal \\\nsum 3195 8460 21324 \n\n Swan Ganz Catheter Present \nsum 830 ",
|
145 |
+
"text/html": "<div>\n<style scoped>\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\n .dataframe tbody tr th {\n vertical-align: top;\n }\n\n .dataframe thead th {\n text-align: right;\n }\n</style>\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>ETT - Abnormal</th>\n <th>ETT - Borderline</th>\n <th>ETT - Normal</th>\n <th>NGT - Abnormal</th>\n <th>NGT - Borderline</th>\n <th>NGT - Incompletely Imaged</th>\n <th>NGT - Normal</th>\n <th>CVC - Abnormal</th>\n <th>CVC - Borderline</th>\n <th>CVC - Normal</th>\n <th>Swan Ganz Catheter Present</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>sum</th>\n <td>79</td>\n <td>1138</td>\n <td>7240</td>\n <td>279</td>\n <td>529</td>\n <td>2748</td>\n <td>4797</td>\n <td>3195</td>\n <td>8460</td>\n <td>21324</td>\n <td>830</td>\n </tr>\n </tbody>\n</table>\n</div>"
|
146 |
+
},
|
147 |
+
"metadata": {}
|
148 |
+
}
|
149 |
+
]
|
150 |
+
},
|
151 |
+
{
|
152 |
+
"cell_type": "code",
|
153 |
+
"source": [
|
154 |
+
"import matplotlib.pyplot as plt\n",
|
155 |
+
"import seaborn as sns"
|
156 |
+
],
|
157 |
+
"metadata": {
|
158 |
+
"execution": {
|
159 |
+
"iopub.status.busy": "2022-10-28T02:47:01.769145Z",
|
160 |
+
"iopub.execute_input": "2022-10-28T02:47:01.769618Z",
|
161 |
+
"iopub.status.idle": "2022-10-28T02:47:02.507132Z",
|
162 |
+
"shell.execute_reply.started": "2022-10-28T02:47:01.769578Z",
|
163 |
+
"shell.execute_reply": "2022-10-28T02:47:02.506044Z"
|
164 |
+
},
|
165 |
+
"trusted": true,
|
166 |
+
"id": "cONSDexl1Cjy"
|
167 |
+
},
|
168 |
+
"execution_count": null,
|
169 |
+
"outputs": []
|
170 |
+
},
|
171 |
+
{
|
172 |
+
"cell_type": "code",
|
173 |
+
"source": [
|
174 |
+
"# value counts\n",
|
175 |
+
"train_df.drop(columns=['StudyInstanceUID','PatientID']).agg(['sum']).T.sort_values(by='sum').plot(kind='barh')\n",
|
176 |
+
"plt.legend(loc='lower right');"
|
177 |
+
],
|
178 |
+
"metadata": {
|
179 |
+
"execution": {
|
180 |
+
"iopub.status.busy": "2022-10-28T02:47:04.180989Z",
|
181 |
+
"iopub.execute_input": "2022-10-28T02:47:04.181680Z",
|
182 |
+
"iopub.status.idle": "2022-10-28T02:47:04.493106Z",
|
183 |
+
"shell.execute_reply.started": "2022-10-28T02:47:04.181644Z",
|
184 |
+
"shell.execute_reply": "2022-10-28T02:47:04.491889Z"
|
185 |
+
},
|
186 |
+
"trusted": true,
|
187 |
+
"id": "rd4yEDyL1Cjz",
|
188 |
+
"outputId": "738805db-8fab-48fe-81de-ece60953337c"
|
189 |
+
},
|
190 |
+
"execution_count": null,
|
191 |
+
"outputs": [
|
192 |
+
{
|
193 |
+
"output_type": "display_data",
|
194 |
+
"data": {
|
195 |
+
"text/plain": "<Figure size 432x288 with 1 Axes>",
|
196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TKpwGDcvuclWJbQO6p01rGTfaE8Jz0ml9qj+y+5J3An4E7gK1SuYCLU99NQH2urVPIHlz6C3ByJ+PahOxKrH+urNvPFdkbieeB1WT3Gk+t5bkB6skS3ELgItK3W3Ygpr+Q3S8t/W5dmup+Nv1cZwMzgU+31Xdrx9eBmGr280q/p4+k47wO6NvRn18qnwJ8paxud52r1v4W9OjvVS1f/opWMzOzAvPQupmZWYE5kZuZmRWYE7mZmVmBOZGbmZkVmBO5mZlZgTmRm5mZFZgTuZmZWYH9f+MJU2sei/e1AAAAAElFTkSuQmCC\n"
|
197 |
+
},
|
198 |
+
"metadata": {
|
199 |
+
"needs_background": "light"
|
200 |
+
}
|
201 |
+
}
|
202 |
+
]
|
203 |
+
},
|
204 |
+
{
|
205 |
+
"cell_type": "code",
|
206 |
+
"source": [
|
207 |
+
"len(train_df.drop(columns=['StudyInstanceUID','PatientID']).agg(['sum']).T)\n",
|
208 |
+
"# num of classes"
|
209 |
+
],
|
210 |
+
"metadata": {
|
211 |
+
"execution": {
|
212 |
+
"iopub.status.busy": "2022-10-28T02:47:07.675004Z",
|
213 |
+
"iopub.execute_input": "2022-10-28T02:47:07.675678Z",
|
214 |
+
"iopub.status.idle": "2022-10-28T02:47:07.695859Z",
|
215 |
+
"shell.execute_reply.started": "2022-10-28T02:47:07.675642Z",
|
216 |
+
"shell.execute_reply": "2022-10-28T02:47:07.694954Z"
|
217 |
+
},
|
218 |
+
"trusted": true,
|
219 |
+
"id": "gdTMPjw_1Cjz",
|
220 |
+
"outputId": "85e76a14-a8c8-4846-8db8-6cc7ba628017"
|
221 |
+
},
|
222 |
+
"execution_count": null,
|
223 |
+
"outputs": [
|
224 |
+
{
|
225 |
+
"execution_count": 6,
|
226 |
+
"output_type": "execute_result",
|
227 |
+
"data": {
|
228 |
+
"text/plain": "11"
|
229 |
+
},
|
230 |
+
"metadata": {}
|
231 |
+
}
|
232 |
+
]
|
233 |
+
},
|
234 |
+
{
|
235 |
+
"cell_type": "code",
|
236 |
+
"source": [
|
237 |
+
"import torch\n",
|
238 |
+
"import cv2\n",
|
239 |
+
"import numpy as np\n",
|
240 |
+
"from torchvision import transforms\n",
|
241 |
+
"from torch.utils.data import Dataset"
|
242 |
+
],
|
243 |
+
"metadata": {
|
244 |
+
"execution": {
|
245 |
+
"iopub.status.busy": "2022-10-28T02:47:09.612626Z",
|
246 |
+
"iopub.execute_input": "2022-10-28T02:47:09.613355Z",
|
247 |
+
"iopub.status.idle": "2022-10-28T02:47:11.485435Z",
|
248 |
+
"shell.execute_reply.started": "2022-10-28T02:47:09.613293Z",
|
249 |
+
"shell.execute_reply": "2022-10-28T02:47:11.484503Z"
|
250 |
+
},
|
251 |
+
"trusted": true,
|
252 |
+
"id": "0AMhReRR1Cj0"
|
253 |
+
},
|
254 |
+
"execution_count": null,
|
255 |
+
"outputs": []
|
256 |
+
},
|
257 |
+
{
|
258 |
+
"cell_type": "code",
|
259 |
+
"source": [
|
260 |
+
"class ImageDataset(Dataset):\n",
|
261 |
+
" def __init__(self, csv, train, test):\n",
|
262 |
+
" self.csv = csv\n",
|
263 |
+
" self.train = train\n",
|
264 |
+
" self.test = test\n",
|
265 |
+
" self.all_image_names = self.csv[:]['StudyInstanceUID']\n",
|
266 |
+
" self.all_labels = np.array(self.csv.drop(['StudyInstanceUID', 'PatientID'], axis=1))\n",
|
267 |
+
" self.train_ratio = int(0.85 * len(self.csv))\n",
|
268 |
+
" self.valid_ratio = len(self.csv) - self.train_ratio\n",
|
269 |
+
" # set the training data images and labels\n",
|
270 |
+
" if self.train == True:\n",
|
271 |
+
" print(f\"Number of training images: {self.train_ratio}\")\n",
|
272 |
+
" self.image_names = list(self.all_image_names[:self.train_ratio])\n",
|
273 |
+
" self.labels = list(self.all_labels[:self.train_ratio])\n",
|
274 |
+
" # define the training transforms\n",
|
275 |
+
" self.transform = transforms.Compose([\n",
|
276 |
+
" transforms.ToPILImage(),\n",
|
277 |
+
" transforms.Resize((400, 400)),\n",
|
278 |
+
" transforms.RandomHorizontalFlip(p=0.5),\n",
|
279 |
+
" transforms.RandomRotation(degrees=45),\n",
|
280 |
+
" transforms.ToTensor(),\n",
|
281 |
+
" ])\n",
|
282 |
+
" # set the validation data images and labels\n",
|
283 |
+
" elif self.train == False and self.test == False:\n",
|
284 |
+
" print(f\"Number of validation images: {self.valid_ratio}\")\n",
|
285 |
+
" self.image_names = list(self.all_image_names[-self.valid_ratio:-10])\n",
|
286 |
+
" self.labels = list(self.all_labels[-self.valid_ratio:])\n",
|
287 |
+
" # define the validation transforms\n",
|
288 |
+
" self.transform = transforms.Compose([\n",
|
289 |
+
" transforms.ToPILImage(),\n",
|
290 |
+
" transforms.Resize((400, 400)),\n",
|
291 |
+
" transforms.ToTensor(),\n",
|
292 |
+
" ])\n",
|
293 |
+
" # set the test data images and labels, only last 10 images\n",
|
294 |
+
" # this, we will use in a separate inference script\n",
|
295 |
+
" elif self.test == True and self.train == False:\n",
|
296 |
+
" self.image_names = list(self.all_image_names[-10:])\n",
|
297 |
+
" self.labels = list(self.all_labels[-10:])\n",
|
298 |
+
" # define the test transforms\n",
|
299 |
+
" self.transform = transforms.Compose([\n",
|
300 |
+
" transforms.ToPILImage(),\n",
|
301 |
+
" transforms.ToTensor(),\n",
|
302 |
+
" ])\n",
|
303 |
+
" def __len__(self):\n",
|
304 |
+
" return len(self.image_names)\n",
|
305 |
+
" \n",
|
306 |
+
" def __getitem__(self, index):\n",
|
307 |
+
" image = cv2.imread(f\"../input/ranzcr-clip-catheter-line-classification/train/{self.image_names[index]}.jpg\")\n",
|
308 |
+
" # convert the image from BGR to RGB color format\n",
|
309 |
+
" image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)\n",
|
310 |
+
" # apply image transforms\n",
|
311 |
+
" image = self.transform(image)\n",
|
312 |
+
" targets = self.labels[index]\n",
|
313 |
+
" \n",
|
314 |
+
" return {\n",
|
315 |
+
" 'image': torch.tensor(image, dtype=torch.float32),\n",
|
316 |
+
" 'label': torch.tensor(targets, dtype=torch.float32)\n",
|
317 |
+
" }"
|
318 |
+
],
|
319 |
+
"metadata": {
|
320 |
+
"execution": {
|
321 |
+
"iopub.status.busy": "2022-10-28T02:47:13.898477Z",
|
322 |
+
"iopub.execute_input": "2022-10-28T02:47:13.899027Z",
|
323 |
+
"iopub.status.idle": "2022-10-28T02:47:13.912689Z",
|
324 |
+
"shell.execute_reply.started": "2022-10-28T02:47:13.898986Z",
|
325 |
+
"shell.execute_reply": "2022-10-28T02:47:13.911765Z"
|
326 |
+
},
|
327 |
+
"trusted": true,
|
328 |
+
"id": "s2qBJ08t1Cj0"
|
329 |
+
},
|
330 |
+
"execution_count": null,
|
331 |
+
"outputs": []
|
332 |
+
},
|
333 |
+
{
|
334 |
+
"cell_type": "code",
|
335 |
+
"source": [
|
336 |
+
"import torchvision\n",
|
337 |
+
"torchvision.__version__"
|
338 |
+
],
|
339 |
+
"metadata": {
|
340 |
+
"execution": {
|
341 |
+
"iopub.status.busy": "2022-10-28T03:05:44.948332Z",
|
342 |
+
"iopub.execute_input": "2022-10-28T03:05:44.948713Z",
|
343 |
+
"iopub.status.idle": "2022-10-28T03:05:44.955478Z",
|
344 |
+
"shell.execute_reply.started": "2022-10-28T03:05:44.948681Z",
|
345 |
+
"shell.execute_reply": "2022-10-28T03:05:44.954402Z"
|
346 |
+
},
|
347 |
+
"trusted": true,
|
348 |
+
"id": "HgyolOKX1Cj1",
|
349 |
+
"outputId": "eabf26d8-d035-47c8-961d-39d5627588c3"
|
350 |
+
},
|
351 |
+
"execution_count": null,
|
352 |
+
"outputs": [
|
353 |
+
{
|
354 |
+
"execution_count": 29,
|
355 |
+
"output_type": "execute_result",
|
356 |
+
"data": {
|
357 |
+
"text/plain": "'0.12.0'"
|
358 |
+
},
|
359 |
+
"metadata": {}
|
360 |
+
}
|
361 |
+
]
|
362 |
+
},
|
363 |
+
{
|
364 |
+
"cell_type": "code",
|
365 |
+
"source": [
|
366 |
+
"print(dir(torchvision.models))"
|
367 |
+
],
|
368 |
+
"metadata": {
|
369 |
+
"execution": {
|
370 |
+
"iopub.status.busy": "2022-10-28T03:42:01.322455Z",
|
371 |
+
"iopub.execute_input": "2022-10-28T03:42:01.322825Z",
|
372 |
+
"iopub.status.idle": "2022-10-28T03:42:01.328721Z",
|
373 |
+
"shell.execute_reply.started": "2022-10-28T03:42:01.322792Z",
|
374 |
+
"shell.execute_reply": "2022-10-28T03:42:01.327749Z"
|
375 |
+
},
|
376 |
+
"trusted": true,
|
377 |
+
"id": "L_eYnLj-1Cj2",
|
378 |
+
"outputId": "92372aff-1f26-4aea-e9f2-8ecef131f56f"
|
379 |
+
},
|
380 |
+
"execution_count": null,
|
381 |
+
"outputs": [
|
382 |
+
{
|
383 |
+
"name": "stdout",
|
384 |
+
"text": "['AlexNet', 'ConvNeXt', 'DenseNet', 'EfficientNet', 'GoogLeNet', 'GoogLeNetOutputs', 'Inception3', 'InceptionOutputs', 'MNASNet', 'MobileNetV2', 'MobileNetV3', 'RegNet', 'ResNet', 'ShuffleNetV2', 'SqueezeNet', 'VGG', 'VisionTransformer', '_GoogLeNetOutputs', '_InceptionOutputs', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', '_utils', 'alexnet', 'convnext', 'convnext_base', 'convnext_large', 'convnext_small', 'convnext_tiny', 'densenet', 'densenet121', 'densenet161', 'densenet169', 'densenet201', 'detection', 'efficientnet', 'efficientnet_b0', 'efficientnet_b1', 'efficientnet_b2', 'efficientnet_b3', 'efficientnet_b4', 'efficientnet_b5', 'efficientnet_b6', 'efficientnet_b7', 'feature_extraction', 'googlenet', 'inception', 'inception_v3', 'mnasnet', 'mnasnet0_5', 'mnasnet0_75', 'mnasnet1_0', 'mnasnet1_3', 'mobilenet', 'mobilenet_v2', 'mobilenet_v3_large', 'mobilenet_v3_small', 'mobilenetv2', 'mobilenetv3', 'optical_flow', 'quantization', 'regnet', 'regnet_x_16gf', 'regnet_x_1_6gf', 'regnet_x_32gf', 'regnet_x_3_2gf', 'regnet_x_400mf', 'regnet_x_800mf', 'regnet_x_8gf', 'regnet_y_128gf', 'regnet_y_16gf', 'regnet_y_1_6gf', 'regnet_y_32gf', 'regnet_y_3_2gf', 'regnet_y_400mf', 'regnet_y_800mf', 'regnet_y_8gf', 'resnet', 'resnet101', 'resnet152', 'resnet18', 'resnet34', 'resnet50', 'resnext101_32x8d', 'resnext50_32x4d', 'segmentation', 'shufflenet_v2_x0_5', 'shufflenet_v2_x1_0', 'shufflenet_v2_x1_5', 'shufflenet_v2_x2_0', 'shufflenetv2', 'squeezenet', 'squeezenet1_0', 'squeezenet1_1', 'vgg', 'vgg11', 'vgg11_bn', 'vgg13', 'vgg13_bn', 'vgg16', 'vgg16_bn', 'vgg19', 'vgg19_bn', 'video', 'vision_transformer', 'vit_b_16', 'vit_b_32', 'vit_l_16', 'vit_l_32', 'wide_resnet101_2', 'wide_resnet50_2']\n",
|
385 |
+
"output_type": "stream"
|
386 |
+
}
|
387 |
+
]
|
388 |
+
},
|
389 |
+
{
|
390 |
+
"cell_type": "code",
|
391 |
+
"source": [
|
392 |
+
"from torchvision import models \n",
|
393 |
+
"import torch.nn as nn\n",
|
394 |
+
"def model(pretrained, requires_grad):\n",
|
395 |
+
" model = models.efficientnet_b7(progress=True, pretrained=pretrained)\n",
|
396 |
+
" # to freeze the hidden layers\n",
|
397 |
+
" if requires_grad == False:\n",
|
398 |
+
" for param in model.parameters():\n",
|
399 |
+
" param.requires_grad = False\n",
|
400 |
+
" # to train the hidden layers\n",
|
401 |
+
" elif requires_grad == True:\n",
|
402 |
+
" for param in model.parameters():\n",
|
403 |
+
" param.requires_grad = True\n",
|
404 |
+
" # make the classification layer learnable\n",
|
405 |
+
" # we have 11 classes in total\n",
|
406 |
+
" model.classifier[1] = nn.Linear(in_features=2560, out_features=11)\n",
|
407 |
+
" return model"
|
408 |
+
],
|
409 |
+
"metadata": {
|
410 |
+
"execution": {
|
411 |
+
"iopub.status.busy": "2022-10-28T04:24:13.656142Z",
|
412 |
+
"iopub.execute_input": "2022-10-28T04:24:13.656782Z",
|
413 |
+
"iopub.status.idle": "2022-10-28T04:24:13.663143Z",
|
414 |
+
"shell.execute_reply.started": "2022-10-28T04:24:13.656746Z",
|
415 |
+
"shell.execute_reply": "2022-10-28T04:24:13.662004Z"
|
416 |
+
},
|
417 |
+
"trusted": true,
|
418 |
+
"id": "QrLWPTo41Cj2"
|
419 |
+
},
|
420 |
+
"execution_count": null,
|
421 |
+
"outputs": []
|
422 |
+
},
|
423 |
+
{
|
424 |
+
"cell_type": "code",
|
425 |
+
"source": [
|
426 |
+
"from tqdm import tqdm\n",
|
427 |
+
"from torchmetrics import Accuracy, AUROC, F1Score, Precision, Recall\n",
|
428 |
+
"# training function\n",
|
429 |
+
"def train(model, dataloader, optimizer, criterion, train_data, device):\n",
|
430 |
+
" print('Training')\n",
|
431 |
+
" model.train()\n",
|
432 |
+
" counter = 0\n",
|
433 |
+
" train_running_loss = 0.0\n",
|
434 |
+
" # instantiate metrics\n",
|
435 |
+
" acc = Accuracy()\n",
|
436 |
+
" auc = AUROC()\n",
|
437 |
+
" f1_score = F1Score()\n",
|
438 |
+
" precision = Precision()\n",
|
439 |
+
" recall = Recall()\n",
|
440 |
+
" preds = []\n",
|
441 |
+
" labels = []\n",
|
442 |
+
" for i, data in tqdm(enumerate(dataloader), total=int(len(train_data)/dataloader.batch_size)):\n",
|
443 |
+
" counter += 1\n",
|
444 |
+
" data, target = data['image'].to(device), data['label'].to(device)\n",
|
445 |
+
" labels.append(target.cpu().numpy().argmax(axis=1))\n",
|
446 |
+
" optimizer.zero_grad()\n",
|
447 |
+
" outputs = model(data)\n",
|
448 |
+
" # apply sigmoid activation to get all the outputs between 0 and 1\n",
|
449 |
+
" outputs = torch.sigmoid(outputs)\n",
|
450 |
+
" loss = criterion(outputs, target)\n",
|
451 |
+
" train_running_loss += loss.item()\n",
|
452 |
+
" # backpropagation\n",
|
453 |
+
" loss.backward()\n",
|
454 |
+
" # update optimizer parameters\n",
|
455 |
+
" optimizer.step()\n",
|
456 |
+
" preds.append(outputs.detach().cpu().numpy().argmax(axis=1))\n",
|
457 |
+
" \n",
|
458 |
+
" train_loss = train_running_loss / counter\n",
|
459 |
+
" preds = torch.tensor(np.concatenate(preds))\n",
|
460 |
+
" labels = torch.tensor(np.concatenate(labels))\n",
|
461 |
+
" train_acc = acc(preds, labels).item()\n",
|
462 |
+
" \n",
|
463 |
+
" return train_loss, train_acc"
|
464 |
+
],
|
465 |
+
"metadata": {
|
466 |
+
"execution": {
|
467 |
+
"iopub.status.busy": "2022-10-28T04:24:16.962617Z",
|
468 |
+
"iopub.execute_input": "2022-10-28T04:24:16.963764Z",
|
469 |
+
"iopub.status.idle": "2022-10-28T04:24:16.976195Z",
|
470 |
+
"shell.execute_reply.started": "2022-10-28T04:24:16.963715Z",
|
471 |
+
"shell.execute_reply": "2022-10-28T04:24:16.975023Z"
|
472 |
+
},
|
473 |
+
"trusted": true,
|
474 |
+
"id": "HQLCRVLO1Cj-"
|
475 |
+
},
|
476 |
+
"execution_count": null,
|
477 |
+
"outputs": []
|
478 |
+
},
|
479 |
+
{
|
480 |
+
"cell_type": "code",
|
481 |
+
"source": [
|
482 |
+
"# validation function\n",
|
483 |
+
"def validate(model, dataloader, criterion, val_data, device):\n",
|
484 |
+
" print('Validating')\n",
|
485 |
+
" model.eval()\n",
|
486 |
+
" counter = 0\n",
|
487 |
+
" val_running_loss = 0.0\n",
|
488 |
+
" # instantiate metrics\n",
|
489 |
+
" acc = Accuracy()\n",
|
490 |
+
" auc = AUROC()\n",
|
491 |
+
" f1_score = F1Score()\n",
|
492 |
+
" precision = Precision()\n",
|
493 |
+
" recall = Recall()\n",
|
494 |
+
" preds = []\n",
|
495 |
+
" labels = []\n",
|
496 |
+
" with torch.no_grad():\n",
|
497 |
+
" for i, data in tqdm(enumerate(dataloader), total=int(len(val_data)/dataloader.batch_size)):\n",
|
498 |
+
" counter += 1\n",
|
499 |
+
" data, target = data['image'].to(device), data['label'].to(device)\n",
|
500 |
+
" labels.append(target.cpu().numpy().argmax(axis=1))\n",
|
501 |
+
" # make predictions\n",
|
502 |
+
" outputs = model(data)\n",
|
503 |
+
" # apply sigmoid activation to get all the outputs between 0 and 1\n",
|
504 |
+
" outputs = torch.sigmoid(outputs)\n",
|
505 |
+
" loss = criterion(outputs, target)\n",
|
506 |
+
" val_running_loss += loss.item()\n",
|
507 |
+
" preds.append(outputs.detach().cpu().numpy().argmax(axis=1))\n",
|
508 |
+
" \n",
|
509 |
+
" val_loss = val_running_loss / counter\n",
|
510 |
+
" preds = torch.tensor(np.concatenate(preds))\n",
|
511 |
+
" labels = torch.tensor(np.concatenate(labels))\n",
|
512 |
+
" val_acc = acc(preds, labels).item()\n",
|
513 |
+
" return val_loss, val_acc"
|
514 |
+
],
|
515 |
+
"metadata": {
|
516 |
+
"execution": {
|
517 |
+
"iopub.status.busy": "2022-10-28T04:24:20.716225Z",
|
518 |
+
"iopub.execute_input": "2022-10-28T04:24:20.716601Z",
|
519 |
+
"iopub.status.idle": "2022-10-28T04:24:20.727583Z",
|
520 |
+
"shell.execute_reply.started": "2022-10-28T04:24:20.716567Z",
|
521 |
+
"shell.execute_reply": "2022-10-28T04:24:20.726191Z"
|
522 |
+
},
|
523 |
+
"trusted": true,
|
524 |
+
"id": "LyvS7_OW1Cj-"
|
525 |
+
},
|
526 |
+
"execution_count": null,
|
527 |
+
"outputs": []
|
528 |
+
},
|
529 |
+
{
|
530 |
+
"cell_type": "code",
|
531 |
+
"source": [
|
532 |
+
"import torch.optim as optim\n",
|
533 |
+
"import matplotlib\n",
|
534 |
+
"from torch.utils.data import DataLoader\n",
|
535 |
+
"matplotlib.style.use('ggplot')\n",
|
536 |
+
"# initialize the computation device\n",
|
537 |
+
"device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')"
|
538 |
+
],
|
539 |
+
"metadata": {
|
540 |
+
"execution": {
|
541 |
+
"iopub.status.busy": "2022-10-28T04:24:24.617804Z",
|
542 |
+
"iopub.execute_input": "2022-10-28T04:24:24.618166Z",
|
543 |
+
"iopub.status.idle": "2022-10-28T04:24:24.623867Z",
|
544 |
+
"shell.execute_reply.started": "2022-10-28T04:24:24.618134Z",
|
545 |
+
"shell.execute_reply": "2022-10-28T04:24:24.622628Z"
|
546 |
+
},
|
547 |
+
"trusted": true,
|
548 |
+
"id": "-GFaZnzr1Cj_"
|
549 |
+
},
|
550 |
+
"execution_count": null,
|
551 |
+
"outputs": []
|
552 |
+
},
|
553 |
+
{
|
554 |
+
"cell_type": "code",
|
555 |
+
"source": [
|
556 |
+
"#intialize the model\n",
|
557 |
+
"from torch.optim.lr_scheduler import ReduceLROnPlateau\n",
|
558 |
+
"\n",
|
559 |
+
"ENet_model = model(pretrained=True, requires_grad=False).to(device)\n",
|
560 |
+
"# learning parameters\n",
|
561 |
+
"lr = 0.0001\n",
|
562 |
+
"epochs = 30\n",
|
563 |
+
"batch_size = 32\n",
|
564 |
+
"optimizer = optim.Adam(ENet_model.parameters(), lr=lr)\n",
|
565 |
+
"scheduler = ReduceLROnPlateau(optimizer, 'min')\n",
|
566 |
+
"criterion = nn.BCELoss()"
|
567 |
+
],
|
568 |
+
"metadata": {
|
569 |
+
"execution": {
|
570 |
+
"iopub.status.busy": "2022-10-28T04:24:26.626925Z",
|
571 |
+
"iopub.execute_input": "2022-10-28T04:24:26.630098Z",
|
572 |
+
"iopub.status.idle": "2022-10-28T04:24:28.432430Z",
|
573 |
+
"shell.execute_reply.started": "2022-10-28T04:24:26.630044Z",
|
574 |
+
"shell.execute_reply": "2022-10-28T04:24:28.431444Z"
|
575 |
+
},
|
576 |
+
"trusted": true,
|
577 |
+
"id": "JzQrr2xz1Cj_"
|
578 |
+
},
|
579 |
+
"execution_count": null,
|
580 |
+
"outputs": []
|
581 |
+
},
|
582 |
+
{
|
583 |
+
"cell_type": "code",
|
584 |
+
"source": [
|
585 |
+
"train_data = ImageDataset(\n",
|
586 |
+
" train_df, train=True, test=False\n",
|
587 |
+
")\n",
|
588 |
+
"# validation dataset\n",
|
589 |
+
"valid_data = ImageDataset(\n",
|
590 |
+
" train_df, train=False, test=False\n",
|
591 |
+
")\n",
|
592 |
+
"# train data loader\n",
|
593 |
+
"train_loader = DataLoader(\n",
|
594 |
+
" train_data, \n",
|
595 |
+
" batch_size=batch_size,\n",
|
596 |
+
" shuffle=True\n",
|
597 |
+
")\n",
|
598 |
+
"# validation data loader\n",
|
599 |
+
"valid_loader = DataLoader(\n",
|
600 |
+
" valid_data, \n",
|
601 |
+
" batch_size=batch_size,\n",
|
602 |
+
" shuffle=False\n",
|
603 |
+
")"
|
604 |
+
],
|
605 |
+
"metadata": {
|
606 |
+
"execution": {
|
607 |
+
"iopub.status.busy": "2022-10-28T04:24:32.210103Z",
|
608 |
+
"iopub.execute_input": "2022-10-28T04:24:32.210655Z",
|
609 |
+
"iopub.status.idle": "2022-10-28T04:24:32.243373Z",
|
610 |
+
"shell.execute_reply.started": "2022-10-28T04:24:32.210615Z",
|
611 |
+
"shell.execute_reply": "2022-10-28T04:24:32.242479Z"
|
612 |
+
},
|
613 |
+
"trusted": true,
|
614 |
+
"id": "R-b3ePes1CkA",
|
615 |
+
"outputId": "21605b5c-fa5e-47e1-b622-7748fe8e8863"
|
616 |
+
},
|
617 |
+
"execution_count": null,
|
618 |
+
"outputs": [
|
619 |
+
{
|
620 |
+
"name": "stdout",
|
621 |
+
"text": "Number of training images: 25570\nNumber of validation images: 4513\n",
|
622 |
+
"output_type": "stream"
|
623 |
+
}
|
624 |
+
]
|
625 |
+
},
|
626 |
+
{
|
627 |
+
"cell_type": "code",
|
628 |
+
"source": [
|
629 |
+
"class EarlyStopper:\n",
|
630 |
+
" def __init__(self, patience=1, min_delta=0):\n",
|
631 |
+
" self.patience = patience\n",
|
632 |
+
" self.min_delta = min_delta\n",
|
633 |
+
" self.counter = 0\n",
|
634 |
+
" self.min_validation_loss = np.inf\n",
|
635 |
+
"\n",
|
636 |
+
" def early_stop(self, validation_loss):\n",
|
637 |
+
" if validation_loss < self.min_validation_loss:\n",
|
638 |
+
" self.min_validation_loss = validation_loss\n",
|
639 |
+
" self.counter = 0\n",
|
640 |
+
" elif validation_loss > (self.min_validation_loss + self.min_delta):\n",
|
641 |
+
" self.counter += 1\n",
|
642 |
+
" if self.counter >= self.patience:\n",
|
643 |
+
" return True\n",
|
644 |
+
" return False"
|
645 |
+
],
|
646 |
+
"metadata": {
|
647 |
+
"execution": {
|
648 |
+
"iopub.status.busy": "2022-10-28T04:24:36.170818Z",
|
649 |
+
"iopub.execute_input": "2022-10-28T04:24:36.171515Z",
|
650 |
+
"iopub.status.idle": "2022-10-28T04:24:36.178005Z",
|
651 |
+
"shell.execute_reply.started": "2022-10-28T04:24:36.171477Z",
|
652 |
+
"shell.execute_reply": "2022-10-28T04:24:36.176852Z"
|
653 |
+
},
|
654 |
+
"trusted": true,
|
655 |
+
"id": "ylwK2HO01CkB"
|
656 |
+
},
|
657 |
+
"execution_count": null,
|
658 |
+
"outputs": []
|
659 |
+
},
|
660 |
+
{
|
661 |
+
"cell_type": "code",
|
662 |
+
"source": [
|
663 |
+
"# start the training and validation\n",
|
664 |
+
"train_loss = []\n",
|
665 |
+
"valid_loss = []\n",
|
666 |
+
"train_acc = []\n",
|
667 |
+
"val_acc = []\n",
|
668 |
+
"early_stopper = EarlyStopper(patience=5, min_delta=0.001)\n",
|
669 |
+
"for epoch in range(epochs):\n",
|
670 |
+
" print(f\"Epoch {epoch+1} of {epochs}\")\n",
|
671 |
+
" train_epoch_loss, train_epoch_acc = train(\n",
|
672 |
+
" ENet_model, train_loader, optimizer, criterion, train_data, device\n",
|
673 |
+
" )\n",
|
674 |
+
" valid_epoch_loss, val_epoch_acc = validate(\n",
|
675 |
+
" ENet_model, valid_loader, criterion, valid_data, device\n",
|
676 |
+
" )\n",
|
677 |
+
" if early_stopper.early_stop(valid_epoch_loss): \n",
|
678 |
+
" break\n",
|
679 |
+
" train_loss.append(train_epoch_loss)\n",
|
680 |
+
" valid_loss.append(valid_epoch_loss)\n",
|
681 |
+
" train_acc.append(train_epoch_acc)\n",
|
682 |
+
" val_acc.append(val_epoch_acc)\n",
|
683 |
+
" print(f\"Train Loss: {train_epoch_loss:.4f}\")\n",
|
684 |
+
" print(f'Val Loss: {valid_epoch_loss:.4f}')\n",
|
685 |
+
" print(f'Train accuracy: {train_epoch_acc:.4f}')\n",
|
686 |
+
" print(f'Val accuracy: {val_epoch_acc:.4f}')"
|
687 |
+
],
|
688 |
+
"metadata": {
|
689 |
+
"execution": {
|
690 |
+
"iopub.status.busy": "2022-10-28T04:24:39.710609Z",
|
691 |
+
"iopub.execute_input": "2022-10-28T04:24:39.710988Z"
|
692 |
+
},
|
693 |
+
"trusted": true,
|
694 |
+
"id": "O969K8JC1CkB",
|
695 |
+
"outputId": "745f1db7-804a-42e2-c8a4-91b71cde8930"
|
696 |
+
},
|
697 |
+
"execution_count": null,
|
698 |
+
"outputs": [
|
699 |
+
{
|
700 |
+
"name": "stderr",
|
701 |
+
"text": "/opt/conda/lib/python3.7/site-packages/torchmetrics/utilities/prints.py:36: UserWarning: Metric `AUROC` will save all targets and predictions in buffer. For large datasets this may lead to large memory footprint.\n warnings.warn(*args, **kwargs)\n",
|
702 |
+
"output_type": "stream"
|
703 |
+
},
|
704 |
+
{
|
705 |
+
"name": "stdout",
|
706 |
+
"text": "Epoch 1 of 30\nTraining\n",
|
707 |
+
"output_type": "stream"
|
708 |
+
},
|
709 |
+
{
|
710 |
+
"name": "stderr",
|
711 |
+
"text": " 0%| | 0/799 [00:00<?, ?it/s]/opt/conda/lib/python3.7/site-packages/ipykernel_launcher.py:56: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).\n800it [48:36, 3.65s/it] \n",
|
712 |
+
"output_type": "stream"
|
713 |
+
},
|
714 |
+
{
|
715 |
+
"name": "stdout",
|
716 |
+
"text": "Validating\n",
|
717 |
+
"output_type": "stream"
|
718 |
+
},
|
719 |
+
{
|
720 |
+
"name": "stderr",
|
721 |
+
"text": "141it [08:23, 3.57s/it] \n",
|
722 |
+
"output_type": "stream"
|
723 |
+
},
|
724 |
+
{
|
725 |
+
"name": "stdout",
|
726 |
+
"text": "Train Loss: 0.4688\nVal Loss: 0.5190\nTrain accuracy: 0.3987\nVal accuracy: 0.4033\nEpoch 2 of 30\nTraining\n",
|
727 |
+
"output_type": "stream"
|
728 |
+
},
|
729 |
+
{
|
730 |
+
"name": "stderr",
|
731 |
+
"text": "800it [45:57, 3.45s/it] \n",
|
732 |
+
"output_type": "stream"
|
733 |
+
},
|
734 |
+
{
|
735 |
+
"name": "stdout",
|
736 |
+
"text": "Validating\n",
|
737 |
+
"output_type": "stream"
|
738 |
+
},
|
739 |
+
{
|
740 |
+
"name": "stderr",
|
741 |
+
"text": "141it [07:49, 3.33s/it] \n",
|
742 |
+
"output_type": "stream"
|
743 |
+
},
|
744 |
+
{
|
745 |
+
"name": "stdout",
|
746 |
+
"text": "Train Loss: 0.3776\nVal Loss: 0.3924\nTrain accuracy: 0.4472\nVal accuracy: 0.4706\nEpoch 3 of 30\nTraining\n",
|
747 |
+
"output_type": "stream"
|
748 |
+
},
|
749 |
+
{
|
750 |
+
"name": "stderr",
|
751 |
+
"text": "800it [46:11, 3.46s/it] \n",
|
752 |
+
"output_type": "stream"
|
753 |
+
},
|
754 |
+
{
|
755 |
+
"name": "stdout",
|
756 |
+
"text": "Validating\n",
|
757 |
+
"output_type": "stream"
|
758 |
+
},
|
759 |
+
{
|
760 |
+
"name": "stderr",
|
761 |
+
"text": "141it [07:51, 3.35s/it] \n",
|
762 |
+
"output_type": "stream"
|
763 |
+
},
|
764 |
+
{
|
765 |
+
"name": "stdout",
|
766 |
+
"text": "Train Loss: 0.3433\nVal Loss: 0.3581\nTrain accuracy: 0.4567\nVal accuracy: 0.4801\nEpoch 4 of 30\nTraining\n",
|
767 |
+
"output_type": "stream"
|
768 |
+
},
|
769 |
+
{
|
770 |
+
"name": "stderr",
|
771 |
+
"text": "800it [45:33, 3.42s/it] \n",
|
772 |
+
"output_type": "stream"
|
773 |
+
},
|
774 |
+
{
|
775 |
+
"name": "stdout",
|
776 |
+
"text": "Validating\n",
|
777 |
+
"output_type": "stream"
|
778 |
+
},
|
779 |
+
{
|
780 |
+
"name": "stderr",
|
781 |
+
"text": "141it [07:48, 3.32s/it] \n",
|
782 |
+
"output_type": "stream"
|
783 |
+
},
|
784 |
+
{
|
785 |
+
"name": "stdout",
|
786 |
+
"text": "Train Loss: 0.3224\nVal Loss: 0.3392\nTrain accuracy: 0.4632\nVal accuracy: 0.4832\nEpoch 5 of 30\nTraining\n",
|
787 |
+
"output_type": "stream"
|
788 |
+
},
|
789 |
+
{
|
790 |
+
"name": "stderr",
|
791 |
+
"text": "800it [45:28, 3.41s/it] \n",
|
792 |
+
"output_type": "stream"
|
793 |
+
},
|
794 |
+
{
|
795 |
+
"name": "stdout",
|
796 |
+
"text": "Validating\n",
|
797 |
+
"output_type": "stream"
|
798 |
+
},
|
799 |
+
{
|
800 |
+
"name": "stderr",
|
801 |
+
"text": "141it [07:48, 3.32s/it] \n",
|
802 |
+
"output_type": "stream"
|
803 |
+
},
|
804 |
+
{
|
805 |
+
"name": "stdout",
|
806 |
+
"text": "Train Loss: 0.3092\nVal Loss: 0.3225\nTrain accuracy: 0.4662\nVal accuracy: 0.4843\nEpoch 6 of 30\nTraining\n",
|
807 |
+
"output_type": "stream"
|
808 |
+
},
|
809 |
+
{
|
810 |
+
"name": "stderr",
|
811 |
+
"text": "800it [45:10, 3.39s/it] \n",
|
812 |
+
"output_type": "stream"
|
813 |
+
},
|
814 |
+
{
|
815 |
+
"name": "stdout",
|
816 |
+
"text": "Validating\n",
|
817 |
+
"output_type": "stream"
|
818 |
+
},
|
819 |
+
{
|
820 |
+
"name": "stderr",
|
821 |
+
"text": "141it [07:45, 3.30s/it] \n",
|
822 |
+
"output_type": "stream"
|
823 |
+
},
|
824 |
+
{
|
825 |
+
"name": "stdout",
|
826 |
+
"text": "Train Loss: 0.3027\nVal Loss: 0.3136\nTrain accuracy: 0.4667\nVal accuracy: 0.4861\nEpoch 7 of 30\nTraining\n",
|
827 |
+
"output_type": "stream"
|
828 |
+
},
|
829 |
+
{
|
830 |
+
"name": "stderr",
|
831 |
+
"text": "800it [45:19, 3.40s/it] \n",
|
832 |
+
"output_type": "stream"
|
833 |
+
},
|
834 |
+
{
|
835 |
+
"name": "stdout",
|
836 |
+
"text": "Validating\n",
|
837 |
+
"output_type": "stream"
|
838 |
+
},
|
839 |
+
{
|
840 |
+
"name": "stderr",
|
841 |
+
"text": "141it [07:49, 3.33s/it] \n",
|
842 |
+
"output_type": "stream"
|
843 |
+
},
|
844 |
+
{
|
845 |
+
"name": "stdout",
|
846 |
+
"text": "Train Loss: 0.2951\nVal Loss: 0.3053\nTrain accuracy: 0.4677\nVal accuracy: 0.4861\nEpoch 8 of 30\nTraining\n",
|
847 |
+
"output_type": "stream"
|
848 |
+
},
|
849 |
+
{
|
850 |
+
"name": "stderr",
|
851 |
+
"text": "800it [45:25, 3.41s/it] \n",
|
852 |
+
"output_type": "stream"
|
853 |
+
},
|
854 |
+
{
|
855 |
+
"name": "stdout",
|
856 |
+
"text": "Validating\n",
|
857 |
+
"output_type": "stream"
|
858 |
+
},
|
859 |
+
{
|
860 |
+
"name": "stderr",
|
861 |
+
"text": "141it [07:47, 3.32s/it] \n",
|
862 |
+
"output_type": "stream"
|
863 |
+
},
|
864 |
+
{
|
865 |
+
"name": "stdout",
|
866 |
+
"text": "Train Loss: 0.2905\nVal Loss: 0.2986\nTrain accuracy: 0.4689\nVal accuracy: 0.4852\nEpoch 9 of 30\nTraining\n",
|
867 |
+
"output_type": "stream"
|
868 |
+
},
|
869 |
+
{
|
870 |
+
"name": "stderr",
|
871 |
+
"text": "800it [45:28, 3.41s/it] \n",
|
872 |
+
"output_type": "stream"
|
873 |
+
},
|
874 |
+
{
|
875 |
+
"name": "stdout",
|
876 |
+
"text": "Validating\n",
|
877 |
+
"output_type": "stream"
|
878 |
+
},
|
879 |
+
{
|
880 |
+
"name": "stderr",
|
881 |
+
"text": "141it [07:49, 3.33s/it] \n",
|
882 |
+
"output_type": "stream"
|
883 |
+
},
|
884 |
+
{
|
885 |
+
"name": "stdout",
|
886 |
+
"text": "Train Loss: 0.2878\nVal Loss: 0.2941\nTrain accuracy: 0.4700\nVal accuracy: 0.4817\nEpoch 10 of 30\nTraining\n",
|
887 |
+
"output_type": "stream"
|
888 |
+
},
|
889 |
+
{
|
890 |
+
"name": "stderr",
|
891 |
+
"text": "800it [45:26, 3.41s/it] \n",
|
892 |
+
"output_type": "stream"
|
893 |
+
},
|
894 |
+
{
|
895 |
+
"name": "stdout",
|
896 |
+
"text": "Validating\n",
|
897 |
+
"output_type": "stream"
|
898 |
+
},
|
899 |
+
{
|
900 |
+
"name": "stderr",
|
901 |
+
"text": "141it [07:48, 3.32s/it] \n",
|
902 |
+
"output_type": "stream"
|
903 |
+
},
|
904 |
+
{
|
905 |
+
"name": "stdout",
|
906 |
+
"text": "Train Loss: 0.2844\nVal Loss: 0.2889\nTrain accuracy: 0.4689\nVal accuracy: 0.4801\nEpoch 11 of 30\nTraining\n",
|
907 |
+
"output_type": "stream"
|
908 |
+
},
|
909 |
+
{
|
910 |
+
"name": "stderr",
|
911 |
+
"text": "800it [45:33, 3.42s/it] \n",
|
912 |
+
"output_type": "stream"
|
913 |
+
},
|
914 |
+
{
|
915 |
+
"name": "stdout",
|
916 |
+
"text": "Validating\n",
|
917 |
+
"output_type": "stream"
|
918 |
+
},
|
919 |
+
{
|
920 |
+
"name": "stderr",
|
921 |
+
"text": "141it [07:46, 3.31s/it] \n",
|
922 |
+
"output_type": "stream"
|
923 |
+
},
|
924 |
+
{
|
925 |
+
"name": "stdout",
|
926 |
+
"text": "Train Loss: 0.2825\nVal Loss: 0.2847\nTrain accuracy: 0.4689\nVal accuracy: 0.4797\nEpoch 12 of 30\nTraining\n",
|
927 |
+
"output_type": "stream"
|
928 |
+
},
|
929 |
+
{
|
930 |
+
"name": "stderr",
|
931 |
+
"text": " 69%|βββββββ | 548/799 [31:11<14:19, 3.42s/it]",
|
932 |
+
"output_type": "stream"
|
933 |
+
}
|
934 |
+
]
|
935 |
+
}
|
936 |
+
]
|
937 |
+
}
|
kaggle_submission.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|