# CNN-Based Pupil Center Detection for Wearable Gaze Estimation System

Authors: Warapon Chinsatit; Takeshi Saitoh
Journal: Applied Computational Intelligence and Soft Computing
 (2017)

---

## Abstract

This paper presents a convolutional neural network- (CNN-) based pupil center detection method for a wearable gaze estimation system using infrared eye images. Potentially, the pupil center position of a user’s eye can be used in various applications, such as human-computer interaction, medical diagnosis, and psychological studies. However, users tend to blink frequently; thus, estimating gaze direction is difficult. The proposed method uses two CNN models. The first CNN model is used to classify the eye state and the second is used to estimate the pupil center position. The classification model filters images with closed eyes and terminates the gaze estimation process when the input image shows a closed eye. In addition, this paper presents a process to create an eye image dataset using a wearable camera. This dataset, which was used to evaluate the proposed method, has approximately 20,000 images and a wide variation of eye states. We evaluated the proposed method from various perspectives. The result shows that the proposed method obtained good accuracy and has the potential for application in wearable device-based gaze estimation.


---

## Body

## 1. Introduction

People obtain various information through the human vision system. By observing eyes, we can observe changes in pupil size, eye direction, and changes in eye state, for example, opening, closing, blinking, and crying. This information can be used to estimate emotions, traits, or interests. To analyze the eye, eye image processing is an important task, and the development and availability of wearable cameras and recording devices have made eye image processing, including gaze estimation, increasingly popular.A gaze estimation system (GES) involves multiple cameras, and such systems can estimate gaze direction and what a user is looking at. Thus, GESs can estimate objects of interest. One type of GES uses an inside-out camera [1, 2], which is comprised of an eye camera and a scene camera. The eye camera captures images of the user’s eyes. Such a GES detects the pupil center and maps it to a point in the scene image. Recently, GESs have been used in various applications, such as video summarization [3], daily activity recognition [4], reading [5], human-machine interfaces [6], and communication support [7].It is difficult to detect the pupil center because the eye is a nonrigid object, users blink frequently, and eyelid or eyelashes can occlude the pupil. Furthermore, the iris has various colors, such as blue, brown, and black. However, when an infrared camera is used to capture eye images, the iris fades out, which makes the pupil clearer. This approach makes the eye image easy to work with. However, blinking remains problematic because it is difficult to detect the pupil center point when a user blinks. Consequently, gaze direction errors can occur.This research focuses on pupil center detection using infrared eye images captured by a wearable inside-out camera and proposes an accurate detection method that uses a convolutional neural network (CNN). The proposed method is composed of two CNN models. The first determines whether it is possible to detect a pupil in an input image. The second CNN model detects the pupil center in an input eye image. This model outputs the pupil centerX- and Y-coordinates. We evaluated the proposed method using a dataset of infrared eye images captured by our inside-out camera. The results demonstrate that the proposed method demonstrates higher accuracy than other methods.Typically, CNNs are trained using supervised learning; thus, they require a large training dataset. There are some public datasets of eye images [8, 9]; however, such datasets do not typically include images of eyes in the blink state. We describe a process to capture a sufficiently large image dataset with good distribution and variety of pupil position and eye state.


## 2. Related Research

