Project-MONAI / Project-MONAI/MONAI
RandAffine translate_range parameter should be relative.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.7k
- Forks
- 1.6k
- Avg merge
- 5d 1h
- Merged PRs (30d)
- 20
Description
Hi,
I'm trying to implement a random translate using MONAI. However, I've noticed the options are a little limited... To formalize a random translate I need to use RandAffine and pass translate_range argument specifying the numbers of pixels to be shifted... I believe this is not a good practice for bigger projects, as passing a relative range to the dimensions would be better.
To explain it in code. Imagine I have a 400x400x400 volume. I want to implement a random translate with range from 0 to 200 pixels (half the pixels in each dimension).
MONAI expects: transforms.RandAffine(prob=1, translate_range=200, padding_mode="zeros")
I believe it would be better to have transforms.RandAffine(prob=1, translate_range=0.5, padding_mode="zeros")
What do you think? Btw is there any other alternative to make a relative translation with MONAI? Or do I need to use another lib?
Thank you :)
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 reviewing MONAI's RandAffine entry point and the current translate_range behavior described in the issue. Define how a relative range should apply across volume dimensions, then validate the expected behavior with focused tests and documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-vision, machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100