This repository is an implementation of the paper "COVID-MobileXpert: On-Device COVID-19 Screening using Snapshots of Chest X-Ray".
Our Android App is available here. Please feel free to have a try. You can directly download the snapshots provided in "Test Cases for App" for testing (click on the "View code").
Here are the steps to test with your own CXR images (click on the "View all of README.md"):
- Download and install our App here.
- Download and install Microsoft Office Lens here.
- Display a CXR image on your screen (PACS system or PC).
- Open Microsoft Office Lens and take a snapshot of the CXR image under the "DOCUMENT" mode (adjust border if needed).
- Choose the "GRAYSCALE" filter and save the snapshot.
- Open our App, load the snapshot from the gallery and make the prediction (check the following live demo).
- Pre-training Data (108,948 CXR Images)
- Fine-tuning Data (537 CXR Images)
- Fine-tuning data is split into training/validation/testing sets with 125/18/36 images for each class.
To create a noisy snapshot dataset, we first display the original CXR image on a PC screen and then use Microsoft Office Lens to scan and save the snapshot. Noisy snapshots will be converted to 8-bit gray-scale images. Each clean CXR image from CXR image dataset has a noisy snapshot counterpart, Here is one example:
Codes and learned model parameters are available in the Main folder. Here are the steps for training and testing:
- Put the CXR images in the Dataset folder as the following structure:
Dataset
train
clean
covid
pneumonia
test
clean
covid
pneumonia
validation
clean
covid
pneumonia
- Download the pre-trained model here and save it into RF_model folder.
- Run the .ipynb file for training and testing.
We provide the source code for deployment with Pytorch Mobile and Android Studio, which is developed based on this repository. The source code contains an example model, if you want to deploy other models, here are the steps:
- Download the pre-trained models.
- Use the script "TorchScript_converter.py" to convert the model to TorchScript (.pt).
- Put the model under "src/main/assets" folder
- Change the path in 'MainActivity.java' to the current .pt file.
- Build and test.
Evaluation of COVID-19 Screening Performance using both CXR Images and Noisy Snapshots.
- Python 3.7
- Pytorch 1.3
Xin Li, Chengyin Li and Dongxiao Zhu
COVID-MobileXpert: On-Device COVID-19 Screening using Snapshots of Chest X-Ray, arXiv:2004.03042, 2020
https://github.com/xinli0928/COVID-Xray
@misc{li2020covidmobilexpert,
title={COVID-MobileXpert: On-Device COVID-19 Screening using Snapshots of Chest X-Ray},
author={Xin Li and Chengyin Li and Dongxiao Zhu},
year={2020},
eprint={2004.03042},
archivePrefix={arXiv},
primaryClass={eess.IV}
}