frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: How to automate aesthetic photo cropping? (CV/AI)

1•icons•1h ago
Hi everyone,

I am a backend developer currently engineering an in-house automation tool for a K-pop merchandise production company (photocards, postcards, etc.).

I have built an MVP using Python (FastAPI) + Libvips + InsightFace to automate the process where designers previously had to manually crop thousands of high-resolution photos using Illustrator.

While basic face detection and image quality preservation (CMYK conversion, etc.) are successful, I am hitting a bottleneck in automating the "Designer's Sense (Vibe/Aesthetics)."

[Current Stack & Workflow]

Tech Stack: Python 3.11, FastAPI, Libvips (Processing), InsightFace (Landmark Detection).

Workflow: Bulk Upload $\rightarrow$ Landmark Extraction (InsightFace) $\rightarrow$ Auto-crop based on pre-defined ratios $\rightarrow$ Human-in-the-loop fine-tuning via Web UI.

[The Challenges]

Mechanical Logic vs. Aesthetic Crop

Simple centering logic fails to capture the "perfect shot" for K-pop idols who often have dynamic poses or varying camera angles.

Issue: Even if the landmarks are mathematically centered, the resulting headroom is often inconsistent, or the chin is awkwardly cut off. The output lacks visual stability compared to a human designer's work.

Need for Reference-Based One-Shot Style Transfer

Clients often provide a single "Guide Image" and ask, "Crop the rest of the 5,000 photos with this specific feel." (e.g., a tight face-filling close-up vs. a spacious upper-body shot).

Goal: Instead of designers manually guessing the ratio, I want the AI to reverse-engineer the composition (face-to-canvas ratio, relative position) from that one sample image and apply it dynamically to the rest of the batch.

[Questions]

Q1. Direction for Improving Aesthetic Composition

Is it more practical to refine Rule-based Heuristics (e.g., fixing eye position to the top 30% with complex conditionals), or should I look into "Aesthetic Quality Assessment (AQA)" or "Saliency Detection" models to score and select the best crop?

As of 2026, what is the most efficient, production-ready approach for this?

Q2. One-Shot Composition Transfer

Are there any known algorithms or libraries that can extract the "compositional style" (relative position of eyes/nose/mouth regarding the canvas frame) from a single reference image and apply it to target images?

I am looking for keywords or papers related to "One-shot learning for layout/composition" or "Content-aware cropping based on reference."

Any keywords, papers, or architectural advice from those who have tackled similar problems in production would be greatly appreciated.

Thanks in advance.

Comments

nialse•1h ago
Use commercial tools and services for automating cropping. Google is your friend.

I kept forgetting Git worktree syntax, so I wrapped it

https://github.com/binbandit/workty
1•binbandit•49s ago•1 comments

Malaysia and Indonesia Block Elon Musk's Grok

https://www.cnbc.com/2026/01/12/malaysia-indonesia-block-elon-musks-grok-obscene-non-consensual-c...
1•rfarley04•14m ago•0 comments

The Workings of the Pentagon's UFO Reverse Engineering Program [video]

https://www.youtube.com/watch?v=u7g5Sn1DJF4
2•keepamovin•18m ago•0 comments

Semantic Rebase

https://www.peterjthomson.com/2026/01/semantic-rebase/
1•handfuloflight•19m ago•0 comments

XFCE Is Great

https://rubenerd.com/xfce-is-great/
3•mikece•19m ago•0 comments

Xibo open-source digital signage solution now works with Raspberry Pi 5

https://www.cnx-software.com/2026/01/12/xibo-open-source-digital-signage-solution-now-works-with-...
1•mikece•20m ago•0 comments

Everything you should know about PostgreSQL constraints

https://xata.io/blog/constraints-in-postgres
1•tudorg•21m ago•0 comments

The Definitive Guide to Claude Code

https://jpcaparas.medium.com/the-definitive-guide-to-claude-code-from-first-install-to-production...
2•handfuloflight•22m ago•0 comments

The beauty queen who caught Scotland's most prolific catfish

https://www.bbc.com/news/articles/ckgkr15el67o
1•ryan_j_naughton•26m ago•0 comments

Show HN: Remember Me AI (FULL RELEASE) – 40x cost reduction in AI memory systems

https://github.com/merchantmoh-debug/Remember-Me-AI
1•MohskiBroskiAI•27m ago•0 comments

Shopify and Google Announce Universal Commerce Protocol

https://www.shopify.com/ca/ucp
1•ianschmitz•27m ago•0 comments

A Short History of the Glass Mirror

https://www.cabinetmagazine.org/issues/14/mcelheny.php
1•o4c•28m ago•0 comments

Gen Z are arriving to college unable to even read a sentence

https://fortune.com/2026/01/09/gen-z-college-students-struggling-to-read-professors-forced-to-ret...
2•LostMyLogin•29m ago•2 comments

First Ever Image of a Multi-Planet System Around a Sun-Like Star

https://www.eso.org/public/news/eso2011/
1•thunderbong•33m ago•0 comments

Standard.site: The Publishing Gateway

https://stevedylan.dev/posts/standard-site-the-publishing-gateway/
1•stevedsimkins•41m ago•0 comments

Pixwit.ai is an AI-powered video creation platform

https://pixwit.ai
1•maysunyoung•42m ago•1 comments

Ask HN: Has anyone built payment flows inside AI voice calls?

2•wasiyc•46m ago•0 comments

Show HN: Karmic Tail – A calculator for the Destiny Matrix numerology system

https://karmictail.com/
2•hugh1st•48m ago•0 comments

The Pain of Real Linear Types in Rust (2017)

https://faultlore.com/blah/linear-rust/
1•xpe•51m ago•1 comments

Show HN: Pointa – Point-and-click annotations for AI coding agents (open source)

https://www.pointa.dev/
1•jberthom•55m ago•0 comments

Letting Claude Play Text Adventures

https://borretti.me/article/letting-claude-play-text-adventures
2•zdw•55m ago•0 comments

Show HN: Dutix – set default apps for file types and URL schemes on macOS

https://github.com/jackchuka/dutix
1•jackchuka•56m ago•0 comments

Show HN: App Logo AI – Your generated application logo

https://applogoai.com/
1•goingmerryapps•1h ago•0 comments

Fed Served with DOJ Subpoenas, Powell Vows to Stand Firm

https://www.bloomberg.com/news/articles/2026-01-12/powell-says-justice-department-served-fed-with...
9•ZeroCool2u•1h ago•2 comments

Everybody's Got a Claim

https://ipcopilot.ai/2026/01/03/everybodys-got-a-claim/
1•lettergram•1h ago•0 comments

16 Best Practices for Reducing Dependabot Noise

https://nesbitt.io/2026/01/10/16-best-practices-for-reducing-dependabot-noise.html
2•zdw•1h ago•1 comments

DOJ has subpoenaed central bank, threatens criminal indictment

https://apnews.com/article/federal-reserve-trump-subpoena-bf4fc6c690fa248fbc531bc9bc7f1758
12•SilverElfin•1h ago•6 comments

Ask HN: Claude Code Degradation

2•lobito25•1h ago•1 comments

Duplicate tab notifications and auto closures

https://chromewebstore.google.com/detail/newtab/ajpgplnoabdfhpnlepboonoocpipmhkg
1•pinestack•1h ago•0 comments

Complete Guide to Agentic Commerce Standards

https://curateclick.com/blog/2026-universal-commerce-protocol
2•QingWu•1h ago•0 comments