GithubHelp home page GithubHelp logo

kang-hana / face-smoothing Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 5starkarma/face-smoothing

0.0 0.0 0.0 39.87 MB

OpenCV implementation of facial smoothing. Facial detection is done using an pretrained TensorFlow face detection model.

Jupyter Notebook 34.54% Python 65.46%

face-smoothing's Introduction

Build Status Python 3.6

Face Smoothing: Detection and Beautification

Input Image Output Image w/ Facial Smoothing
alt text alt text

OpenCV implementation of facial smoothing. Facial detection is done using an pretrained TensorFlow face detection model. Facial smoothing is accomplished using the following steps:

  • Change image from BGR to HSV colorspace
  • Create mask of HSV image
  • Apply a bilateral filter to the Region of Interest
  • Apply filtered ROI back to original image

Install

git clone https://github.com/5starkarma/face-smoothing.git
cd face-smoothing

Run

python3 infer.py --input 'path/to/input_file.jpg' (Input file - image, video, or folder with images and/or videos - default is hillary_clinton.jpg)
                         'can/handle/videos.mp4'
                         'as/well/as/directories'
                 --output 'path/to/output_folder' (Output folder - default is data/output)
                 --save_steps 'path/to/file.jpg' (Concats images from each step of the process and saves them)
                 --show-detections (Saves bounding box detections to output)

Example: --save-steps flag

alt text

TODO

  • Finish documentation and cleanup functions
  • Reduce input image size for detections
  • Fix combined output
  • Test on multiple faces
  • Apply blurring on multiple faces
  • Video inference
  • Save bounding box to output
  • Apply different blurring techniques/advanced algo using facial landmarks to blur only skin regions
  • Unit tests
  • Run time tests on units

face-smoothing's People

Contributors

5starkarma 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.