Skip to content

Computer vision · Livestock monitoring

Eyes on the barn,even at night.

Livestock monitoring with computer vision uses cameras and AI to detect and count the animals in a barn or area and follow signals of activity and behaviour. We build systems that watch pens, feeding areas or birthing areas continuously and send the farmer flags to check, while decisions about the animals stay with the farmer and the vet.

#011. #01#022. #02#033. #03#044. #04#05 · LOW ACTIVITY5. #05 · LOW ACTIVITY#066. #06#077. #07#088. #08FEEDING · EMPTY9. FEEDING · EMPTY
LIVE · CAM 04 · BARN · PEN 205:52:31

Events

  • 05:52:31Pen 2 · 8 animals counted
  • 05:52:31Feeding area · empty
  • 05:52:32#05 · activity below usual
  • 05:58:00Flagged to the farmer
Animated illustration · not footage from a delivered project

You cannot be in every barn, every hour

Many signs that something is wrong appear gradually: an animal standing apart, a feeding area visited by fewer animals, a restless female before giving birth. Checks are done at fixed times, and what happens in between, especially at night, goes unseen.

  • Counts when animals enter or leave the barn are done by hand and can be wrong
  • Births often start at night, when nobody is in the barn
  • Changes in activity or feeding are noticed only once they become obvious
  • Farm cameras, where they exist, are watched only when someone has the time

Who it is for

  • Cattle, pig, sheep or poultry farms that want to keep an eye on their barns without always being there
  • Breeders who want to know early when a birth or an isolated animal needs attention
  • Farms with several barns or sites, where routine checks take a lot of time
  • Technical teams or agricultural integrators who need a video analysis component

Step by step

How the system watches a pen, step by step

The five stages on the animation show a camera above a pen before sunrise: from the raw image to the animal flagged to the farmer.

LIVE · CAM 04 · BARN · PEN 205:52:31

Events

Animated illustration · not footage from a delivered project

Step 1 of 5

The camera above the pen

A camera mounted high up, above the pen or the feeding area, sees the animals from above, where they hide each other the least. At night it works in infrared, so the image turns black and white and the model has to be trained on such frames too. Dust and condensation on the lens are the main enemies, which is why cleaning the cameras becomes part of the farm routine.

Which kind of monitoring suits your farm

  • Counting in the pen or at the gate

    Counting can happen inside the pen, from frames taken at regular intervals, or at a gate, where animals crossing a virtual line are counted in and out. The first shows how many animals are there right now, while the second suits the entrance to a sheepfold or moves between barns.

  • Activity per group or per animal

    The most robust option follows the activity of the whole pen, compared with previous days. Tracking each animal in frame gives more detail, but in dense groups the track can be lost when animals overlap, so we use it only where the stocking density allows.

  • Plain detection or with posture

    For counting and presence at the feeder, detecting the animals is enough. For birthing pens or animals that spend a long time lying down, a model that also estimates body posture gives finer signals, but it needs more examples labelled together with the stockpeople.

What you receive at hand-over

  • The detection model adapted to your species and housing, trained on daytime and infrared images and exported for the device on the farm
  • The pens, feeding areas and birthing pens drawn on each camera, with the flagging rules agreed together
  • Notifications set up by SMS, email or Telegram, with an image of the moment, to the people you choose
  • A history by pen and day of counts, activity and flags, in which each alert can be marked as useful or not
  • A measurement report from the test period, comparing counts with a human count and covering useful flags and missed situations
  • Documentation, training and, typically, a plan for camera maintenance and threshold adjustment

No strings attached: tell us what the cameras should see and we'll tell you honestly whether it can be done.

Let's talk

What the livestock monitoring system can follow

  • 01

    Detecting and counting animals

    Counts the animals in a pen, a fold or an area and flags when the total does not match the expected herd or flock size.

  • 02

    Activity signals

    Estimates how much the animals in an area are moving and compares it with the usual pattern for that pen at the same time of day.

  • 03

    Presence at feeding and drinking

    Measures how long and how many animals spend at the trough or the drinker, as a signal of changes worth checking.

  • 04

    Watching birthing areas

    Follows the birthing pens and flags changes in posture or restlessness that may indicate the start of a birth.

  • 05

    Flagging unusual behaviour

    Can flag an animal lying down or standing apart for a long time, crowding or an animal that has got out of its pen, for checking.

  • 06

    Notifications to the farmer

    Flags arrive by phone or email with an image from the moment, so the farmer can decide whether to go and check.

How it works

From the barn image to the farmer's check

The steps marked in yellow are approved by a person.

  • Input
  • AI
  • Action
  • Human in the loop
  • Result
  1. 01

    Input

    Cameras in the barn

    The cameras covering pens, folds or feeding areas send images continuously.

  2. 02

    AI

    Detection and posture

    The model finds the animals, counts them and estimates their position and movement.

  3. 03

    Action

    Comparison with pattern

    Activity is compared with the pen's usual pattern, and deviations become flags.

  4. 04

    Human in the loop

    Farmer's check

    The farmer looks at the image and decides whether to go to the animal or call the vet.

  5. 05

    Result

    Log and statistics

    Flags, counts and activity are kept in a history by pen and day.

