pyronn-torch
This repository provides PyTorch bindings for PYRO-NN, a collection of back-rotatable projectors for CT reconstruction.
Feel free to cite our publication:
@article{PYRONN2019,
author = {Syben, Christopher and Michen, Markus and Stimpel, Bernhard and Seitz, Stephan and Ploner, Stefan and Maier, Andreas K.},
title = {Technical Note: PYRO-NN: Python reconstruction operators in neural networks},
year = {2019},
journal = {Medical Physics},
}
Installation
From PyPI:
pip install pyronn-torch
From this repository:
git clone --recurse-submodules --recursive https://github.com/theHamsta/pyronn-torch.git
cd pyronn-torch
pip install torch
pip install -e .
You can build a binary wheel using
python setup.py bdist_wheel
Usage
import pyronn_torch
#ConeBeamProjector(volume_shape,
# volume_spacing,
# volume_origin,
# projection_shape,
# projection_spacing,
# projection_origin,
# projection_matrices)
projector = pyronn_torch.ConeBeamProjector(
(128, 128, 128),
(2.0, 2.0, 2.0),
(-127.5, -127.5, -127.5),
(2, 480, 620),
[1.0, 1.0],
(0, 0),
np.array([[[-3.10e+2, -1.20e+03, 0.00e+00, 1.86e+5],
[-2.40e+2, 0.00e+00, 1.20e+03, 1.44e+5],
[-1.00e+00, 0.00e+00, 0.00e+00, 6.00e+2]],
[[-2.89009888e+2, -1.20522754e+3, -1.02473585e-13,
1.86000000e+5],
[-2.39963440e+2, -4.18857765e+0, 1.20000000e+3,
1.44000000e+5],
[-9.99847710e-01, -1.74524058e-2, 0.00000000e+0,
6.00000000e+2]]]) # two projection matrices
)
projection = projector.new_projection_tensor(requires_grad=True)
projection += 1.
result = projector.project_backward(projection, use_texture=True)
assert projection.requires_grad
assert result.requires_grad
loss = result.mean()
loss.backward()
Or easier with PyCONRAD (pip install pyconrad)
projector = pyronn_torch.ConeBeamProjector.from_conrad_config()
The configuration can then be done using CONRAD (startable using conrad from command line)
Metadata
Release files for pyronn-torch 0.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyronn-torch-0.0.9.tar.gz | 38.7 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| pyronn_torch-0.0.9-cp38-cp38-manylinux2014_x86_64.whl | CPython 3.8 | CPython 3.8 | Linux glibc 2.17+ x86-64 | Details |
| pyronn_torch-0.0.9-cp37-cp37m-manylinux2014_x86_64.whl | CPython 3.7 | CPython 3.7 pymalloc | Linux glibc 2.17+ x86-64 | Details |
| pyronn_torch-0.0.9-cp36-cp36m-manylinux2014_x86_64.whl | CPython 3.6 | CPython 3.6 pymalloc | Linux glibc 2.17+ x86-64 | Details |
| pyronn_torch-0.0.9-cp35-cp35m-manylinux2014_x86_64.whl | CPython 3.5 | CPython 3.5 pymalloc | Linux glibc 2.17+ x86-64 | Details |
Total release size: 6.8 MB
Release files / pyronn-torch-0.0.9.tar.gz
| Download URL | pyronn-torch-0.0.9.tar.gz |
|---|---|
| Size | 38.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
254fc2af2e9b488473519f749b1243e3089262c502fc8453aca2220c8db515bf
|
|
BLAKE2b-256 checksum How to use checksums |
4c772c3c70d9928bf641337e9ba1a9f35486fb1292231082b7cf3d56503b640f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.5
|
Release files / pyronn_torch-0.0.9-cp38-cp38-manylinux2014_x86_64.whl
| Download URL | pyronn_torch-0.0.9-cp38-cp38-manylinux2014_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
bf8b9d24b4cc4946190cb5feb0737f2066a26c263f01de0b194d8141cbb0d512
|
|
BLAKE2b-256 checksum How to use checksums |
bf82914953a3bc7d8cbec461120b3cbf3845074c1e23ccab289c1a68065b29a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.5
|
Release files / pyronn_torch-0.0.9-cp37-cp37m-manylinux2014_x86_64.whl
| Download URL | pyronn_torch-0.0.9-cp37-cp37m-manylinux2014_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
267b42be82b3769a57bd76a597573597b78392e061162a0598c5a11c5096b120
|
|
BLAKE2b-256 checksum How to use checksums |
2a4e390ceba6088be7836e1626cc0353bd72ad071e66c8378e628042bc204750
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.5
|
Release files / pyronn_torch-0.0.9-cp36-cp36m-manylinux2014_x86_64.whl
| Download URL | pyronn_torch-0.0.9-cp36-cp36m-manylinux2014_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
2c9adb3e7262a6ed60d568b8e2726f913d38e6033d259e4a7a34836d84a3090a
|
|
BLAKE2b-256 checksum How to use checksums |
916b9d2ebb816768f7a54321cd720a3c64d84de48f992a6072c5f673ec1e5edd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.5
|
Release files / pyronn_torch-0.0.9-cp35-cp35m-manylinux2014_x86_64.whl
| Download URL | pyronn_torch-0.0.9-cp35-cp35m-manylinux2014_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
544bef95c00339eed24d6397d7a2e677db08a971845fe97b5a77844f83e9872d
|
|
BLAKE2b-256 checksum How to use checksums |
340de1754cae18dd11985bcea158a38d5e270b438506b18a09e84a86916faf9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.5
|