SlideShare une entreprise Scribd logo
1  sur  34
Télécharger pour lire hors ligne
Introduction to
Action Recognition
in Python
@wideio

Bertrand NOUVEL, bn@wide.io
Jonathan KELSEY, jk@wide.io
Bernard HERNANDEZ, bh@wide.io
PYDATA LONDON 2014
Outline
- (While you download the data) Forewords & Overview
- PART 1: Video-processing in python
- PART 2: The pipeline in details
- PART 3: Putting it together

WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
FOREWORDS

WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
GETTING READY

1)
2)

GET THE ABSOLUTELY ESSENTIAL PACKAGES :
Python 2.x / 3.x
Numy/Scipy
PIL
OpenCV2

ANACONDA
WAKARI

GET THE SOURCE CODE

git clone https://bitbucket.org/wideio/pydata.git

WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
WHO WE ARE
WIDE IO - Democratising the best algorithms
startup

+

consultancy

WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
Why do Computer Vision in Python?
Reflexive
Multiparadigm

Computer vision is difficult.

“””
Readable

Python is 1000 slower than C++
Lots of packages
Lightweight
Best community
Operator
overloading
WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
ACTION RECOGNITION

WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
What is action recognition ?
Classification task

SEMANTIC GAP
KTH, Human action dataset (Laptev)
Classify actions

WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
Types of Systems
FEATURE BASED
ACTION SPECIFIC

HOLISTIC
APPROACHES

APPEARANCE
BASED

Many priors
WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL

DEEP LEARNING

Less priors
The Very-Traditional Pipeline
RAW DATA

FEATURE-EXTRACTION

MACHINE LEARNING

WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
The Very-Traditional Pipeline

VIDEO
FRAMES

SPARSIFICATION

CLASSIFICATION
METHOD

WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
The Very-Traditional Pipeline

VIDEO
FRAMES

BAGS OF KEYPOINTS

SVM

WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
PART I
PROCESSING
VIDEOS

TOWARDS FRAMEWORKS
Reading Videos
-

PYFFMPEG (outdated)

-

OPENCV
MLT

-

ON WAKARI

anaconda$ vi io/player_mlt.py
WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
Reading Videos
-

PYFFMPEG (outdated)

-

OPENCV
MLT

-

ON WAKARI

anaconda$ vi io/player_cv.py
WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
Displaying Images
Alternatives

Recommended

anaconda$

python io/display_pyglet.py

WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
Harris Corner Detector
Detecting interest points:
imsmooth=scipy.ndimage.gaussian_filter
def harris(I,alpha=0.04,si=1):
Ix,Iy = scipy.gradient(I)
H11 = imsmooth(Ix*Ix, si)
H12 = imsmooth(Ix*Iy, si)
H22 = imsmooth(Iy*Iy, si)
return ((H11*H22 - H12**2)
- alpha*(H11+H22)**2)

anaconda$

python keypoints/harris.py

WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
Optical flow - wrapper based code

anaconda$

python keyponats/custom_feature.py

WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
Spatio-temporal keypoints
Use the two previous elements to compute keypoints that contain information about the movement

anaconda$

python keyponats/custom_feature.py

Ideas for extension: Make the same with a pyramidal approach.

WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
PART II
UNDERSTANDING THE KEY
ELEMENTS OF THE PIPELINE
Feature extractions

WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
Feature extractions

SIFT (128)
Descriptor vector
WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL

SURF (64)
Algorithms:
Type (density, connectivity, …)
Dimension (descriptor, position, …)

Recursive clustering
Connectivity (ward)

Centroid (k-means)

WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL

Density (optics)
WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
Support Vector Machines

WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
Support Vector Machines
Weighted-Support Vector Machines
Different support

WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
Support Vector Machines
Weighted-Support Vector Machines
Different support
Different relevance (outliers)

WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
PART III
PUTTING EVERYTHING
TOGETHER
Feature detection
PCA Projection

Clustering
Eigen Vectors & Mean

Graphic Model
Model.model

centers

BOW

WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
Feature detection stack for image

PCA project with graphic model

Distance of projection to BOW cluster centers with metric

Invert with 'discriminator' to turn into weighting
Normalise (Area=1)

Mean of stack to create histogram

WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
Training data

Training Labels

Testing data

Testing labels

Feature computer
SVM predict all

Feature stack
SVM auto train

Param grid

WIDE IO - DEMOCRATISING THE BEST ALGORITHMS

INTRODUCTION TO ACTION RECOGNITION
PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
Introduction to
Action Recognition
in Python
@wideio

Bertrand NOUVEL, bn@wide.io
Jonathan KELSEY, jk@wide.io
Bernard HERNANDEZ, bh@wide.io
PYDATA LONDON 2014

Contenu connexe

Plus de PyData

Plus de PyData (20)

Using Embeddings to Understand the Variance and Evolution of Data Science... ...
Using Embeddings to Understand the Variance and Evolution of Data Science... ...Using Embeddings to Understand the Variance and Evolution of Data Science... ...
Using Embeddings to Understand the Variance and Evolution of Data Science... ...
 
