Sparse Neural Network for horse face detection in a Smart Riding Club Biometric System

Horses and breeders need to be safe on the farm and the riding club. On account of the great value of the horse, the breeder needs to protect it from theft and disease. In this context, it is important to detect and to recognize the identity of each horse for security reasons. In fact, this paper proposes a Smart Riding Club Biometric System (SRCBS) consisting in automatically detecting and recognizing horses as well as humans. The proposed system is based on the facial biometrics for a horse and the gait biometrics for a human due to their simplicity and intuitiveness in an uncontrolled environment. The present work focuses mainly on horse face detection and recognition. Animal face detection is still extremely diﬃcult given the fact that face textures and shapes are grossly diverse. In addition, recent detectors require a huge dataset for training and represent a huge number of parameters and layers, leading to so much training time. For re-Islem solving these problems and also for a useful detection system, this paper proposes a Sparse Neural Network (SNN) based on sparse features for horse face detection. Diﬀerent global and local features were performed to identify horses and humans for the recognition process. Due to the unavailability of horse databases, this paper presents a new benchmark for horse detection and recognition in order to evaluate our proposed system. This system achieved an average precision equal to 90% for horse face detection and a recognition rate equal to 99.89% for horse face identiﬁcation.

solving these problems and also for a useful detection system, this paper proposes a Sparse Neural Network (SNN) based on sparse features for horse face detection. Different global and local features were performed to identify horses and humans for the recognition process. Due to the unavailability of horse databases, this paper presents a new benchmark for horse detection and recognition in order to evaluate our proposed system. This system achieved an average precision equal to 90% for horse face detection and a recognition rate equal to 99.89% for horse face identification.
Keywords Horse Face Detection · Identification · Neural Network · THDD · THoDBRL 1 Introduction Object detection and identity recognition have been widely employed in recent years for several security reasons. Animals, just as humans, need to be safe. Farm animals control is required for verification of the source, the identity and the production process as well as for the livestock health surveillance. In addition, the outbreak of diseases such as bovine spongiform encephalopathy (BSE), foot-andmouth disease (FMD) and classical swine fever (CSF), and the importance of export markets for domestic producers, requires the implementation of animal detection and identification programs that allow farmers to trace cattle from birth.
Hence, the regulatory provisions (Orientation Law 1999) [13] made the equine identification compulsory to ensure the origin of each horse and certify their identities for the purpose of fighting againt theft and fradulant horses as well as making sure of healthy monitoring.
In this context, assuring the security of animals and humans seems extremely interesting in a riding club. Owing to its great value, it is very necessary to help essentially the horse as well as its owner so as to be controlled without obstacles or difficulties in the barn, the box or the race track.
Well-known traditional methods of animal identification use plastic ear tags, tatoos, freeze branding, hot-iron branding or RFID electronic ear tags. However, these techniques may threaten the well-being of animals [6] and require effort to identify the animal. Because of these problems, another detection and identification way should be used for effective control by means of a stressed robust biometric marker that is invariant, fraud-proof, fast, accurate, inexpensive and non-invasive to capture. Researchers have resorted to other identification methods using different physiological biometric modalities such as muzzle patterns [24,23] and retina pattern [2]. Although these patterns are effective, they require an effort to get the identity of the animal. In fact, these methods necessitate direct contact between the animal and the camera to capture the muzzle or retina patterns. Thus, a biometric detection and recognition system needs to be created for the comfort of both animals and humans taking into account the subject in motion in order to be well-being and lack the direct contact between the subject and the sensor.
Gait acquisition does not require contact with the sensor, just as the face biometrics, and is less likely to be exposed to obscurity than other biometrics. In fact, gait identification is easier to use and more secure than the other biometrics.
The subject can be identified in any view and at any location. In a riding club, the gait biometrics are very useful for human identification but not for horses. In the stable, the horses remain in their boxes without walking and only the face appears. Therefore, the facial biometrics are the most suitable biometric traits for horse identification. In fact, the most suitable biometric traits that can be useful for a smart riding club security are the facial biometrics for horses and the gait biometrics for humans due to their simplicity and intuitiveness in an uncontrolled environment.
Face recognition is one of the most promising modalities for horse identification [16,17,34] despite the scarcity of research in this field. According to the 5 th edition of the FEI 1 , the description of the horse face is particularly different. In fact, the horse hair color is very varied and contains different texture patterns such as the blaze, the strip, the snip, the star and the lip marking on the head. The variation in direction and shape of these texture patterns is different from one horse to another.
Indeed, the use of the face pattern is more effective for the horse identification. This paper suggests renewing the Smart Riding Club Biometric System (SR-CBS) proposed in [34] using other modalities, features, methods and techniques to achieve a more efficient automatic system with an improved performance. The proposed SRCBS is very important for breeders to ensure the safety of the horse due to its great value. Renewing the horse face detection and recognition systems is the main interest in this work. Regretfully, the face detection task is still very difficult mainly because of the large intra-class variation, the illumination change, the variable pose, the complex background, the partial occlusion and the uncontrolled environment. Face textures and shapes are grossly diverse, which makes the animal face detection extremely difficult. This is probably the reason why the number of related work approaches for animas is small. Despite these difficulties, recent research has achieved significant progress to resolve the interesting detection problems. The detection rate has reached nearly 90% of the human face using boosting-based and CNN-based (Convolutional Neural Network) approaches [18,44]. The fact that Convolutional Neural Networks (CNNs) are strong and fascinating classification tools is among the reasons why Deep Learning is immensely popular and widely used for computer vision tasks. Despite the rapid development of CNN, there are different challenges during its training. First, CNN requires a huge dataset for training [19]. Second, pooling layers eliminate a great deal of information and ignore the realationship between image parts according to Hinton [39]. Finally, CNNs represent a big number of parameters and layers, leading to much training time and high computational complexity.
According to the above-listed problems, the challenging questions at this step are: -How to create a neural network as a backbone detector with a small number of parameters and layers in order to minimize the training time and the computational complexity.
-How to determine the powerful features and effectively detect horse faces using a small database for training.
-How to recognize horses using the simplest method for training and testing.
The challenging issue consists in establishing a safer smart riding club and proposing a new application to detect and recognize the horse face and human gait with an easy and fast way without the need for a huge data for training. The different contributions in this paper are as follows: -Renewing the proposed SRCBS in [34] using other modalities and other methods.
-Making a Sparse Neural Network for horse face detection (SNN) using the smallest number of parameters and without the need for a huge horse data for training.
-Making a system for horse face detection based on the proposed SNN.
-Employing a sparse feature selection method for face detection. The feature selection field has been well adapted resorting to many learning methods for pattern recognition applications. However, these are not devoted to object detection applications.
-Using the proposed sparse feature selection method as a training optimizer for a sparse hidden layer of SNN instead of such traditional algorithms as ADAM and SGD.
-Making a new horse database called Tunisian Horse Detection Database (THDD), which could contribute to the research community of the animal biometrics.
To the best of our knowledge, this is the only dataset of public face image that is available for research on horse detection.
-Proving that our proposed SNN could get better performance than the CNNs of the traditional detectors. In the experiments, the efficiency of SNN was demonstrated for face classification compared to the other Conolutional Neural Networks using the smallest number of parameters and without the need for a huge dataset.
-Showing through experimental studies that the proposed recognition system for hoses got a better performance than the related works.
The rest of this paper is organized as follows: Section 2 presents the related works on animal face detection and recognition. However, the proposed SRCBS and its sub-systems are described in Section 3. Section 4 is devoted to the presentation of THoDBRL'2015 and THDD databases. Section 5 focuses on the experimental study, whereas section 6 shows the limitations of the system. The conclusion of this paper which also presents some possible future work is eventually drawn in Section 7. Zhang et al. [53] proposed a set of Haar of Oriented Gradients (HOOG) to capture the texture and shape features on the animal head (such as cats, tigers, pandas, foxes and cheetahs). They used SVM for classification and decision calculation. Using the Cat Database, they found a precision equal to 95% and a recall equivalent to 99.8%.
Yamada et al. [50] proposed detecting dog and cat heads using edge-based fea- The proposed detectors [46,49] have already taken on known CNN architectures (ResNet and DarkNet) as backbones. In addition, other detectors for animal detection [20] based on CNN were propounded. However, Convolutional Neural Networks (CNNs) ignore the relationship between image parts, represent a big number of parameters and layers and require a huge dataset for training. This leads to much training time and high computational complexity.
To deal with the above-listed problems, this paper introduces the Sparse Neural Network for animal face detection SNN. The proposed network effectively exploits the animal face characterization to obtain fast classification and detection using the smallest number of parameters and without the need for a huge dataset.

