Pig pens watched around the clock: pen records and water today, camera video analysis in research
Staff see a pen a few times a day, and tail biting or a pig falling behind starts between rounds. We offer records for every pen with a water meter and alerts, and we are linking camera video analysis to the pen's history. We build on research into pig tracking, aggression and skin lesions from video.
verifiedFrom the team that has organised work on poultry farms for years.
A problem starts with one pig
In a pig house, trouble usually starts with one or a few animals: a pig that starts biting tails, a weaner that lags behind the group, a finisher that moves less. Staff see a pen a few times a day for a few minutes. When tail biting is visible to the naked eye, it usually already involves several animals, which means treatment, poorer gains and losses at the slaughterhouse.
A camera knows nothing on its own
A camera watches the pen all day and night, but you need software that tells the animals apart, tracks them and recognizes what they do. Until recently, every such system needed thousands of hand-labeled frames from one specific farm. And even a good picture says little if you cannot compare it with how much the pen drinks and how many pigs have died in it. We cover similar work on poultry in our article on flock behavior and welfare from video.
How we solve it
1. Every pen has its own group and entries
In the app for pig farmers, you divide the house into pens, and each has its own group, entries, water meter and alerts. A card with a QR code hangs above the pen, and animal moves update the group count. This works today.
2. Water in every pen
You enter the water meter reading by hand or from a photo, which the app reads for you to check. More in our article on reading a water meter from a photo. A drop in drinking often comes before other signs, and without meter records you have nothing to compare it with.
3. Entries from the pen, even without signal
You and your worker enter deaths, culls and moves from a phone at the pen. The farmer app and the worker app save entries on the phone and send them when the network returns. The worker ticks off tasks and adds a photo.
4. Camera video analysis in pens
We are researching video analysis from pen cameras, including assessment of activity, behavior and skin lesions, and we are working on linking its results to the pen's history. A camera result is meant to be a signal for staff. Assessing the animal and treating it stays with the farmer and the vet.

What the research says
A camera can track every piglet for hours
Bi and colleagues (2026) ran a study in a nursery at Iowa State University, in 12 pens of 10 piglets each, with six cameras. A general model detected piglets in about 85% of cases by day, but only 58% at night. After adding tracking over time, more than 80% of 4,927 movement tracks across 550 clips were fully correct. On one continuous recording of 132 minutes, the system kept the identity of all piglets without a single swap, with MOTA accuracy of 0.99. Animal tracking is therefore ready for further work in the pen.
You do not need to label thousands of images by hand
Faria and colleagues (2026) used a large general model to automatically label 2,130 images from five production stages, then trained a small, fast detector on those labels. It reached mAP of 79.4%, compared with 91.7% with hand-made labels, and was about 200 times faster than the large model. In the farrowing house, where piglets lie on top of each other, the result fell to 56.7%. Qazi and colleagues (2024) showed on sheep recordings how to combine models that find an animal, outline it and mark body points. This shortens the time to set up a system for a new farm.
Behavior and skin are only a signal, not a verdict
Souza and colleagues (2024) recorded 421 clips with a smartphone on a commercial farm in Brazil, 143 of them showing aggression. The best model detected only about half of the aggression episodes (sensitivity about 0.50). Bedin and colleagues (2024) on the same farm assessed photos of pigs aged 70–180 days. Precision was 80.6% for bitten tails, about 76% for ear hematoma, 72% for scratches and 56% for natural spots. The authors considered this too low for practice. So we treat a camera result as a hint on where to look, and combine it with the pen's data.
Several traits together give more than one
Russello and colleagues (2024) recorded 272 passes of 98 cows on a farm in the Netherlands. The model marked 9 body points with 99.6% accuracy, and six gait traits were calculated from their movement. Accuracy of lameness recognition rose from 76.6% with one trait to 80.1% with six. This is work on cattle, but it shows the principle we rely on: camera images, water, deaths and moves together say more than each alone.
What a pig farm gains
You see which pen stands out
Water, deaths and moves are recorded separately for each pen. A pen that drinks less or has more deaths stands out right away.
Less paper at the pen
A QR card and an entry from your phone replace a notebook you would have to copy later. The group count updates itself after every move.
History ready for the vet
When you call the vet, you have the pen's history in one place: water, deaths, moves and tasks. The conversation starts with facts.
We will show it on your farm
Want to see pen and water meter records on your own buildings, or are you thinking about cameras in pens? Leave your contact in the form at the bottom of the page.
Frequently asked questions
How do pen records work?add
You divide the building into pens, and each has its own group of pigs, entries, water meter and alerts. A card with a QR code hangs above the pen, and animal moves update the group count.
What equipment do you need?add
A phone with the app, printed QR cards and a water meter in each pen. You enter the meter reading by hand or from a photo. Cameras in pens are the subject of our research.
How much work is setup?add
A wizard guides you through describing buildings and pens. You can enter the first group from a photo of a document or from a spreadsheet. Workers install the app and start making entries right away. We describe the steps on the page how we roll it out.
What if there is no signal in the pig house?add
The farmer app and the worker app save entries on the phone and send them when the network returns.
Can a camera spot the pig that bites tails?add
You cannot rely on it yet. On a commercial farm, the best model detected about half of the aggression episodes, and precision for bitten tails in photos was 80.6%. A camera can point to a pen to check, and the assessment stays with staff.
Will the system replace a vet?add
No. Pen data and any camera signal help you notice a problem sooner. Diagnosis and treatment belong to the vet.
How do you know a camera in a pen makes sense?add
In a nursery at Iowa State University, a system tracked 10 piglets for 132 minutes without a single identity swap (MOTA 0.99). It detected piglets in about 85% of cases by day and 58% at night. A detector trained on automatically made labels reached mAP of 79.4% versus 91.7% with human labels, so setting up a system for a new farm takes less and less work. Recognition of behavior and skin lesions currently gives 50–80%, so we combine the image with the pen's data.
Sources & resources
- linkBi Y., Acharya B., Rosero D., Steibel J. (2026). Automated Segmentation and Tracking of Group Housed Pigs Using Foundation Models. arXiv:2604.03426
- linkFaria M.V.M., Pereira T.B., Condotta I.C.F.S., Paixão T.M., Boldt F.A. (2026). SAM3-Assisted Training of Lightweight YOLO Models for Precision Pig Farming. arXiv:2605.25860
- linkSouza J.S., Bedin E., Higa G.T.H., Loebens N., Pistori H. (2024). Pig aggression classification using CNN, Transformers and Recurrent Networks. arXiv:2403.08528
- linkBedin E., Souza J.S., Higa G.T.H., Pereira A., Kiefer C., Loebens N., Pistori H. (2024). Using Deep Learning for Morphological Classification in Pigs with a Focus on Sanitary Monitoring. arXiv:2403.08962
- linkQazi A., Razzaq T., Iqbal A. (2024). AnimalFormer: Multimodal Vision Framework for Behavior-based Precision Livestock Farming. arXiv:2406.09711
- linkRussello H., van der Tol R., Holzhauer M., van Henten E.J., Kootstra G. (2024). Video-based automatic lameness detection of dairy cows using pose estimation and multiple locomotion traits. arXiv:2401.05202 (also Computers and Electronics in Agriculture 223, 109040)
Prepared by: DlaFerm Team based on data from the sources listed · Publisher: INSTA-TECH sp. z o.o.
Let's talk about pen records and cameras on your pig farm
Want to see which pen drinks less and keep each pen's history on your phone? Get in touch. We will show you the <a href="/hodowca-trzody-chlewnej">app for pig farmers</a> and our work on cameras in pens. You can also create a free farm account.
Phone
+48 796 258 151