{'fraction_non_alphanumeric': 0.03400093153237075, 'fraction_numerical': 0.011777230687337813, 'mean_word_length': 4.691026126467247, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Small Noisy and Perspective Face Detection using Deformable Symmetric Gabor Wavelet Network

Face detection and tracking in low resolution image is not a trivial task due to the limitation in the appearance features for face characterization. Moreover, facial expression gives additional distortion on this small and noisy face. In this paper, we propose deformable symmetric Gabor wavelet network face model for face detection in low resolution image. Our model optimizes the rotation, translation, dilation, perspective and partial deformation amount of the face model with symmetry constraints. Symmetry constraints help our model to be more robust to noise and distortion. Experimental results on our low resolution face image dataset and videos show promising face detection and tracking results under various challenging conditions.


INTRODUCTION
Face detection and tracking have been essential topic in computer vision and image processing. In order to detect human face robustly, abstracted human face models are built and detected in images or videos by minimizing distance between the model and face region. Viola et al. [1] propose real time face detection algorithm using integral image and learning method with AdaBoost. However, this works well with only frontal faces. Zhu et al. [2] propose a unified model for face detection using mixture of trees with a shared pool of parts.
Several researchers have proposed wavelet based model for face detection and tracking [3] [5]. Volker Kruger et al. [3] introduce Gabor wavelet network as an abstracted face model for fast and efficient face tracking. This modeling finds frontal face, but it has difficulties in detecting faces with any perspective. They improve the method for affine transformed face detection [7]. Park and Lee [6] adapt machine learning method for accurate face detection. Recently, Lee [4] has proposed a facial symmetry based Gabor wavelet model for robust face detection which inspired our proposed method.
Detecting face from low resolution and noisy images is challenging task, because they contain very little appearance clue for face detection. In order to overcome this problem, Qahwaji et al. [9] obtain boundary information of a target in an image and then attempt to eliminate noise using Hit-Miss transform. Note that the test images have uniform background. Chung et al. [11] concentrate on face detection in low resolution videos. Face detection based on the modeling using the mixture of tree and a shared pool of parts has been proposed by Zhu et al. [2] to address the face localization problem occurring in the images with different viewpoints. Yang et al. [8] studied face detection in low resolution and occluded images. They propose three-layer hierarchical model which consists of six nodes (head and shoulder, face, left eye, right eye, nose, mouth). Zheng et al. [10] present 12-bit modified census transform for face detection in low resolution color images. Kruppa and Schiele [13] use local context which is trained with instances that contain an entire head for face detection in low resolution images. Mahdi et al. [12] use image denoising method which is suggested by Kovesi [14].
In this paper, we propose deformable symmetric Gabor wavelet network (DSGWN) model for face detection in low resolution and noisy images. Advantages of the GWN face model that has been used in many previous work [4] is that we are able to build a scalable face model with controlled number of wavelets for coarse to fine representation of human face. In real world images, faces almost always contain perspective distortion. Particularity, people take a picture of human face close to them frequently showing more serious distortions. With small sized image, perspective distortion and others like facial expression seriously degrade the face detection performance. Furthermore, our symmetric constrains keep the global facial shape without detailed appearance features in small image. In our modeling, we build symmetric GWN model including perspective view parameter. Then we separate wavelets to several groups to allow deformation in face structure. We add symmetry constraints between these arXiv:2010.16164v1 [cs.CV] 30 Oct 2020 (a) candidate windows (b) CNN classifier [4] (c) our DSGWN Fig. 2. Stages of proposed method groups. In the detection and tracking, we adapt the frequency guidance detection method proposed in [4].

PROPOSED METHOD
Proposed method consist of three stages as shown in Figure  2, i.e. searching face-like regions, face classification and find accurate face information(accurate location, rotation, scaling, perspective, symmetric etc). In first stage we find face-like regions. In this section we use object detection method which is Viola-Jones object detection framework [16] [17]. By minimizing detection rate we can get more face-like regions. It helps to find face regions from low resolution images. In the second stage, we use Convolution Neural Network classification. Because we get several candidate face regions from first stage. Then we should keep only face regions.
In the last stage using GWN face model we find accurate shape and position of face. In this stage we generalize symmetric GWN face model [4] by incorporating perspective distortion and extending it to be our deformable symmetric model (DSGWN) with geometric and symmetric constraints. In order to recognize perspective distortion, our optimization has extended searching space including parameters of perspective transformation. Our GWN model has three subgroups (top-left, top-right and bottom) with perspective, translation, orientation and size parameters. Each subgroup try to find optimized location searching for optimal appearance of human face under constraints such as distance, orientation difference and size difference between subgroups keeping symmetric structure of our model.

FINDING CANDIDATE FACES
In order to get roughly face regions from low resolution images we use Viola-Jones object detection method [17]. This method is robust very high detection rate (true-positive rate) very low false-positive rate always. Basic idea of this algorithm is sliding window across image and evaluate a face model at every location. This algorithm has four stages: 1. Haar feature selection 2. Creating an Integral Image

Adaboost Training 4. Cascading Classifiers
Concept of integral image helps to calculate Haar features quickly.
In order to select features we use Adaboost algorithm. Boosting is a classification scheme that works by combining weak learners into a more accurate ensemble classifier. We can define weak learners based on rectangle features as follows: here x is window, h t is value of rectangle feature, p t is parity and θ t is threshold. Adaboost learning algorithm creates a small set of only the best features to create more efficient classifiers [18].
Then in order to achieve increased detection performance and reduce computation time we use cascade classifiers. A cascade is a way of combining classifiers in a way that a given classifier is only processed after all other classifiers coming before it have already been processed. In last stage threshold value may be adjust to tune accuracy. Choosing lower threshold helps to find face regions from low resolution images, but more probably we get false positive windows as shown in Figure 2 (a).

FACE CLASSIFICATION
From first stage we get candidate windows consist of positive and negative. Next thing to do is get only face-like regions. In order to check candidate windows we use CNN classification. In order to make structure of CNN we use LeNet-5 [19]. Our CNN network is consist of 8 layers, 3 convolution layers, 3 max pooling layer and 2 fully connected layers (shown as figure 3-not yet). Output is two which are face and non-face. Input is 32x32 gray-scale image, because we need find small faces that's why input is small. For training of CNN face classification we use 1000 positive and 4000 negative images. In this stage, the positive proposed candidate windows are selected by CNN face classification (as shown in Figure 2 (b) .

GWN FACE MODEL
Gabor wavelet network (GWN) used by Kruger et al. [7] for face detection optimize the location, orientation and size of each Gabor wavelet based on the local appearance of human face. In order to build the GWN for frontal face, we use N wavelets Ψ = ψ n1 , ψ n2 , ... ,ψ nN with parameter vectors n = (c x , c y , θ, s x , s y ) T calculated as follows [4]. Structure of network shown as figure [make], which consist of one input layer where (c x , c y ) is translation, θ is orientation and (s x , s y ) is wavelet size. Based on a given frontal face image I, GWN is built by minimizing the energy function E with respect to weight ω i and n i [4].

PERSPECTIVE GWN FACE MODEL
Homography describes the transformation function between two images having respective perspective distortions that has been used for panorama creation stitching multiple images taken at different positions. This transformation is constructed in homogeneous coordinates represented by a 3x3 matrix with 8 degrees of freedom (DoF). We represent projective transformation of face in an image using homography matrix. The advantage of utilizing homogeneous coordinates is that we can represent position of each wavelet as a tuple (x, y, w), where w is a scale parameter. For simplification, we will let w be fixed at 1. Homogeneous coordinates allow us to perform an image projective transformation by using standard matrix multiplication.
where x and y are current locations of Gabor wavelet, x and y are projected locations of Gabor wavelet, and w is scale parameter. All projected points have been calculated by using equation (4). In order to recover original coordinates, each elements of tuple are divided by its homogeneous scale parameter. Then as we mentioned above for the simplification we set w to 1 (Equation (5)) x , y , w where, x and y are normalized projected location of Gabor wavelets. By choosing the correct values for the homography matrix, we could get a transformed GWN face model (A sample is overlapped on the result image in Figure 1).

DEFORMABLE GWN FACE MODEL
Now we have symmetric GWN face model with perspective parameter. In order to allow deformation in the structure of the face, we separate Gabor wavelets to three group (A.topleft, B.top-right and C.bottom) as shown in Figure 3 (c). Each group has parameter vector m = (c x , c y , θ, s x , s y ) that consists of translation, orientation and dilation. In this work, we use 16 Gabor wavelets. Group A and B consist of 4 wavelets and group C consists of 8 wavelets. At each group, respective group translation, orientation and dilation values are calculated. In our face detection and tracking, each group separately finds best fit in local area keeping relations defined and controlled by the symmetric constraints that will be explained in detail in the following section.

DSGWN FACE DETECTION AND TRACKING
Deformable Symmetric GWN (DSGWN) face model is constructed with a perspective distortion. Then we calculate constraints for face detection with DSGWN. Our constraints consist of translation, rotation and scale differences between groups. In order to calculate distance between groups we calculate average location of wavelets of each group x c = x1+x2+..+xi i , y c = y1+y2+..+yi i . And we calculate Euclidean distance d = (x 2 − x 1 ) 2 + (y 2 − y 1 ) 2 between these average locations. And then we calculate orientation difference between the subgroups. In order to calculate the orientation of each group A and B, we calculate upward orientations using 1st-3rd and 2nd-4th wavelet pairs (θ = atan2 (y 2 − y 1 , x 2 − x 1 )) and average them as shown in figure 4 (b). For group C, we calculate orientations using 1st-5th, 2nd-6th, 3rd-7th and 4th-8th wavelet pairs. Orientation difference between groups θ d = |θ n1 − θ n2 | are calculated using the group orientations.
Next constraint is scaling. Let's γ h and γ v are horizontal and vertical scale factors of an wavelet in our model. We have original scale of each Gabor wavelet. We calculate sum of multiplied scale of wavelets in each group as shown follows.
where i is the index of wavelet for n th group. Then we get (a) Frontal face (b) BSGWN [4] (c) Our DSGWN where H is homography matrix, s is scaling factor, R is rotation matrix and c is translation vector. We use equation (7) for all wavelets in our model and (8) for each group's wavelets. Now, we optimize weight differences between the super-wavelets (face model) and an image or a current video frame. For our optimization, we use Levenberg-Marquardt algorithm.

EXPERIMENTAL RESULTS
Our DSGWN face model for face detection consists of 16 wavelets. In figure 5, four different results are compared. First column is the result of [3] and the second column is the result of [7]. In the third column, deformable face model is used without symmetric constraints and fourth column is the result of our proposed method with DSGWN. Detected face region(bottom-left) and transformed face model(bottomright) show that all methods works properly with frontal face with the first image. On the other hand, the proposed method captures perspective and rotation of target human face even with very low resolution images compared to previous methods (second and third images). Figure 7 shows face detection results with various still images. Each result compares input image with detected face (blue square), detected face region image and transformed our DSGWN face model. Note that we sorted the results by the resolution of detected face (fine to coarse). Rotation (#3, #8, #11, #14, and #16) and perspective (#5, #9, #10, #12, and #16) faces are well detected and represented by our face model. Images #14, #15, and #16 contains very low resolution faces and even it is difficult to Face detection results compared with two previous face models: GWN [3] and BSGWN [4] recognize any detail of human face in the detected face images. Proposed method, however, finds global symmetry face shape showing reasonably correct detection results that can be checked in the input images. Especially, in the result of #16, we observe that the perspective of human face is correctly detected with such small sized face image. Figure 6 shows several screenshots of the tracking result from videos containing various rotation and perspective motions. Video frames with perspective face (4th, 9th of 1st row and 3rd, 4th, 7th, 8th, 9th, 10th, 11th of 2nd row) faces are well tracked through the video.

CONCLUSION
In this paper, we propose DSGWN face model for face detection in low resolution and nosy images. Our model optimizes the rotation, translation, dilation, perspective and partial deformation amount of the face model with symmetry constraints. Our experimental results show that our method gives promising detection results compared with previous methods [3] [4] in low resolution images and videos.