Skip to main content

Explainable Detection of COVID-19 from Chest X-Ray Images

This project is part of the course DD2424 Deep Learning in Data Science at KTH. The goal is to train a classifier for COVID-19 detection from chest X-ray (CXR) images and boost it with explainability. More information can be found in the report. Also check out our presentation.

This package provides:

  • An application with a graphical user interface (GUI). This application can be used to make predictions on your images using trained models.
  • A suite of tools with a command-line interface (CLI). These tools can be used to train and test new models.
  • Several modules with a Keras-like API. These modules can be used in Python code.

1. Setup

The recommended installation is the following:

wget https://raw.githubusercontent.com/franco-ruggeri/dd2424-covid19-detection/master/scripts/install.sh -O install.sh
bash -i install.sh

Following the prompt, you can get a ready-to-use installation that uses the best models we trained.

The package is distributed on PyPi, so can be installed also with:

pip install covid19-detection

However, in this case you have to provide the trained models to the application. You can decide either to download the best models we trained or to train your own models with the command-line tools.

2. Application

If you have done the recommended installation, you can launch the application by searching it among the applications. Otherwise, you can launch it from the terminal:

covid19-detector

3. Command-line suite

The command-line suite is available under the covid19-detection command. It provides several subcommands. The list can be retrieved with:

covid19-detection -h

More information about each subcommand can be obtained with:

covid19-detection <subcommand> -h

4. Package

You can import the package in your Python code with:

import covid19

The covid19 package is composed of the following sub-packages:

  • covid19.datasets: contains utilities for generating COVIDx, HAM10000 and for building an input pipeline with tf.data.
  • covid19.models: contains ResNet50 and COVID-Net, two deep convolutional neural networks.
  • covid19.explainers: contains Grad-CAM and IG, two explainable AI methods, with some utilities for plotting the explanations.
  • covid19.layers: contains layers used by models in covid19.models.
  • covid19.metrics: contains utilities for computing and plotting metrics.
  • covid19.gui: contains graphical user interface implemented with Qt.
  • covid19.cli: contains command-line interface.

Each subpackage provides interesting modules. For example, you can create a COVID-Net as follows:

from covid19.models import COVIDNet

model = COVIDNet(n_classes=3)

For more information about each class, see the comments.

Metadata

Release files for covid19-detection 0.3.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for covid19-detection 0.3.6
File Size Uploaded Provenance Actions
covid19-detection-0.3.6.tar.gz 1.5 MB Without provenance Details for covid19-detection-0.3.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for covid19-detection 0.3.6
File Interpreter ABI Platform Actions
covid19_detection-0.3.6-py3-none-any.whl Python 3 none any Details for covid19_detection-0.3.6-py3-none-any.whl

Total release size: 1.6 MB

Release files / covid19-detection-0.3.6.tar.gz

Download URL covid19-detection-0.3.6.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
dc26a949dd1a2e931253f7e3050289df56c6eb63cc67bc532ace90c1be3f1f47
BLAKE2b-256 checksum
How to use checksums
ec756ad2231526781058bcf47197d8973928951af4e375ab4d2223c1a2463ac1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5

Release files / covid19_detection-0.3.6-py3-none-any.whl

Download URL covid19_detection-0.3.6-py3-none-any.whl
Size 158.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56aa0338664679baac346625b7d1ceeff708f3a6d023c5db3299d76830cf97b7
BLAKE2b-256 checksum
How to use checksums
0aabaf9df548b451205e70d9084193419cb3682553545b4f0881d4c4498a8a4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5

Security for covid19-detection 0.3.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page