Several studies have focused on feature point detection based on eye images [10–13]. Li et al. proposed a hybrid eye-tracking method that integrates feature-based and model-based approaches [10]. They captured eye images using an inexpensive head-mounted camera. Their method detects pupil edge points and uses ellipse fitting to estimate the pupil center. Zheng et al. proposed an algorithm to detect eye feature points, including pupil center and radius, eye corners, and eyelid contours [11]. Moriyama et al. developed a generative eye region model that can meticulously represent the detailed appearance of the eye region for eye motion tracking [12]. Chinsatit and Saitoh proposed a fast and precise eye detection method using gradient value [13]. However, if the eye image contains unexpected objects with a high gradient or intensity, such as an eyelash with mascara or a specular point, it is difficult for such methods to detect the pupil.CNNs outperform traditional algorithms in various research fields, such as artificial intelligence, image classification, and audio processing. Zhang et al. proposed a CNN-based gaze estimation method in an unconstrained daily life setting [8]. In that method, the input data are an eye image and the 2D head angle, and the output is a 2D gaze angle vector that consists of two gaze angles, that is, yaw and pitch. Fuhl et al. proposed a dual CNN pipeline for image-based pupil detection [14]. Here, the input is an eye image, and the output is an estimated pupil center position. In the first pipeline stage, an input image is downscaled and divided into overlapping subregions. A coarse pupil position is estimated by the first shallow CNN. In the second stage, subregions surrounding the initial estimation are evaluated using a second CNN, and the final pupil center position is detected. Choi et al. proposed a CNN model to categorize driver gaze zones [15]. Here the input image is an eye image, and the outputs are the probabilities of nine gaze zones. As mentioned previously, most related studies that employ CNNs attempt to detect only the center point of a pupil.The objective of this study is to apply the proposed method to a GES. The proposed method is designed for daily life; thus, it must be robust because it is not always possible to detect the pupil center position, for example, when the eyelid overlays the pupil due to blinking. The proposed method is composed of two CNN models. The first model classifies the input image, as shown in Figure1. The second model operates in a regression mode [16, 17]. Collectively, this CNN model outputs the X- and Y-coordinates of the pupil center point.Figure 1
Proposed two-part CNN model.
(a)
The proposed method A
(b)
The proposed method B


## 3. Proposed Method

A CNN is composed of a convolutional layer and a fully connected layer. Typically, the fully connected layer is a feed-forward neural network. The effective layer between the input data and the fully connected layer is the convolutional layer, which is used to detect the significant feature point in the input data prior to sending it to the fully connected layer. If the convolutional layer cannot detect the target feature point, it inputs zeros to the fully connected layer. Under this condition, the fully connected layer outputs only the bias effect of each layer. In other words, a CNN outputs a value regardless of the quality of the input data. We employ a CNN model to classify the input data prior to sending it to the detection model.We describe the classification and detection models in the following subsections.


### 3.1. Classification Model

There are various CNN classification models, and each model has specific characteristics. AlexNet [18] is a well-known model for classification tasks. We selected this model to classify the eye state. We defined three states in eye images; that is, (1) the image shows the pupil as a full circle (open state), (2) an eyelid overlays the pupil (medium state), and (3) no pupil is observable in the image (closed state).Some studies have used a separate CNN model to perform specific tasks. For example, Sun et al. created multiple models to detect each feature point [16]. We also propose using two methods, which we refer to as methods A and B. For method A, we create a CNN model to classify the input image as open, medium, or closed eye states, as shown in Figure 1(a). For medium and open eye images, we create two CNN regression models to detect the feature points from each image type. The details of method A’s classification and regression models are listed in Table 1 (row 1). If the input image is an open eye image, it will be sent to a CNN model trained using only open eye images. Similarly, if the input image is a medium eye image, it is sent to a CNN model trained using only medium eye images.Table 1
Proposed CNN architectures.
Name
Item
Conv1
Conv2
Conv3
Conv4
Conv5
Full1
Full2
Out
Classification model A
Channel
48
128
192
192
128
1024
1024
3 classes
Filter size
11
×
11
5
×
5
3
×
3
3
×
3
3
×
3
—
—
—
Pooling size
2
×
2
2
×
2
2
×
2
2
×
2
3
×
3
—
—
—
Normalization
yes
—
—
—
—
Yes
Yes
—
Dropout
—
—
—
—
—
Yes
Yes
—
Classification model B
Channel
48
128
192
192
128
1024
1024
2 classes
Filter size
11
×
11
5
×
5
3
×
3
3
×
3
3
×
3
—
—
—
Pooling size
2
×
2
2
×
2
2
×
2
2
×
2
3
×
3
—
—
—
Normalization
yes
—
—
—
—
Yes
Yes
—
Dropout
—
—
—
—
—
Yes
Yes
—
Regression model
Channel
96
256
512
512
512
4096
4096
2 reg.
Filter size
7
×
7
5
×
5
3
×
3
3
×
3
3
×
3
—
—
—
Pooling size
3
×
3
2
×
2
—
—
3
×
3
—
—
—
Normalization
yes
—
—
—
—
Yes
Yes
—
Dropout
—
—
—
—
—
Yes
Yes
—The proposed CNN models can potentially solve multiple problems. Note that most previous studies employed an end-to-end CNN model to solve multiple problems. We use method B (Table1, row 2) to classify input images as closed or nonclosed eye (i.e., open eye and medium eye images, respectively). This classification model selects only nonclosed eye images and sends those images to the CNN trained using nonclosed eye images, as shown in Figure 1(b). Note that we compare the performance of both methods.A cost function must be defined prior to training the CNN. The training process attempts to minimize this cost function. In the proposed CNN classification model, we use the mean of the sum of squared errors as the cost function, which is expressed as follows:(1)cost=∑i=1Nooi-di2No,where oi is an estimation output at i, di is a label at i, and No is the number of output classification results.


