Skip to content

🌈 Automatic Color Pop effect on any image inspired by Google Photos

Notifications You must be signed in to change notification settings

blenderskool/color-pop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

26 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌈 Color Pop

The Color Pop(aka Color splash) effect makes the subject(usually a person) stand out from the rest of the image. The subject remains in color, but the background is made black and white. This gives a pleasant look in most cases.

This app applies color pop effect on human subjects and supports images with many people.
Here's an article that I wrote explaining the working of this project at a basic level.

Examples

Image with one person

Imgur

Original left, Color pop right.

Image with many people

Imgur

Original left, Color pop right.

Behind the scenes

It uses Tensorflow.js and the BodyPix model to create segmentation masks around people in images.

It can be accessed using the colorpop cloud function once the project is deployed on Firebase.

Deployment

Instructions to deploy this project on Firebase

Options for colorpop cloud function

The colorpop is an HTTP cloud function which can be accessed by making a POST request with the binary image data as the body of the request, along with following optional query params

Param Expected data Description
model mobilenet(default) or resnet The model to use for segmentation.
Mobilenet is faster but less accurate.
Resnet is slower but more accurate

Example cURL command

curl --location --request POST 'http://{CLOUD_FUNCTION_HOST_URL}/colorpop?model=mobilenet' \
--header 'Content-Type: image/jpeg' \
--data-binary 'test.jpg' \
--output 'output.jpeg'

History

Achieving this effect manually is quite simple. It involves creating a mask around the subject and dropping the color of the background (Example using Photoshop). While it is simple, doing this manually has the following issues:

  • Tedious and time-consuming.
  • Poor results for complex subjects.
  • Not all applications(especially mobile apps) support masking.

Google announced the color pop effect for its Photos app in Google IO 2018 and although it does an incredible job of detecting the subject and applying the effect, it applies it automatically only to some images. Certain conditions have to be met before the color pop effect even shows up in the editing options of the Photos app.

This inspired me to build this tool which makes it as easy as Google Photos to apply the color pop effect on photos with people in it, without needing any manual work.

About

🌈 Automatic Color Pop effect on any image inspired by Google Photos

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published