Deploying Data Science for Distribution of The New York Times - Anne Bauer
Deploying Data Science for Distribution of The New York Times - Anne BauerDeploying Data Science for Distribution of The New York Times - Anne Bauer
Deploying Data Science for Distribution of The New York Times - Anne Bauer
 
Graph Analytics - From the Whiteboard to Your Toolbox - Sam Lerma
Graph Analytics - From the Whiteboard to Your Toolbox - Sam LermaGraph Analytics - From the Whiteboard to Your Toolbox - Sam Lerma
Graph Analytics - From the Whiteboard to Your Toolbox - Sam Lerma
 
Do Your Homework! Writing tests for Data Science and Stochastic Code - David ...
Do Your Homework! Writing tests for Data Science and Stochastic Code - David ...Do Your Homework! Writing tests for Data Science and Stochastic Code - David ...
Do Your Homework! Writing tests for Data Science and Stochastic Code - David ...
 
RESTful Machine Learning with Flask and TensorFlow Serving - Carlo Mazzaferro
RESTful Machine Learning with Flask and TensorFlow Serving - Carlo MazzaferroRESTful Machine Learning with Flask and TensorFlow Serving - Carlo Mazzaferro
RESTful Machine Learning with Flask and TensorFlow Serving - Carlo Mazzaferro
 
Mining dockless bikeshare and dockless scootershare trip data - Stefanie Brod...
Mining dockless bikeshare and dockless scootershare trip data - Stefanie Brod...Mining dockless bikeshare and dockless scootershare trip data - Stefanie Brod...
Mining dockless bikeshare and dockless scootershare trip data - Stefanie Brod...
 
Avoiding Bad Database Surprises: Simulation and Scalability - Steven Lott
Avoiding Bad Database Surprises: Simulation and Scalability - Steven LottAvoiding Bad Database Surprises: Simulation and Scalability - Steven Lott
Avoiding Bad Database Surprises: Simulation and Scalability - Steven Lott
 
Words in Space - Rebecca Bilbro
Words in Space - Rebecca BilbroWords in Space - Rebecca Bilbro
Words in Space - Rebecca Bilbro
 
End-to-End Machine learning pipelines for Python driven organizations - Nick ...
End-to-End Machine learning pipelines for Python driven organizations - Nick ...End-to-End Machine learning pipelines for Python driven organizations - Nick ...
End-to-End Machine learning pipelines for Python driven organizations - Nick ...
 
Pydata beautiful soup - Monica Puerto
Pydata beautiful soup - Monica PuertoPydata beautiful soup - Monica Puerto
Pydata beautiful soup - Monica Puerto
 
1D Convolutional Neural Networks for Time Series Modeling - Nathan Janos, Jef...
1D Convolutional Neural Networks for Time Series Modeling - Nathan Janos, Jef...1D Convolutional Neural Networks for Time Series Modeling - Nathan Janos, Jef...
1D Convolutional Neural Networks for Time Series Modeling - Nathan Janos, Jef...
 
Extending Pandas with Custom Types - Will Ayd
Extending Pandas with Custom Types - Will AydExtending Pandas with Custom Types - Will Ayd
Extending Pandas with Custom Types - Will Ayd
 
Measuring Model Fairness - Stephen Hoover
Measuring Model Fairness - Stephen HooverMeasuring Model Fairness - Stephen Hoover
Measuring Model Fairness - Stephen Hoover
 
What's the Science in Data Science? - Skipper Seabold
What's the Science in Data Science? - Skipper SeaboldWhat's the Science in Data Science? - Skipper Seabold
What's the Science in Data Science? - Skipper Seabold
 
Applying Statistical Modeling and Machine Learning to Perform Time-Series For...
Applying Statistical Modeling and Machine Learning to Perform Time-Series For...Applying Statistical Modeling and Machine Learning to Perform Time-Series For...
Applying Statistical Modeling and Machine Learning to Perform Time-Series For...
 
Solving very simple substitution ciphers algorithmically - Stephen Enright-Ward
Solving very simple substitution ciphers algorithmically - Stephen Enright-WardSolving very simple substitution ciphers algorithmically - Stephen Enright-Ward
Solving very simple substitution ciphers algorithmically - Stephen Enright-Ward
 
The Face of Nanomaterials: Insightful Classification Using Deep Learning - An...
The Face of Nanomaterials: Insightful Classification Using Deep Learning - An...The Face of Nanomaterials: Insightful Classification Using Deep Learning - An...
The Face of Nanomaterials: Insightful Classification Using Deep Learning - An...
 
Deprecating the state machine: building conversational AI with the Rasa stack...
Deprecating the state machine: building conversational AI with the Rasa stack...Deprecating the state machine: building conversational AI with the Rasa stack...
Deprecating the state machine: building conversational AI with the Rasa stack...
 
Towards automating machine learning: benchmarking tools for hyperparameter tu...
Towards automating machine learning: benchmarking tools for hyperparameter tu...Towards automating machine learning: benchmarking tools for hyperparameter tu...
Towards automating machine learning: benchmarking tools for hyperparameter tu...
 