### 3.2. Regression Model

The proposed CNN regression model (Table1, row 3) is based on the pose regression ConvNet [17], which consists of five convolutional layers and three fully connected layers. The collection of convolutional layers is followed by pooling and local response normalization layers, and the fully connected layers are regularized using dropout. All hidden weight layers use a rectification activation (i.e., ReLU) function. Most CNN architectures for object localization use five convolutional layers [17, 19–21]. A difference between pose regression ConvNet and the proposed regression model is the normalization layer. ConvNet has a normalization layer after the last convolutional layer (Conv5). However, in a preliminary experiment, we found that training using the eye image dataset does not converge when the normalization layer is applied after the final convolutional layer. Thus, we do not employ this architecture. This difference also applies to the fully connected layers. In our architecture, we use local response normalization [18] for Conv1 and use L2 normalization for fully connected layers. L2 normalization is defined as follows: (2)xk′=xk∑i=1Nixi2,where k is the index of input nodes, xk is the input data at node k, xk′ is the output from the normalization process at node k, and Ni is the number of data elements in the layer. This normalization process is required for training to converge.We remove the activation function to make the output value linear. The input to the proposed CNN is an eye image (120×80 pixels). The error function e of the CNN regression model is defined as follows: (3)e=Px-Dx2+Py-Dy2.This function is the distance between ground truth D and estimated point P.


## 3.1. Classification Model

There are various CNN classification models, and each model has specific characteristics. AlexNet [18] is a well-known model for classification tasks. We selected this model to classify the eye state. We defined three states in eye images; that is, (1) the image shows the pupil as a full circle (open state), (2) an eyelid overlays the pupil (medium state), and (3) no pupil is observable in the image (closed state).Some studies have used a separate CNN model to perform specific tasks. For example, Sun et al. created multiple models to detect each feature point [16]. We also propose using two methods, which we refer to as methods A and B. For method A, we create a CNN model to classify the input image as open, medium, or closed eye states, as shown in Figure 1(a). For medium and open eye images, we create two CNN regression models to detect the feature points from each image type. The details of method A’s classification and regression models are listed in Table 1 (row 1). If the input image is an open eye image, it will be sent to a CNN model trained using only open eye images. Similarly, if the input image is a medium eye image, it is sent to a CNN model trained using only medium eye images.Table 1
Proposed CNN architectures.
Name
Item
Conv1
Conv2
Conv3
Conv4
Conv5
Full1
Full2
Out
Classification model A
Channel
48
128
192
192
128
1024
1024
3 classes
Filter size
11
×
11
5
×
5
3
×
3
3
×
3
3
×
3
—
—
—
Pooling size
2
×
2
2
×
2
2
×
2
2
×
2
3
×
3
—
—
—
Normalization
yes
—
—
—
—
Yes
Yes
—
Dropout
—
—
—
—
—
Yes
Yes
—
Classification model B
Channel
48
128
192
192
128
1024
1024
2 classes
Filter size
11
×
11
5
×
5
3
×
3
3
×
3
3
×
3
—
—
—
Pooling size
2
×
2
2
×
2
2
×
2
2
×
2
3
×
3
—
—
—
Normalization
yes
—
—
—
—
Yes
Yes
—
Dropout
—
—
—
—
—
Yes
Yes
—
Regression model
Channel
96
256
512
512
512
4096
4096
2 reg.
Filter size
7
×
7
5
×
5
3
×
3
3
×
3
3
×
3
—
—
—
Pooling size
3
×
3
2
×
2
—
—
3
×
3
—
—
—
Normalization
yes
—
—
—
—
Yes
Yes
—
Dropout
—
—
—
—
—
Yes
Yes
—The proposed CNN models can potentially solve multiple problems. Note that most previous studies employed an end-to-end CNN model to solve multiple problems. We use method B (Table1, row 2) to classify input images as closed or nonclosed eye (i.e., open eye and medium eye images, respectively). This classification model selects only nonclosed eye images and sends those images to the CNN trained using nonclosed eye images, as shown in Figure 1(b). Note that we compare the performance of both methods.A cost function must be defined prior to training the CNN. The training process attempts to minimize this cost function. In the proposed CNN classification model, we use the mean of the sum of squared errors as the cost function, which is expressed as follows:(1)cost=∑i=1Nooi-di2No,where oi is an estimation output at i, di is a label at i, and No is the number of output classification results.


