Giter VIP home page Giter VIP logo

facetrack's Introduction

facetrack

In this face-tracking tutorial you will learn to:

  • install and run Python with the Anaconda package manager
  • create a new Anaconda environment and install packages in it
  • use the OpenCV package to do face detection on still images
  • use the OpenCV package to do face-tracking with images from a webcam
  • build your own SnapChat filters!

installing Anaconda

Installation instructions for Mac, Windows and Linux: https://conda.io/docs/user-guide/install/index.html

Anaconda is a package manager for Python. Packages (also called modules) are like recipe books - they have instructions for performing a specific task. Imagine you want to bake a pie: you might want to a import package with a recipe for making a crust so that you don't have to write your own instructions for doing that task. The package with the crust recipe would itself refer to other packages with recipes for things like how to churn butter or grow wheat and mill flour. In this way, it's possibile to do some cool stuff with Python without having to understand all the details about how the software is performing every task.

You can run Python and install packages without a package manager, but it's better to use one because it will make your life a lot easier. When you install a new package, Anaconda will make sure that the other packages that your new module relies on are up-to-date. Another advantage is that Anaconda allows you to create a new "environment" for each project you do: that way if an old project uses an old version of a package, you don't have to uninstall and reinstall packages each time you switch between old and new projects.

creating a new conda environment and installing packages

Create a new Anaconda environment called 'facetrack' and activate that environment

conda create --name facetrack
source activate facetrack

Now you'll want to install some packages that you need:

conda install opencv ipython matplotlib

somewhere to write your code!

If you're not using a development environment like Pycharm or VSCode, you'll also want to install a text editor (like Sublime or TextWrangler) where you can write your code.

getting started with using OpenCV for face detection

OpenCV has a face detection tool that is based on an algorithm from 2001 called Haar Cascades. (you can read a bit about the algorithm here: https://docs.opencv.org/trunk/d7/d8b/tutorial_py_face_detection.html)

Exercise 1: Make some simple modifications to a script for opening images on your local hard drive and detecting faces in those images.

Exercise 2: Make sure you can run the simple script for fetching video from your laptop camera and running the face detection algorithm on the captured frames.

project ideas

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.