Skip to content

Commit 3b4c63d

Browse files
Merge pull request #17 from AdamMiltonBarker/main
1.0.2
2 parents f9bd1e8 + 041b09b commit 3b4c63d

File tree

10 files changed

+52
-30
lines changed

10 files changed

+52
-30
lines changed

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
![Acute Lymphoblastic Leukemia Arduino Nano 33 BLE Sense Classifier](assets/images/project-banner.jpg)
55

6-
[![CURRENT RELEASE](https://img.shields.io/badge/CURRENT%20RELEASE-1.0.0-blue.svg)](https://github.com/AMLResearchProject/ALL-Arduino-Nano-33-BLE-Sense-Classifier/tree/1.0.0) [![UPCOMING RELEASE](https://img.shields.io/badge/CURRENT%20DEV%20BRANCH-2.0.0-blue.svg)](https://github.com/AMLResearchProject/ALL-Arduino-Nano-33-BLE-Sense-Classifier/tree/2.0.0) [![Contributions Welcome!](https://img.shields.io/badge/Contributions-Welcome-lightgrey.svg)](CONTRIBUTING.md) [![Issues](https://img.shields.io/badge/Issues-Welcome-lightgrey.svg)](issues)
6+
[![CURRENT RELEASE](https://img.shields.io/badge/CURRENT%20RELEASE-1.0.2-blue.svg)](https://github.com/AMLResearchProject/ALL-Arduino-Nano-33-BLE-Sense-Classifier/tree/1.0.2) [![UPCOMING RELEASE](https://img.shields.io/badge/CURRENT%20DEV%20BRANCH-2.0.0-blue.svg)](https://github.com/AMLResearchProject/ALL-Arduino-Nano-33-BLE-Sense-Classifier/tree/2.0.0) [![Contributions Welcome!](https://img.shields.io/badge/Contributions-Welcome-lightgrey.svg)](CONTRIBUTING.md) [![Issues](https://img.shields.io/badge/Issues-Welcome-lightgrey.svg)](issues)
77

88
[![PEP8](https://img.shields.io/badge/code%20style-pep8-orange.svg)](https://www.python.org/dev/peps/pep-0008/) [![Documentation Status](https://readthedocs.org/projects/all-arduino-nano-33-ble-sense-classifier/badge/?version=latest)](https://all-arduino-nano-33-ble-sense-classifier.readthedocs.io/en/latest/?badge=latest) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/5065/badge)](https://bestpractices.coreinfrastructure.org/projects/5065)
99

@@ -33,7 +33,13 @@
3333

3434
# Introduction
3535

36-
The **Acute Lypmhoblastic Leukemia Arduino Nano 33 BLE Sense Classifier** is an experiment to explore how low powered microcontrollers, specifically the Arduino Nano 33 BLE Sense, can be used to detect Acute Lymphoblastic Leukemia. The Arduino Nano 33 BLE Sense is the latest Arduino Board which supports Tensorflow Lite, allowing machine learning on Arduino.
36+
The **Acute Lypmhoblastic Leukemia Arduino Nano 33 BLE Sense Classifier** is an experiment to explore how low powered microcontrollers, specifically the Arduino Nano 33 BLE Sense, can be used to detect Acute Lymphoblastic Leukemia. The [Arduino Nano 33 BLE Sense](https://store.arduino.cc/arduino-nano-33-ble-sense) is the latest Arduino Board which supports Tensorflow Lite, allowing machine learning on Arduino.
37+
38+
![Acute Lymphoblastic Leukemia Arduino Nano 33 BLE Sense Classifier](assets/images/all-arduino-nano-33-ble-classifier.gif)
39+
40+
The model you will train is a 6 layer Convoluntional Neural Network trained using [Intel® Optimization for Tensorflow*](https://software.intel.com/content/www/us/en/develop/articles/intel-optimization-for-tensorflow-installation-guide.html) from the [Intel® oneAPI AI Analytics Toolkit](https://software.intel.com/content/www/us/en/develop/tools/oneapi/ai-analytics-toolkit/download.html?operatingsystem=linux) to optimize and accelerate the training process.
41+
42+
Checkout the [official video](https://www.youtube.com/watch?v=CDJEXdj2KZs) for the project.
3743

3844
 
3945

@@ -54,13 +60,16 @@ The motivation for this project was to explore how low powered devices such as A
5460
 
5561

5662
# Acute Lymphoblastic Leukemia
57-
[Acute lymphoblastic leukemia (ALL)](https://www.leukemiaairesearch.com/research/leukemia), also known as Acute Lymphocytic Leukemia, is a cancer that affects the lymphoid blood cell lineage. It is the most common leukemia in children, and it accounts for 10-20% of acute leukemias in adults. The prognosis for both adult and especially childhood ALL has improved substantially since the 1970s. The 5- year survival is approximately 95% in children. In adults, the 5-year survival varies between 25% and 75%, with more favorable results in younger than in older patients.
63+
[Acute lymphoblastic leukemia (ALL)](https://www.leukemiaairesearch.com/research/leukemia), also known as acute lymphocytic leukemia, is a cancer that affects the lymphoid blood cell lineage. It is the most common leukemia in children, and it accounts for 10-20% of acute leukemias in adults. The prognosis for both adult and especially childhood ALL has improved substantially since the 1970s. The 5- year survival is approximately 95% in children. In adults, the 5-year survival varies between 25% and 75%, with more favorable results in younger than in older patients.
5864

5965
For more information about Acute Lymphoblastic Leukemia please visit our [Leukemia Information Page](https://www.leukemiaairesearch.com/research/leukemia)
6066

6167
 
6268

6369
# ALL-IDB
70+
71+
![Acute Lymphoblastic Leukemia Arduino Nano 33 BLE Sense Classifier](assets/images/all-idb.jpg)
72+
6473
You need to be granted access to use the Acute Lymphoblastic Leukemia Image Database for Image Processing dataset. You can find the application form and information about getting access to the dataset on [this page](https://homes.di.unimi.it/scotti/all/#download) as well as information on how to contribute back to the project [here](https://homes.di.unimi.it/scotti/all/results.php). If you are not able to obtain a copy of the dataset please feel free to try this tutorial on your own dataset, we would be very happy to find additional AML & ALL datasets.
6574

6675
 
Loading

assets/images/all-idb.jpg

77.2 KB
Loading

assets/images/project-banner.jpg

626 KB
Loading

docs/img/project-banner.jpg

626 KB
Loading

docs/index.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@
44

55
# Welcome
66

7-
Welcome to the **ALL Arduino Nano 33 BLE Sense Classifier** official documentation.
8-
9-
The **Acute Lypmhoblastic Leukemia Arduino Nano 33 BLE Sense Classifier** is an experiment to explore how low powered microcontrollers, specifically the Arduino Nano 33 BLE Sense, can be used to detect Acute Lymphoblastic Leukemia. The Arduino Nano 33 BLE Sense is the latest Arduino Board which supports Tensorflow Lite, allowing machine learning on Arduino.
10-
11-
The motivation for this project was to explore how low powered devices such as Arduino can be used to detect Acute Lymphoblastic Leukemia. The project will be submitted to the Tensorflow For Microcontroller Challenge and the Eyes on Edge: tinyML Vision Challenge.
7+
Welcome to the [ALL Arduino Nano 33 BLE Sense Classifier](https://github.com/AMLResearchProject/ALL-Arduino-Nano-33-BLE-Sense-Classifier) official documentation.
128

139
 
1410

@@ -24,7 +20,7 @@ _Developers that have contributed to this repository have experience in using Ar
2420

2521
# Installation
2622

27-
Use the following installation guides to set up your project:
23+
Use the following installation guides to set up your project.:
2824

2925
- [Ubuntu Installation Guide](installation/ubuntu.md)
3026
- [Arduino Installation Guide](installation/arduino.md)

docs/installation/arduino.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ The following hardware is required for this project:
2424
# Software
2525
The following Arduino software libraries are used with this project:
2626

27-
- [Arduino Tensorflow Lite](https://github.com/tensorflow/tflite-micro)
27+
- [Arduino IDE](https://www.arduino.cc/en/software)
28+
- [Arduino Tensorflow Lite For Microcontrollers](https://github.com/tensorflow/tflite-micro)
2829
- [JpegDecoder](https://github.com/Bodmer/JPEGDecoder)
2930

3031
 
3132

3233
# Prerequisites
33-
You will need to ensure you have installed the following software and followed the provided guides:
34+
You will need to ensure you have followed the provided guides below:
3435

3536
- [Ubuntu Installation Guide](../installation/ubuntu.md)
3637
- [Python Usage Guide](../usage/python.md) or [Jupyter Notebooks Usage Guide](../usage/notebooks.md)
37-
- [Arduino IDE](https://www.arduino.cc/en/software)
3838
- [Getting started with the Arduino Nano 33 BLE Sense](https://www.arduino.cc/en/Guide/NANO33BLESense)
3939
- [Why doesn't the 5V pin work in the Arduino Nano 33 BLE boards?](https://support.arduino.cc/hc/en-us/articles/360014779679-Why-doesn-t-the-5V-pin-work-in-the-Arduino-Nano-33-BLE-boards-)
4040

@@ -44,7 +44,18 @@ You will need to ensure you have installed the following software and followed t
4444

4545
![ALL Arduino Nano 33 BLE Sense Classifier](../img/arduino-nano-33-ble-sense-sd_bb.jpg)
4646

47-
Follow the diagram above to connect your SD card reader to the Arduino Nano 33 BLE Sense.
47+
Follow the diagram above to connect your SD card reader to the Arduino Nano 33 BLE Sense. Remember you need to follow the steps in [Why doesn't the 5V pin work in the Arduino Nano 33 BLE boards?](https://support.arduino.cc/hc/en-us/articles/360014779679-Why-doesn-t-the-5V-pin-work-in-the-Arduino-Nano-33-BLE-boards-) to enable 5V on the Arduino Nano BLE Sense.
48+
49+
Below is a pin guide to help.
50+
51+
| Arduino Pin | SD Card Pin |
52+
| ---------- | ---------- |
53+
| D10 | CS |
54+
| D11 | MOSI |
55+
| D12 | MISO |
56+
| D13 | SCK |
57+
| 5v | VCC |
58+
| GND | GND |
4859

4960
 
5061

docs/installation/ubuntu.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ To clone the repository and install the project, make sure you have Git installe
4040
git clone https://github.com/AMLResearchProject/ALL-Arduino-Nano-33-BLE-Sense-Classifier.git
4141
```
4242

43-
This will clone the ALL Arduino Nano 33 BLE Sense Classifier repository and move the cloned repository to the agents directory in the HIAS project (components/agents/mqtt/).
43+
This will clone the ALL Arduino Nano 33 BLE Sense Classifier repository.
4444

4545
``` bash
4646
ls
@@ -59,10 +59,10 @@ Navigate to the **ALL-Arduino-Nano-33-BLE-Sense-Classifier** directory, this is
5959
Developers from the Github community that would like to contribute to the development of this project should first create a fork, and clone that repository. For detailed information please view the [CONTRIBUTING](https://github.com/AMLResearchProject/ALL-Arduino-Nano-33-BLE-Sense-Classifier/blob/master/CONTRIBUTING.md "CONTRIBUTING") guide. You should pull the latest code from the development branch.
6060

6161
``` bash
62-
git clone -b "1.0.0" https://github.com/AMLResearchProject/ALL-Arduino-Nano-33-BLE-Sense-Classifier.git
62+
git clone -b "2.0.0" https://github.com/AMLResearchProject/ALL-Arduino-Nano-33-BLE-Sense-Classifier.git
6363
```
6464

65-
The **-b "1.0.0"** parameter ensures you get the code from the latest master branch. Before using the below command please check our latest master branch in the button at the top of the project README.
65+
The **-b "2.0.0"** parameter ensures you get the code from the latest master branch. Before using the below command please check our latest master branch in the button at the top of the project README.
6666

6767
 
6868

docs/usage/arduino.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,13 @@ Now you need to import your C array model into the Arduino project. On your deve
3636

3737
 
3838

39+
# Test Data
40+
During training the test data was resized and moved to the **model/data/test/** directory. Before you can continue you need to upload these files to the SD card.
41+
42+
 
43+
3944
# Run The Classifier
40-
Now it is time to run your classifier on the Arduino Nano 33 BLE Sense. Make sure you are connected to your Arduino and click on the **upload** button. Once the model is uploaded it will start to run, open your serial monitor and watch the output.
45+
Now it is time to run your classifier on the Arduino Nano 33 BLE Sense. Make sure you are connected to your Arduino and click on the **upload** button. Once the model is uploaded it will start to run, open your serial monitor and watch the output. You will see the onboard LED on the Arduino Nano 33 BLE Sense turn **red** if Acute Lymphoblastic Leukemia is detected and **green** if it is not.
4146

4247
``` bash
4348
19:22:40.139 -> Initialising SD card...
@@ -183,7 +188,7 @@ Now it is time to run your classifier on the Arduino Nano 33 BLE Sense. Make sur
183188

184189
# Conclusion
185190

186-
We see that our model that can correctly classify all twenty images only gets 11/20 when running on Arduino. There are some additional testing steps we can take which will be introduced in V2 that will allow us to test the Arduino model on our development machine to help identify where the bug is coming from. For now this is a good first attempt at building a classifier to detect Acute Lymphoblastic Leukemia detection on Arduino. If you would like to view the ongoing issue in the Tensorflow Micro repository [click here](https://github.com/tensorflow/tflite-micro/issues/287), thanks to [Advait Jain](https://github.com/advaitjain) for the asistance with this issue.
191+
We see that our model that can correctly classify all twenty images only gets 11/20 when running on Arduino. There are some additional testing steps we can take which will be introduced in V2 that will allow us to test the Arduino model on our development machine to help identify where the bug is coming from. For now this is a good first attempt at building a classifier to detect Acute Lymphoblastic Leukemia detection on Arduino. If you would like to view the ongoing issue in the Tensorflow Micro repository [click here](https://github.com/tensorflow/tflite-micro/issues/287) thanks to [Advait Jain](https://github.com/advaitjain) for the asistance with this issue.
187192

188193
 
189194

docs/usage/python.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -221,29 +221,30 @@ _________________________________________________________________
221221
## Training Results
222222
Below are the training results for 28 epochs.
223223
224-
<img src="../img/plots/accuracy.png" alt="Adam Optimizer Results" />
224+
![Accuracy](../img/plots/accuracy.png)
225225
226-
_Fig 2. Accuracy_
226+
_Fig 1. Accuracy_
227227
228-
<img src="../img/plots/loss.png" alt="Loss" />
228+
![Loss](../img/plots/loss.png)
229229
230-
_Fig 3. Loss_
230+
_Fig 2. Loss_
231231
232-
<img src="../img/plots/precision.png" alt="Precision" />
232+
![Precision](../img/plots/precision.png)
233233
234-
_Fig 4. Precision_
234+
_Fig 3. Precision_
235235
236-
<img src="../img/plots/recall.png" alt="Recall" />
236+
![Recall](../img/plots/recall.png)
237237
238-
_Fig 5. Recall_
238+
_Fig 4. Recall_
239239
240-
<img src="../img/plots/auc.png" alt="AUC" />
240+
![AUC](../img/plots/auc.png)
241241
242-
_Fig 6. AUC_
242+
_Fig 5. AUC_
243243
244-
<img src="../img/plots/confusion-matrix.png" alt="AUC" />
244+
![Confusion Matrix](../img/plots/confusion-matrix.png)
245+
246+
_Fig 6. Confusion Matrix_
245247
246-
_Fig 7. Confusion Matrix_
247248
248249
``` bash
249250
2021-07-18 17:47:55,953 - Classifier - INFO - Metrics: loss 0.2371470034122467

0 commit comments

Comments
 (0)