DASNet a dual branch multi level attention sheep counting network

Abstract Grassland sheep counting is essential for both animal husbandry and ecological balance. Accurate population statistics help optimize livestock management and sustain grassland ecosystems. However, traditional counting methods are time–consuming and costly, especially for dense sheep herds....

Full description

Saved in:
Bibliographic Details
Main Authors: Yini Chen, Ronghua Gao, Qifeng Li, Hongtao Zhao, Rong Wang, Luyu Ding, Xuwen Li
Format: Article
Language:English
Published: Nature Portfolio 2025-07-01
Series:Scientific Reports
Online Access:https://doi.org/10.1038/s41598-025-97929-w
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1849238566355337216
author Yini Chen
Ronghua Gao
Qifeng Li
Hongtao Zhao
Rong Wang
Luyu Ding
Xuwen Li
author_facet Yini Chen
Ronghua Gao
Qifeng Li
Hongtao Zhao
Rong Wang
Luyu Ding
Xuwen Li
author_sort Yini Chen
collection DOAJ
description Abstract Grassland sheep counting is essential for both animal husbandry and ecological balance. Accurate population statistics help optimize livestock management and sustain grassland ecosystems. However, traditional counting methods are time–consuming and costly, especially for dense sheep herds. Computer vision offers a cost–effective and labor–efficient alternative, but existing methods still face challenges. Object detection–based counting often leads to overcounts or missed detections, while instance segmentation requires extensive annotation efforts. To better align with the practical task of counting sheep on grasslands, we collected the Sheep1500 UAV Dataset using drones in real–world settings. The varying flight altitudes, diverse scenes, and different density levels captured by the drones endow our dataset with a high degree of diversity. To address the challenge of inaccurate counting caused by background object interference in this dataset, we propose a dual–branch multi–level attention network based on density map regression. DASNet is built on a modified VGG–19 architecture, where a dual-branch structure is employed to integrate both shallow and deep features. A Conv Convolutional Block Attention Layer (CCBL) is incorporated into the network to more effectively focus on sheep regions, alongside a Multi–Level Attention Module (MAM) in the deep feature branch. The MAM, consisting of three Light Channel and Pixel Attention Modules (LCPM), is designed to refine feature representation at both the channel and pixel levels, improving the accuracy of density map generation for sheep counting. In addition, a residual structure connects each module, facilitating feature fusion across different levels and offering increased flexibility in handling diverse information. The LCPM leverages the advantages of attention mechanisms to more effectively extract multi-scale global features of the sheep regions, thereby helping the network to reduce the loss of deep feature information. Experiments conducted on our Sheep1500 UAV Dataset have demonstrated that DASNet significantly outperforms the baseline MAN network, with a Mean Absolute Error (MAE) of 3.95 and a Mean Squared Error (MSE) of 4.87, compared to the baseline’s MAE of 5.39 and MSE of 6.50. DASNet is shown to be effective in handling challenging scenarios, such as dense flocks and background noise, due to its dual–branch feature enhancement and global multi–level feature fusion. DASNet has shown promising results in accuracy and computational efficiency, making it an ideal solution for practical sheep counting in precision agriculture.
format Article
id doaj-art-b594053e490d4b22bc664719e82242b4
institution Kabale University
issn 2045-2322
language English
publishDate 2025-07-01
publisher Nature Portfolio
record_format Article
series Scientific Reports
spelling doaj-art-b594053e490d4b22bc664719e82242b42025-08-20T04:01:34ZengNature PortfolioScientific Reports2045-23222025-07-0115111810.1038/s41598-025-97929-wDASNet a dual branch multi level attention sheep counting networkYini Chen0Ronghua Gao1Qifeng Li2Hongtao Zhao3Rong Wang4Luyu Ding5Xuwen Li6Information Technology Research Center, Beijing Academy of Agriculture and Forestry SciencesInformation Technology Research Center, Beijing Academy of Agriculture and Forestry SciencesInformation Technology Research Center, Beijing Academy of Agriculture and Forestry SciencesDepartment of Mathematics And Physics, North China Electric Power UniversityInformation Technology Research Center, Beijing Academy of Agriculture and Forestry SciencesInformation Technology Research Center, Beijing Academy of Agriculture and Forestry SciencesInformation Technology Research Center, Beijing Academy of Agriculture and Forestry SciencesAbstract Grassland sheep counting is essential for both animal husbandry and ecological balance. Accurate population statistics help optimize livestock management and sustain grassland ecosystems. However, traditional counting methods are time–consuming and costly, especially for dense sheep herds. Computer vision offers a cost–effective and labor–efficient alternative, but existing methods still face challenges. Object detection–based counting often leads to overcounts or missed detections, while instance segmentation requires extensive annotation efforts. To better align with the practical task of counting sheep on grasslands, we collected the Sheep1500 UAV Dataset using drones in real–world settings. The varying flight altitudes, diverse scenes, and different density levels captured by the drones endow our dataset with a high degree of diversity. To address the challenge of inaccurate counting caused by background object interference in this dataset, we propose a dual–branch multi–level attention network based on density map regression. DASNet is built on a modified VGG–19 architecture, where a dual-branch structure is employed to integrate both shallow and deep features. A Conv Convolutional Block Attention Layer (CCBL) is incorporated into the network to more effectively focus on sheep regions, alongside a Multi–Level Attention Module (MAM) in the deep feature branch. The MAM, consisting of three Light Channel and Pixel Attention Modules (LCPM), is designed to refine feature representation at both the channel and pixel levels, improving the accuracy of density map generation for sheep counting. In addition, a residual structure connects each module, facilitating feature fusion across different levels and offering increased flexibility in handling diverse information. The LCPM leverages the advantages of attention mechanisms to more effectively extract multi-scale global features of the sheep regions, thereby helping the network to reduce the loss of deep feature information. Experiments conducted on our Sheep1500 UAV Dataset have demonstrated that DASNet significantly outperforms the baseline MAN network, with a Mean Absolute Error (MAE) of 3.95 and a Mean Squared Error (MSE) of 4.87, compared to the baseline’s MAE of 5.39 and MSE of 6.50. DASNet is shown to be effective in handling challenging scenarios, such as dense flocks and background noise, due to its dual–branch feature enhancement and global multi–level feature fusion. DASNet has shown promising results in accuracy and computational efficiency, making it an ideal solution for practical sheep counting in precision agriculture.https://doi.org/10.1038/s41598-025-97929-w
spellingShingle Yini Chen
Ronghua Gao
Qifeng Li
Hongtao Zhao
Rong Wang
Luyu Ding
Xuwen Li
DASNet a dual branch multi level attention sheep counting network
Scientific Reports
title DASNet a dual branch multi level attention sheep counting network
title_full DASNet a dual branch multi level attention sheep counting network
title_fullStr DASNet a dual branch multi level attention sheep counting network
title_full_unstemmed DASNet a dual branch multi level attention sheep counting network
title_short DASNet a dual branch multi level attention sheep counting network
title_sort dasnet a dual branch multi level attention sheep counting network
url https://doi.org/10.1038/s41598-025-97929-w
work_keys_str_mv AT yinichen dasnetadualbranchmultilevelattentionsheepcountingnetwork
AT ronghuagao dasnetadualbranchmultilevelattentionsheepcountingnetwork
AT qifengli dasnetadualbranchmultilevelattentionsheepcountingnetwork
AT hongtaozhao dasnetadualbranchmultilevelattentionsheepcountingnetwork
AT rongwang dasnetadualbranchmultilevelattentionsheepcountingnetwork
AT luyuding dasnetadualbranchmultilevelattentionsheepcountingnetwork
AT xuwenli dasnetadualbranchmultilevelattentionsheepcountingnetwork