Catalog / Predictive Analytics & Forecasting / PRED-044

Sensor-based livestock health, heat & calving prediction (boluses, collars, ear tags)

Time-series models on wearable and ingestible cow sensors detect heat and the best insemination time, predict calving and warn early of mastitis, ketosis or disease, with alerts to the farmer's app.

Quick win: proven, manageable effort, first results within weeks, low regulatory risk.

Parts needed to run it yourselfPrediction & time seriesVision

Dairy herds are too large for a farmer to observe every cow every hour. Sensors on or inside the animal stream temperature, rumination, activity and drinking data to the cloud. Time-series models flag cows in heat (and the best insemination time), cows about to calve, and early signs of mastitis, ketosis or fever. The farmer gets a short prioritised to-do list on a phone instead of walking the barn at night. The technology is established on EU dairy farms; the open questions are accuracy per herd, data ownership and how much to trust each alert.

Problem & value

  • Today: heat and sickness are found by visual observation, milk-yield drops or milk-conductivity checks. Missed heats lengthen calving intervals; late disease detection means more antibiotics, lower yield and losses; unnoticed calvings endanger cow and calf, usually at night.
  • AI value: continuous 24/7 observation, individual baselines per animal (a cow is compared with her own normal), and combined signals (temperature + rumination + activity) that single thresholds miss.
  • Vendor-reported benefits (not independently verified): smaXtec states on its website disease detection up to 5 days earlier, up to 70 % less antibiotic use, and calving alerts on average about 15 hours ahead; customer testimonials on the same page are self-reported [1]. Treat all such figures as marketing claims and validate on your own herd (see KPIs).
  • Other vendors (Nedap, Afimilk, MSD) publish few quantified claims on their general product pages [3][4]; ask for peer-reviewed validation (sensitivity, specificity, false alerts per cow-month) before buying.

Variants

  • Heat/oestrus detection and insemination timing (activity/rumination collars, ear tags, leg pedometers, boluses).
  • Calving prediction (temperature drop and behaviour change; bolus or tail/ear sensors).
  • Health early warning (mastitis, ketosis, milk fever, metritis, pneumonia, lameness, heat stress).
  • Young stock/calf monitoring (e.g. MSD SenseHub Dairy Youngstock, now also for bucket-fed calves [2]).
  • Pasture-based herds (separate heat algorithms for grazing cows [1]), beef suckler herds, sheep/goat and pigs (fewer mature products).
  • Herd-level analytics for advisers, vets and cooperatives (benchmarking, antibiotic-use reporting).
  • Camera-based observation is a different data type: see VIS-014.

How it works

  1. sensor (bolus / collar / ear tag / leg band)
  2. base station or gateway (LoRa, BLE, proprietary radio)
  3. cloud ingestion (per-animal time series, milking-system data, barn climate)
  4. preprocessing (calibration, drinking-event removal from temperature, rumen-cycle features)
  5. per-cow baseline + event models (heat, calving, disease risk)
  6. alert logic (thresholds, ranking, de-duplication)
  7. app / herd software
  8. farmer/vet confirms (insemination, treatment, observation)
  9. outcome fed back as labels
  • Models: typically gradient boosting / random forests on engineered features, change-point and anomaly detection against each cow's baseline, and increasingly neural time-series models. Pretrained time-series foundation models (e.g. Chronos-2, which handles covariates zero-shot [5]) are useful for baselines and forecasting of expected values, but alert classifiers still need labelled events.
  • Labels come from farm records: insemination and pregnancy results, calving dates, treatment records, milk tests.
  • Human-in-the-loop: alerts are decision support. Farmer confirms heat before insemination; a vet diagnoses and prescribes. smaXtec itself states its service does not replace veterinary diagnosis [1].

Data preparation

  • Which data: sensor time series per animal (temperature, activity, rumination), milking and milk-test data, insemination, calving and treatment records, barn climate.
  • Where it lives: the sensor vendor's cloud, herd-management software, milking-system exports, the vet's reports, paper notebooks or Excel lists of the farmer.
  • Typical gaps: ear-tag and animal IDs that differ between systems, events recorded late or only on paper, drinking events distorting temperature, sensors replaced mid-lactation, too few confirmed events per farm.
  • Steps: (1) check which systems hold which data (PREP-001), (2) export via APIs or file exports (PREP-005), (3) harmonise animal IDs and timestamps in tidy tables (PREP-011), (4) replace paper notes by digital capture at the barn (PREP-008), (5) harvest labels from insemination, pregnancy and calving records (PREP-020), (6) capture farmer feedback on each alert (PREP-021). Tools: Python, pandas, a small time-series database.
  • Effort share: roughly 30-40 %; with a bought product mainly ID clean-up and consistent event recording.

