Project-MONAI / Project-MONAI/MONAI
Standardize roi_size/spatial_size keywords across transforms
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.
There seems to be a discrepancy between keyword arguments that should mean the same across several transforms.
RandSpatialCrop, CenterSpatialCrop, RandScaleCrop use roi_size to denote the size of the crop.
RandCropByLabelClasses, RandCropByPosNegLabel, RandWeightedCrop use spatial_size to denote the size of the crop.
It seems counterintuitive to me to have different names for the same concept. I think it would be cleaner to have the same - either roi_size or spatial_size.
Describe the solution you'd like
Rename keywords with backward compatibility ensured
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 locating the implementations and tests for RandSpatialCrop, CenterSpatialCrop, RandScaleCrop, RandCropByLabelClasses, RandCropByPosNegLabel, and RandWeightedCrop. Review how their keyword arguments are validated and documented, then determine the consistent name and verify that the old names remain backward-compatible across the transform tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100