nowfound

Work · August 26, 2022

HB

Headshot – Better Profile Photos for Hackers

Hello, HN! Headshot is a tiny side project I've been working on to create better looking profile photos. It started when my wife needed a headshot for work. Instead of just snapping a photo and calling it a day, we were looking for something a little more professional. There are a ton of native apps that help you remove the background of an image, and after seeing the good work at remove.bg[1] I had a hunch even a script kiddie like myself could get a decent result using client side javascript with an off the shelf image segmentation model. After a little research I found Google's MediaPipe…

In plain words

Headshot is a web-based tool that helps users create professional-looking profile photos by removing backgrounds from images. It uses Google's MediaPipe Selfie Segmentation technology running in the browser via JavaScript, making processing happen on the user's device rather than on servers. The tool works best when there is clear separation between the person and the background, offering a quick alternative to native apps for anyone needing a polished headshot for professional purposes.

written from the facts on this page · September 2026

From the sources

In the maker’s words, at launch

Hello, HN! Headshot is a tiny side project I've been working on to create better looking profile photos. It started when my wife needed a headshot for work. Instead of just snapping a photo and calling it a day, we were looking for something a little more professional. There are a ton of native apps that help you remove the background of an image, and after seeing the good work at remove.bg[1] I had a hunch even a script kiddie like myself could get a decent result using client side javascript with an off the shelf image segmentation model. After a little research I found Google's MediaPipe Selfie Segmentation[2]. It's a derivative of the same tech driving Google Meet. While it is performant on mobile phones, the tradeoff[3] is a less than pixel perfect mask. It performs best when there is clear separation between the person and the background. I went down the rabbit hole in this problem space and found this[4] and this[5] which led me to believe with a little more work I can get a better result. I am completely out of my depth in ML and would most likely need a partner to help me implement better quality image segmentation for high definition photos. I considered using remove.bg's API but with the goal of keeping Headshot free, the unit economics won't work for the time being. Headshot is built with Vue and Tailwind and hosted on Firebase. It leverages glfx.js[6] letting the user apply image filters to both the foreground and background. With a few filter tweaks you can put together a pretty decent looking profile photo. I compress uploaded images as mobile browsers seem to fall over on raw files taken from an iPhone 13. Final image compositing was pretty straightforward using HTML Canvas and the CanvasRenderingContext2D.globalCompositeOperation. I do apply a bilateral filter[7] to the segmentation mask to smooth out the edges and provide an adjustable blur[8] on the background to create a light ring effect. The quality of the result really comes down to the quality of the starting photo. When I followed these general tips[9] for taking a good headshot I was able to create something that can pass as a reasonable headshot. I am pretty happy with the result but would love to ultimately improve the segmentation mask under more challenging photographic conditions. The lengths that the Google Meet team went to get a professional result are an interesting technical read[10] that is well above my pay grade. I hope someone on Hacker News can use Headshot to create a great looking profile photo that they can upload to LinkedIn, Zoom, or Slack. Happy to answer any questions. Jason [1] - https://www.remove.bg/ [2] - https://google.github.io/mediapipe/solutions/selfie_segmenta... [3] - https://drive.google.com/file/d/1dCfozqknMa068vVsO2j_1FgZkW_... [4] - https://github.com/anilsathyan7/Portrait-Segmentation [5] - https://github.com/Volcomix/virtual-background [6] - https://evanw.github.io/glfx.js/ [7] - https://github.com/m0ose/imageRoutines [8] - https://github.com/flozz/StackBlur [9] - https://headshot.page/tips [10] - https://ai.googleblog.com/2020/10/background-features-in-goo...

More work this month

the category →
  • Let agents source clips from terabytes of your local video

    Work · 18d ago · clipto.com

  • Free local transcription that is 100% Private

    Work · 17d ago · hynote.ai

  • The app store for voice native apps that lives in your notch

    Work · 28d ago · voiceos.com

  • Ask any question, get a video back instantly

    Work · 24d ago · scrimba.com

  • Handle all of the work before, during, and after meetings

    Work · 17d ago · calendly.com

Launched alongside, August 2022

the whole month →
  • Xnapper1,517

    Take beautiful screenshots instantly

    Work · 2022 · xnapper.com

  • Gamma1,169

    Write like a doc, present like a deck

    Work · 2022 · gamma.app

  • Threado923

    The command center for community builders

    Life & fun · 2022

  • Build remote engineering teams in 24 hours

    Dev tools · 2022 · remotebase.com

  • Convert Figma designs into Flutter 3.0 & React code rapidly

    Dev tools · 2022 · dhiwise.com

  • PA

    Hey HN, I've been working on https://pornpen.ai, a site for generating adult images. Please only visit the site if you are 18+ and willing to look at NSFW images. This site is an experiment using newer text-to-image models. I explicitly removed the ability to specify custom text to avoid harmful imagery from being generated. New tags will be added once the prompt-engineering algorithm is fine-tuned further. If the servers are overloaded, take a look at the feed and search pages to look through past results. For comments/suggestions/feedback please visit…

    AI · 2022 · pornpen.ai