Animal face recognition
In the last decades, the development of facial recognition systems has been achieved using manually-noted databases in order to locate the facial area in the image.
Overall, facial recognition systems have not been automated by facial detection systems [16,17,34,42,22,40,31]. However, these methods allow high recognition rates but their systems lack automatic face detection, which is why the animal face detection system is important to ensure safety and security.
Jarraya et al. [16] benefited from the horse face properties and proposed an approach for horse identity recognition using frontal facial features of 47 horses.
They used the Gabor filters and the LDA for features extraction. However, the Euclidian (Euc) distance and MahCosine (MC) distance were employed for classification. They validated our previous system using the THoDBRL'2015 and they achieved a recognition rate equal to 95.74%.
Jarraya et al. [17] proposed a multi-view horse face recognition using the THoD-BRL'2015 that contains 47 horses. They used the Gabor filters for face characterization, the Stacked Auto-encoders (SA) to reduce the size of the feature vector and SVM for classification. Using 9 images for training, they obtained a recognition rate equal to 94.22% on the frontal images. Face recognition was performed on other animals such as cattle by [22,40] and dogs by [31]. Kumar et al. [22] used the SURF and the LBP for feature extraction and the Chi-Square for classification. The performance was about 92,5% with a database of 40 cattle.
Salama et al. [40] used the Bayesian optimization to automatically set the parameters for the AlexNet convolutional neural netwotk. They performed their method on a database of 52 sheep. They achieved a recognition rate of 98%.
Mougeot et al. [31] proposed a deep learning approach based on a deep convolutional neural network for the face recognition and verification of dogs. They found a recognition rate equal to 88% on a database of 48 dogs.
The previously-mentioned related works conducted their proposed methods on small datasets that contained on average between 40 and 50 subjects with no more than 10 images for each subject. This number is not sufficient for a deep neural network training. This explains the high recognition rate for works [16,17,34,22] that used handcrafted features and the low rate for works [31,42] which used deep neural network approaches. Hence, the proposed solution in this paper is to avoid the use of a deep neural network which represents a big number of parameters.
Owing to the importance of studying the horse, some works have been carried out recently and have given new computer solution for control and security objectives. In fact, according to North [33], the interaction between the horse and the computer is more substancial.
Hummel et al. [15] and Li et al. [27] proposed using the face pattern as it is rich in information about the life of horses such as pain, disease and feelings.
The objective of Hummel et al. [15] was to recognize the pain in equines. They The objective of Li et al. [27] was to detect EquiFACS units automatically from the horse face images. They proposed to test the DRML and AlexNet for horse facial AU recognition. They found an accuracy between 54.0% and 58.1% using DRML and an accuracy between 52.8% and 57.0% with AlexNet on their own dataset.
Bragança et al. [5] propounded to improve the gait classifcation of horses using data generated by the Inertial Measurement Unit (IMU). They built a dataset of 120 horses which included 7.576 strides of 8 different gaits. Their gait classification model based on the LSTM network achieved 97% of accuracy.

