MHAFF: Multi-Head Attention Feature Fusion of CNN and Transformer for Cattle Identification

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Dulal, Rabin, Zheng, Lihong, Kabir, Muhammad Ashad
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866909452667453440
author Dulal, Rabin
Zheng, Lihong
Kabir, Muhammad Ashad
author_facet Dulal, Rabin
Zheng, Lihong
Kabir, Muhammad Ashad
contents Convolutional Neural Networks (CNNs) have drawn researchers' attention to identifying cattle using muzzle images. However, CNNs often fail to capture long-range dependencies within the complex patterns of the muzzle. The transformers handle these challenges. This inspired us to fuse the strengths of CNNs and transformers in muzzle-based cattle identification. Addition and concatenation have been the most commonly used techniques for feature fusion. However, addition fails to preserve discriminative information, while concatenation results in an increase in dimensionality. Both methods are simple operations and cannot discover the relationships or interactions between fusing features. This research aims to overcome the issues faced by addition and concatenation. This research introduces a novel approach called Multi-Head Attention Feature Fusion (MHAFF) for the first time in cattle identification. MHAFF captures relations between the different types of fusing features while preserving their originality. The experiments show that MHAFF outperformed addition and concatenation techniques and the existing cattle identification methods in accuracy on two publicly available cattle datasets. MHAFF demonstrates excellent performance and quickly converges to achieve optimum accuracy of 99.88% and 99.52% in two cattle datasets simultaneously.
format Preprint
id arxiv_https___arxiv_org_abs_2501_05209
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle MHAFF: Multi-Head Attention Feature Fusion of CNN and Transformer for Cattle Identification
Dulal, Rabin
Zheng, Lihong
Kabir, Muhammad Ashad
Computer Vision and Pattern Recognition
Convolutional Neural Networks (CNNs) have drawn researchers' attention to identifying cattle using muzzle images. However, CNNs often fail to capture long-range dependencies within the complex patterns of the muzzle. The transformers handle these challenges. This inspired us to fuse the strengths of CNNs and transformers in muzzle-based cattle identification. Addition and concatenation have been the most commonly used techniques for feature fusion. However, addition fails to preserve discriminative information, while concatenation results in an increase in dimensionality. Both methods are simple operations and cannot discover the relationships or interactions between fusing features. This research aims to overcome the issues faced by addition and concatenation. This research introduces a novel approach called Multi-Head Attention Feature Fusion (MHAFF) for the first time in cattle identification. MHAFF captures relations between the different types of fusing features while preserving their originality. The experiments show that MHAFF outperformed addition and concatenation techniques and the existing cattle identification methods in accuracy on two publicly available cattle datasets. MHAFF demonstrates excellent performance and quickly converges to achieve optimum accuracy of 99.88% and 99.52% in two cattle datasets simultaneously.
title MHAFF: Multi-Head Attention Feature Fusion of CNN and Transformer for Cattle Identification
topic Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2501.05209