What data livestock monitoring needs

  • Real images from your barns, at different times, including at night, with the usual animals and stocking density
  • Labelled examples of the situations of interest, for example an animal lying down, feeding or in labour, marked together with the people who look after the animals
  • Information about the herd or flock, pens, feeding schedule and farm routine, so flags take them into account
  • Cameras suited to the environment: resistant to dust and humidity, with infrared for night and mounted above the areas of interest
  • Access to camera streams (for example via RTSP or ONVIF, where the equipment supports them) and a stable connection on the farm
  • An edge device or local server, so the analysis keeps working when the internet connection is weak

Possible integrations

  • IP cameras with an RTSP stream and infrared illumination
  • ONVIF-compatible cameras
  • NVRs and VMS systems
  • NVIDIA Jetson edge devices
  • Notifications by SMS, email or Telegram
  • Farm management applications, via API, where the vendor offers one
  • Feeding or climate control systems, as a source of data on schedules and conditions
  • MQTT
  • PostgreSQL databases
  • IP cameras with an RTSP stream and infrared illumination
  • ONVIF-compatible cameras
  • NVRs and VMS systems
  • NVIDIA Jetson edge devices
  • Notifications by SMS, email or Telegram
  • Farm management applications, via API, where the vendor offers one
  • Feeding or climate control systems, as a source of data on schedules and conditions
  • MQTT
  • PostgreSQL databases

Each integration's compatibility is checked during the analysis phase, for the systems and versions you use.

Control and transparency

What stays with people

  • Any decision about an animal's health, treatment or moving it, which belongs to the farmer and the vet
  • Checking flags on the spot, because an image does not show everything a person sees in the barn
  • Defining what unusual behaviour means for each species, age group and barn
  • Adjusting the flag thresholds so that alerts are useful and not too frequent

Limits and operating conditions

  • The system does not diagnose: it flags visible changes, and their cause is established by the people who know the animals
  • In dense groups, animals that overlap or hide one another are harder to count
  • Recognising a particular animal within the group is not guaranteed; without visible ear tags or other markings, the system works mainly at pen or group level
  • Dust, condensation, dirt on the lenses and poor light can reduce image quality, so camera maintenance is part of the project

How we evaluate livestock monitoring quality

We agree the indicators together before launch and track them afterwards. The values depend on the process, the data and the volume.

Counting accuracy
The number given by the system compared with a count made by a person on the same images, across different pens and times
Useful flags
The share of flags the farmer confirms as situations worth checking, recorded for each alert
Missed situations
Events noticed by staff, for example a birth, for which the system sent no flag, gathered in a shared log
Day and night stability
Results compared separately on daytime images and infrared images, across different barns

How we implement livestock monitoring, in 4 steps

  1. 01

    We choose what to follow

    We agree with the farmer which situations matter, in which barns and who receives the flags.

  2. 02

    We install or check the cameras

    We review the existing cameras or propose new positions and collect real images, by day and by night.

  3. 03

    We train and test in parallel

    We adapt the models to your animals and barns and let them run alongside the usual checks, comparing flags with what staff observe.

  4. 04

    We switch on notifications and monitor

    We activate notifications, adjust thresholds based on the farmer's feedback and retrain when the barns or the herd change.

Use cases

The scenarios below are conceptual examples, designed to illustrate realistic applications. They are not implementations delivered by WEB-AZ.

  • Dairy farm

    Calving pens overnight

    Infrared cameras watch the calving pens, and when a cow shows prolonged restlessness the stockperson on duty receives a notification with the image, to decide whether to go to her.

    Conceptual example
  • Pig farm

    Activity at the troughs

    For each pen, the time the animals spend feeding is tracked, and drops compared with previous days appear in a morning report checked by the farmer.

    Conceptual example
  • Sheep farm

    Counting at the fold gate

    A camera above the gate counts the sheep coming in for the evening, and any difference from the flock size is sent to the shepherd, who checks whether an animal is missing.

    Conceptual example

Frequently asked questions

  1. What is AI livestock monitoring?

    It is the use of cameras and computer vision models to detect and count animals and to follow signals of activity and behaviour in barns, at feeding or in birthing areas. The system sends flags to check, and the farmer and the vet decide what happens next.

  2. Can the system tell that an animal is ill?

    No. It can flag visible changes, for example an animal standing apart or eating less than usual, but it does not diagnose. Interpretation and any treatment remain with the farmer and the vet.

  3. Which species does it work for?

    The principle can be applied to cattle, pigs, sheep, goats or poultry, but the models have to be adapted to each species and each type of barn. We start from images from your farm and check what can realistically be observed in the conditions there.

  4. Can it recognise each individual animal?

    We do not promise that. In most situations the system works at pen or group level, because animals look alike and hide one another. Where ear tags or other markings are clearly visible, we can check together whether identifying individual animals is feasible.

  5. What about the people who appear in the images?

    The system is designed for animals and does not identify the people who work on the farm. Cameras are pointed at pens and feeding areas, people can be blurred in stored images, and employees must be informed about the cameras, in line with the obligations on video surveillance at work.

  6. Does it work without good internet on the farm?

    The analysis can run on a local device on the farm, so it does not depend on a fast connection. A modest link, for example over the mobile network, is enough for notifications, and images do not need to be sent to the cloud.

Can’t find the answer? Write to us and we’ll reply directly.

Want to know what happens in the barn when you are not there?

Tell us which animals you keep, how many barns you have and which situations you want to follow. We will tell you what can be observed with cameras and what would be needed.

Project type *
Add details, budget and timeline (optional)

* required fields. We don't send newsletters.