Skip to content

InsightSoftwareConsortium/ITKPyTorch

Repository files navigation

ITKPyTorch

 Apache 2.0 License  Build, test, package status

Overview

This Insight Toolkit (ITK) module provides support for PyTorch Tensors as ITK Images.

Try it online

We will set up a demonstration of this using Binder that anyone can try. Click here:  Binder

Technical description

The ITK TorchImage< TPixel, VImageDimension > templated class in C++ is a subclass of the corresponding ITK Image< TPixel, VImageDimension > templated class and supports the same pixel types (i.e., integers, real numbers, RGBPixel, RGBAPixel, Vector, and CovariantVector) and the same numbers of dimensions. A TorchImage can be used in lieu of an Image in ITK pipelines but also can be used with filters and transformations that are specialized for TorchImage objects. These specialized pipeline steps are executed on a CUDA GPU using the C++ libTorch interface.

It is intended that this module enable MONAI intergration.

Installation for Python

 PyPI Version

Usage in Python

Functional interface to ITK

ITK pipeline interface

About

Implementations of ITK spatially-aware filters in PyTorch

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published