| Traditional pig identification methods mainly rely on intrusive identification methods such as ear tags and tattoos,such methods are usually more costly and the marking effect is reduced over time and affects the health of individual pigs.But with the rapid development of deep learning technology,we can migrate face recognition technology to the identification of individual pigs,so as to improve the efficiency of pig breeding management.In this paper,based on the theory of convolutional neural network,the pig face recognition model is designed,and the pig monitoring system is constructed,and the main tasks are as follows:(1)Build a pig face recognition model based on improved YOLOv4.On the basis of the cropped YOLOv4 backbone network,the improved dense connection network and the improved enhanced Receptive Field Block are added,the result is a YOLOv4_DB_RFB_c model.Pig face detection performance test was carried out using YOLOv4 model and improved YOLOv4 model,The test results show that the improved pig face recognition model effectively improves the detection accuracy and realizes the detection of long-distance and obscure small targets under the condition that the detection speed does not decrease much.When the Objection-over-Union threshold is set to 0.5 and the classification probability threshold is set to 0.1,YOLOv4_DB_RFB_c model detection accuracy reached 83.49%,12% higher than YOLOv4,The detection accuracy in severe occlusion conditions reached 52.37%,which is nearly 11% higher than YOLOv4.(2)For the embedded-based information acquisition section.Using the embedded development board Nano PC-T4 as the information acquisition terminal of the pig face monitoring system,research and design of pig image information and the collection and transmission of breeding environment information.Connect the HD camera and four-in-one sensor via the Nano PC-T4,pig image,temperature data,humidity data,light data,CO2 data and ammonia data are collected,transmitted by TCP protocol,and the format of the data frame is agreed.(3)Pig monitoring system is implemented.Complete the overall architecture design of the system,the main functional design of the system and the design of the system database.Based on the Django development framework and MTV design mode,the relevant code is written in python language,which realizes real-time monitoring,pig face detection and recognition.The monitoring system can monitor the pigs under different pig houses by selecting different access nodes,and feedback the relevant environmental parameters in the current breeding environment in real time on the page.For the pig face detection and recognition function,two methods of picture detection and video detection are designed for the convenience of users. |