This page is being translated by your browser

Translation can break parts of Roboflow. If something stops working, turn translation off and reload the page.

Detection · Agriculture

Livestock counting: Datasets & Models

Automatically count cattle, sheep, and other livestock in images and video from field cameras, drones, or fixed feedlot cameras using object detection.

Livestock counting example
1M+
developers
16k
organizations
50B
inferences

Livestock counting

This detection workflow locates individual livestock, such as cattle and sheep, in a scene and returns a bounding box for each animal so counts can be tallied per frame or across a herd. It accepts still images, video frames, and aerial drone footage as input, making it usable with any suitable livestock dataset from field cameras, drones, or fixed feedlot cameras.

Try it out

Powered by general detection model

Run on custom image

Drop an image here or click to upload

Detecting classes:

Why automate livestock counting

Counting livestock by hand is slow, repetitive, and inconsistent, especially across large herds or when animals bunch together and move. Miscounts affect inventory reconciliation, stocking-density decisions, feed planning, and loss detection, and sending staff to physically walk pens or fields does not scale. Automating the count with detection turns any camera or drone pass into a reliable headcount without disturbing the herd. It also creates a timestamped record you can audit and trend over time instead of relying on a clipboard.

Key benefits

Teams get faster, more consistent counts that reduce labor and catch discrepancies earlier, and the model runs on footage from cameras and drones you likely already operate. Detection scales from a single pen to thousands of animals across multiple sites, and outputs plug into inventory or herd-management systems via API. Starting from an existing livestock dataset shortens the path from prototype to a model tuned for your breeds and camera setup.

How to use it

  1. Upload an image: Drop any photo into the widget above to try livestock counting for free, right on this page.
  2. Preview instant results: The model detects cow, sheep, goat, pig, chicken within seconds and returns an annotated image with structured predictions, so you can immediately see how well it works. Adjust the detection classes and re-run until the results fit your scenario.
  3. Like what you see?: With a free Roboflow account, you can deploy this workflow with the Serverless Cloud API, customize it in your workspace, or train RF-DETR on your own images for production accuracy.
  4. Get started for free: No code or training data required to begin: upload, review the results, and make it part of your stack in a single click.
Recommended model

Recommended model for livestock counting

RF-DETR is state of the art for real-time object detection, instance segmentation, and keypoint detection, with higher accuracy and lower latency than comparable models, and it's Apache 2.0 licensed. When you're ready to build a production model for livestock counting, fine-tune it on your own labeled images, then deploy to a Serverless Cloud API endpoint.

Train your own model
Roboflow Agent

Not sure where to start?

Describe your Livestock Counting project to Roboflow Agent.

Agent