- Introduction
- Required Hardware
- Prerequisites
- Installation
- Data
- iotJumpWay
- Continue
- Contributing
- Versioning
- License
- Bugs/Issues
The following guide will take you through setting up and installing the COVID-19 Tensorflow DenseNet Classifier.
This project requires a fully functioning HIAS server. Features of this project require the iotJumpWay for device to device/application communication. The iotJumpWay broker is part of the HIAS server and must be running for the system to work correctly.
Before you start this tutorial please complete the HIAS Installation Guide.
If you want to use this project without HIAS you can comment out the following lines in COVID19DN.py:
COVID19DN.iotjumpway_client()
COVID19DN.threading()
For this Project, the operating system choice is Ubuntu 18.04.4 LTS. To get your operating system installed you can follow the Create a bootable USB stick on Ubuntu tutorial.
Ubuntu 18.04 come with Python 3.6 by default. You should be able to invoke it with the command in Shell:
python3
Clone the COVID-19 AI Classification repository from the Peter Moss COVID-19 AI Research Github Organization.
To clone the repository and install the COVID-19 Tensorflow DenseNet Classifier, make sure you have Git installed. Now navigate to the home directory on your device using terminal/commandline, and then use the following command.
$ git clone https://github.com/COVID-19-AI-Research-Project/AI-Classification.git
Once you have used the command above you will see a directory called COVID-19-AI-Research-Project in your home directory.
ls
Using the ls command in your home directory should show you the following.
COVID-19-AI-Research-Project
Navigate to COVID-19-AI-Research-Project/Projects/2 directory, this is your project root directory for this tutorial.
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 guide. You should pull the latest code from the development branch.
$ git clone -b "0.2.0" https://github.com/COVID-19-AI-Research-Project/AI-Classification.git
The -b "0.2.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.
Use the following commands to install the required software.
You will find the configuration file in the project 2 root directory.
{
"modes": [
"Classify",
"Client",
"Server",
"Train"
],
"data": {
"allowed": [
".png"
],
"batch": 64,
"channels": 3,
"dim": 64,
"h5": "Model/model.h5",
"rotations": 1,
"seed": 42,
"test_size": 0.255,
"test_0": [
"Model/Data/0/Non-Covid (1).png",
"Model/Data/0/Non-Covid (54).png",
"Model/Data/0/Non-Covid (104).png",
"Model/Data/0/Non-Covid (389).png",
"Model/Data/0/Non-Covid (582).png"
],
"test_1": [
"Model/Data/1/Covid (10).png",
"Model/Data/1/Covid (76).png",
"Model/Data/1/Covid (156).png",
"Model/Data/1/Covid (356).png",
"Model/Data/1/Covid (675).png"
],
"threshold": 0.5,
"train": "Model/Data"
},
"model": {
"beta_1": 0.9,
"beta_2": 0.999,
"decay": 0.0,
"dropout": 0.5,
"epochs": 50,
"epsilon": 0.1,
"factor": 0.5,
"json": "Model/model.json",
"lr": 0.002,
"min_lr": 1e-3,
"patience": 5,
"weights": "Model/model.h5"
},
"iotJumpWay": {
"host": "",
"port": 8883,
"loc": 0,
"zne": 0,
"id": 0,
"key": "",
"name": "",
"mqtt": {
"username": "",
"password": ""
}
},
"server": {
"ip": "",
"port": 8181
}
}
The following will install all dependencies. This installation will install Tensorflow GPU, if you need to install Tensorflow for CPU remove the -gpu in the shell file.
sh Scripts/Installation/Shell/Install.sh
The following will install all dependencies. This installation will install Tensorflow GPU, if you need to install Tensorflow for CPU remove the -gpu
pip3 install psutil
pip3 install requests
pip3 install numpy
pip3 install scipy
pip3 install scikit-image
pip3 install pandas
pip3 install scikit-learn
pip3 install matplotlib
pip3 install jsonpickle
pip3 install flask
pip3 install tensorflow-gpu==2.1.0
pip3 install paho-mqtt
Now you need to download the SARS-COV-2 Ct-Scan Dataset. Once you have downloaded the data you need to add the negative samples to the Model/Data/0/ directory, and the positive samples to the Model/Data/1/ directory.
In the project configuration file you will find data->test_0 and data->test_1. The files provided will allow you to use the same test data for your real-world testing when using the local classifier and the HTTP classifier.
These files are skipped during the augmentation process and used when using the local and HTTP classifier. You will also use them in the HIAS UI by sending them to the server for classification.
You can use the exact data we used, or you can change them to any files you like.
This system uses the HIAS iotJumpWay broker to communicate. You should already have followed the HIAS Installation Guide and have the server and broker online.
Once you have accessed your server head to the iotJumpWay devices section. IoT->Devices once ther click on the + sign to create a new device. Fill out the required details and submit the form. You will be redirected to your device page.
You will need to add your HIAS URL to the iotJumpWay->host section in the project configs, port should be 8883, then add Location ID, Zone ID, Device ID, Device Name and the MQTT username and password.
This project sends regular updates to the iotJumpWay which allows the UI to know vital information about the device such as location. For this you need to register a key at ipinfo.io. Once you have your key you need to add it to the iotJumpWay->key section in the project confs.
Now continue with the COVID-19 DenseNet tutorial.
Peter Moss COVID-19 AI Research Project encourages and welcomes code contributions, bug fixes and enhancements from the Github.
Please read the CONTRIBUTING document for a full guide to forking your repositories and submitting your pull requests. You will also find information about your code of conduct on this page.
- Adam Milton-Barker - Asociacion De Investigation En Inteligencia Artificial Para La Leucemia Peter Moss President & Lead Developer, Sabadell, Spain
You use SemVer for versioning. For the versions available, see Releases.
This project is licensed under the MIT License - see the LICENSE file for details.
You use the repo issues to track bugs and general requests related to using this project. See CONTRIBUTING for more info on how to submit bugs, feature requests and proposals.