## 3.2. Regression Model

The proposed CNN regression model (Table1, row 3) is based on the pose regression ConvNet [17], which consists of five convolutional layers and three fully connected layers. The collection of convolutional layers is followed by pooling and local response normalization layers, and the fully connected layers are regularized using dropout. All hidden weight layers use a rectification activation (i.e., ReLU) function. Most CNN architectures for object localization use five convolutional layers [17, 19–21]. A difference between pose regression ConvNet and the proposed regression model is the normalization layer. ConvNet has a normalization layer after the last convolutional layer (Conv5). However, in a preliminary experiment, we found that training using the eye image dataset does not converge when the normalization layer is applied after the final convolutional layer. Thus, we do not employ this architecture. This difference also applies to the fully connected layers. In our architecture, we use local response normalization [18] for Conv1 and use L2 normalization for fully connected layers. L2 normalization is defined as follows: (2)xk′=xk∑i=1Nixi2,where k is the index of input nodes, xk is the input data at node k, xk′ is the output from the normalization process at node k, and Ni is the number of data elements in the layer. This normalization process is required for training to converge.We remove the activation function to make the output value linear. The input to the proposed CNN is an eye image (120×80 pixels). The error function e of the CNN regression model is defined as follows: (3)e=Px-Dx2+Py-Dy2.This function is the distance between ground truth D and estimated point P.


## 4. Experiment

### 4.1. Dataset

A CNN is a supervised learning method that requires a large dataset to train a model. Moreover, a variety of ground truths are required to make the model more accurate. MPIIGaze [8] is a well-known eye image dataset composed of medial canthus, lateral canthus, and pupil points. However, the pupil points are not center points. For a GES, pupil center points are required to calculate gaze direction. In this study, we developed a system to capture a dataset with appropriate variation and reliability using an inside-out camera [2].We required a dataset that contains blinking eye images to test the performance of the proposed CNN method. Thus, we had to design a system to capture multiple eye images under appropriate conditions. Note that the center of the pupil’s position depends on gaze direction. To create the dataset, subjects wore an inside-out camera and observed a marker displayed on a monitor. Next, the system captures an image from the eye camera. We designed an additional process to ensure that the subject focused on the marker position. This capture system selects an arrow (up, right, down, and left) at random and displays it at the center of the marker. The subjects were tasked with pressing a corresponding arrow key. We asked the subjects to blink approximately five times before pressing the key. If the subject pressed the correct key, the capture system saved the eye images to the dataset. This process improved the variation of eye images in the dataset. The image collection environment is shown in Figure2. Details about the data collection process are described in the following:(i)
We used a 24-inch widescreen display for this experiment, and the distance between the subject and the display was 60 cm. We captured the images for the dataset in a room with sufficient light from both natural and fluorescent light sources.(ii)
We divided the display area into 49(7×7) sections and show the marker in that section, respectively. First, we shuffle the order of the marker position, in order to make the unpredictable position. The subject has to gaze at the marker without moving the head.(iii)
Then, the user was asked to blink approximately five times. Next, the subject pressed the direction key corresponding to the arrow shown in the center of the marker. The capture program stored 20 eye images captured approximately one second prior to the subject pressing the key. After the eye images were saved, the marker was moved to the next position automatically. This process was repeated 49 times to collect49×40=1960 eye images.Figure 2
Collection experiment scene.After collecting all eye images, we manually annotated the pupil center position by one person for avoiding wrong categorization by multiple persons. We categorized the eye images into three classes: open, medium, and closed eyes. Each class is described as follows:(i)
An open eye image clearly shows the edge of the pupil, which makes it easy to estimate the pupil center position.(ii)
A medium eye image shows the eyelid overlaid on some part of the pupil, which makes it difficult to estimate the pupil position.(iii)
A closed eye image shows no pupil, which makes it impossible to estimate the pupil position.Figure3 shows sample eye images. Ten subjects (seven males (a)–(g); three females (h)–(j)) participated, and a total of 19,600 eye images were collected. All subjects were normally sighted and did not wear glasses. This dataset has 6,526 open eye images, 6,234 medium eye images, and 6,840 closed eye images.Figure 3
Sample eye images from our dataset.The distribution of the pupil center position in our dataset is shown in Figure4. The distributions of open, medium, and closed eye images are shown in Figures 4(b), 4(c), and 4(d), respectively. These distributions show that the number of image types is approximately equal for each section. Note that the pupil center positions were annotated manually. For medium and closed eye images, the exact pupil center position is unknown. We assume the pupil does not move during blinking; thus, we use the same annotation point from a previous open eye image frame, as shown in Figure 5, where the red dot shows the manually annotated ground truth. At frames one and two, the eye is open and easy to annotate. However, in frames three to five, the eye is in the medium or closed states; therefore, for such images, we used the ground truth from frame two.Figure 4
Distributions of our dataset.
(a)
All images
(b)
Open eye image
(c)
Medium eye image
(d)
Closed eye imageFigure 5
Annotation of medium and closed eye image.


### 4.2. Classification Evaluation

We evaluated the classification problem using leave-one-out cross-validation. We used a pretraining model trained using the ImageNet dataset [22] in order to avoid overfitting. The result from the pretraining model are better than without a pretraining model. The classification results of model A are shown in Table 2(a). The accuracy of this model was 82.58%. This result indicates that the accuracy of closed eye images is greater than that of the other classes. Some images for which classification failed are shown in Figure 6. The accuracy of the medium eye case (73.67%) is less than that of other classes because some of the medium eye images were difficult to classify, as shown in Figures 6(c) and 6(d). However, this level of accuracy is reasonable.Table 2
Confusion matrices of CNN classification model.
(a)
Classification result of method A
Predict
Open
Medium
Closed
Accuracy
Actual
Open
5465
1013
48
83.64
%
Medium
784
4595
855
73.67
%
Closed
0
707
6133
89.66
%
(b)
Classification result of method B
Predict
Nonclosed
Closed
Accuracy
Actual
Nonclosed
6596
244
96.43
%
Closed
776
6064
88.65
%Figure 6
Sample images from the failed classification model.
(a)
Label: open eye; predicted: medium eye
(b)
Label: open eye; predicted: closed eye
(c)
Label: medium eye; predicted: open eye
(d)
Label: medium eye; predicted: closed eye
(e)
Label: closed eye; predicted: medium eyeNext, we created a model to classify two classes for method B, which we refer to as classification model B. This model was designed to classify closed and nonclosed eye images. To train model B, we randomly selected nonclosed eye images from medium and open eye images to ensure that the number of nonclosed eye images was the same as closed eye images. The classification results of this model are shown in Table2(b). The overall accuracy of this model was 92.54%, and the accuracy of nonclosed and closed eye images was 96.43% and 88.65%, respectively. This indicates that the classification accuracy of model B is better than that of model A. Classifying closed and nonclosed eye images is easier than doing so for the three classes of eye images because classification model B only classifies two classes, which improves accuracy compared to classification model A. However, all proposed classification models were designed to identify input images for which it is impossible to detect the pupil center position. Thus, both classification models can potentially identify closed eye images effectively.


### 4.3. Regression Model Evaluation

