Animal species classification using machine learning techniques

. Animals recognition is one of the research areas in which few effective technologies have been proposed, especially in the predator animals’ domain. Predator animals present a great danger to people who are camping or staying in outdoor areas and they are also a menace to livestock. In this paper, a multiple feature detection of predator animals is proposed. This method focuses on the face of the animal, explicitly the eyes and the ears. A database was created by collecting the features of ears and eyes from 10 animals and an experiment was conducted using machine learning techniques such as SVM and MLP to classify them as predators or pets. The evaluation results achieved the classification accuracies of 82% for MLP and 78% for SVM, which justify its effectiveness for the proposed method.


Introduction
Animal attacks are a common cause of either human fatalities or injuries. Up to five million people in the US are attacked by animals each year as reported in 2017 [1]. Langley & Morrow [2] estimated that up to two million animal's bites occur each year in the United States. The frequency of animal attacks varies with geographical location. Man-eater is an informal term for a particular animal that preys on humans as a form of hunting habit. For instance, tigers have been recorded that they kill more people than any other of its kind. They have been responsible for more human deaths through direct attack than any other wild animal as reported by Nowak, et al. [3]. Man-eating lions, on the other hand, have been recorded that they actively enter human villages at night as well as during the daytime to hunt for prey. American and Tanzanian scientists report that man-eating incidents in rural areas of Tanzania increased significantly from 1990 to 2005. At least 563 villagers were attacked, and many people were eaten over this period. Warrell [4], stated that injuries caused by animal attacks result in thousands of fatalities worldwide every year. Though it does not seem every country, they keep track of fatalities caused by animals. Most animals, excluding some tigers, do not regularly hunt humans, although some animals will feed on people if they are dead, sick, or unconscious. Attacks on people, livestock, and pets may occur when animals habituate to humans or are in a condition of severe starvation. Attacks are most frequent during night time when animals leave their territory in search of food. No current predator animal detector is found in the literature. In this paper, an animal species recognition method is proposed using image processing techniques, the proposed method is then tested on a dataset containing two species of animals namely pets and predators by using several classifiers. Lastly, the results of the classification are evaluated and discussed regarding accuracy. The outline of this paper is as follows: In section 2, some existing related work will be discussed. In section 3, the background knowledge will aim to provide related information about the proposal. In section 4, the proposal of animal species recognition method will be presented. Next, the effectiveness of the proposed method will be evaluated in section 5. Finally, the conclusion and future work will be stated.

Related work
A limited amount of research has been undertaken in the domain of Animal types recognition especially in the predator animal area. One example here [5] is about identifying animal species in a tracking tunnel by capturing ink footprints in a specific area which is not suitable in our case because we wish to detect the animal in real-time. Researchers [6] attempted to detect events like hunting by classifying and tracking of moving object blobs using a neural network. However, in this research, we aim to detect the animal before the hunt not during. Work done here [7] used a background subtraction method for finding the details of the targeted animal from the background, yet it does not classify them. Authors in [8] presented a modified version of Viola and Jones [9] Haar-like detector to be used for detecting and tracking of animals in real-time. They extracted the Haar-like features of a lion and presented a model for monitoring and annotating the presence of an animal in a video. Although, they only used one animal. In this paper, we are proposing a new approach for extracting animal features and using machine learning methods to distinguish between predators and non-predators.

Background knowledge 3.1 Feature extraction
Image feature extraction is an essential step for object classification. In order to classify an object in an image, there are various types of features to be extracted, for example, statistical features of raw pixel data, shape and color feature maps and transform coefficient or vectors.

Classification
Image object classification is one of the famous problems in the area of image processing research. There are numerous methods for solving this problem in an instance, Support Vector Machine (SVM), Decision Tree and Artificial Neural Network (ANN). SVM is among the best known linear methods in image classification and pattern recognition. The main advantage of SVM is the capability to get good generalization with a limited number of training samples. ANN, however, is a nonlinear method that is inspired by the biological neural network of the brain. Some of the advantages of ANN is that it has the ability to learn and model non-linear and complex connections between inputs and outputs, also it is able to generalize, after learning from the primary inputs and their correlation with the outputs, it can derive unperceived connections, thus making the model capable of generalizing and predicting undiscovered data. Decision Tree method uses a tree-like model of decisions. Originally used in data mining research for deriving a scheme to reach a specific goal, its also commonly used in machine learning areas.

Predator animals' features
In this paper, a statistical feature extraction method of predator animal face region in outdoor areas is proposed. The region descriptors are used to extract the statistical information of a specific image region of animal faces. We propose that animals' ears and eyes are used as a region for extraction of statistical information because they contain valuable features to classify the type of animal species. Researchers found a correlation between terrestrial species pupil shape and ecological niche, which is to say that, predator animals have different pupil shape than prey animals [8]. In this research we focused on extracting the features of animals eyes and ears, to determine which type of animals it belongs to. The process flow is as follows: First, a dataset was created containing images of ten animals (5 Predators   Second, the ROIs (region of interest) was drawn manually for all animals as demonstrated in figure 2. After that, statistical information such as mean, standard deviation and perimeter were extracted. In the third step, the dataset was split into two. The first was the training set, which contained 150 image information 75 for Predators and 75 for Pets. The second dataset was for testing, and it contained 50 image information 25 for both Predators and Pets. Finally, two classifiers were used for training and testing the dataset by taking the statistical features as in input parameter and outputting two classes pet or predator.
The selected parameters Mean, Standard deviation and Perimeter were chosen as regional descriptors which are an important representation of an object shape and texture. The extracted statistical parameters can then be used as probabilistic descriptor and classifier for objects in an image.

Results and Discussion
In this section, the results of the evaluation of the proposed method will be shown. In order to evaluate the results of the classification for the proposed method, the F1 score algorithm was used. In table 1 the results of the SVM and MLP classifiers are computed. The F1 score method was utilized as shown in table 1, which considers both the precision P and the recall R of the test to compute the accuracy score. Where P is the number of correct positive results divided by the number of all positive results as given in Equation (1), and R is the number of correct positive results divided by the number of positive results that should have been returned as given in Equation (2). The F1 score shown in Equation (3) is the average of the precision and recall, where an F1 score reaches its best value at 1 and worst at 0.
The SVM classifier average accuracy score for both classes is 78%. However, the MLP average score for both classes is higher at 82% which suggests that the neural networks ability to learn and work for non-linear data is a good fit for this proposal. Unlike SVM which is considered a more better fit for liner datasets. Figure 3 indicates that the Receiver Operating Curve (ROC) of the MLP classifier is better in the working area, unlike the SVM classifier. By analysing the ROC curve, we can say it demonstrates several things. First, it shows the trade-off between sensitivity and specificity. Second, the closer the curve to the lefthand border and top border of the ROC space, the higher the accuracy. Comparing our proposed method with the work done here [10] using our dataset. The result of the accuracy was lower at 68% which shows the superiority of our proposal in distinguishing between different species.

Conclusion
In conclusion, this research succeeded in developing a multiple feature extraction method for classifying animal species that achieved a good accuracy of 82% for MLP and 78% for SVM.
The proposal used the unique characteristics of animals such as ears and eyes. This work can offer many social significance possibilities, for instance, it can be used to avoid animals in outdoor areas. Users can benefit from this animal species classifier in outdoor activities like camping and hiking. Also, this research can help animal farmers protect their livestock from predator's animal attacks.
For future work, more animals need to add to the dataset and also investigating a way to increase the accuracy by using deep learning