Contrastive learning with multi-centroid proxy loss for domain adaptive cattle identification
-
Graphical Abstract
-
Abstract
Visual identification of cattle in the wild is essential to provide continuous individual monitoring applicable to precision livestock farming. Supervised learning heavily relies on annotation, which is really a time-consuming work for cattle labeling. Domain adaptive cattle identification aims at transferring knowledge learned from the source domain with rich annotations to the unlabeled target domain. Pseudo-label-based contrastive learning with a unique centroid inevitably incorporates information from different identities due to imperfect clustering. Thus, a contrastive learning with multi-centroid proxy (CL-MCP) for domain adaptive cattle identification was proposed with more local centroids to enhance the reliability of pseudo-labels for a more compact cluster in the target feature space. Firstly, a target domain feature storage module and a momentum update strategy were proposed to progressively update the target domain features for effective training with a stable clustering space. Secondly, a multi-centroid storage module and a proxy representation method were proposed to learn more informative local clusters and provide a representative proxy for each class to efficiently form correct clusters in the feature space. Finally, the domain-specific proxy-level contrastive loss was presented to enlarge the similarity between a query and its positive proxy while reducing the similarities among the query and its negative proxies for more compact clustering. It is encouraging to find that our CL-MCP mechanism performs better than Deep Metric Learning (DML) approaches for identifying individuals from different farms or unseen viewpoints or of a new breed. The datasets, MVCAID100, CNSID100, and Cattle-2022, are available on https://pan.baidu.com/s/19hoWd__7NMLvdLNp-otDSRg (code: d3oa). The results of this study can provide an effective cattle identification method applicable to automated production monitoring, behavioral and physiological observation, health and welfare supervision in precision livestock farming, and animal science research.
-
-