We employed leave-one-out cross-validation to evaluate the regression model. As with the classification model, we used models pretrained using the ImageNet dataset [22] before training with our eye dataset. As discussed in Section 3, the input to the regression model is an eye image selected by the classification model. For the regression model, we had to train and evaluate the model using manually annotated eye images; we called the methods A∗ and B∗. The regression model was trained using methods A∗ and B∗ before the regression model was integrated into the CNN classification model. Next, we evaluated the estimated point using an image from the classification model (methods A and B). Methods A and A∗ have two CNN regression models to estimate the pupil center position in the specific input image (open and medium eye images). The average errors are shown in Table 3.Table 3
Confusion matrix of CNN classification model.
Average error [pixel]
Method
A
B
A
∗
B
∗
Open eye
0.79
—
0.80
—
Medium eye
2.19
—
1.21
—
Total
1.49
1.43
1.00
0.97MethodsA∗ and B∗ are the situation of classification model having a 100% accuracy. However, when we attempted to detect the pupil position in an image classified by the CNN classification model (methods A and B), the average error was somewhat high. Next, we compared the proposed method to a CNN with no classification model, which we refer to as the simple CNN. This model architecture is the same as the regression model of methods A and B. We trained this model using all eye images in the dataset. Figure 7 shows that the average errors of methods A and B are better than those of the regression model with no classification model. Moreover, we compared the proposed method to other well-known CNNs used in feature point detection research (Sun et al. [16]; Zhang et al. [23]). Sun et al. presented multiple CNN models to detect facial feature points. Zhang et al. presented Coarse-to-Fine Auto-Encoder Networks, which are used to detect multiple facial feature points. We trained the compared models under the same conditions as the simple CNN. The results show that the proposed simple CNN model obtained good accuracy compared to the other models.Figure 7
Average error of each CNN model.Figures8 and 9 show sample results for the estimated point obtained by method A. Here, the green point is the estimated pupil point, and the blue point is the ground truth from our dataset. As can be seen, these points are very accurate, and the estimated point nearly overlays the ground truth. However, for some difficult images in which the pupil is shown in the small part, the CNN generates more errors, as shown in Figure 10.Figure 8
Success samples of open eye image.Figure 9
Success samples of medium eye image.Figure 10
Failure samples.


## 4.1. Dataset

A CNN is a supervised learning method that requires a large dataset to train a model. Moreover, a variety of ground truths are required to make the model more accurate. MPIIGaze [8] is a well-known eye image dataset composed of medial canthus, lateral canthus, and pupil points. However, the pupil points are not center points. For a GES, pupil center points are required to calculate gaze direction. In this study, we developed a system to capture a dataset with appropriate variation and reliability using an inside-out camera [2].We required a dataset that contains blinking eye images to test the performance of the proposed CNN method. Thus, we had to design a system to capture multiple eye images under appropriate conditions. Note that the center of the pupil’s position depends on gaze direction. To create the dataset, subjects wore an inside-out camera and observed a marker displayed on a monitor. Next, the system captures an image from the eye camera. We designed an additional process to ensure that the subject focused on the marker position. This capture system selects an arrow (up, right, down, and left) at random and displays it at the center of the marker. The subjects were tasked with pressing a corresponding arrow key. We asked the subjects to blink approximately five times before pressing the key. If the subject pressed the correct key, the capture system saved the eye images to the dataset. This process improved the variation of eye images in the dataset. The image collection environment is shown in Figure2. Details about the data collection process are described in the following:(i)
We used a 24-inch widescreen display for this experiment, and the distance between the subject and the display was 60 cm. We captured the images for the dataset in a room with sufficient light from both natural and fluorescent light sources.(ii)
We divided the display area into 49(7×7) sections and show the marker in that section, respectively. First, we shuffle the order of the marker position, in order to make the unpredictable position. The subject has to gaze at the marker without moving the head.(iii)
Then, the user was asked to blink approximately five times. Next, the subject pressed the direction key corresponding to the arrow shown in the center of the marker. The capture program stored 20 eye images captured approximately one second prior to the subject pressing the key. After the eye images were saved, the marker was moved to the next position automatically. This process was repeated 49 times to collect49×40=1960 eye images.Figure 2
Collection experiment scene.After collecting all eye images, we manually annotated the pupil center position by one person for avoiding wrong categorization by multiple persons. We categorized the eye images into three classes: open, medium, and closed eyes. Each class is described as follows:(i)
An open eye image clearly shows the edge of the pupil, which makes it easy to estimate the pupil center position.(ii)
A medium eye image shows the eyelid overlaid on some part of the pupil, which makes it difficult to estimate the pupil position.(iii)
A closed eye image shows no pupil, which makes it impossible to estimate the pupil position.Figure3 shows sample eye images. Ten subjects (seven males (a)–(g); three females (h)–(j)) participated, and a total of 19,600 eye images were collected. All subjects were normally sighted and did not wear glasses. This dataset has 6,526 open eye images, 6,234 medium eye images, and 6,840 closed eye images.Figure 3
Sample eye images from our dataset.The distribution of the pupil center position in our dataset is shown in Figure4. The distributions of open, medium, and closed eye images are shown in Figures 4(b), 4(c), and 4(d), respectively. These distributions show that the number of image types is approximately equal for each section. Note that the pupil center positions were annotated manually. For medium and closed eye images, the exact pupil center position is unknown. We assume the pupil does not move during blinking; thus, we use the same annotation point from a previous open eye image frame, as shown in Figure 5, where the red dot shows the manually annotated ground truth. At frames one and two, the eye is open and easy to annotate. However, in frames three to five, the eye is in the medium or closed states; therefore, for such images, we used the ground truth from frame two.Figure 4
Distributions of our dataset.
(a)
All images
(b)
Open eye image
(c)
Medium eye image
(d)
Closed eye imageFigure 5
Annotation of medium and closed eye image.


