Hextract

image

A colour palette generator with subject extraction.

Powered by Tensorflow.js real time body segmentation.

Currently a proof of concept.

Reasoning

I have a friend that generates colour palettes from pictures online as inspiration for some of their outfits and to study fashion colour theory. They would take images off their Pinterest, Instagram, and other social media to load into an image to colour palette generator like Coolors. A minor problem was that it would extract the colours of the background also, and not only just the outfit.

This is a fun little project to see what can be done to solve this using a fully local solution running in the browser.

Samples!

sample1 sample2

TODO:

  • Improve performance of segmentation
  • Determine strategy to preload models from Google Cloud storage
  • Fix handling of remote URLs (CORS issues 😢 - will need to proxy images)
    • Intend to be able to load Instagram posts
  • Pretty stuff

Note

Colour (⌐■_■)