decode + crop util?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 17.9k
- Forks
- 7.3k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 13
Description
https://github.com/pytorch/vision/issues/7761 made me think that maybe we could implement a decode_and_crop util that would basically be the combination of decode() + RandomCrop, but implemented at a low-level where we would only decode the desired cropped region (I assume/hope this is possible via libjpeg and others?)
I guess it could speeds things up a bit by avoiding to decode out-of-crop regions. I was hoping that it would allow us to return a batch of images of the same size, but in practice we will want different crop sizes and ratios (unless we're OK to have it constant across a batch? IDK).
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
Review issue #7761 and the existing decode() and RandomCrop APIs first. Determine whether libjpeg or other decoders can decode only the requested crop, and clarify how variable crop sizes and aspect ratios should work across a batch. Done means a scoped feasibility and design decision for a decode_and_crop utility.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-vision, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100