Dimillian / Dimillian/IceCubesApp

Feature request: Smarter cropping with face detection

Open
#1,762 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Swift
Stars
7.1k
Forks
720
PR merge metrics
No merged PRs in 30d

Description

Web:
web

IceCubes:
icecubes

A relatively cheap way of improving this might be:

  1. extract downloaded image from the LazyResizableImage
  2. detect faces in the image using Vision.framework
  3. take the average vertical position of the detected faces
  4. set the frame(alignment:) of the image in defaultLinkPreview to whichever is closest to the average vertical position of faces (so .top in 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.