Universal Bovine Identification via Depth Data and Deep Metric Learning (2404.00172v1)
Abstract: This paper proposes and evaluates, for the first time, a top-down (dorsal view), depth-only deep learning system for accurately identifying individual cattle and provides associated code, datasets, and training weights for immediate reproducibility. An increase in herd size skews the cow-to-human ratio at the farm and makes the manual monitoring of individuals more challenging. Therefore, real-time cattle identification is essential for the farms and a crucial step towards precision livestock farming. Underpinned by our previous work, this paper introduces a deep-metric learning method for cattle identification using depth data from an off-the-shelf 3D camera. The method relies on CNN and MLP backbones that learn well-generalised embedding spaces from the body shape to differentiate individuals -- requiring neither species-specific coat patterns nor close-up muzzle prints for operation. The network embeddings are clustered using a simple algorithm such as $k$-NN for highly accurate identification, thus eliminating the need to retrain the network for enrolling new individuals. We evaluate two backbone architectures, ResNet, as previously used to identify Holstein Friesians using RGB images, and PointNet, which is specialised to operate on 3D point clouds. We also present CowDepth2023, a new dataset containing 21,490 synchronised colour-depth image pairs of 99 cows, to evaluate the backbones. Both ResNet and PointNet architectures, which consume depth maps and point clouds, respectively, led to high accuracy that is on par with the coat pattern-based backbone.
- Distributions of emissions intensity for individual beef cattle reared on pasture-based production systems, Journal of Cleaner Production 171 (2018) 1672–1680. doi:10.1016/J.JCLEPRO.2017.10.113.
- Perspectives of farmers and veterinarians concerning dairy cattle welfare, Animal frontiers : the review magazine of animal agriculture 8 (2018) 8–13. URL: https://pubmed.ncbi.nlm.nih.gov/32002209/. doi:10.1093/AF/VFX006.
- F. J. DeGraves, J. Fetrow, Economics of mastitis and mastitis control, The Veterinary clinics of North America. Food animal practice 9 (1993) 421–434. URL: https://pubmed.ncbi.nlm.nih.gov/8242449/. doi:10.1016/S0749-0720(15)30611-3.
- A two-stage approach using yolo for automated assessment of digital dermatitis within dairy cattle, in: 2024 IEEE 22nd World Symposium on Applied Machine Intelligence and Informatics (SAMI), Institute of Electrical and Electronics Engineers (IEEE), 2024, pp. 000417–000422. doi:10.1109/SAMI60510.2024.10432745.
- Benefit-cost analysis of animal identification for disease prevention and control, Revue scientifique et technique (International Office of Epizootics) 20 (2001) 385–405. URL: https://pubmed.ncbi.nlm.nih.gov/11552703/. doi:10.20506/RST.20.2.1277.
- Visual identification of individual holstein-friesian cattle via deep metric learning, Computers and Electronics in Agriculture 185 (2021) 106133. doi:10.1016/J.COMPAG.2021.106133.
- Computer vision system for measuring individual cow feed intake using rgb-d camera and deep learning algorithms, Computers and Electronics in Agriculture 172 (2020) 105345. doi:10.1016/J.COMPAG.2020.105345.
- Rgb-d video-based individual identification of dairy cows using gait and texture analyses, Computers and Electronics in Agriculture 165 (2019) 104944. doi:10.1016/J.COMPAG.2019.104944.
- Dairy cow monitoring by rfid, Scientia Agricola 69 (2012) 75–80. URL: https://www.scielo.br/j/sa/a/jtc43hq5QNh8cXnW4WVLRmF/?lang=en. doi:10.1590/S0103-90162012000100011.
- Enhancing food safety, product quality, and value-added in food supply chains using whole-chain traceability, International Food and Agribusiness Management Review 19 (2016).
- A. I. Awad, From classical methods to animal biometrics: A review on cattle identification and tracking, Computers and Electronics in Agriculture 123 (2016) 423–435. doi:10.1016/J.COMPAG.2016.03.014.
- A. M. Johnston, D. S. Edwards, Welfare implications of identification of cattle by ear tags, Veterinary Record 138 (1996) 612–614. URL: https://onlinelibrary.wiley.com/doi/full/10.1136/vr.138.25.612https://onlinelibrary.wiley.com/doi/abs/10.1136/vr.138.25.612https://bvajournals.onlinelibrary.wiley.com/doi/10.1136/vr.138.25.612. doi:10.1136/VR.138.25.612.
- Accelerometer systems as tools for health and welfare assessment in cattle and pigs – a review, Behavioural Processes 181 (2020) 104262. URL: https://www.sciencedirect.com/science/article/pii/S0376635720304551. doi:https://doi.org/10.1016/j.beproc.2020.104262.
- Evaluation of data loggers, sampling intervals, and editing techniques for measuring the lying behavior of dairy cattle, Journal of Dairy Science 93 (2010) 5129–5139. doi:10.3168/JDS.2009-2945.
- Icetag3d™ accelerometric device in cattle lameness detection, Agronomy Research 12 (2014).
- A lightweight deep learning model for cattle face recognition, Computers and Electronics in Agriculture 195 (2022) 106848. doi:10.1016/J.COMPAG.2022.106848.
- Deep learning framework for recognition of cattle using muzzle point image pattern, Measurement 116 (2018) 1–17. doi:10.1016/J.MEASUREMENT.2017.10.064.
- A new cow identification system based on iris analysis and recognition, International Journal of Biometrics 6 (2014) 18–32. doi:10.1504/IJBM.2014.059639.
- Evaluation of retinal imaging technology for the biometric identification of bovine animals in northern ireland, Livestock Science 116 (2008) 42–52. doi:10.1016/J.LIVSCI.2007.08.018.
- Single-frame regularization for temporally stable cnns, Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition 2019-June (2019) 11168–11177. URL: http://arxiv.org/abs/1902.10424http://dx.doi.org/10.1109/CVPR.2019.01143. doi:10.1109/CVPR.2019.01143.
- Cattlefacenet: A cattle face identification approach based on retinaface and arcface loss, Computers and Electronics in Agriculture 193 (2022) 106675. doi:10.1016/J.COMPAG.2021.106675.
- Facial recognition of cattle based on sk-resnet, Scientific Programming 2022 (2022). doi:10.1155/2022/5773721.
- Cow face detection and recognition based on automatic feature extraction algorithm, ACM International Conference Proceeding Series (2019). URL: https://dl.acm.org/doi/10.1145/3321408.3322628. doi:10.1145/3321408.3322628.
- Cattle facial matching recognition algorithm based on multi-view feature fusion, Electronics 2023, Vol. 12, Page 156 12 (2022) 156. URL: https://www.mdpi.com/2079-9292/12/1/156/htmhttps://www.mdpi.com/2079-9292/12/1/156. doi:10.3390/ELECTRONICS12010156.
- Feature fusion capsule network for cow face recognition, https://doi.org/10.1117/1.JEI.31.6.061817 31 (2022) 061817. URL: https://www.spiedigitallibrary.org/journals/journal-of-electronic-imaging/volume-31/issue-6/061817/Feature-fusion-capsule-network-for-cow-face-recognition/10.1117/1.JEI.31.6.061817.fullhttps://www.spiedigitallibrary.org/journals/journal-of-electronic-imaging/volume-31/issue-6/061817/Feature-fusion-capsule-network-for-cow-face-recognition/10.1117/1.JEI.31.6.061817.short. doi:10.1117/1.JEI.31.6.061817.
- Fusion of retinaface and improved facenet for individual cow identification in natural scenes, Information Processing in Agriculture (2023). URL: https://linkinghub.elsevier.com/retrieve/pii/S2214317323000653. doi:10.1016/J.INPA.2023.09.001.
- An iris localization algorithm based on geometrical features of cow eyes, SPIE 7495 (2009) 749517. URL: https://ui.adsabs.harvard.edu/abs/2009SPIE.7495E..17Z/abstract. doi:10.1117/12.832494.
- Tracking and traceability system using livestock iris code in meat supply chain, International Journal of Innovative Computing, Information and Control 7 (2011) 2201–2212.
- An image processing pipeline to segment iris for unconstrained cow identification system, Open Computer Science 9 (2019) 145–159. URL: https://www.degruyter.com/document/doi/10.1515/comp-2019-0010/html?lang=en. doi:10.1515/COMP-2019-0010/MACHINEREADABLECITATION/RIS.
- Individual beef cattle identification using muzzle images and deep learning techniques, Animals 2022, Vol. 12, Page 1453 12 (2022) 1453. URL: https://www.mdpi.com/2076-2615/12/11/1453/htmhttps://www.mdpi.com/2076-2615/12/11/1453. doi:10.3390/ANI12111453.
- Identification and recognition of animals from biometric markers using computer vision approaches: A review, Kafkas Universitesi Veteriner Fakultesi Dergisi 29 (2023) 581–593. doi:10.9775/KVFD.2023.30265.
- A novel jinnan individual cattle recognition approach based on mutual attention learning scheme, Expert Systems with Applications 230 (2023) 120551. doi:10.1016/J.ESWA.2023.120551.
- Intelligent perception for cattle monitoring: A review for cattle identification, body condition score evaluation, and weight estimation, Computers and Electronics in Agriculture 185 (2021) 106143. doi:10.1016/J.COMPAG.2021.106143.
- Label a herd in minutes: Individual holstein-friesian cattle identification, Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) 13374 LNCS (2022) 384–396. URL: https://link.springer.com/chapter/10.1007/978-3-031-13324-4_33. doi:10.1007/978-3-031-13324-4_33/FIGURES/7.
- Cows2021 dataset, arXiv preprint arXiv:2105.01938 (2021). doi:10.5523/BRIS.4VNRCA7QW1642QLWXJADP87H7.
- Towards self-supervision for video identification of individual holstein-friesian cattle: The cows2021 dataset, Event Conference on Computer Vision and Pattern Recognition Workshop on Computer Vision for Animal Behavior Tracking and Modeling (CV4Animals) (2021). URL: https://research-information.bris.ac.uk/en/publications/towards-self-supervision-for-video-identification-of-individual-h.
- Opencows2020, Computers and Electronics in Agriculture (2020). doi:10.5523/BRIS.10M32XL88X2B61ZLKKGZ3FML17.
- Visual localisation and individual identification of holstein friesian cattle via deep learning, Proceedings - 2017 IEEE International Conference on Computer Vision Workshops, ICCVW 2017 2018-January (2017a) 2850–2859. doi:10.1109/ICCVW.2017.336.
- Aerialcattle2017, Proceedings - 2017 IEEE International Conference on Computer Vision Workshops, ICCVW 2017 (2017b). doi:10.5523/BRIS.3OWFLKU95BXSX24643CYBXU3QH.
- Aerial animal biometrics: Individual friesian cattle recovery and visual identification via an autonomous uav with onboard deep inference, IEEE International Conference on Intelligent Robots and Systems (2019) 237–243. doi:10.1109/IROS40897.2019.8968555.
- J. M. Zhao, Q. S. Lian, Compact loss for visual identification of cattle in the wild, Computers and Electronics in Agriculture 195 (2022) 106784. doi:10.1016/J.COMPAG.2022.106784.
- Algorithm for cattle identification based on locating key area, Expert Systems with Applications 228 (2023) 120365. doi:10.1016/J.ESWA.2023.120365.
- Automated monitoring of dairy cow body condition, mobility and weight using a single 3d video capture device, Computers in industry 98 (2018) 14–22.
- Body condition estimation on cows from depth images using convolutional neural networks, Computers and electronics in agriculture 155 (2018) 12–22.
- Automatic monitoring system for individual dairy cows based on a deep learning framework that provides identification via body parts and estimation of body condition score, Journal of dairy science 102 (2019) 10140–10151.
- Cow tail detection method for body condition score using faster r-cnn, in: 2019 IEEE International Conference on Unmanned Systems and Artificial Intelligence (ICUSAI), IEEE, 2019, pp. 347–351.
- Rear shape in 3 dimensions summarized by principal component analysis is a good predictor of body condition score in holstein dairy cows, Journal of dairy science 98 (2015) 4465–4476.
- Automatic estimation of dairy cattle body condition score from depth image using ensemble model, biosystems engineering 194 (2020) 16–27.
- Automated acquisition of top-view dairy cow depth image data using an rgb-d sensor camera, Translational Animal Science 6 (2022). URL: https://dx.doi.org/10.1093/tas/txac163. doi:10.1093/TAS/TXAC163.
- Enhanced computer vision with microsoft kinect sensor: A review, IEEE Transactions on Cybernetics 43 (2013) 1318–1334. doi:10.1109/TCYB.2013.2265378.
- Automatic individual holstein friesian cattle identification via selective local coat pattern matching in rgb-d imagery, Proceedings - International Conference on Image Processing, ICIP 2016-August (2016) 484–488. doi:10.1109/ICIP.2016.7532404.
- Scikit-learn: Machine learning in Python, Journal of Machine Learning Research 12 (2011) 2825–2830.
- S. Hossain, X. Lin, Efficient stereo depth estimation for pseudo-lidar: A self-supervised approach based on multi-input resnet encoder, Sensors 23 (2023). doi:10.3390/S23031650.
- The farthest point strategy for progressive image sampling, Proceedings - International Conference on Pattern Recognition 3 (1994) 93–97. doi:10.1109/ICPR.1994.577129.
- Pointnet: Deep learning on point sets for 3d classification and segmentation, Proceedings - 30th IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017 2017-January (2016) 77–85. URL: https://arxiv.org/abs/1612.00593v2. doi:10.1109/CVPR.2017.16.
- Fast point feature histograms (fpfh) for 3d registration, Proceedings - IEEE International Conference on Robotics and Automation (2009) 3212–3217. doi:10.1109/ROBOT.2009.5152473.
- Fast 3d recognition and pose using the viewpoint feature histogram, IEEE/RSJ 2010 International Conference on Intelligent Robots and Systems, IROS 2010 - Conference Proceedings (2010) 2155–2162. doi:10.1109/IROS.2010.5651280.
- General 3d modelling of novel objects from a single view, ieeexplore.ieee.orgZC Marton, D Pangercic, N Blodow, J Kleinehellefort, M Beetz2010 ieee/rsj international conference on intelligent robots and, 2010•ieeexplore.ieee.org (2010). URL: https://ieeexplore.ieee.org/abstract/document/5650434/. doi:10.1109/IROS.2010.5650434.
- Risas: A novel rotation, illumination, scale invariant appearance and shape feature, Proceedings - IEEE International Conference on Robotics and Automation (2017) 4008–4015. doi:10.1109/ICRA.2017.7989461.
- 3d point cloud descriptors: state-of-the-art, Artificial Intelligence Review 56 (2023) 12033–12083. URL: https://link.springer.com/article/10.1007/s10462-023-10486-4. doi:10.1007/S10462-023-10486-4/TABLES/6.
- Deep residual learning for image recognition, Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition 2016-December (2016) 770–778. doi:10.1109/CVPR.2016.90.
- Great ape detection in challenging jungle camera trap footage via attention-based spatial and temporal feature blending, 2019 IEEE/CVF International Conference on Computer Vision Workshop (ICCVW) (2019) 255–262. doi:10.1109/ICCVW.2019.00034.
- Dimensionality reduction by learning an invariant mapping, Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition 2 (2006) 1735–1742. doi:10.1109/CVPR.2006.100.
- Facenet: A unified embedding for face recognition and clustering, Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition 07-12-June-2015 (2015) 815–823. URL: https://arxiv.org/abs/1503.03832v3. doi:10.1109/cvpr.2015.7298682.
- Who goes there? exploiting silhouettes and wearable signals for subject identification in multi-person environments, Proceedings - 2019 International Conference on Computer Vision Workshop, ICCVW 2019 (2019) 1599–1607. doi:10.1109/ICCVW.2019.00199.
- An object is worth six thousand pictures: The egocentric, manual, multi-image (emmi) dataset, Proceedings - 2017 IEEE International Conference on Computer Vision Workshops, ICCVW 2017 2018-January (2017) 2364–2372. doi:10.1109/ICCVW.2017.279.
- C. Shorten, T. M. Khoshgoftaar, A survey on image data augmentation for deep learning, Journal of Big Data 6 (2019) 1–48. URL: https://journalofbigdata.springeropen.com/articles/10.1186/s40537-019-0197-0. doi:10.1186/S40537-019-0197-0/FIGURES/33.
- Albumentations: Fast and flexible image augmentations, Information 11 (2020). URL: https://www.mdpi.com/2078-2489/11/2/125. doi:10.3390/info11020125.
- Adapting grad-cam for embedding networks, in: Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, 2020, pp. 2794–2803.
- Grad-cam: Visual explanations from deep networks via gradient-based localization, in: Proceedings of the IEEE international conference on computer vision, 2017, pp. 618–626.
- Pointcloud saliency maps, 2019 IEEE/CVF International Conference on Computer Vision (ICCV) 2019-October (2019) 1598–1606. doi:10.1109/ICCV.2019.00168.
- A. Haider, H. Hel-Or, What can we learn from depth camera sensor noise?, Sensors 22 (2022) 5448. doi:10.3390/s22145448.
- Thermography for disease detection in livestock: A scoping review, Frontiers in Veterinary Science 9 (2022) 965622. doi:10.3389/FVETS.2022.965622/BIBTEX.