Coder Social home page Coder Social logo

structseg2019's Introduction

SE-ResUnet in StructSeg2019

Train and val

To train your model, just set some hyperparameter and run train_2d.py in both coarse and fined segmentation stage.
If you want to train a coarse segmentation model for all organs, set organs = ['Bg', 'RightLung', 'LeftLung', 'Heart', 'Esophagus', 'Trachea', 'SpinalCord']. For fine segmentation of each organ, set organs = ['Bg', 'Trachea'](Trachea for example).
crop_h and crop_w should be 512 for coarse stage, 256 in RightLung, LeftLung, Heart fined segmentation and 128 in Esophagus, Trachea, SpinalCord's due to the different area of different organs in CT slices.
This code only support GPU train and test, set the 'cuda' of your GPU ids used. Other parameter is trvial.

Data

Arange your data like the text file in data_split folder, train.txt for coarse segmenation and subfolder files for fined segmenation. Use absolute path works well.
For dataset configuration, self.to_tensor and self.seq need to be set for different task, if needed to change, we write as annotatation in the corresponding position.

Test

To test your model, run val.py file. Set the same hyperparameters used in train.py and set the pretrained model path. Firstly run main, croped2full_pred and evaluate function to get a nii and csv output. Secondly, you can run ensemble function to ensemble mutiple models to get a better result.

Pretrained models

As the model file is too large to upload, we upload to BaiduYun disc BaiduYun disc:https://pan.baidu.com/s/1Ux-g0YVDvrTmE7bMLT9VJw password:a0o7 It contains all used model in StructSeg2019, 5 fold models of both coarse segmentation stage and all organs segmentation of fined stage.

structseg2019's People

Contributors

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