Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Facial Analysis Techniques for Pythonista (and beyond!) - PyCon8

Facial Analysis Techniques for Pythonista (and beyond!) - PyCon8

The ability to detect, track, and analyze faces opens up a wide range of interesting use cases, ranging from interactive smart applications and real-time video processing, all the way to biometric security and augmented reality.

This talk will showcase the available tools built by the Python community and their corresponding pros & cons, limitations, and complexity. While discussing the possible scenarios and what is actually required to DIY with Python, I will compare such handmade solutions with Cloud-based products and APIs.

Alex Casalboni

April 09, 2017
Tweet

More Decks by Alex Casalboni

Other Decks in Programming

Transcript

  1. About  Me @alex_casalboni clda.co/pycon8-­‐facial-­‐analysis Computer  Science  Background Master  in  Sound

     &  Music  Engineering Sr.  SoDware  Engineer  &  Web  Developer Cloud  Evangelist  @  Cloud  Academy
  2. What  is  a  Face? You  thought  you  knew,  but  you

     didn’t…  ? clda.co/pycon8-­‐facial-­‐analysis
  3. Problem  decomposiLon What  are  the  main  building  blocks  for  facial

     analysis? clda.co/pycon8-­‐facial-­‐analysis
  4. Face  DetecCon clda.co/pycon8-­‐facial-­‐analysis Input:  1  image  &  unknown  context Goal:

     finding  faces  (how  many?) Output:  lists  of  coordinates Difficulty:  preUy  easy
  5. HOG  w/  OpenCV  and  dlib clda.co/pycon8-­‐facial-­‐analysis *  Vectors  allow  for

     more  advanced  analysis  (see   hUp:/ /www.paulvangent.com/2016/08/05/ emoLon-­‐recogniLon-­‐using-­‐facial-­‐landmarks/) *  That  .dat  file  is  100+MB
  6. Face  RecogniCon clda.co/pycon8-­‐facial-­‐analysis Input:  1  reference  and  1  target  image

    Goal:  finding  facial  matches Output:  lists  of  (potenLal)  matches Difficulty:  medium
  7. Facial  Analysis clda.co/pycon8-­‐facial-­‐analysis Input:  1  detected  face Goal:  extracLng  high-­‐level

     informaLon Output:  gender,  age,  emoLons,  headwear,  etc. Difficulty:  preUy  hard
  8. Facial  Analysis clda.co/pycon8-­‐facial-­‐analysis How  many  training  sets? Parallel  features  extracLon

     &  predicLon Accuracy  is  more  subjecLve  (source/target  audience) Real-­‐Lme  is  not  guaranteed
  9. Facial  Analysis  Services Amazon  RekogniLon Google  Cloud  Vision Azure  Face

     API Face++   Kairos EmoVu clda.co/pycon8-­‐facial-­‐analysis
  10. clda.co/pycon8-­‐facial-­‐analysis Cloud  Services  Pros Language  agnosLc  (RESTful  APIs) Models  are

     updated  under  the  hood No  infrastructure  to  manage PAYG  model  (w/  free  Ler) Great  for  embedded  systems Granted  accuracy  (globally)
  11. clda.co/pycon8-­‐facial-­‐analysis Cloud  Services  Cons Hardly  real-­‐Lme  (HTTPs  calls) ConnecLvity  is

     always  needed Training  set  is  never  customizable ML  Models  are  a  black  box