XebiCon'16 : Parenting 2.0 : calmer son bébé avec du machine learning et un Raspberry Pi Par...

26
@xebiconfr #xebiconfr PARENTING 2.0 Calmer son bébé avec du machine learning et un Raspberry Pi Giulia Bianchi

Transcript of XebiCon'16 : Parenting 2.0 : calmer son bébé avec du machine learning et un Raspberry Pi Par...

@xebiconfr #xebiconfr

PARENTING 2.0Calmer son bébé avec du machine

learning et un Raspberry Pi

GiuliaBianchi

@xebiconfr #xebiconfr

L'AIGLE

2

@xebiconfr #xebiconfr

LE CYCLE INFINI

3

@xebiconfr #xebiconfr

LE CYCLE INFINI 2.0

4

@xebiconfr #xebiconfr

LES OBJECTIFS

● Reconnaître en temps réel les pleurs d'un bébé

● Implémentation d'un projet data science de A à Z● Algorithme de machine learning déployé sur un Raspberry Pi

5

@xebiconfr #xebiconfr

Au coeur du projet

6

@xebiconfr #xebiconfr

Question

UN PROJET DATA SCIENCE

7

@xebiconfr #xebiconfr

UN PROJET DATA SCIENCE

8

Données d'entraînement

@xebiconfr #xebiconfr

UN PROJET DATA SCIENCE

9

Feature engineering

@xebiconfr #xebiconfr

UN PROJET DATA SCIENCE

10

Modèle

@xebiconfr #xebiconfr

UN PROJET DATA SCIENCE

11

Reconnaissance de nouvelles données

@xebiconfr #xebiconfr

10 types de sons d’environnement :

● pleurs de bébé

● sirène, klaxon, gazouillis d’oiseaux, cloches, orage● verre qui se casse, miaulement, aboiement, ronflements

40 enregistrements par type : 400 sons

12

JEU DE DONNÉES

@xebiconfr #xebiconfr

JEU DE DONNÉES

13

● 5 secondes● échantillonnage : 44.1 kHz

220500 points

@xebiconfr #xebiconfr

DU TEMPS AUX FRÉQUENCES

14

aigu

grave

@xebiconfr #xebiconfr

FEATURE ENGINEERING

Dans le domaine temporel :● zero crossing rate

En fréquence :● Mel Frequency Cepstrum Coefficients (#13)● Spectral centroid● Spectral rolloff● Spectral bandwidth

17 variables dérivées au total pour l'entraînement

15

@xebiconfr #xebiconfr

LE MODÈLE ET LA PRÉDICTION

Le modèle :● SVM● 10 fold cross validation● 72 % de bonnes prédictions

16

La prédiction :● Vote Majoritaire● Action : jouer une berceuse

9 s

5 s

5 s

5 s

5 s

5 s

@xebiconfr #xebiconfr

L'ORGANISATION DU CODE ET LE MATÉRIEL

17

CODELecture données d'entraînementFeature engineeringEntraînement du modèleSérialisation du modèle

CODEEnregistrement

Lecture des données enregistréesÉlaboration de données

PrédictionAction

MATÉRIELMacBookPro OS X El Capitan

2.2 GHz Intel Core i716 GB$$$$

MATÉRIELRaspberry Pi 2 Modèle B Raspbian Jessie900 MHz QUAD Core Broadcom BCM2836

1 GB$

@xebiconfr #xebiconfr 18

L'ORGANISATION DU CODE ET LE MATÉRIEL

@xebiconfr #xebiconfr

LE CYCLE INFINI 2.0 EN ACTION

19

9 s

5 s

5 s

5 s

5 s

5 s

@xebiconfr #xebiconfr

Conclusion

20

@xebiconfr #xebiconfr

Machine learning au delà de challenges data science

● automatisation● reproductibilité

CONCLUSION

21

@xebiconfr #xebiconfr

Exemple en petite échelle d'un projet data :

● déployé sur un cluster● générateur de valeur

CONCLUSION

22

@xebiconfr #xebiconfr

Question ?

FIN

@Giuliabianchl

giulbia/baby_cry_detection

@xebiconfr #xebiconfr

Annex

24

@xebiconfr #xebiconfr

EN VRAI

25

@xebiconfr #xebiconfr

EN ACTION

26