Skip to main content

UNET SEGMENTATION PYTORCH

Installation

pip install segment-torch

Usage

from segment_torch.unet import UNet
from torch import nn

device = "cuda"

config = dict(
    in_channels=3,
    out_channels=1,
    hiddens=[4, 8, 16, 32],
    dropouts=[0, 0.15, 0.15, 0.15],  # hiddens
    maxpools=2,  # hiddens - 1
    kernel_sizes=3,  # 2*hiddens + 3*hiddens + 2
    paddings='same',  # 2*hiddens + 3*hiddens + 2
    strides=1,  # 2*hiddens + 3*hiddens
    dilation=1,
    criterion=nn.BCELoss(),
    output_activation=nn.Sigmoid(),
    activation=nn.ReLU(),
    dimensions=2,
    device=device
)
unet = UNet(**config)

Different ways to define configs

# 0. None: default values are used
kernel_sizes=None

# 1. Single value or tuple: all layers have the same value
kernel_sizes = 3 
kernel_sizes = (3, 3)

# 2. Lists of values
encooder_kernel_sizes = [3, 3, 3, 3]
decoder_kernel_sizes = [3, 3, 3, 3, 3]
kernel_sizes = [encooder_kernel_sizes, decoder_kernel_sizes]

Metadata

Release files for segment-torch 0.0.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for segment-torch 0.0.10
File Size Uploaded Provenance Actions
segment_torch-0.0.10.tar.gz 8.5 kB Without provenance Details for segment_torch-0.0.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for segment-torch 0.0.10
File Interpreter ABI Platform Actions
segment_torch-0.0.10-py3-none-any.whl Python 3 none any Details for segment_torch-0.0.10-py3-none-any.whl

Total release size: 19.3 kB

Release files / segment_torch-0.0.10.tar.gz

Download URL segment_torch-0.0.10.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
badc19d6817e1d9e8ee2defb8b7bd13ba358bf0db467bd9ae8c451c8578bd5a5
BLAKE2b-256 checksum
How to use checksums
cb8e568f9b8d6898dfc0e3dccc7c1195d298863d0291ebc116dc01087c69079a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.16

Release files / segment_torch-0.0.10-py3-none-any.whl

Download URL segment_torch-0.0.10-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c0939b296e404d7a9a9269261eb26272f53133659d2a03bab04e45c9c363b062
BLAKE2b-256 checksum
How to use checksums
fcc47985c80f1d68f57ddc4976e09fabc0004f9dd81799c08603ef6491a93cf4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.16

Security for segment-torch 0.0.10

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page