← Latest papers
💻 computer science

A CEDNet-based Algorithm for Cattle Detection and Counting in Complex Farming Environment in UAV Imagery

This paper proposes C2Net, a lightweight CEDNet-based algorithm that leverages point annotations and a novel Focus Inverse Distance Transform to achieve high-precision cattle detection and counting in complex UAV imagery, addressing challenges like occlusion and annotation costs while offering a practical solution for edge device deployment.

Original authors: Tao Wu, Yihan Niu, Xi Chen, Qizhao Zhou

Published 2026-10-15
📖 5 min read🧠 Deep dive

Original authors: Tao Wu, Yihan Niu, Xi Chen, Qizhao Zhou

Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). ✨ This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

In the vast, open landscapes of modern agriculture, managing large herds of cattle is a task that demands constant vigilance. Farmers need to know exactly how many animals they have, where they are, and how they are behaving to ensure the health of the herd and the efficiency of the farm. For decades, this has meant walking the fields or relying on expensive, labor-intensive counting methods. Today, technology offers a new perspective: unmanned aerial vehicles, or drones, which can fly over pastures and capture high-resolution images of the livestock below. These images provide a bird's-eye view that is impossible to get from the ground, but they also present a unique challenge for computers. When a drone looks down at a dense crowd of cows, the animals often overlap, hide each other, or blend into the muddy ground and shadows. Standard computer programs, which are usually trained to recognize objects by drawing boxes around them, often struggle in these chaotic scenes. They might miss a cow hidden behind another, or they might get confused by the sheer number of animals packed together. Furthermore, teaching a computer to recognize these animals usually requires humans to spend hours drawing precise boxes or outlines around every single cow in thousands of photos, a process that is slow, expensive, and difficult to scale.

To solve these problems, a team of researchers from Chengdu University of Information Technology and Southwest Minzu University has developed a new way to count cattle using drone imagery. They created a specialized computer algorithm called C2Net, which is designed specifically to handle the messy, crowded reality of a working farm. Instead of asking humans to draw complex boxes around every animal, the new method only requires a simple dot to mark the center of each cow. This tiny change in how the data is prepared drastically reduces the time and cost needed to train the system. The researchers built a massive new collection of images, called HerdSet7K, containing nearly 7,000 photos of cattle in various environments, from open grasslands to crowded feeding pens. This dataset includes scenes where cows are so close together they form a solid mass, as well as scenarios where they are spread out, allowing the computer to learn how to distinguish individuals even when they are touching or partially hidden.

The core of this new system is a clever way of teaching the computer to see distance and space. Rather than just looking for the shape of a cow, the algorithm generates a map that shows how far every point in the image is from the nearest cow. In areas where cows are packed tightly, this map creates distinct, non-overlapping zones for each animal, allowing the computer to pinpoint the exact center of each one without getting confused by the crowd. This approach, which the researchers call a focal inverse distance transform, acts like a guide that helps the computer separate individual animals even when they are visually merged. By using this technique, the system can count the herd with high precision while also keeping track of where each animal is located, a capability that is essential for monitoring feeding habits or detecting if a cow is injured or fighting.

When the researchers tested their new system against other leading computer vision models, the results showed a clear advantage in difficult conditions. In scenarios where the ground was muddy, the lighting was poor, or the cows were clustered in dense groups, traditional models often failed, missing many animals or counting them incorrectly. The new C2Net system, however, maintained its accuracy. In tests involving hundreds of images, the system achieved a counting error rate that was significantly lower than its competitors, with an average difference of about 20 animals per image compared to the actual count. More importantly, it was able to locate individual cows with a high degree of certainty, even in the most crowded pens where other systems gave up. The system also proved to be efficient enough to run on smaller, portable computers, meaning it could potentially be used on drones or farm robots in real-time without needing massive, expensive servers.

The study demonstrates that it is possible to automate livestock monitoring in a way that is both highly accurate and practical for real-world farming. By shifting the focus from complex, time-consuming annotations to simple point markers, the researchers have lowered the barrier for creating these intelligent systems. The new method does not just count the animals; it provides a reliable map of the herd's distribution, which can help farmers make better decisions about resource allocation and animal welfare. The team has made their dataset and the code for the algorithm available to the public, hoping that this open approach will accelerate the development of smarter, more efficient tools for the future of agriculture. In the end, the work offers a practical solution to a persistent problem, turning the chaotic visual noise of a crowded pasture into clear, actionable data for the farmer.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →