The invention provides an improved
Mask2Former-based intelligent identification method and device for the
livestock affiliation of a herdsman. The method comprises the following steps: acquiring an image when
livestock is stocked; inputting the photos and the videos into a trained improved
Mask2Former
image segmentation model, and outputting color classification corresponding to the backs of the
livestock; and according to the color classification, determining the corresponding herdsman belonging to the color classification. In the scheme provided by the invention, on the basis of a
Mask2Former network,
Haar wavelet transform is introduced to improve the local
feature extraction capability, an attention module is utilized to pay attention to key features, multi-scale
feature fusion is optimized through a feature
pyramid network, an improved Mask2Former
image segmentation model is constructed, and the backs of the livestock are classified into different colors; the method is advantaged in that livestock back color segmentation precision and
pasture affiliation identification accuracy are improved, the method is especially suitable for scenes with complex backgrounds and dense livestock, an innovative solution is provided for
sheep flock management and
pasture affiliation identification in Qinghai-Tibet
Plateau areas, and a new research path is developed for
image segmentation tasks based on color features.