| Pork products are the main source of meat for most residents in China,and the quality of pork is closely related to people’s health.In order to ensure the quality of pork,it is necessary to monitor the important link of group health pigs,so as to find the abnormal behavior of pigs in time,take corresponding measures to reduce the incidence of diseases and ensure the safe of pork.Pig activity is recorded by image monitoring system.In order to realize the automatic identification of pig behavior,it is necessary to complete pig recognition and segmentation.In this paper,a method of image segmentation based on neural network is proposed to realize the effective segmentation and recognition of pigs,in which the circular residual attention mechanism is used to improve the recognition accuracy.The research contents of this paper are as follows:Design of pig image segmentation systemThe pig monitoring system is designed by using the combination of embedded acquisition terminal and cloud service.The system can automatically acquire images,transmit and store data;At the same time,an image segmentation algorithm is provided in the cloud to further intelligently process the acquired image and complete the segmentation of pig image.Preprocessing of pig image dataPig image data preprocessing image acquisition system for continuous monitoring of pigs after shooting,through the image preprocessing method to adjust the image,such as zooming and other operations,after this operation,the image needs to be further processed,including image enhancement and other processes,to change the image quality,and finally classify the image,to prepare for the subsequent image segmentation.Segmentation of pig imageResearch on pig image segmentation method: train the neural network model of pig image input,compare with Mask R-CNN、Cascade Mask R-CNN.On this basis,the idea of circular residual attention(RRA)is introduced to further optimize the model,which can improve the feature extraction ability and segmentation accuracy without significantly increasing the amount of calculation.The experimental results show that the system can meet the experimental requirements of this paper,and the improved algorithm with the introduction of cyclic residual attention(RRA)module has the most obvious improvement effect on each task model.The resolution of 512 × 256 images,its data set from the beginning of 1917,changed to 3834.And in the pig individual single category information and pig pen,debris and other controllable information,the use of shallow resnet50 network can extract reasonable image features to a certain extent,and can save time to a certain extent.The addition of RRA module improves the accuracy of pig segmentation and the integrity of segmentation edge,and 2 ~ 3 layers are suitable for the actual fusion of RRA module.In the three scenes of deep separation,high adhesion and debris occlusion,the model with two RRA modules is more precise and complete.It can be seen from the experiment that the AP0.5 and AP0.75 indexes of Mask R-CNN-Res Net50 with one RRA module are 2.5 and 0.8 percentage points lower than those without RRA module. |