During loading, two finishing pigs pass through a narrow gate shoulder to shoulder. One briefly disappears behind the other in the camera view. How can a system tell whether both animals crossed? Machine vision in animal counting analyses movement across successive video frames. The result also depends on where staff place the camera and how they verify the count.

How machine vision in animal counting follows a crossing
A camera supplies images of animals moving through a defined passage. First, detection software identifies animals in individual frames. Tracking then links observations across time so that a single pig moving through several images can remain one tracked animal. Finally, a counting rule checks whether that animal has completed a crossing through a configured zone.
A detection box alone cannot establish a final headcount. For example, an animal may stop near the boundary, lean forward or turn around. In AnimalCounter, a completed crossing in the selected direction changes the net total. If a previously counted animal fully returns across the appropriate boundary, the system can subtract that crossing. This logic depends on the installed setup and the visibility of the movement.
The hidden challenge behind a clear camera image
Two pigs can overlap even when the overall video looks sharp. Moreover, a worker, gate or handling board may block the view at the decisive moment. Light can also change sharply between a barn and the open loading ramp. For machine vision in animal counting, a clear view across the whole passage matters as much as image quality. As a result, camera position, lighting and stable mounting deserve a site check.
A 2026 study of pig passage counting tested a separate research system on nine videos from one corridor. The researchers examined changes of direction and animal overlap, while calling for tests across more farms and layouts. Their findings illustrate the need for field validation and are not performance figures for AnimalCounter.

What AnimalCounter records alongside the live count
AnimalCounter counts pigs, cattle and sheep passing through configured livestock corridors or loading points. Staff can follow the number while a transfer is under way. When starting a session, the operator selects the receiving location and enters the lot identifier. The saved session connects the result with its timestamps and video.
Afterwards, staff can find the lot in the archive, review or download its recording and export session data to Excel. Together, these records make machine vision in animal counting easier to review after a transfer. They help colleagues examine a discrepancy using the same session. The operator still checks the camera view, identifies the correct lot and closes the session.
Local counting can operate without internet access when the camera and processing unit communicate over a suitable local network. However, remote support and optional external connections may need internet access. Hardware, recording settings and retention depend on the actual installation. Before rollout, agree who may access recordings and how long the site will keep them.
How to test machine vision in animal counting on site
Begin with the species, passage width, lighting and a possible camera location. Then record typical movement, including close pairs, short stops, crowding and full return crossings. Compare each complete session’s net result with an independently verified reference count. Also check that the saved video, session times and lot identifier agree.
If machine vision in animal counting loses an animal behind another, review the viewing angle or the passage arrangement and repeat the test. Record the conditions and agree on success criteria before making a purchasing decision. This gives the farm team evidence about its own working environment instead of relying on a general accuracy claim.

A useful counting system starts with a suitable view of the animals. To discuss an installation, share a short video of your loading passage and explain the species, traffic direction and lighting. The AGRI-FOOD.AI team can review the requirements with you.