Code Monkey home page Code Monkey logo

spatiotemporal-cnn-transformer's Introduction

Hybrid Spatio-Temporal Transformer Network for Predicting Ischemic Stroke Lesion Outcomes from 4D CT Perfusion Imaging

Keras implementation of our method for MICCAI2022 paper: "Hybrid Spatio-Temporal Transformer Network for Predicting Ischemic Stroke Lesion Outcomes from 4D CT Perfusion Imaging".

Abstract

Predicting the follow-up infarct lesion from baseline spatio-temporal (4D) Computed Tomography Perfusion (CTP) imaging is essential for the diagnosis and management of acute ischemic stroke (AIS) patients. However, due to their noisy appearance and high dimensionality, it has been technically challenging to directly use 4D CTP images for this task. Thus, CTP datasets are usually post-processed to generate parameter maps that describe the perfusion situation. Existing deep learning-based methods mainly utilize these maps to make lesion outcome predictions, which may only provide a limited understanding of the spatio-temporal details available in the raw 4D CTP. While a few efforts have been made to incorporate raw 4D CTP data, a more effective spatio-temporal integration strategy is still needed. Inspired by the success of Transformer models in medical image analysis, this paper presents a novel hybrid CNN-Transformer framework that directly maps 4D CTP datasets to stroke lesion outcome predictions. This hybrid prediction strategy enables an efficient modeling of spatio-temporal information, eliminating the need for post-processing steps and hence increasing the robustness of the method. Experiments on a multicenter CTP dataset of 45 AIS patients demonstrate the superiority of the proposed method over the state-of-the-art.

Usage

Installation

Recommended environment:

  • Python 3.8.1
  • TensorFlow GPU 2.4.1
  • CUDA 11.0.2
  • cuDNN 8.0.4.30

To install the dependencies, run:

$ git clone https://github.com/kimberly-amador/Spatiotemporal-CNN-Transformer
$ cd Spatiotemporal-CNN-Transformer
$ pip install -r requirements.txt

Data Preparation

  1. Preprocess the data. The default model takes images of size 384 x 256.
  2. Save the preprocessed images and its corresponding labels as numpy arrays into a single file in 'patientID_preprocessed.npz' format.
  3. Create a patient dictionary. This should be a pickle file containing a dict as follows, where s is the slice number:
partition = {
    'train': {
        's_patientID',
        's_patientID',
        ...
    },
    'val': {
        's_patientID',
        's_patientID',
        ...
    }
    'test': {
        's_patientID',
        's_patientID',
        ...
    }
}

Train Model

  1. Modify the model configuration. The default configuration parameters are in ./model/config_file.py.
  2. Run python main.py to train the model.

Citation

If you find this code and paper useful for your research, please cite the paper:

K. Amador, A. Winder, J. Fiehler, M. Wilms, N.D. Forkert. (2022) Hybrid spatio-temporal Transformer network for predicting ischemic stroke lesion outcomes from 4D CT perfusion imaging. In: Proceedings of MICCAI 2022. pp. 644โ€“654.

Acknowledgement

Part of the code is adapted from open-source codebase:

spatiotemporal-cnn-transformer's People

Contributors

kimberly-amador avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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