| As an important research direction in the field of computer vision,instance segmentation,aiming to segment the area of instance in an image and distinguish different instance individuals.In recent years,instance segmentation has been gradually applied in various fields.In the intelligent pig breeding industry,pigs in herd mode are difficult to detect and segment because of small targets and occluded targets,which further affects the performance of instance segmentation algorithm.Due to the small target occupies less pixel area in the image,the available feature information is insufficient and other reasons in the dense small target pigs image,it is easy to produce missing detection or false detection in the process of image instance segmentation.When pigs gather,pig targets in the image are prone to false detection because of mutual occlusion.In addition,during the segmentation process of occluded pigs,the detection is correct but the mask overflows or the mask is incomplete.The unsmooth or inaccurate mask will also affect the application effect of the instance segmentation algorithm.In this paper,the one-stage instance segmentation algorithm,Blend Mask,is studied,and the feature extraction network and the quality of the generated mask are improved.By enhancing the feature extraction ability of the network for small targets and improving the quality of target segmentation mask,the detection and segmentation effect of pig individuals in group breeding mode is improved.The main research and work contents are as follows:Firstly,this paper studies the one-stage instance segmentation algorithm Blend Mask based on deep learning,and analyzed the performance of the algorithm on the self-made pig dataset through experiments.Aiming at the problems existing in the instance segmentation method in the detection and segmentation tasks of dense small targets pig images,an improved scheme is proposed.Secondly,aiming at the problem of insufficient information available to small targets in dense small target pig image and feature loss caused by occluded targets,an improved feature extraction network based on Blend Mask is designed to improve the accuracy of detection and segmentation of dense small targets.The improvement of feature extraction network is mainly realized by improving backbone network and feature connection module: the backbone network is upgraded and deformable convolution is introduced to improve the adaptability of the network to target deformation.Meanwhile,the convolutional attention module is introduced to improve the ability of the network to extract and strengthen feature information of small targets;A path aggregation feature pyramid is constructed by adding a bottom-up enhancement path in the feature connection module,and the low-level detail information are fully integrated to improve the feature extraction ability of the network for targets.Finally,aiming at the problem of low quality of target segmentation mask caused by mutual occlusion between pigs in dense scenes,,the bottom module that generates the feature score map in the Blend Mask network was improved to achieve the improvement of segmentation mask quality in this paper.At the end of decoding,the correlation between high-level global information and low-level detail information is enhanced,and the data correlation upsampling method is introduced to increase the recovery of more image feature information in the decoding process,so as to obtain a higher quality mask to improve the segmentation effect of the network. |