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.
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.
git clone https://github.com/giansimone/unet-pytorch.git
cd 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.
import torch
from 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 file for details.
Metadata
Release files for unet-pytorch 0.4.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| unet_pytorch-0.4.3.tar.gz | 6.8 kB | Without provenance | Details for unet_pytorch-0.4.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| unet_pytorch-0.4.3-py3-none-any.whl | Python 3 | none | any | Details for unet_pytorch-0.4.3-py3-none-any.whl |
Total release size: 14.9 kB
Release files / unet_pytorch-0.4.3.tar.gz
| Download URL | unet_pytorch-0.4.3.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
36b7123c977a96a30be6eec50fe38ee69726684ac479cb11aaabb350c23a4913
|
|
BLAKE2b-256 checksum How to use checksums |
03860d4fc5c3804b1c0c00b450173f35da541e6349f20e170ddf1e6b879ce306
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.4 CPython/3.13.2 Darwin/24.4.0
|
Release files / unet_pytorch-0.4.3-py3-none-any.whl
| Download URL | unet_pytorch-0.4.3-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1671582cc36c27a3738f36691bfb180446dd04fbd15854305e2bf8dc1a36ecf3
|
|
BLAKE2b-256 checksum How to use checksums |
ef3423724a25521d77c5145cad58a9938fd8b15ece55e02838cf85b8b1fac36d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.4 CPython/3.13.2 Darwin/24.4.0
|
Security for unet-pytorch 0.4.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.