PyTomography / PyTomography/PyTomography
FilteredBackProjection crashes on any input
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 173
- Forks
- 38
- Avg merge
- 1h 17m
- Merged PRs (30d)
- 5
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.
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.
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.
Assessment
- Tech stack
- python, pytorch
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100