Assistive robotics solutions help people regain their mobility and autonomy lost in their daily lives. JoyFace is a human machine interface based on head postures and facial expressions to control a robotized wheelchair. This work presents a comparison between two smile classifiers based on machine learning techniques to be integrated into the JoyFace system.
According to (World Health Organization, 2011), more than one billion people in the world suffer from some form of disability, being about 200 million with considerable functional difficulties. In Brazil, over 45 million of the population have some disability, among which 13 million of them suffer from severe motor disabilities (IBGE, 2010).
Recent works bring different solutions for wheelchair alternative controls. (Chauhan et al., 2016) developed a wheelchair controlled by voice commands, however this solution can have the influence of the environment’s sounds.(Kim et al., 2013) implemented a control based on commands sent through the tongue. (Rohmer, Pinheiro, Raizer, Olivi and Cardozo, 2015) proposed a control for assistive robotics vehicles using small movements of the face or limbs through Electromyograph (EMG) and signals generated by brain activity Electroencephalograph (EEG).
The JoyFace is a system based on Computer Vision developed to control a wheelchair through facial expressions. The video 1 shows a preview of the system overview, utilizing a simulation. This Human Machine Interface considers the displacement of the user’s face relative to a reference region.The face is identified by a regular webcam and verify the face positions. Each position is associated with a movement control of the wheelchair.
In this article, we present a comparison between two Machine Learning techniques for smiles classifiers: The K-Nearest Neighbors and Support Vector Machine.The classifiers will be integrated into JoyFace to stop the wheelchair movements.
In [33]:
from IPython.display import YouTubeVideo
YouTubeVideo("9pUiHnGc9co")
Out[33]:
For validating the performance of the approaches, we use Olivetti faces dataset which contains a set of face images taken between April 1992 and April 1994 at AT&T Laboratories Cambridge. There are 400 images, with ten different images of each of the 40 subjects.
As can be seen below, for some subjects, the images were taken at different times, varying the lighting, facial expressions (open / closed eyes, smiling / not smiling) and facial details (glasses / no glasses).All the images were taken against a dark homogeneous background with the subjects in an upright, frontal position (with tolerance for some side movement).
In our experiments, we compare two classifiers: K-Nearest Neighbors and Support Vector Machine.
In [34]:
%pylab inline
import IPython
import sklearn as sk
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from sklearn.datasets import fetch_olivetti_faces
faces = fetch_olivetti_faces()
def print_faces(images, target, top_n):
fig = plt.figure(figsize=(12, 12))
fig.subplots_adjust(left=0, right=1, bottom=0, top=1, hspace=0.05, wspace=0.05)
for i in range(top_n):
p = fig.add_subplot(20, 20, i + 1, xticks=[], yticks=[])
p.imshow(images[i], cmap=plt.cm.bone)
p.text(0, 14, str(target[i]))
p.text(0, 60, str(i))
print ("The Dataset Fetch Olivetti Faces")
print_faces(faces.images, faces.target, 400)
K Nearest Neighbors it is an algorithm that holds all cases and classifies new cases by majority vote of its neighbors k. The case being assigned to the class is more common among its nearest K neighbors, as measured by a distance function.These distance functions can be Euclidean, Manhattan, Minkowski and Hamming distance. In this case we use the Euclidean distance, for being simple and efficient.
Chauhan, R., Jain, Y., Agarwal, H. and Patil, A. (2016). Study of implementation of voice con- trolled wheelchair, Advanced Computing and Communication Systems (ICACCS), 2016 3rd International Conference on, Vol. 1, IEEE, pp. 1–4.
Kim, J., Park, H., Bruce, J., Sutton, E., Rowles, D., Pucci, D., Holbrook, J.,Minocha, J., Nar- done, B., West, D. et al. (2013). The tongue enables computer and wheelchair control for people with spinal cord injury, Science trans- lational medicine 5(213): 213ra166–213ra166.
Rohmer, E., Pinheiro, P., Raizer, K., Olivi, L. and Cardozo, E. (2015). A novel platform supporting multiple control strategies for as- sistive robots, Robot and Human Interac- tive Communication (RO-MAN), 2015 24th IEEE International Symposium on, IEEE, pp. 763–769.
World Health Organization (2011). World report on disability., World Health Organization.
IBGE (2010). Cartilha do censo 2010: Pessoas com deficiência, Brasília: Secretaria de Direitos Humanos da Presidência da República (SDH)/Secretaria Nacional de Promoção dos Direitos da Pessoa com Deficiência (SNPD).
Batista, Gustavo Enrique de Almeida Prado et al. Pré-processamento de dados em aprendizado de máquina supervisionado. 2003. Tese de Doutorado. Universidade de São Paulo.
Deep Learning Course. Udacity. Available in: https://classroom.udacity.com/courses/ud730
Olivetti Faces. Available in: http://scikit-learn.org/stable/datasets/olivetti_faces.html