David H. Simangunsong
Back to Computer Vision

Broiler chicken counting from barn camera video

A YOLO11n detector counts the chickens visible in each frame of an overhead barn camera, tested on labelled images from a barn it never saw during training.

Year
2026
Study area
Public broiler house dataset, not in Indonesia
Period
Recording of 25 January 2025
Methods
Object detectionDeep learningCounting
Stack
PythonYOLO11nUltralyticsOpenCVFastAPISQLite
  • 81%Precision at confidence 0.25 on 216 test images
  • 64%Recall on the same images
  • 16Mean count error per image, in birds, mostly undercounting
  • 54% to 96%Detected as a share of labelled birds, week one to week six

Problem

Broiler farms track bird numbers to spot mortality and crowding early. Manual counts are slow and only happen a few times per cycle. An overhead camera can count all day, but only if the count is reliable at every age of the flock.

Method

Training, testing and replay.
Training, testing and replay.

The model was trained on images from some barns and weeks and tested on a barn it never saw. Each frame of the recording is counted at confidence 0.25, and the demo replays those counts in sync with the video.

Results

On 216 test images, precision is 81% and recall is 64%. The mean count error is 16 birds per image, almost always too few.

Accuracy depends strongly on age. Detected birds as a share of labelled birds:

Week 1 2 3 4 5 6
Detected vs labelled 54% 78% 82% 101% 90% 96%

Young chicks are small and packed together, and the model often reads a group as one bird or none.

Use

Trend monitoring from week three onward. A sudden drop in the visible count is a reason to check the house, not a census figure.

Interactive

Barn camera replay with counts

Self contained HTML, served from this site

Open in a new tab

Limitations

What these results should not be used for.

  1. Tested on one barn from one public dataset. No Indonesian farm has been tested.
  2. A frame count is the number of visible birds, not the flock size. Birds under feeders or behind others are missed.
  3. Trained on a small subset for six epochs. No confidence intervals are reported.