## 4.2. Classification Evaluation

We evaluated the classification problem using leave-one-out cross-validation. We used a pretraining model trained using the ImageNet dataset [22] in order to avoid overfitting. The result from the pretraining model are better than without a pretraining model. The classification results of model A are shown in Table 2(a). The accuracy of this model was 82.58%. This result indicates that the accuracy of closed eye images is greater than that of the other classes. Some images for which classification failed are shown in Figure 6. The accuracy of the medium eye case (73.67%) is less than that of other classes because some of the medium eye images were difficult to classify, as shown in Figures 6(c) and 6(d). However, this level of accuracy is reasonable.Table 2
Confusion matrices of CNN classification model.
(a)
Classification result of method A
Predict
Open
Medium
Closed
Accuracy
Actual
Open
5465
1013
48
83.64
%
Medium
784
4595
855
73.67
%
Closed
0
707
6133
89.66
%
(b)
Classification result of method B
Predict
Nonclosed
Closed
Accuracy
Actual
Nonclosed
6596
244
96.43
%
Closed
776
6064
88.65
%Figure 6
Sample images from the failed classification model.
(a)
Label: open eye; predicted: medium eye
(b)
Label: open eye; predicted: closed eye
(c)
Label: medium eye; predicted: open eye
(d)
Label: medium eye; predicted: closed eye
(e)
Label: closed eye; predicted: medium eyeNext, we created a model to classify two classes for method B, which we refer to as classification model B. This model was designed to classify closed and nonclosed eye images. To train model B, we randomly selected nonclosed eye images from medium and open eye images to ensure that the number of nonclosed eye images was the same as closed eye images. The classification results of this model are shown in Table2(b). The overall accuracy of this model was 92.54%, and the accuracy of nonclosed and closed eye images was 96.43% and 88.65%, respectively. This indicates that the classification accuracy of model B is better than that of model A. Classifying closed and nonclosed eye images is easier than doing so for the three classes of eye images because classification model B only classifies two classes, which improves accuracy compared to classification model A. However, all proposed classification models were designed to identify input images for which it is impossible to detect the pupil center position. Thus, both classification models can potentially identify closed eye images effectively.


## 4.3. Regression Model Evaluation