The proposed Smart Riding Club Biometric System (SRCBS)
In this section, the proposed Smart Riding Club Biometric System (SRCBS) which involves three sub-systems for horse and human recognition is introduced. The objective of the first sub-system (HFD-SF system: Horse Face Detection using Sparse Features) is to detect the horse face. As for the second sub-system (HIR-FB system: Horse Identity Recognition based on Face Biometrics), its objective is to develop a contactless solution for horse recognition using facial features. The objective of the third sub-system (HIR-GB system: Human Identity Recognition based on Gait Biometrics) is to recognize the person from a specific distance using the gait modality. In fact, two Camera positions were proposed for human gait and horse face detection and recognition. The first camera was placed in the barn near the horses for the facial biometrics capture. The second one could be placed anywhere in the club for the capture of the human gait biometrics from a distance.

HFD-SF system: Horse Face Detection based Sparse Features
The difficult question, at this stage, is how to determine the powerful features and the most useful method to effectively detect horse faces using a small number of parameters and without the need for a huge set of data. Due to the large diversity of horse head textures, it would be a sophisticated task to develop a face detector. Although horses have distinctive ears, this characteristic cannot be focused on because the horse moves them frequently and changes their shape and position in a fascinating way. Therefore, our work concentrates on detecting the horse face without considering its ears. On the other hand, we has been observed that all horses have distinctive head forms, nose and profile eyes. The horse faces have a globally similar shape, but locally variant colors and textures. For this reason, finding out how to effectively use the shape features has been our focus in order to create a robust horse face detector. Based on this idea, a detection method that focuses on the most expressive oriented gradient features has been proposed. In fact, a Sparse Neural Network for horse face detection using sparse gradient features called (SNN) has been suggested.

