Abstract:
Pig individual identification technology can effectively improve the management efficiency of large-scale pig farms, reduce feeding costs and the economic losses of farms. The individual pig postures in real farming scenarios are variable, which makes it difficult to collect samples and obtain a proper posture with all the pig face information.To realize the non-contact pig individual recognition of small samples in the real pig house environment, a pig individual recognition method based on transfer learning and an improved neural network model is proposed in this paper. Based on ResNet34 network model, some convolution layers are optimized, the original single-layer full connection layer is replaced by a double-layer full connection layer, and the Dropout method is added. Combined with the transfer learning method and parameter optimization, the model is trained. The experimental results show that the average recognition time of the improved ResNet34 model is 0.003 2 s. The verification accuracy and test accuracy are 98.7% and 97.8%, respectively. After the improvement, the floating-point operation amount of the model is reduced by about 25.3%, the total parameters are reduced by about 10.3%, the recognition accuracy is increased by 1.9%,and the average detection time and training time are reduced by 15.8% and 14.3%, respectively.In addition, the overall performance of the improved ResNet34 model is better than that of AlexNet, GoogleNet, VGG16, and other models.The method proposed in this paper shows an accuracy and precision of 97.8% and 98.1%, respectively, in a test trial of 30 pigs.Therefore, the model proposed in this paper can accurately realize the individual recognition of pigs under the background of real and complex pig houses, and provide a reference for the intelligent breeding and traceability research of pigs.