The purpose of this project is to detect COVID-19 positive cases based on lung CT scan images. The model is based on a Resnext101 architecture and is fine-tuned in order to classify our own images.
Use the package manager pip to install required packages
pip3 install -r requirements.txt
If you're not placed in the root folder, use full/relative path to requirements.txt instead.
Important: Make sure to install the required packages, otherwise, you may have some package related errors (especially CUDA issues) while running the program.
Before running the program, you need to download the data first. You can find it here.
Once you download the data, place the /train
and /test
folders in /data/covid_data
folder
, Otherwise you will need to change train_path
and test_path
arguments when running your code. You should have
a similar structure:
Covid-19-Detection-CTScans
│ README.md
│ requirements.txt
│
└───data
│ │ __init__.py
│ │ data.py
│ │
│ └───covid_data
│ │
│ │───train
│ │ └───img.png ....
│ │
│ └───test
│ └───img.png ....
└───....
You can run the program using the following command:
python3 covid19_detector.py
This command will use the default parameters, if you want to change any parameter , you will need to pass it as an argument when running the program, for example:
python3 covid19_detector.py -m Test -lr 0.001
For more information about arguments, type the following command:
python3 covid19_detector.py -h
Thrown errors and exceptions during training/ testing are written to a log file /logs/error.log
.
Make sure to check the logs if you have any issues.
All are welcome to contribute, but before making any changes, please make sure to check the project's style. It is best if you follow the "fork-and-pull" Git workflow.
- Fork the repo on GitHub
- Clone the project to your own machine
- Commit changes to your own branch
- Push your work back up to your fork
- Submit a Pull request.
Important: Do not forget to keep your cloned project up to date, and to open a new issue in case of any major changes.