Giter Club home page Giter Club logo

hinet's Introduction

Hi-Net

Code for TMI 2020 "Hi-Net: Hybrid-fusion Network for Multi-modal MR Image Synthesis"

alt text


Usage

  1. The original implementation of Hi-Net is Pytorch. The code has been tested in Mac and Linux.

  2. To run the code, you should first install dependencies:

    pip install fire

  3. Setup all parameters in config.py

  4. Put your data into ./data (Some samples from BraTs2018 have been stored out in this file)

  5. Train

    CUDA_VISIBLE_DEVICES=0,1 python main.py train --batch_size=128 --task_id=2 --gpu_id=[0,1]

    (you can set your parameters when runing the code)


If you use this code, please cite the following papers:

[1] Tao Zhou, Huazhu Fu, Geng Chen, Jianbing Shen, Ling Shao. "Hi-Net: Hybrid-fusion Network for Multi-modal MR Image Synthesis". IEEE Transactions on Medical Imaging (IEEE TMI), 2020. (Offical version)(arXiv version)


Datsets: you can download multi-modal medical datastes from:

[1] BraTs 2018: [HERE]

[2] BraTs 2019: [HERE]

[3] ISLES2015: [HERE]

hinet's People

Contributors

taozh2017 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

hinet's Issues

How to convert a file in nii format to mat format?

I downloaded the BraTs2018 dataset from the website, but it seems that the format in this dataset is nii while the files in data directory are in mat format. Could you please show me how to a file in nii format to mat format with python?

关于数据集以及测试指标问题

您好,我按照您论文中描述的进行数据集的预处理,进行训练,但是一直达不到您论文中提到的指标,差距比较大,请问您愿意分享您当时使用的数据集以及您的参数设置吗,感谢您的帮助!

An error in function call

🐛 BUG

According to

def forward(self, x1,x2,xx):
,
the function call here in
down_fu_2 = self.down_fu_2(down_fu_1m,down_2_0m,down_2_1m)
and
down_fu_3 = self.down_fu_3(down_fu_2m,down_3_0m,down_3_1m)
should be

down_fu_2 = self.down_fu_2(down_2_0m, down_2_1m, down_fu_1m)
down_fu_3 = self.down_fu_3(down_3_0m, down_3_1m, down_fu_2m)

instead.

Overflow problem

Hi there, thanks for your work, it's really inspiring!
I notice that in synthesis network, you use multiple MFB to mix feature maps, and in the MFB, there is a multiple computation.
With so many feature map in this computation, how can you provide from the NaN problem when training?
Because mul especially in 3D Volumn, might cause overflow problem and I use MFB in mixed precision mode.

Thanks a lot!

how to test?

I have realized the training process, but I don't know how to test. Could you tell me how to test it?

Backpropagation

It seems that you have added the four losses at the end and have then backpropagated it through the generator. But how is the final loss getting backpropagated through the all the three branches?

How to get Experimental phenomenon Images?

Dear taozh2017:
Thank you very much for sharing the code.
I have a confusion that want to ask you, I have accomplished the train process, and have got the discrimator.pkl and generator.pkl file.But when I test, only the mse, ssim and psnr values are displayed, how can I get the experimental images, for example, T1 + Flair to T2. After using the test, no experimental result images in any folder, what should I do?
@taozh2017

IndexError: too many indices for array

Sir, so sorry to bother you again. When I tried to run the code with the data example in data directory, there was problem in dataset.py, line 28, "img_t1 = img_t1[40:200, 20:200, :]". I print the shape of img_t1, which is (240,240). But the code in this line is to operate a 3-D ndarray, while img_t1 is a 2-D ndarray. And the paper of HiNet shows "For a 2D slice (240 × 240), we crop out an image of size 160 × 180 from the center region." So, what should I do to avoid this error, change the code or the data format? So sorry for my poor English and programming ability. And thanks again for your patient guidance.

关于数据集的问题

您好,我最近复现了您的程序,但是在数据集方面有一些问题,可以冒昧的向您要一下您当时使用的数据集吗,谢谢您的帮助

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.