This repository contains various U-Net architecture variants implemented in Keras for image segmentation tasks. These models provide different features and capabilities for building U-Net models quickly and efficiently.
- UNet2D: Basic 2D U-Net model.
- ResUNet2D: 2D Residual U-Net model. Inspired from here.
- ResUNetPlusPlus2D: 2D Residual U-Net++ model. Inspired from here.
- AttentionUNet2D: 2D Attention U-Net model. Inspired from here.
Each model is implemented as a function that can be easily called to create the corresponding architecture. The models offer flexibility in terms of levels, convolutional layers per level, starting features, dropout rate, output and activation.
- Clone the repository.
- Import the desired U-Net architecture function into your project.
- Call the function with the appropriate parameters to create the model.
from unet_models import create_unet_2D
# Create a 2D U-Net model
model = create_unet_2D(
input_shape=(256, 256, 3),
levels=4,
convs_per_level=2,
start_features=64,
dropout=0.5,
output_activation='sigmoid'
)
Contributions to add more U-Net variants or improve existing ones are welcome! Please follow the standard contribution guidelines.
This project is licensed under the GNU General Public License v3.