tlucch-rootstrap
commited on
Commit
•
fec5466
1
Parent(s):
c6ac168
Update README.md
Browse files
README.md
CHANGED
@@ -1,11 +1,95 @@
|
|
1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
license: mit
|
3 |
-
language:
|
4 |
-
- en
|
5 |
metrics:
|
6 |
- accuracy
|
7 |
-
library_name: keras
|
8 |
pipeline_tag: image-classification
|
9 |
-
|
10 |
-
-
|
11 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
library_name: monai
|
3 |
+
tags:
|
4 |
+
- classification
|
5 |
+
- medical
|
6 |
+
- neuroscience
|
7 |
+
- alzheimer
|
8 |
license: mit
|
|
|
|
|
9 |
metrics:
|
10 |
- accuracy
|
|
|
11 |
pipeline_tag: image-classification
|
12 |
+
datasets:
|
13 |
+
- ADNI
|
14 |
+
---
|
15 |
+
---
|
16 |
+
|
17 |
+
### Model Description
|
18 |
+
A machine learning model for waste classification
|
19 |
+
|
20 |
+
- **Developed by:** rootstrap
|
21 |
+
- **Model type:** image-classifier
|
22 |
+
- **License:** mit
|
23 |
+
|
24 |
+
## Waste Classifier Model
|
25 |
+
The aim is to build a model for MRI classification that identifies among the different classes:
|
26 |
+
|
27 |
+
- Alzheimer's
|
28 |
+
- Mild Cognitive Impairment
|
29 |
+
- Control
|
30 |
+
|
31 |
+
This machine learning model will help medical staff get a second opinion on whether a pacient MRI indicates the presence of Alzheimer's desease
|
32 |
+
|
33 |
+
|
34 |
+
The model was built using **Monai** MONAI is a freely available, community-supported, PyTorch-based framework for deep learning in healthcare imaging.
|
35 |
+
|
36 |
+
It has two main design goals:
|
37 |
+
|
38 |
+
To be approachable and rapidly productive
|
39 |
+
To be also configurable.
|
40 |
+
|
41 |
+
### Model Sources
|
42 |
+
|
43 |
+
- **Repository:** [https://github.com/rootstrap/MRI-classifier](https://github.com/rootstrap/MRI-classifier)
|
44 |
+
|
45 |
+
## Uses
|
46 |
+
|
47 |
+
At Rootstrap we classify waste. We found that people were struggled to classify correctly,
|
48 |
+
and then we end up not recycling most of the generated waste at the office, since if there were items in the wrong basket,
|
49 |
+
all the basket should not be classified.
|
50 |
+
Because of this reason, we created an app to help people at our company to classify waste.
|
51 |
+
|
52 |
+
### Direct Use
|
53 |
+
|
54 |
+
```bash
|
55 |
+
model = nets.DenseNet121(spatial_dims=3, in_channels=1, out_channels=3)
|
56 |
+
checkpoint = torch.load("86_acc_model.pth")
|
57 |
+
model.load_state_dict(checkpoint)
|
58 |
+
model.predict()
|
59 |
+
|
60 |
+
```
|
61 |
+
|
62 |
+
## Bias, Risks, and Limitations
|
63 |
+
|
64 |
+
This model has an 86% of accuracy. Although it is an outstanding result, his means that 13% of times the prediction is wrong.
|
65 |
+
This is why its important to understand that this tool is not a real medical opinion and can not be used as a final diagnosis by any means.
|
66 |
+
This project does not aim to replace medical staff in diagnosing Alzheimer's desease, instead it is a tool to help them to get a quick and accurate second opinion.
|
67 |
+
|
68 |
+
## Training Details
|
69 |
+
|
70 |
+
### Training Data
|
71 |
+
|
72 |
+
The MRI data was gathered from the Alzheimer’s Desease Neuroimaging Initiative (ADNI) Database.
|
73 |
+
Afterwards, the data was splitted into one folder for each class.
|
74 |
+
|
75 |
+
Split into train/test
|
76 |
+
The data was splitted using the 60% for training, 20% for validation and 20% for testing
|
77 |
+
|
78 |
+
The model has been trained to classify waste into 3 classes.
|
79 |
+
The dataset used for the training consisted of 2527 images:
|
80 |
+
- 501 glass
|
81 |
+
- 594 paper
|
82 |
+
- 403 cardboard
|
83 |
+
- 482 plastic
|
84 |
+
- 410 metal
|
85 |
+
- 137 trash
|
86 |
+
|
87 |
+
|
88 |
+
### Training Procedure
|
89 |
+
|
90 |
+
You can find the code for training at [train.ipynb](https://github.com/rootstrap/MRI-classifier/blob/main/train.ipynb)
|
91 |
+
Training the model using DenseNet121 adapted for 3D images.
|
92 |
+
|
93 |
+
## Evaluation and Results
|
94 |
+
|
95 |
+
After 100 epochs, the model reached an accuracy of 85.76%
|