Public _RandomApplyTransform class
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 17.9k
- Forks
- 7.3k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 13
Description
🚀 The feature
Make _RandomApplyTransform public for custom random apply transforms.
The main change is to refactor _RandomApplyTransform to RandomApplyTransform, add it to the available classes in torchvision.transforms.v2.
Motivation, pitch
This class might be beneficial for custom transformations that should have Random behaviour. We are currently playing with non-standard augmentation pipelines that needs this.
I will submit a PR with this refactoring.
Alternatives
No response
Additional context
No response
cc @vfdev-5
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 in torchvision/transforms/v2/_transform.py at the referenced _RandomApplyTransform definition, then inspect torchvision/transforms/v2/init.py where available classes are listed. Rename the class for public use, expose it through the v2 module, and verify that custom random apply transforms can import it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-vision
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100