Gradient features for horse face description
Since gradient features have performed well in several high-level computer vision tasks such as object detection [37], testing their performance on horse face detection is proposed in the present work. This descriptor describes the apparent objects and shapes by estimating the direction of the edges or the intensity distribution [7]. The description was carried out by dividing the image into small adjacent regions, called cells, and by calculating the gradient the directions for each cell in the histogram. The magnitude (Mag) and direction in pixel (x, y) were calculated according to the following equations where I(x ,y) is the brightness value of the image in (x,y) (Eq. 1-4).
For each cell, an oriented gradient feature vector was constructed by quantizing θ into K orientation bins weighted by the gradient magnitude [7]. The overlapped cells were grouped and normalized in order to form a wider spatial region (block).
The concatenation of the block histograms formed the gradient descriptor [7].There were significant challenges in adapting gradient features for horse face detection and selecting the effective ones of the complicated face textures.

Sparse Neural Network (SNN) architecture
To deal with the above-listed problems (in the Introduction), the smallest network with a small number of parameters was suggested for horse face detection. In  fig. 2.

HIR-FB system: Horse Identity Recognition based on Facial Biometrics
According to [16,17,34] it can be concluded that the Gabor descriptor is effective for horse face characterization. Gabor descriptor has proven its sufficiency in many recent works for face recognition [26,4,30]. Jarraya et al. [16] demonstrated that if W P E trun (i) 0 then 6: the LDA was better than the PCA for the selection of Gabor features. Multi-class SVM effectiveness for horse face feature classification was proven in [34]. Thus, it would be interesting to use these techniques and propose an identification system using the Gabor filters for feature extraction, the LDA for feature selection and multi-class SVM for classification. Make prediction sgn(x T t W t )

4:
Receive y t

4:
Receive y t

5:
if y t x T t W t ≤ 0 then 6: W P E trun = T runcate( W t+1 , B) 8: Send W P E trun

HIR-GB system: Human (worker and rider) Identity Recognition based on
Gait Biometrics

Pre-processing (CRF-RNN for worker and rider detection)
Since CNNs have achieved a great success in natural image analysis and the CRF outperformed other existing solutions in structural learning, the Conditional Ran- The next estimation of marginal distributions after one iteration was given by f θ (U, H, Img). Eq. 6-8 represent the behaviour of the network where T is the number of iterations while the θ vector represents the CRF parameters [54].
Using CRF-RNN, the output is a number of regions with different classes. The region reference map was obtained and only the human references have been selected. As shown in Fig. 4, the CRF-RNN of semantic image segmentation was benefited from in order to detect the human boundary area represented by the light pink color.

Worker and rider identity recognition
The main advantage of the gait biometrics is that it offers a great potential for recognition at a low resolution and from a distance. Using the proposed solution in [11], the gait signature was represented by the fusion of two types of silhouette characterization. The Gait Pal and Pal Entropy (GPPE) features were merged with four proposed distances from the silhouette. The proposed distances were d1, d2, d3 and the slope of axis of least inertia of the silhouette area θ which were detailed in [11]. The proposed features were performed on the Casia-B dataset using the MLP classifier. Fig. 1 shows the human gait recognition solution for a Smart Riding Club Biometric System.

Databases
To the best of our knowledge, there is no public horse face image pattern database that can be used for the evaluation of detection algorithms. Therefore, the THDD was prepared for the horse face detection system while the THoDBRL'2015 was used for the horse face recognition system.

THDD
The THDD includes a set of frontal horse images. The digital images were taken at different distances ranging from 1 to 2 meter from horses. The capture was performed by a video camera. Two digital cameras were used. The first is of 10.1 Mega Pixels and at a resolution of 640 * 480 pixels, whereas the second is of 15 Mega Pixels and at a resolution of 12080 * 720 pixels. The collected data set consists of 1103 horse images and 6000 cropped face images for 60 Barbaro, Arabian and hybrid horses (Table 1). In fact, there were two sets: The first one was for horse face classification that includes 6000 positive images and 7937 negative images, the second one was for horse face detection that includes 1103 images.
The first set was used as a training set and the second set was used as a test set in this paper. Most of these animal images had near frontal view. Fig. 5 shows some sample images from the training set of the database. Fig. 6 shows some sample images from the test set of the database.  (Table 1), 470 left profile images and 470 right profile images. In fact, following the same database construction process of the most related works [21,45,22,1], 10 frontal face images. Therefore, this database contains 10 left profile images and 10 right profile images were taken per horse.
In the THoDBRL'2015 database, there are three sets: The first one contains the captured videos, the second one includes selected images, the third one has the cropped images.

