Code Monkey home page Code Monkey logo

skintone-detector's Introduction

Skintone Shade Detector

  • A script in python to allot skin tone to a certain shade.

  • It makes use of K means clustering to get approximate skin tone. It also uses haar cascade to detect face.

  • This project can be used in fashion recommendation websites for recommendation of outfits based on skin tone of the user. (Note : This is not racist in any sense and many Fashion designers use skin complexion to recommend outfits to users. This project is a part of my capstone project i.e Outfit recommendation based on Occasion and Skin Tone. Fashion Designer Website Example)

Process :

=> Take Image 
=> Detect face 
=> Extract Face 
=> Pass to K means Clustering algorithm 
=> Get the cluster with max members 
=> Denote that as actual shade 
=> Subtract the received skintone from selected values of skin tone shade 
=> Allot the skin tone with min subtracted value as shade.

Installation

pip install sklearn
pip install matplotlib
pip install opencv-python
pip install pandas
pip install sklearn

Usage:

python main_file.py

Image file name : test.jpg

Note :

The reference skin tone shades that I have used are in the file skin.png. Different values can be used. Just edit the list variable named 'colors' with custom RGB tones. I've also left some code in comments so that it can be easier if one wants to test and see output at various points.

skintone-detector's People

Contributors

digantgarude avatar

Stargazers

Azma Imtiaz avatar

Watchers

James Cloos avatar

Forkers

azeimtiaz

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.