Giter Site home page Giter Site logo

covid_19_rapid_triage_risk_predictor's Introduction

COVID-19 Outcome Prediction Guideline

DOI

Environment Building

Python Environment

Install a python 3.6 environment using conda

Packages

  1. Install gdcm using command
conda install -c conda-forge gdcm
  1. Install majority of packages using command pip install -r requirements.txt

  2. Install pytorch using command conda install

pytorch-cpu==1.1.0 torchvision-cpu==0.3.0 cpuonly -c pytorch

Or follow this link to install pytorch 1.1.0.

  1. Install pyradiomics from source using command
git clone git://github.com/Radiomics/pyradiomics

For unix like systems (MacOSX, linux):

cd pyradiomics

python -m pip install -r requirements.txt

python setup.py install

python setup.py build_ext --inplace

For Windows:

cd pyradiomics

python -m pip install -r requirements.txt

python setup.py install
  1. (HELPER) If you run into problem described by this link when extracting features, you can replace the files in
anaconda\envs\<env_name>\lib\site-packages\radioimcs\

with the corresponding files we provided in folder radiomics_patch.

Feature extraction pipeline usage

Input

  1. Place unsegmented dicom image series in a folder (e.g. <dcm>), and arrange the dicom series in the following way:
<dcm>
├───<patient_id>
│   └───<study_uid>
│       └───<series_uid>
│           ├───000001.dcm
│    		├───000002.dcm
│    		├───...
│    		└───000333.dcm
├───<patient_id>
│...
  1. Convert segmentation mask images into PNG format, named them in a sequence of numbers (e.g. 000.png, 001.png, …, 332.png), and place them in another folder (e.g. <seg>) for segmentation, and arrange them in the following way:
<seg>
├───<patient_id>
│   └───<study_uid>
│       └───<series_uid>
│           ├───000.png
│    		├───001.png
│    		├───...
│    		└───332.png
├───<patient_id>
│...

Execution

  1. Open terminal in root directory of the prediction pipeline.

  2. Activate the conda environment in the terminal.

  3. Extract radiomics features using the following command:

python proc_radiomic_feature.py --dicom_root <dcm> --lesion_mask_root <seg> --save_root <save_root>

Output

  1. Extracted features will be saved in the <save_root> directory with file name: “final_merge_feature.csv”.

Prediction Pipeline Usage

Input

  1. For radiomics-only models (Radiom), use command
python COVID-19_prediction.py --radiomics_data <save_root\final_merge_feature.csv>
  1. For models that include clinical symptoms, demographics and lab test results (RadioClinLab), you can prepare an additional CSV input, according to “example_lab_input.csv” (refer to the “units.txt” for units and meanings of the entries). This file should also be placed into the root directory of the prediction pipeline (<project_root>\<lab_input.csv>).
  2. To use the “RadioClinLab” model, use the command line code
python COVID-19_prediction --radiomics_data <save_root\final_merge_feature.csv> --lab_data <lab_input.csv>

covid_19_rapid_triage_risk_predictor's People

Contributors

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