Horses in motion:
The animal is not sane and it is impossible to fix its head and keep its stability. It may change its place and position for any time. These changes of place spoil the distance of 1 meter (for THoDBRL'2015) and 1-2 meters (for THDD) between the camera and the animal. In order to fix the head of the animal as much as possible to obtain adequate images, the capture of horse videos was done when they were in barns. The movements of the horse were reduced but did not disappear. Thus, the distance between the horse face and the camera slightly changed on the two databases .

Natural conditions:
Videos were taken from four equestrian centers in Sfax (a city in the east coast of Tunisia) at daylight. The camera was hand-held and positioned in front of the photographer eyes at a distance of about 10 cm from his face. In order to guarantee a maximum fixation of the animal head and to obtain adequate images, the videos were taken when the horses were in barns in natural conditions and without any pressure.
There was a change of the lighting in the horse face according to the position of the animal head and the sun. In addition, there were shadows such as the shadow of the walls or the leaves (Fig. 7). The background also varied in each of the captured videos (Fig. 8).  In the THDD, each face area was manually detected with four ROIs (Xmin, Ymin, Width, Height) of the selected image ( fig. 9).
In the THoDBRL'2015, each face area was manually cropped of the selected image for three views ( fig. 10). Sparse hidden layer of SNN: A small fraction of features equal to 10% of the feature dimensions was selected as proposed in [3]. This fraction is enough to find Block generation for detection process: A very popular searching strategy has been proposed in [48] to detect face instances in the image. A sequential scan of all possible regions in the image was done by a sliding window. The highly accurate real-time human frontal face detector presented by [47] and [48] used the sliding window strategy. This technique is still used for its sufficiency in many recent detection works [14,25,36]. In this paper, this detection strategy was chosen owing to its interesting performance.
The digital images of the database were taken at distances ranging from 1 to 2 meter from the horses. Hence, the camera was considerably not too far from the animal and, consequently, the horse face region was a bit wide in the image. Thus, the horse face size in the image varied between 80 * 155 to 360 * 640. Taking this characteristic into account, the first stage consisted in scanning the entire image with a resized window (from 80 * 155 to 360 * 640) with 8 pixels in width, 20 pixels in height and 10 pixels stride. To control the presence of the horse face in each window , the output value of the SNN was monitored. Each window classified as face, would be kept to collect all predicted windows. The predicted windows were filtered applying the Non-Maximum Suppression algorithm (NMS).
Gabor descriptor: The same parameters used in [16,17] were employed.
Multi-class SVM: The linear kernel of the multi-class SVM was used.

Experimental results
In the literature, the detection procedure usually includes three steps: block generation (multi-scale sliding windows or region proposals), face classification (in the backbone of the detector) and post-processing (non-maximum suppression and bounding box regression). In fact, the performance of face detectors is mainly influenced by the face classification network also known as the backbone. Duan et al.
[10] discovered that the detector and the classifier of the general object detection have comparable performances using the same backbone. This explains that the designed backbone for the classification dataset is applied easily to the general object detection which gets an excellent mAP (mean Average Precision) score.
Therefore, it is necessary to evaluate the proposed SNN and the HFD-SF system for horse face classification and detection on the THDD.
Using the gait modality, the CRF-RNN for human body detection and the proposed solution by [11], the recognition rates equal to 95.41% on Casia-B database were close to the recognition rates of the last SRCBS system in [34] using face biometrics even though the capture distances in Casia-B were larger than the distances in the databases used in [34]. The recognition result was the same as [11] because CRF-RNN detected all human bodies of the test set. Then, it would be more efficient to replace the old system with ours.

HFD-SF system
Classification evaluation: For a good evaluation, the proposed SNN was compared with other CNNs such as MobileNetV2 [41] and GoogLeNet [43] which have represented the smallest number of parameters as well as ResNet-50 [51] which has been widely used for human face detection [29,52].   [32].
Our detector was found to achieve a higher performance. The Average Precision of the two detectors (HFD-SF and Viola-Jones) was 90.00% and 70.00% respectively.
The detection results were compared (shown in Table 3) using two kinds of features, gradient features and intensity features (using LBP features). The average precision and recall of the two descriptors (gradient, intensity) using the proposed detection system were (90%, 90.39%) and (71.40%, 83.27%) respectively. Fig. 12 shows precision-recall curves on the THDD. This figure represents the performance of the proposed detector HFD-SF on the THDD and reports that the proposed method had the biggest critical region. The Haar (Fig. 14) and weighted LBP features (Fig. 12) gave the poorest performance because of the large texture variations and shapes of the horse head. With the help of the proposed SNN, we have   Table 2).
The same thing was noticed for the detection process. HFD-SF based on SNN gave encouraging results with an Average Precision equal to 90%. Unlike the other networks, SNN kept as much information as possible by minimizing the number of operations and parameters. Consequently, the sparse hidden layer positively influenced decisions and brought detection closer to reality.

