Dimillian / Dimillian/IceCubesApp
Feature request: Smarter cropping with face detection
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 7.1k
- Forks
- 720
- PR merge metrics
- No merged PRs in 30d
Description
Web:
IceCubes:
A relatively cheap way of improving this might be:
- extract downloaded image from the
LazyResizableImage - detect faces in the image using Vision.framework
- take the average vertical position of the detected faces
- set the
frame(alignment:)of the image indefaultLinkPreviewto whichever is closest to the average vertical position of faces (so.topin the example above)
Unfortunately I can't figure out step 1 and dropping to the lower-level code of Nuke seems like a disproportionate amount of work for the benefit. There's ImageRenderer but that's gross.
Filing here anyway in case anybody has other ideas.
Contributor guide
No contributing guide indexed for this repository
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 reading LazyResizableImage and defaultLinkPreview to understand how the downloaded image is handled and aligned. Investigate whether Vision.framework can inspect that image without dropping into Nuke or using ImageRenderer. Done means link-preview images choose an alignment near the average vertical position of detected faces, while retaining a sensible fallback when no faces are found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- mobile-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100