GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - MolloiLab/py-distance-transforms

BranchesTags
Open more actions menu

Latest commit

 

History

63 Commits
63 Commits

Folders and files

NameName
Last commit message
Last commit date
docs
docs
 
 
py_distance_transforms
py_distance_transforms
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.python-version
.python-version
 
 
README.md
README.md
 
 
pyproject.toml
pyproject.toml
 
 
requirements-dev.lock
requirements-dev.lock
 
 
requirements.lock
requirements.lock
 
 

Repository files navigation

py-distance-transforms

py_distance_transforms is a Python package that provides efficient distance transform operations on arrays. It is a wrapper around the Julia package DistanceTransforms.jl, bringing its high-performance capabilities to the Python ecosystem.

Documentation

Docs Description
Getting Started: Open In Colab A quickstart guide to using py_distance_transforms for efficient distance transform operations on arrays.
Deep Learning (Hausdorff Loss): Open In Colab A MONAI tutorial adjusted to show how to use the Hausdorff loss function and the corresponding py_distance_transforms

Features

  • Fast distance transform computations on CPU and GPU
  • Support for 1D, 2D, and 3D arrays
  • Multi-threading for enhanced CPU performance
  • GPU acceleration for NVIDIA GPUs (CUDA)
  • Simple and intuitive API

Installation

Install py_distance_transforms using pip:

pip install py_distance_transforms

Basic Usage

from py_distance_transforms import transform
import numpy as np

arr = np.random.choice([0, 1], size=(10, 10)).astype(np.float32)
result = transform(arr)

GPU Acceleration

import torch
from py_distance_transforms import transform_cuda

x_gpu = torch.rand((100, 100), device='cuda')
x_gpu = (x_gpu > 0.5).float()

gpu_transformed = transform_cuda(x_gpu)

Acknowledgments

  • py_distance_transforms is a Python wrapper around the Julia package DistanceTransforms.jl.
  • Huge thanks to @pabloferz for getting DLPack.jl to work with PythonCall/juliacall and PyTorch. Massive thanks to @cjdoris and all of the contributors to PythonCall.jl as well.

About

No description, website, or topics provided.

Resources

Readme
Activity
Custom properties

Stars

2 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.