Git Product home page Git Product logo

willcode4exp_covidimagehackathon's Introduction

WillCode4EXP_CovidImageHackathon

This repository contains codes, scripts, and data used for team WillCode4EXP submission to AIAT Hackathon competing on classification of X-ray for Covid/Normal/Pneumonia classes. The method can be roughly described as modifying UNET+Attention model to classify visualize decision made with x-ray region.

Important notice

These code are intended for educational purpose. UNET is modifid for the Hackathon from other repository and presented for people who what to study on how my team modified UNet for classification.

uNetImplement.py and uNetParts.py for UNET architecture are not entirely mine. These are codes modified from a generous repository milesial/Pytorch-UNet/ who show me how to implement UNet

visit the link below for more info https://github.com/milesial/Pytorch-UNet/tree/master/unet

For any people who learn from my codes, please also give credit to the original repository when the credit is due.

Dependecies

The codes were developed using Pytorch with following packages

numpy scipy pandas scikit-learn pillow flask opencv matplotlib scikit-image torchvision natsort

For installation using anaconda

conda install numpy scipy
conda install pandas scikit-learn
conda install -c pillow flask
conda install -c conda-forge opencv matplotlib scikit-image

Code organization

competeRunUnet_FullAttention.py is main script for training validating and testing run. There is option to set number of epoch, load existing model, generate results .csv file, and etc.

competeRunUnet_FullAttention_getAttentionMap.py is a side script to extract attention maps and save into numpy array (.npy) for later visualization using Opencv.

uNetImplement.py and uNetParts.py are network architecture implementation files.

opencvProcess.py is script for visualization with attention map.

ForthTrialSub.csv is submission used in the competition.

compete__ are folders contain data for training, validation, and testing. The data in these folder are organized with subfolder indicating class label.

compete__All are data folders without any class label. The unorganized folders are easier to load in some scripts.

All the data has been manually crop to focus more on chest area.

Usage

Generating submission .csv results from test images (CompeteTest folder).

python competeRunUnet_FullAttention.py

competeRunUnet_FullAttention.py is automatically set to validate run be default, which mean there will be no training during the run. Many part of codes has option to run with GPU/CPU version of Pytorch. Feel free to select the modes as appropriated

Contributing

This is my first repository that I able to publicly release. Feel free to email me for questions/comments/suggestions at [email protected] or [email protected]. Pull request also appreciated.

willcode4exp_covidimagehackathon's People

Contributors

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