https://github.com/salwaelkaddaoui/unet
Implementation of the paper "U-Net: Convolutional Networks for Biomedical Image Segmentation" By Olaf Ronneberger, Philipp Fischer, Thomas Brox, 2015 in Tensorflow 2.x low level API.
https://github.com/salwaelkaddaoui/unet
deep-learning neural-networks semantic-segmentation tensorflow
Last synced: 2 months ago
JSON representation
Implementation of the paper "U-Net: Convolutional Networks for Biomedical Image Segmentation" By Olaf Ronneberger, Philipp Fischer, Thomas Brox, 2015 in Tensorflow 2.x low level API.
- Host: GitHub
- URL: https://github.com/salwaelkaddaoui/unet
- Owner: salwaElkaddaoui
- License: gpl-3.0
- Created: 2025-01-07T15:58:53.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-21T21:33:10.000Z (over 1 year ago)
- Last Synced: 2025-03-21T22:27:47.443Z (over 1 year ago)
- Topics: deep-learning, neural-networks, semantic-segmentation, tensorflow
- Language: Python
- Homepage:
- Size: 82 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# U-Net Implementation
This project provides a configurable U-Net for image segmentation, implemented using the TensorFlow 2.x low-level API. It is based on:
- U-Net: "U-Net: Convolutional Networks for Biomedical Image Segmentation" By Olaf Ronneberger, Philipp Fischer, Thomas Brox, 2015
- Residual connections (optional): He et al., 2016 (ResNet)
### Features
- **Connection type**: Choose between basic or residual connections.
- **Network depth**: Configurable by setting the number of blocks.
- **Initial filters**: Start from 64 (default) or any other value.
- **Batch Normalization** and **Dropout** are optional.
All parameters are set in **config/config.yaml**, making it easy to experiment with different architectures.
### Data Format
- Training and test images: RGB JPEG images.
- Masks: RGB PNG images, where each class is assigned a specific color.
- Dataset listing:
- The list of training images must be stored in a text file, with each line containing the absolute path to an image.
- A separate text file should contain the absolute paths to the corresponding masks, one per line.
- The paths to the training and test sets must be specified in the **config/config.yaml** file.
- Label Map:
- A JSON file defining the class mappings.
- The class with index 0 is the background.
- The path to this label map should be set in **config/config.yaml**.
- Color Map:
- A JSON file defining the color of each class (for visualization purposes).
- The path to this label map should be set in **config/config.yaml**.
### Requirements installation
A GPU is required. Install dependencies with:
```
pip install -r requirements.txt
```
### Usage
- **Training:** Run
```
python src/train.py
```
- **Prediction:** To generate segmentations **from a checkpoint on a set of images**, run
```
python src/predict.py
```
The checkpoint's name and path should be set in **config/config.yaml**.
### Monitoring Training with TensorBoard
- Evaluation metrics and errors can be visualized during training using TensorBoard.
- The logs directory path should be defined in **config/config.yaml**.
- To launch TensorBoard, run:
```
tensorboard --logdir=
```