Project-MONAI / Project-MONAI/MONAI
Make the Affine 32 Again
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.7k
- Forks
- 1.6k
- Avg merge
- 5d 1h
- Merged PRs (30d)
- 20
Description
Is your feature request related to a problem? Please describe.
When read in the NiftiImage with LoadImage transform the affine matrix is saved in torch.float64, which causes problems when using MacBook's neural engine because mps accelerator doesn't support float64.
Describe the solution you'd like
Just make the affine matrix into float 32, thank you!
Describe alternatives you've considered
None
Additional context
None
Contributor guide
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 by tracing the NiftiImage handling used by the LoadImage transform and identify where the affine matrix dtype is established. Verify the behavior on an MPS device, then confirm that the affine is float32 and no longer triggers float64 incompatibility.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100