Urgent.News

What's breaking now, across thousands of outlets.

AI

Outdoor portrait generator: a quality and speed test

Outdoor portrait generator: a quality and speed test To test an outdoor portrait generator, measure sharpness on a crop of the face and time the order from upload to the "photos ready" email. A whole-image sharpness score misleads because a good outdoor portrait is mostly blurred background. The generator I would run this on first is PFPMaker , which promises delivery in under 10 minutes. I…

To evaluate an outdoor portrait generator, assess sharpness in a face crop and monitor the time from upload to when photos are ready to send via email. Whole-image sharpness can be misleading, as outdoor portraits typically feature a blurred background. The generator I would test first is PFPMaker, which claims delivery within 10 minutes. However, this article does not involve any generated photos for scoring purposes.

I created a small Python script using Pillow and OpenCV to calibrate and score images. The calibration exposed a flaw in the conventional scoring method, which proved more beneficial for developers than a gallery of visually judged samples. The whole-frame score nearly failed a sharp photo I expected the standard blur check to be a fair first step.

The variance of the Laplacian on a grayscale image is a better metric, which is a single line of OpenCV. Adrian Rosebrock's 2015 method uses 100 as the default threshold, flagging anything lower as blurry.

The calibration photo used was a free stock portrait cropped to 1200 x 675 pixels, featuring a man in a white T-shirt standing in front of out-of-focus trees with round bokeh highlights. The photo is sharp where it should be, with crisp details in the chain around his neck. The region sizes and corresponding Laplacian variances are as follows: whole frame (1200 x 675) measured 106.0, face crop (220 x 280) measured 605.2, and blurred background (350 x 300) measured 6.9.

A batch script with a single cut-off at 100 rejected a photo whose face was six times above that threshold.

The script prints pixel size, per-channel means, red-to-blue ratio, and Laplacian variance for both the whole frame and the selected face crop. To use the script, save it as portrait_check.py, install the necessary libraries (Pillow, OpenCV, numpy), and run it with the image file and face coordinates as arguments. The results show that a sunlit portrait whose face appears cooler than its background may indicate a relighting error.

In this case, the whole-frame score of 106.0 passed the threshold, while the face scored 605.2 and the background scored 6.9. The generator's output closely mimics a fast lens, which aligns with the desired shallow depth of field for outdoor portraits.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

My Subagents Were Eating 48% of My Tokens. So I Gave Them Hard Budget Caps — Enforced by Hooks, Not Dashboards

My subagents were eating 48% of my tokens. So I gave them hard budget caps — enforced by hooks, not dashboards A few weeks ago a measurement made the rounds: developer aidiveyt logged a month of…

  • Subagents consumed 48.1% of all tokens in a month
  • Simon Willison built subagent-budget tool to enforce caps
  • Subagent-budget uses Claude Code hooks to prevent over-budget launches

NatureSnap-AI

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass NatureSnap AI — The Open-Source Outdoor Companion That Gets You Off Your Screen What I Built Most modern…

  • NatureSnap-AI identifies natural specimens in seconds using open-weight models.
  • App offers bite-sized nature facts and personalized outdoor missions.
  • Aimed at students, hikers, families, and anyone exploring nature.

More from Sunday 11 October →