| In precision livestock farming,visual identification of cattle in the wild paves an essential way for individual tracking,behavior analysis,growth and health monitoring,etc.However,there is still lack of effective and feasible identification method.The coat of Chinese Simmental and Holstein cows exhibits two color interlaced fusion pattern.With its uniqueness and convenience for sampling,the coat pattern can be used as ideal visual biometrics for cattle identification in realistic farming environment.Deep metric learning aims at learning favorable feature clustering space and has achieved great performance in face recognition and pedestrian re-identification tasks.Therefore,we investigate the approaches based on deep metric learning with multi-view images for identifying Chinese Simmental and Holstein in the wild that would facilitate the identification of the individual by any view of it in real farming scenario.The concrete research contents and innovative achievements are as follows:Firstly,we propose compact loss to tackle the challenge of feature extraction caused by the inferior distribution of multi-view images with large intra-class distance and high inter-class similarity.Compact loss with Soft Max-n B,triplet loss and tight loss is proposed to jointly supervise the deep neural convolutional networks(DCNNs)for increasing the margin among the features of different identities and compressing the inner class gap within an individual to enhance the compactness of the distribution.And it achieves high accuracy on MVCAID100 dataset.In addition,the good performance is also verified in the real farming environment with complex background,various postures and mutual occlusions.Secondly,with the changes of views and postures,the multi-view images present several inner-class local clusters in the samples of the same identity.The inter-class distance of the centroids from different identities is smaller than that of the intra-class centroids.In order to address the problem of difficult clustering caused by the inferior distribution of the centroids,we propose multi-centroid proxy loss(MCPL).It enforces the model to learn and provide more inner-class centroids for clustering to reduce the intra-class distances among the same identities.The proxy of the class is represented based on multi-centroid and K-nearest negative proxy triplet(K-NNPT)is constructed.The proxy level triplet loss is proposed to improve the distribution of multi-centroid and under the supervision with MCPL the model performs well on CNSID100 dataset.And with object detection,feature extraction and classification,an integrated pipeline for multi-object identification is proposed and achieves good performance on multi-object recognition task in real farming.Thirdly,aiming at the deficiencies of approaches based on distance metric that omit the awareness of the ranking information within a query list and the characteristic of the existence of multiple local clusters in the real-world data,multi-centroid Soft Max reciprocal average precision loss(mc SAP Loss)is proposed.It learns and captures more inner-class local centers to improve the cluster ability and removes the false positives by learning the correct order of the retrieved sequence with average precision loss for purer cluster.It achieves good performance on CUB-2011,Cars196,SOP and Cattle-2022 datasets and demonstrates the effective learning ability of retrieval,clustering and recognition on a broad range of multi-view natural images.Finally,supervised learning heavily relies on a large amount of labeled data,which is really a time-consuming hard work for cattle annotation.We propose contrastive learning with multi-centroid proxy for unsupervised domain adaptive cattle identification.It provides more local centroids to alleviate the difficulty of clustering for enhancing the reliability of it and reducing noises of pseudo labels that is helpful for improving the efficiency of learning in the target domain.The domain-specific proxy-level contrastive loss is also presented to effectively transferring the learning ability from the source domain with rich annotation to the unlabeled target domain in different scenarios.Extensively domain adaptive experiments and unsupervised experiments are conducted and our CL-MCP method achieves good performance on all of them.Moreover,MVCAID100,CNSID100 and Cattle-2022 datasets are created for model training and evaluation for Chinese Simmental and Holstein identification.The approaches proposed above perform well on all of them and all the works in the paper give basic data supporting and effective algorithm for identification of cattle in the wild in precision livestock farming. |