HIR-FB system
Among the THoDBRL'2015 images, only the frontal face images were interesting and seven face images were chosen per horse (329 images in total) for the training step of the facial recognition system. To better verify the performance and the efficiency of the HFD-SF system in SRCBS and also to achieve end-to-end recognition system, an investigation on horse identity recognition has been integrated based on our detection algorithm results. Using the proposed HFD-SF system, faces were detected on 3 images from the THDD for each horse in the THoDBRL'2015. These images were used for evaluation on the HIR-FB system. In fact, three face images per horse (141 images in total) were used as test images.
In the identification of applications, the camera is fixed and the background was static. It is easy to take a background model and identify objects of interest by detecting changes in the background. In our system, the case was different. In fact, the capture was done in natural conditions with varied background. Because of these reasons and the variety of luminance in our database, the facial area of the horse was cropped with Matlab from the original images of the database and resized (the same image size 160 * 380) as shown in Fig. 16. Table 4 shows that the proposed recognition system gave the highest performance in two processes: Verification and Identification with interesting results compared to the results of the related works. Fig. 17 of ROC curves and Fig. 18 of CMC curves disclose that the HIR-FB had the bigest critical region compared to the others. HIR-FB recorded an 8.5% and a 6.62% improvement in the identification and verification rates respectively. It is worth reminding that there has already been a suitable horse face recognition system in [16,34,17]. However, their previously published results were less than the present results.
For more evaluation, the proposed approaches were compared with some famous and standard systems of face recognition including VGG-Face [35], SphereFace [28] and ArcFace [9] and RiseNet [42].
SphererFace [28] is based on a convolutional neural network of 64 layers including convolutional, fully connected and softmax layers with an angular softmax loss RiseNet proposed by [42] is an animal face recognition framework .
The above-listed systems are based on pre-trained networks on the ImageNet [8].  Table   5. This table proves the superiority of the proposed approach based on Gabor features, LDA and SVM. The proposed HIR-FB proved its performance on the VGG Face 72.62% [28] SphererFace 74.98% [9] ArcFace 75.32% [42] Fine-tuning of Arcface 81.79% [42] RiseNet 82.56% HIR-FB Gabor+LDA+SVM 99.89% experimental part for the classification and verification processes. In fact, the results were very encouraging with a recognition rate equal to 99.89%. The proposed system improved the recognition rate by 1.12% compared to the old SRCBS [34] and 22.44% in comparison with the standard systems for face recognition [35,28,9,42]. According to these results, facial pattern can be considered as a well biometric marker for horse identification.
The multi-class SVM was used to separate the data in n classes by optimal hyperplanes. It uses different kernels for feature transformation in a new helpful representation to facilitate the optimization of the margin by reducing feature complexity. The choice of the best and simplest kernel was proposed in this work to easily separate the feature classes. The use of the multi-class SVM based on a linear kernel is justified by the linearity of data using the Linear Discriminant Analysis (LDA) which represents the features in a new space based on the projection of eigenvectors. In addition, the Gabor features and LDA proved their efficiency for horse face recognition.

Limitations
Owing to the photos which were taken close to the pets in the used databases, the faces of the animals were not very small and the system easily detected and recognized them. Nevertheless, the proposed SRCBS cannot detect very small faces when the animal present in the photo is very far away. This was due to the poor resolution of the facial area as well as the lack of the important details and information. However, the performance of the sparse feature selection method decreased as the information was reduced. The more information there is, the fairer the SNN does the classification. The problem of detecting small faces is actually a challenge in the backbone of the most popular detectors. In an open space, when the horse is not in the stable, the animal will move around and sometimes the camera will only be able to capture a part of its body. The proposed SRCBS cannot in this case identify the horse and the face biometrics become useless.
Therefore, the addition of the gait biometrics to the recognition system is effective.
The construction of a multimodal identification system based on the face and the gait biometrics is an urgent necessity.

Conclusion
In this paper, a new biometric system for smart riding club security called SRCBS was introduced. This system is based on two main sub-systems to detect and recognize both horses and humans.
The proposed HFD In order to obtain a more efficient SRCBS system, with supplementary services for humans, our paper has proposed to use our previously developed approach in [11]. Using the gait modality, the CRF-RNN for human body detection and the proposed solution by [11], the recognition rates equal to 95.41% on Casia-B database were close to the recognition rates of the last SRCBS system in [34] using face biometrics.
Our future perspectives can be summarized as follows: -Developing the SRCBS system for horse and human detection and identification at real time.
-Expanding the proposed HFD-SF system in two directions. First, it is important to improve its performance and effectiveness by designing more discriminant features. Second, extending the HFD-SF system to other animals is among our plans for the future.