GithubHelp home page GithubHelp logo

rookielinlucy666 / defeatcovid19-net-pytorch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from defeatcovid19/defeatcovid19-net-pytorch

0.0 0.0 0.0 47 KB

Pytorch solution for predictions on X-ray images of COVID-19 patients

Home Page: https://www.defeatcovid19.org/

License: MIT License

Python 81.29% Dockerfile 11.33% Shell 7.37%

defeatcovid19-net-pytorch's Introduction

defeatcovid19-net-pytorch

This repo provides a Pytorch solution for predictions on X-ray images for COVID-19 patients.

Motivation

It is intended to be used as a template for defeatcovid19 group partecipants who like to contribute. You can find more info on our group's effort here. At the moment we're actively trying to contact local hospitals to collect radiologic (mainly XRay and Eco) images to build a robust dataset for deep learning training.

Implementation

The network of choice is ResNet34, provided by torchvision and pretrained on Imagenet. The net is first trained on the Kaggle Chest X-Ray Pneumonia dataset (5856 images) and then on the COVID-19 Chest X-Ray dataset (123 usable images).

Axial and lateral images were removed from the latter dataset. COVID-19 diagnoses were labelled 1, 0 otherwise (SARS/ARDS/Pneumocystis/Streptococcus/No finding).

Requirements

An environment.yml file is provided to list the package requirements (mainly numpy, pandas, opencv, torch). The train entrypoint expects to find the aforementioned datasets in ./input. Adjust your paths accordingly.

Training

You can train the network and see the results of the cross validation with

python train.py

Running with Docker

Requirements

NVIDIA Driver Installation Docker installation NVIDIA Docker installation

Build docker image

From the root of the repository (the image takes several minutes to build, due to download and compilation):

source tools/docker/setup.sh

Or if you are using shell fish:

source tools/docker/setup.fish

For running the training process:

dkrun train.py

Results (initial)

The first part of the training (on the "Pneumonia" dataset) uses a simple 80/20 train/valid split. It achieves a ROC AUC score close to 1 for the selected fold. The second part of the training (on the "COVID" dataset) uses a more robust 5-fold cross validation and it results in a ~0.77 ROC AUC score.

Citations

License

This repo serves as a template for future effort of the defeatcovid19 group and as such is intended to be released under the MIT license.

defeatcovid19-net-pytorch's People

Contributors

thundo avatar mrtj avatar alessandroferrari 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.