https://github.com/giansimone/unet-pytorch
PyTorch implementation of a convolutional neural network (U-Net) for semantic segmentation of biomedical images.
https://github.com/giansimone/unet-pytorch
pytorch semantic-segmentation unet unet-pytorch unet-segmentation
Last synced: 2 months ago
JSON representation
PyTorch implementation of a convolutional neural network (U-Net) for semantic segmentation of biomedical images.
- Host: GitHub
- URL: https://github.com/giansimone/unet-pytorch
- Owner: giansimone
- License: mit
- Created: 2025-04-01T15:52:39.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-04-10T13:04:14.000Z (6 months ago)
- Last Synced: 2025-04-13T11:14:35.094Z (6 months ago)
- Topics: pytorch, semantic-segmentation, unet, unet-pytorch, unet-segmentation
- Language: Python
- Homepage:
- Size: 85.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://badge.fury.io/py/unet-pytorch)
[](https://badge.fury.io/py/unet-pytorch)
[](https://github.com/giansimone/unet-pytorch/blob/main/LICENSE)# unet-pytorch
PyTorch implementation of a convolutional neural network (U-Net) for semantic segmentation of biomedical images.## Overview
This repository contains a PyTorch implementation of the U-Net architecture for semantic segmentation tasks.U-Net is a convolutional neural network architecture that was originally designed for biomedical image segmentation.
## Installation
You can install the U-Net model using pip.```bash
pip install unet-pytorch
```
We recommend using Python 3.11 or later and PyTorch 2.6 or later.You can also clone the repository and install it in local development mode using poetry.
```bash
git clone https://github.com/giansimone/unet-pytorch.gitcd unet-pytorch
pip install poetry
poetry install
```## Usage
To use the U-Net model, you can import the `UNet` class from the `unet_pytorch.model` module and create an instance of the model.```python
import torchfrom unet_pytorch.model import UNet
model = UNet(in_channels=1, out_channels=2)
input_tensor = torch.randn(1, 1, 512, 512)
output_tensor = model(input_tensor)
print(output_tensor.shape) # Should be (1, 2, 512, 512)
```## Training
To train the U-Net model, you can use the `unet_pytorch.train` module.## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.