We employed leave-one-out cross-validation to evaluate the regression model. As with the classification model, we used models pretrained using the ImageNet dataset [22] before training with our eye dataset. As discussed in Section 3, the input to the regression model is an eye image selected by the classification model. For the regression model, we had to train and evaluate the model using manually annotated eye images; we called the methods A∗ and B∗. The regression model was trained using methods A∗ and B∗ before the regression model was integrated into the CNN classification model. Next, we evaluated the estimated point using an image from the classification model (methods A and B). Methods A and A∗ have two CNN regression models to estimate the pupil center position in the specific input image (open and medium eye images). The average errors are shown in Table 3.Table 3
Confusion matrix of CNN classification model.
Average error [pixel]
Method
A
B
A
∗
B
∗
Open eye
0.79
—
0.80
—
Medium eye
2.19
—
1.21
—
Total
1.49
1.43
1.00
0.97MethodsA∗ and B∗ are the situation of classification model having a 100% accuracy. However, when we attempted to detect the pupil position in an image classified by the CNN classification model (methods A and B), the average error was somewhat high. Next, we compared the proposed method to a CNN with no classification model, which we refer to as the simple CNN. This model architecture is the same as the regression model of methods A and B. We trained this model using all eye images in the dataset. Figure 7 shows that the average errors of methods A and B are better than those of the regression model with no classification model. Moreover, we compared the proposed method to other well-known CNNs used in feature point detection research (Sun et al. [16]; Zhang et al. [23]). Sun et al. presented multiple CNN models to detect facial feature points. Zhang et al. presented Coarse-to-Fine Auto-Encoder Networks, which are used to detect multiple facial feature points. We trained the compared models under the same conditions as the simple CNN. The results show that the proposed simple CNN model obtained good accuracy compared to the other models.Figure 7
Average error of each CNN model.Figures8 and 9 show sample results for the estimated point obtained by method A. Here, the green point is the estimated pupil point, and the blue point is the ground truth from our dataset. As can be seen, these points are very accurate, and the estimated point nearly overlays the ground truth. However, for some difficult images in which the pupil is shown in the small part, the CNN generates more errors, as shown in Figure 10.Figure 8
Success samples of open eye image.Figure 9
Success samples of medium eye image.Figure 10
Failure samples.


## 5. Discussion

We compared the proposed method to the simple CNN model. We also compared the different effects between method A and method B. MethodsA∗ and B∗ represent methods A and B when the classification model achieves 100% accuracy. The results shown in Figure 7 indicate that the success rate of method A∗ is better than that of method B∗. This result proves that when we allow the CNN model to learn a specific problem, the model can obtain better results than the single model. However, when we use an input image from the CNN classification, the success rate of method A is slightly less than that of method B because the classification accuracy of method B is better than that of method A. When we consider the difficulty of the classification problem, classifying nonclosed and closed eye images is easier than classifying eye states with three classes (i.e., open, medium, and closed). The single regression model (method B) was trained using both types of image (open and medium). Method B has robustness relative to classification error compared with method A.However, the success rate of both models is better than that of the CNN model with no classification model (i.e., the simple CNN) and the compared models. Figure11 shows the success rate of the proposed method. These results are the ratio of successful images compared to failed images when the distance between the ground truth and estimated point is less than the error distance. When the error distance is greater than four pixels, the success rate of methods A and B is greater than 90%. This shows that the proposed method has the potential for application in gaze estimation tasks.Figure 11
Performance curves.


## 6. Conclusion

This paper has presented methods to detect the pupil center position using a CNN model. We have focused on a wearable camera-based GES. When using a GES in daily life, it is sometimes impossible to detect the pupil center position from an eye image; thus, this paper has considered avoiding this situation, for example, when blinking obscures the pupil. For supervised learning of the CNN, the dataset required specific features, that is, effective variety, appropriate distributions of image types, and sufficient amounts of data, to make the training process successful. Thus, we created a capture system to construct an original dataset. This original dataset provided closed, open, and medium eye images with good distribution. Using pretrained models, the dataset contained approximately 20,000 images, which is sufficient to train the CNN model effectively.The proposed CNN method has two parts. The first is the CNN model, which is used to classify the eye state, and the other is the CNN regression model, which detects the pupil center position. The results show that the proposed CNN model has the potential to classify the eye state. Moreover, the accuracy of the pupil detection is better than that of the simple CNN model.



---

*Source: 8718956-2017-12-04.xml*