Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pyronn-torch
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stephan Seitz
pyronn-torch
Commits
c5a35d60
Commit
c5a35d60
authored
5 years ago
by
Stephan Seitz
Browse files
Options
Downloads
Patches
Plain Diff
Add README.rst
parent
9277ca55
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.rst
+87
-8
87 additions, 8 deletions
README.rst
with
87 additions
and
8 deletions
README.rst
+
87
−
8
View file @
c5a35d60
.. image:: https://badge.fury.io/py/pyronn-torch.svg
:target: https://badge.fury.io/py/pyronn-torch
:alt: PyPI version
============
============
pyronn-torch
pyronn-torch
============
============
This repository provides PyTorch bindings for `PYRO-NN <https://github.com/csyben/PYRO-NN>`_
Feel free to cite our publication:
.. code-block:: bibtex
@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:
.. code-block:: bash
pip install pyronn-torch
From this repository:
.. code-block:: bash
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
.. code-block:: bash
python setup.py bdist_wheel
Usage
=====
.. code-block:: python
#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=with_texture)
Add a short description here!
assert projection.requires_grad
assert result.requires_grad
loss = result.mean()
loss.backward()
Description
Or easier with `PyCONRAD <https://pypi.org/project/pyconrad/>`_ (``pip install pyconrad``)
===========
A longer description of your project goes here...
.. code-block:: python
projector = pyronn_torch.ConeBeamProjector.from_conrad_config()
Note
The configuration can then be done using `CONRAD <https://github.com/akmaier/CONRAD>`_
====
(startable using ``conrad`` from command line)
This project has been set up using PyScaffold 3.2.3. For details and usage
information on PyScaffold see https://pyscaffold.org/.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment