Assumption about bounds in floating point images
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 17.9k
- Forks
- 7.3k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 13
Description
Took me a while to figure out while the ColorJitter transform produced strange results (mostly fully saturated images) until I realized that there is a hard coded assumption that images of type float are bounded to max value 1.0.
Might either need a warning in the doc, or even better, the bound could be provided as an argument:
https://github.com/pytorch/vision/blob/a2f65656b2b9dd7cc4363c8ad4afcbf89a25952b/torchvision/transforms/functional_tensor.py#L314
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 with torchvision/transforms/functional_tensor.py around line 314 and the ColorJitter documentation linked in the issue. Trace how floating-point image bounds are handled, then determine how the reported saturation behavior should be addressed and verify the resulting behavior for floating-point images.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100