Effacer les filtres
Effacer les filtres

how to build "Nested UNet or UNet3+" in MATLAB?

16 vues (au cours des 30 derniers jours)
kobe
kobe le 21 Juin 2022
Réponse apportée : Jaynik le 28 Sep 2023
I want to know how to build nested U-net 3+ architecture in Matlab? Especially in how to make the full scale skip connection.

Réponses (1)

Jaynik
Jaynik le 28 Sep 2023
Hi Kobe,
I understand that you want to build a nested UNet or UNet3+ along with a full-scale skip connection.
For building a UNet, MATLAB provides the “unetLayers” function directly, which is a part of the Computer Vision Toolbox. But for nested UNet or UNet3+, you need to build the model from scratch.
For a nested UNet, you can create a UNet normally using the unetLayers” function and perform modifications on it by extracting the different encoder and decoder layers from it, nesting these layers, and merging the nested encoded and decoded layers. Skip connections can also be added in a similar way.
For example, to extract the layers, you can do the following:
unetModel = unetLayers(inputSize, numClasses);
layers = unetModel.Layers;
encoderLayers = layers(2:18);
decoderLayers = layers(19:end);
bridgeLayer = decoderLayers(1);
decoderLayers = decoderLayers(2:end);
Then, other steps like adding nesting or skip connections can be performed using these extracted layers.
Refer the following link to learn more about "unetLayers" function:
Refer the following example for using “encoderDecoderNetwork” to create a UNet network with skip connections:
Hope this helps!

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by