Font Size: a A A

Research On Pig Face Recognition Under Unrestricted Conditions And Based On Machine Learning

Posted on:2020-02-07Degree:DoctorType:Dissertation
Country:ChinaCandidate:H W YanFull Text:PDF
GTID:1483306011993379Subject:New technologies and equipment for processing agricultural products
Abstract/Summary:PDF Full Text Request
Pig individual recognition research is of great significance for the management of pig breeding process and the construction of intelligent traceability system.While face recognition technology enjoys the advantages of being non-invasive and animal-friendly and has been widely applied in the field of identity recognition,pig face recognition technology is actually a brand new field.In this paper,pig face recognition is chosen as the research focus to study the pig individual recognition under unrestricted condition,aiming to provide theoretical and experimental support for applicable methods and models in the field of pig face recognition as well to offer reference for developing portable and real-time pig face recognition system for pig breeding enterprises.The research content and conclusions are as follows:(1)In order to obtain pig face images automatically and remotely,methods and systems for collecting pig face data under unrestricted conditions have been designed and three methods of data collection and light filling system have been realized: The first one is fixed-time collection program that collects samples during the pig's diet time based on its behavioral rules;the second one is user-controlling manual collection scheme that is designed based on the researcher's attention on the characteristics of the pig's different parts;the third one is pig face-triggering automatic collection scheme,and when adopting this scheme to detect and collect the pig face,two open mv3 digital cameras are used,while one camera is installed directly above the pig's active area to determine whether there is a collectable pig face,another one is installed directly in front of the pig's active area to judge whether the pig's face could be collected based on the level signal sent by the first digital camera.The light filling system solves the problem of uneven illumination of the collected pig face samples caused by the light intensity difference and provides reference for the collection of pig face data under unrestricted conditions.(2)As for the feature extraction of the pig face sample image,three traditional methods including PCA,LDA and LBP have been utilized.In order to overcome the problem of large amount of calculation and long time consumption in the sample image processing of the pig face,dimensionality has been reduced concerning the pig face sample.Utilizing PCA method and choosing the principal components of pig face samples as 300,the overall variance interpretation rate has reached over 95%,and the first 24 features have been visualized.Besides,to verify the recognizability of pig face features extracted by PCA,a pig face identification procedure based on eigenfaces has been developed,and in the identification test of ten categories of pigs,the average recognition accuracy rate was 74.4%.Utilizing LDA method to reduce the image size of the pig face sample to 9 dimensions and carry out the pig face feature extraction test to develop the fish face recognition program based on fisherface,the average recognition accuracy reached 64.9% in the recognition test of ten categories of pigs.Utilizing LBP method to extract the pig face features,the influence of uneven illumination and rotation on the pig face recognition accuracy has been overcome.(3)In order to improve the recognition accuracy,the traditional algorithms including KNN,random forest and SVM machine learning have been adopted to carry out the pig face recognition experiment.While the experiment determined K value of KNN algorithm as 3,and ten categories of pigs were identified,the average accuracy rate was 91.46%,the recall rate was 90.16%,and the f1 value was 90.36%;while the experiment determined the number value of decision trees in random forests as 65 and impure gini as the splitting quality performance parameter to identify ten categories of pigs,the average accuracy rate was 90.61%,the recall rate was 89.76%,and the f1 value was 89.79%;while the experiment determined poly as the SVM kernel function and 0.03 as the kernel function to identify the ten categories of pigs,the average accuracy rate was 83.66%,the recall rate was 79.53%,and the f1 value was 79.95%.Comparing the recognition efficiency of three machine learning algorithms,it can be found that the prediction time of random forest reached 8ms,SVM 329 ms,and the KNN 1306 ms.The experiment results show that the machine learning algorithm excels the method based on feature extraction.(4)In order to further improve the recognition accuracy and the algorithm efficiency,a deep learning model has been applied to carry out the pig face recognition experiment.Constructing network structures Alex Net,Mini-Alex Net and Attention-Alex Net with the basic principles of convolutional neural network and selecting the best effect model for pig face recognition,the accuracy rates were 97.48%,96.66% and 98.11%,respectively,the recall rate reached 98.03%,96.46%,98.03% respectively,and the f1 values were 98.05%,96.43%,and 98.05%,respectively.Besides,the influence of batch size on the performance of the model has been discussed.Specifically,comparative experiments have been carried out for each model when the batch size was 16,32,and 64.And by observing the training and verifying the accuracy and its loss function variation law from a macroscopic point,and drawing the confusion matrix on the test set to explore the relationship between batch size and model performance,the experiment shows that the batch size exerts certain influence on the model prediction results.Furthermore,exploring the performance variation of each model in the same training environment and carrying out three pairs of comparative experiments with regard to the three models when batch was of the same size,it shows that the Attention-Alex Net model proposed in this paper can achieve the best classification performance index value with fewer iterations.As for the lightweight model proposed in this paper,Mini-Alex Net can achieve with less training time the classification performance no inferior to other two models,thus in the future it can be used to train resource-poor scenarios.(5)In order to comprehensively explore the recognition accuracy and the algorithm efficiency,the machine learning and deep learning pig face recognition experiment fused with feature extraction has been designed,and the experiment results show that with the traditional machine learning algorithm fused with feature extraction,displayed face recognition,the highest accuracy increase was 7.48 percentage points,thereinto in PCA+SVM test the accuracy increase was 5.1% and the prediction time was only 20.9%,and the recognition accuracy of the deep learning model proposed in this paper has reached 98.11%.The deep learning pig face recognition experiment fused with feature extraction aims to improve the operating efficiency of the model under the premise of certain recognition accuracy,and the test results show that the running time of the model has been reduced to 95%,which improves the operating efficiency of the model,and the recognition accuracy has a certain degree of decline,providing reference for developing real-time,portable embedded pig face recognition system.
Keywords/Search Tags:pig face recognition, feature extraction, feature fusion, machine learning, deep learning, unrestricted conditions
PDF Full Text Request
Related items