FilteredBackProjection crashes on any input
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- python, pytorch
- Domain
- computer-vision
Research direction
Start in algorithms/fbp.py and inspect FilteredBackProjection.init and call. Reproduce the small SPECT example, then verify the three reported failures involving self.proj, FFT dimensions, and projection-count handling are resolved. Done means FilteredBackProjection can be called on the example without these AttributeError or TypeError crashes.
Written by the indexing model from the issue text.
Description
Hi, thanks for maintaining PyTomography - I've been learning XCT reconstruction algorithms and reading the source has been really helpful.
I tried running FilteredBackProjection on a small SPECT example and it always crashes. Looking at algorithms/fbp.py, three things stand out:
-
__init__takesprojectionsbut never stores it (self.proj), while__call__readsself.proj-> AttributeError on the first use. -
The FFT calls use
axis=-2, buttorch.fft.fft/iffttakedim(in older torch versionsaxisis not accepted at all, and the project requirestorch>=1.10.2). -
len(self.system_matrix.proj_meta.shape[0])callslen()on an int (shape[0]is the number of projections) -> TypeError. Looks like it should just betorch.pi / self.system_matrix.proj_meta.shape[0].
I confirmed the first crash locally (AttributeError on self.proj). It's possible I'm missing something, but this class seems unusable on any input right now. Let me know if you'd like me to open a PR for the fixes.
- Dominant language
- Python
- Stars
- 173
- Forks
- 38
- Avg merge
- 1h 17m
- Merged PRs (30d)
- 5
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PyTomography/PyTomography
-
SPECT data handling: rescale tags ignored when reading projections, plus a misleading docstring Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PyTomography/PyTomography#232 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
PyTomography/PyTomography#230 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 76/100
PyTomography/PyTomography#231 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
PyTomography/PyTomography#228 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
PyTomography/PyTomography#229 ·
All issues in PyTomography/PyTomography
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
stephrobert/dsoxlab#238 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
sublimehq/package_control#1780 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
nwg-piotr/nwg-displays#145 ·