https://github.com/insightsoftwareconsortium/itkpytorch
Implementations of ITK spatially-aware filters in PyTorch
https://github.com/insightsoftwareconsortium/itkpytorch
Last synced: 7 months ago
JSON representation
Implementations of ITK spatially-aware filters in PyTorch
- Host: GitHub
- URL: https://github.com/insightsoftwareconsortium/itkpytorch
- Owner: InsightSoftwareConsortium
- License: apache-2.0
- Created: 2020-07-16T19:20:52.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-09-07T17:41:11.000Z (over 1 year ago)
- Last Synced: 2025-06-26T04:25:29.958Z (7 months ago)
- Language: C++
- Size: 62.5 KB
- Stars: 3
- Watchers: 2
- Forks: 3
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ITKPyTorch
[  ](https://github.com/InsightSoftwareConsortium/ITKPyTorch/blob/master/LICENSE) [  ](https://github.com/InsightSoftwareConsortium/ITKPyTorch/actions?query=workflow%3A%22Build%2C+test%2C+package%22)
## Overview
This [ Insight Toolkit (ITK) ](https://itk.org/) module provides support for PyTorch Tensors as ITK Images.
### Try it online
We will set up a demonstration of this using [ Binder ](www.mybinder.org) that anyone can try. Click here: [  ](https://mybinder.org/v2/gh/InsightSoftwareConsortium/ITKPyTorch/master?filepath=examples%2FITKPyTorch.ipynb)
### 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
[  ](https://pypi.python.org/pypi/itk-pytorch)
## Usage in Python
### Functional interface to ITK
### ITK pipeline interface