This section describes how we leveraged COVID-Net to create a COVIDNet-P model which distinguishes between cases where pneumonia is present and where it is not. Using the inference_pneumonia.py file provided, COVIDNet-P takes as input an image of shape (N, 480, 480, 3) and outputs the likelihood of whether pneumonia is present or not in the given image.
DISCLAIMER: Do not use this prediction for self-diagnosis. You should check with your local authorities for the latest advice on seeking medical assistance.
- Download a model from the pretrained models section
- Locate models and xray image to be inferenced
- To inference,
python inference_pneumonia.py \
--weightspath models/COVIDNet-CXR4-A \
--metaname model.meta \
--ckptname model-18540 \
--imagepath assets/ex-covid.jpeg
- For more options and information,
python inference_pneumonia.py --help
- Download a model from the pretrained models section
- Download a test dataset from the main repo
- To evaluate,
python eval_pneumonia.py \
--weightspath models/COVIDNet-CXR4-A \
--metaname model.meta \
--ckptname model-18540 \
--testfile test_COVIDx5.txt
--testfolder data/test
- For more options and information,
python eval_pneumonia.py --help
These are the results generated using the eval_pneumonia.py script with the COVIDNet-CXR4-A model acting as the backbone of COVIDNet-P and test_COVIDx5.txt dataset
Sensitivity (%) | ||
---|---|---|
Normal | Pneumonia | |
94.0 | 95.0 |
Positive Predictive Value (%) | ||
---|---|---|
Normal | Pneumonia | |
90.4 | 96.9 |