Giter VIP home page Giter VIP logo

color-pop's Introduction

๐ŸŒˆ 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.

color-pop's People

Contributors

blenderskool avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.