Implementation paths

Which path for whom

  • smb (A): mature sensor-plus-app products for heat, calving and health alerts exist at farm prices, and the process is standard dairy management.
  • enterprise (B): large farm groups and cooperatives integrate sensor data with herd software and milking systems through APIs to run alerts across many sites.
  • developer (C): open-source time-series and gradient-boosting stacks on HW1 serve researchers and ag-tech start-ups that need transparent models on raw sensor data.
  • smaXtec (Austria, EU): ingestible bolus measuring inner body temperature, activity, rumination and water intake; TruD cloud; alerts for heat with insemination window, calving, mastitis/ketosis/milk-fever indications, optional pH bolus for rumen acidosis [1].
  • Nedap CowControl (Netherlands, EU): neck/leg-based heat, health and location monitoring [3].
  • Afimilk (Israel): AfiAct pedometers, AfiCollar, milk-meter based mastitis detection [4].
  • MSD Animal Health SenseHub (collars and youngstock monitoring) [2].
  • Also common on EU farms (not re-verified for this document): Lely, GEA, DeLaval and Allflex/SCR systems, often bundled with milking robots or parlours. Prefer the system matching your milking equipment.
  • Check: EU data hosting and contract terms on data ownership, export API to your herd software, sensor lifetime and replacement cost, validated detection rates, subscription vs. purchase.

Path B — Build on cloud APIs

  • Rarely makes sense as a replacement for the vendor algorithms, but is useful to add an analytics layer on exported data: store in a time-series DB, run Chronos-2/Nixtla-style forecasting or anomaly detection [5][6], and use an LLM to turn herd data into a daily plain-language briefing or adviser report. Use EU-region cloud and only aggregated or pseudonymised farm data where possible.
  • Needs a vendor API or export; many vendors expose data to herd-management platforms but not raw signals.

Path C — Self-host (open source)

  • Sensors: open hardware is niche; research projects use commodity accelerometers with LoRaWAN gateways (ChirpStack) and MQTT.
  • Stack: TimescaleDB/InfluxDB, scikit-learn/LightGBM, StatsForecast, Chronos-2 (Apache-2.0 [5]) for baselines; anomaly detection per animal. Models run on CPU or small edge devices.
  • Hardware: HW1 suffices (a CPU server or small edge box); no GPU needed except for optional LLM reporting.
  • Choose C for research institutes, large integrators or farms with strict data sovereignty. Expect considerable validation effort; no vendor-grade ground truth.

Path D — Custom training

  • Worth it for sensor manufacturers, breeding/AI cooperatives and universities with large labelled histories (thousands of cows, with confirmed pregnancies, calvings, diagnoses). Key challenges: label quality (treatment records are noisy), seasonal and heat-stress effects, breed/lactation differences, and per-farm drift. Federated learning across farms is an option where data owners will not pool raw data.

State of the art (2026)

  • Mature sensor classes: boluses (core temperature, rumination, drinking) and collars/ear tags (activity, rumination) are standard on larger EU dairy farms; heat detection is the most established application, health early warning the most variable in quality.
  • Trends: multi-signal fusion with milk-robot data; individual baselines; antibiotic-reduction use cases as regulation tightens; pasture algorithms; young-stock monitoring [2]; time-series foundation models for baselines [5].
  • Limits and failure modes: false alerts (cows alerting for non-disease reasons such as heat stress or regrouping); missed silent heats; sensor loss or bolus displacement; drinking events distorting temperature; algorithm updates changing alert behaviour; performance dropping when vendor accuracy figures from trial herds are applied to differently managed herds. Alerts indicate deviation, not diagnosis. Independent validation data is uneven across vendors; I could not re-verify peer-reviewed accuracy figures in this review round.

Shared resources & combinations

  • Building blocks: time-series forecasting, anomaly detection, streaming ingestion and edge runtime are shared with PRED-006 (predictive maintenance), PRED-014 (soft sensors), PRED-007 (load forecasting) and ANOM-001-style anomaly detection; one time-series platform on HW1/CPU can serve all.
  • Combinations: VIS-014 (camera-based livestock welfare monitoring) for lameness, body condition and behaviour; PRED-013 (yield prediction) and OPT-014 (precision farming) for feed and production planning; SCI-020 (genomic selection) uses the same fertility and health phenotypes.
  • Data pipeline: herd-management software (milking, feeding, breeding records) provides labels and context for all of these.

