Coder Social home page Coder Social logo

covid-xray's Introduction

Overview

This repository is an implementation of the paper "COVID-MobileXpert: On-Device COVID-19 Screening using Snapshots of Chest X-Ray".

Android App

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).

Live demo

CXR Imaging Datasets

Snapshots Dataset

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:

test

COVID-MobileXpert Architecture with Three-player KTD Training

test

Model Training and Evaluation

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.

On-device Deployment of the COVID-MobileXpert

test

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.

Results

Evaluation of COVID-19 Screening Performance using both CXR Images and Noisy Snapshots.

test

Dependencies

  • Python 3.7
  • Pytorch 1.3

Citation

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}
}

covid-xray's People

Contributors

xinli0928 avatar

Watchers

paper2code - bot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.