Using GANs to improve generalization in a semi-supervised setting - trying it...
Using GANs to improve generalization in a semi-supervised setting - trying it...Using GANs to improve generalization in a semi-supervised setting - trying it...
Using GANs to improve generalization in a semi-supervised setting - trying it...
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 

Wide IO Presentation PyData London

  • 1. Introduction to Action Recognition in Python @wideio Bertrand NOUVEL, bn@wide.io Jonathan KELSEY, jk@wide.io Bernard HERNANDEZ, bh@wide.io PYDATA LONDON 2014
  • 2. Outline - (While you download the data) Forewords & Overview - PART 1: Video-processing in python - PART 2: The pipeline in details - PART 3: Putting it together WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
  • 3. FOREWORDS WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
  • 4. GETTING READY 1) 2) GET THE ABSOLUTELY ESSENTIAL PACKAGES : Python 2.x / 3.x Numy/Scipy PIL OpenCV2 ANACONDA WAKARI GET THE SOURCE CODE git clone https://bitbucket.org/wideio/pydata.git WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
  • 5. WHO WE ARE WIDE IO - Democratising the best algorithms startup + consultancy WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
  • 6. Why do Computer Vision in Python? Reflexive Multiparadigm Computer vision is difficult. “”” Readable Python is 1000 slower than C++ Lots of packages Lightweight Best community Operator overloading WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
  • 7. ACTION RECOGNITION WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
  • 8. What is action recognition ? Classification task SEMANTIC GAP KTH, Human action dataset (Laptev) Classify actions WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
  • 9. Types of Systems FEATURE BASED ACTION SPECIFIC HOLISTIC APPROACHES APPEARANCE BASED Many priors WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL DEEP LEARNING Less priors
  • 10. The Very-Traditional Pipeline RAW DATA FEATURE-EXTRACTION MACHINE LEARNING WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
  • 11. The Very-Traditional Pipeline VIDEO FRAMES SPARSIFICATION CLASSIFICATION METHOD WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
  • 12. The Very-Traditional Pipeline VIDEO FRAMES BAGS OF KEYPOINTS SVM WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
  • 14. Reading Videos - PYFFMPEG (outdated) - OPENCV MLT - ON WAKARI anaconda$ vi io/player_mlt.py WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
  • 15. Reading Videos - PYFFMPEG (outdated) - OPENCV MLT - ON WAKARI anaconda$ vi io/player_cv.py WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
  • 16. Displaying Images Alternatives Recommended anaconda$ python io/display_pyglet.py WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
  • 17. Harris Corner Detector Detecting interest points: imsmooth=scipy.ndimage.gaussian_filter def harris(I,alpha=0.04,si=1): Ix,Iy = scipy.gradient(I) H11 = imsmooth(Ix*Ix, si) H12 = imsmooth(Ix*Iy, si) H22 = imsmooth(Iy*Iy, si) return ((H11*H22 - H12**2) - alpha*(H11+H22)**2) anaconda$ python keypoints/harris.py WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
  • 18. Optical flow - wrapper based code anaconda$ python keyponats/custom_feature.py WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
  • 19. Spatio-temporal keypoints Use the two previous elements to compute keypoints that contain information about the movement anaconda$ python keyponats/custom_feature.py Ideas for extension: Make the same with a pyramidal approach. WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
  • 20. PART II UNDERSTANDING THE KEY ELEMENTS OF THE PIPELINE
  • 21. Feature extractions WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
  • 22. Feature extractions SIFT (128) Descriptor vector WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL SURF (64)
  • 23. Algorithms: Type (density, connectivity, …) Dimension (descriptor, position, …) Recursive clustering Connectivity (ward) Centroid (k-means) WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL Density (optics)
  • 24. WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
  • 25. WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
  • 26. WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
  • 27. Support Vector Machines WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
  • 28. Support Vector Machines Weighted-Support Vector Machines Different support WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
  • 29. Support Vector Machines Weighted-Support Vector Machines Different support Different relevance (outliers) WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
  • 31. Feature detection PCA Projection Clustering Eigen Vectors & Mean Graphic Model Model.model centers BOW WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
  • 32. Feature detection stack for image PCA project with graphic model Distance of projection to BOW cluster centers with metric Invert with 'discriminator' to turn into weighting Normalise (Area=1) Mean of stack to create histogram WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
  • 33. Training data Training Labels Testing data Testing labels Feature computer SVM predict all Feature stack SVM auto train Param grid WIDE IO - DEMOCRATISING THE BEST ALGORITHMS INTRODUCTION TO ACTION RECOGNITION PYDATA LONDON 2014 - BERNARD HERNANDEZ - JONATHAN KESLEY - BERTRAND NOUVEL
  • 34. Introduction to Action Recognition in Python @wideio Bertrand NOUVEL, bn@wide.io Jonathan KELSEY, jk@wide.io Bernard HERNANDEZ, bh@wide.io PYDATA LONDON 2014