Effort, cost & KPIs

  • Path A: weeks to install and onboard; costs are sensors (purchase or lease) plus subscription; per-animal replacement of boluses/tags is a main cost driver.
  • Path B: 1-3 months for analytics layer on exported data.
  • Path C/D: many months; needs data scientist and ground truth from veterinary records.
  • KPIs: heat detection rate and conception rate, calving interval, days open, insemination-to-conception, proportion of calvings attended, treatment days and antibiotic use per cow (DDD), disease incidence, culling and mortality rates, false-alert rate per cow-month, alerts acted on per day (time burden).

People & change

  • Involve early: the owner or management, the herd manager as process owner, the barn staff who use alerts daily, the vet, and the sensor and software suppliers. IT only for connectivity and accounts.
  • Works council: usually no, since the system monitors animals, not staff, and most farms have no works council. If alerts are logged per employee (e.g. who confirmed), §87(1) no. 6 BetrVG may apply; inform under §90(1) no. 3 where a council exists.
  • Data protection: animal data is non-personal, but employee names in logs and farm identifiers are personal data; sign an AVV (Art. 28 GDPR) with the vendor. A DPIA is not expected.
  • AI literacy (Art. 4): support the barn team with short training on what an alert means, false alarms and when to call the vet (GUIDE-006).
  • Communication and pilot: start with one group of cows or one barn for a full breeding cycle and compare with the previous routine (GUIDE-009).
  • Typical concerns: alert overload and distrust - tune thresholds with the staff, review missed events together (GUIDE-008). The farmer confirms heat and the vet diagnoses and treats.

Risks, regulation & compliance

  • EU AI Act: minimal risk. Agriculture and livestock management do not appear in Annex III [7]; the system makes decisions about animals, not natural persons. Art. 4 AI literacy applies to the operator. Watch for the case where worker-monitoring features (e.g. tracking staff via the same system) are added, which would change classification (employment, Annex III) [7][8].
  • GDPR: mostly farm and animal data. Farm identity, location and performance data of an identifiable farmer is personal data in practice; contracts should regulate data ownership, secondary use (benchmarking, sale to third parties) and deletion on termination (the EU Code of conduct on agricultural data sharing is a useful reference). Hence depends.
  • Animal health law: Regulation (EU) 2016/429 requires registration and traceability for bovines and keepers' records; electronic identification is permitted [9]. Sensors do not replace official ear tags. Veterinary medicines law (prescription, antibiotic-use recording and reduction) keeps treatment decisions with the vet.
  • Medical device rules: veterinary products are outside MDR; claims about diagnosis should be avoided by vendors.
  • Risks/mitigations: over-trust in alerts (keep routine observation), vendor lock-in (export clause), data ownership (contract), sensor welfare (bolus approval and safety), cyber-security of gateways.

Getting started

  1. Define the top problem (missed heats, calving losses, mastitis/ketosis) and record a baseline of KPIs for the last 12 months.
  2. Request validation data (sensitivity, specificity, false alerts) and 2-3 reference farms of similar size and management from vendors in Path A.
  3. Check the data contract: ownership, API/export, hosting in the EU, behaviour at contract end.
  4. Pilot on a sub-group for one calving/breeding season, logging every alert and its outcome.
  5. Review the logged alerts with the vet monthly; adjust alert thresholds and add analytics on exported data later (Path B).

Sources

  1. smaXtec — product and health/heat/calving alerts, vendor claims — https://smaxtec.com/en/
  2. MSD Animal Health — SenseHub Dairy Youngstock for bucket-fed calves — https://www.msd-animal-health.com/news-and-insights/featured-stories/next-gen-calf-care-sensehub-dairy-youngstock-now-available-for-bucket-fed-calves/
  3. Nedap Livestock Management — CowControl heat and health monitoring — https://www.nedap-livestockmanagement.com/
  4. Afimilk — AfiAct, AfiCollar, milk meter — https://www.afimilk.com/
  5. Amazon Science — Chronos / Chronos-2 time-series forecasting (Apache-2.0) — https://github.com/amazon-science/chronos-forecasting
  6. Nixtla — TimeGPT and open-source SDK — https://github.com/Nixtla/nixtla
  7. AI Act Annex III (high-risk areas) — https://artificialintelligenceact.eu/annex/3/
  8. Regulation (EU) 2024/1689 (AI Act) — https://eur-lex.europa.eu/eli/reg/2024/1689/oj
  9. European Commission — Animal Health Law (Reg. 2016/429) — https://food.ec.europa.eu/animals/animal-health/animal-health-law_en