Giter Site home page Giter Site logo

baoanh1310 / sharingan Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 2.0 69.85 MB

Transform eyes into special Naruto forms using Dlib

Python 100.00%
eye-detection facial-landmarks opencv dlib dlib-face-detection eye-blink naruto sharingan real-time face-detection

sharingan's Introduction

Introduction

In this pet project, I use dlib to predict facial landmarks, then extract eyes from face and finally make transform the eyes into special eyes in Naruto anime.

Installation

git clone https://github.com/baoanh1310/sharingan.git
cd sharingan
sudo apt-get update
sudo apt-get install build-essential cmake
sudo apt-get install libopenblas-dev liblapack-dev 
sudo apt-get install libx11-dev libgtk-3-dev
sudo apt-get install python python-dev python-pip
sudo apt-get install python3 python3-dev python3-pip
mkvirtualenv sharingan -p python3
workon sharingan
pip install -r requirements.txt

How to run?

1. If you want to predict facial landmarks from input image

python facial_landmarks.py --shape-predictor shape_predictor_68_face_landmarks.dat --image images/sample.jpg

2. If you want to predict facial landmark in real-time video stream

python facial_landmarks_stream.py --shape-predictor shape_predictor_68_face_landmarks.dat

3. If you want to extract face parts from input image

python extract_parts.py --shape-predictor shape_predictor_68_face_landmarks.dat --image images/elon.jpg

4. If you want to count your eye blink in real-time video stream

python eye_blink_detect.py --shape-predictor shape_predictor_68_face_landmarks.dat

5. If you want to try glasses filter on input image

python glasses_effect.py --shape-predictor shape_predictor_68_face_landmarks.dat --image images/elon.jpg --glass images/glasses.png

6. If you want to try glasses filter on video stream

python glasses_stream.py --shape-predictor shape_predictor_68_face_landmarks.dat --glass images/glasses.png

7. If you want to try sharingan filter on input image

python sharingan.py --shape-predictor shape_predictor_68_face_landmarks.dat --image images/elon.jpg --eye images/sharingan.png

8. If you want to try sharingan filter on video stream

python sharingan_stream.py --shape-predictor shape_predictor_68_face_landmarks.dat --eye images/sharingan.png

References

1. Dlib

I use this library to detect face, facial landmarks and extract face parts.

2. Papers

If you really want to know the details in the libraries or functions in my code, I recommend you read the following papers:

sharingan's People

Contributors

baoanh1310 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.