Coder Social home page Coder Social logo

lilac's Introduction

Learning-based Inference of Longitudinal imAge Changes (LILAC)

Overview

LILAC is a model that learns to compare images, designed to automatically filter out nuisance variations and focus on clinically significant changes in longitudinal imaging data.

LILAC overview

This repository includes models and train/evaluation code for the LILAC paper.

For more information, please read the LILAC paper. README.md.html For questions and feedback, please open issues or email the corresponding author

Installation

git clone https://github.com/heejong-kim/lilac.git
cd lilac
# if you prefer to use install in conda env
conda create -n lilac python pip 
conda activate lilac
pip install -e .

Requirements

The LILAC package depends on the following requirements:

  • torch
  • torchvision>=0.11.2
  • torchio>=0.18.73
  • pandas>=1.3.4
  • pillow>=8.4.0
  • numpy>=1.21.2
  • tensorboard

Running pip install -e . will automatically check for and install all of these requirements.

All baseline experiments in the paper were run on Python 3.9.7 and CUDA 11.2.

Examples

Learning to temporally order embryo images (LILAC-o)

python run.py \
    --jobname='embryo' \
    --task_option='o' \
    --targetname='phaseidx' \
    --backbone_name='cnn_2D' \
    --batchsize=64 \
    --max_epoch=40 \
    --output_directory='./output' \
    --image_directory='./embryo_image_location' \
    --image_size='224,224' \
    --csv_file_train='./demo_for_release/demo_embryo_train.csv' \
    --csv_file_val='./demo_for_release/demo_embryo_val.csv' \
    --csv_file_test='./demo_for_release/demo_embryo_test.csv'

Learning to temporally order wound-healing images (LILAC-o)

python run.py \
    --jobname='woundhealing' \
    --task_option='o' \
    --targetname='timepoint' \
    --backbone_name='cnn_2D' \
    --batchsize=128 \
    --max_epoch=40 \
    --output_directory='./output' \
    --image_directory='./woundhealing_image_location' \
    --image_size='224,224' \
    --csv_file_train='./demo_for_release/demo_woundhealing_train.csv' \
    --csv_file_val='./demo_for_release/demo_woundhealing_val.csv' \
    --csv_file_test='./demo_for_release/demo_woundhealing_test.csv'

Learning to predict temporal changes (LILAC-t)

python run.py \
    --jobname='oasis-aging' \
    --task_option='t' \
    --targetname='age' \
    --backbone_name='cnn_3D' \
    --batchsize=16 \
    --max_epoch=100 \
    --output_directory='./output' \
    --image_directory='./oasis-aging_image_location' \
    --image_size='128,128,128' \
    --csv_file_train='./demo_for_release/demo_oasis-aging_train.csv' \
    --csv_file_val='./demo_for_release/demo_oasis-aging_val.csv' \
    --csv_file_test='./demo_for_release/demo_oasis-aging_test.csv'

Learning to predict specific changes (LILAC-s)

python run.py \
    --jobname='adni-mci' \
    --task_option='s' \
    --targetname='CDRSB' \
    --optional_meta='AGExSEX'\
    --backbone_name='cnn_3D' \
    --batchsize=16 \
    --max_epoch=40 \
    --output_directory='./output' \
    --image_directory='./adni-mci_image_location' \
    --image_size='128,128,128' \
    --csv_file_train='./demo_for_release/demo_adni-mci_train.csv' \
    --csv_file_val='./demo_for_release/demo_adni-mci_val.csv' \
    --csv_file_test='./demo_for_release/demo_adni-mci_test.csv'

Inference

Simply adding --run_mode='eval' will run inference on the testing set specified in the CSV file provided through --csv_file_test=testset_list.csv. For example,

python run.py \
    --jobname='adni-mci' \
    --task_option='s' \
    --targetname='CDRSB' \
    --optional_meta='AGExSEX'\
    --backbone_name='cnn_3D' \
    --batchsize=16 \
    --max_epoch=40 \
    --output_directory='./output' \
    --image_directory='./adni-mci_image_location' \
    --image_size='128,128,128' \
    --csv_file_train='./demo_for_release/demo_adni-mci_train.csv' \
    --csv_file_val='./demo_for_release/demo_adni-mci_val.csv' \
    --csv_file_test='./demo_for_release/demo_adni-mci_test.csv'
    --run_mode='eval'

All *.csv files above are available in ./demo_for_release.

lilac's People

Contributors

heejong-kim avatar

Watchers

 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.