frankkramer-lab / MIScnn

A framework for Medical Image Segmentation with Convolutional Neural Networks and Deep Learning
GNU General Public License v3.0
406 stars 115 forks source link

2D/3D use #1

Closed AmericaBG closed 5 years ago

AmericaBG commented 5 years ago

Hi! I would like to know id unet models can be used both in 2d and 3D. For example, to use Multires.py with 2D data, would be correct by setting the number of input channels to 1?

Thank you very much!

muellerdo commented 5 years ago

Hey SouthAmericaB,

sadly no. Only the standard U-Net Architecture can be currently used for processing 2D or 3D data. The others model architectures are a little bit outdated and can't be used right now. (because they only support 3D models)

If you want the use the Multires model, you have to manually adjust the layers for 2D images and then pass it to the Neural Network class as Architecture.

I'm planning to add examples and tutorials for how I use MIScnn. Approximately end of September.

Greetings, Dominik

muellerdo commented 5 years ago

Todo:

AmericaBG commented 5 years ago

All right! Thanks a lot and best regards! :)

muellerdo commented 5 years ago

Updated all U-Net models to the new MIScnn architecture standard. -> They are all usable, now

Usage:

from miscnn.neural_network.model import Neural_Network
from miscnn.neural_network.architecture.unet.multiRes import Architecture

unet_multiRes = Architecture()
model = Neural_Network(preprocessor=pp, architecture=unet_multiRes)

The Residual and Dense U-Net variants can be used identically. Also, I have tested them both and they work fine :)

Sadly, I haven't found any time, yet, to test out the performance of the MutliRes architecture. But it runs fine in the MIScnn pipeline and I haven't changed the code for the architecture -> it is still the original code from the paper soooo it should work

If you are using it, please share its performance with me :)

Greetings, Dominik