BovisTechNet: A Multimodal IoT-Enabled Framework for Cattle Disease Detection Using DINOv2 and Ensemble Learning

P
Pallavi Mangrulkar1,*
R
Rajiv Iyer1
1Amity School of Engineering and Technology, Amity University, Panvel, Mumbai-410 206, Maharashtra, India.

Background: Cattle diseases reduce productivity and compromise animal welfare. However, many existing monitoring systems depend on a single data source or target individual diseases.

Methods: BovisTechNet, a multimodal internet of things (IoT) framework, integrates six wearable-neckband measurements (body temperature, heart rate, blood oxygen saturation and three-axis acceleration) with pretrained DINOv2 ViT-B/14 visual embeddings extracted from five anatomical regions (eye, mouth, hoof, udder and skin). A soft-voting ensemble comprising seven classifiers (XGBoost, LightGBM, CatBoost, random forest, extra trees, K-nearest neighbours and bagging) was used to classify nine health conditions from 35,206 observations obtained from 200 cattle. Animal-level partitioning was used to prevent data leakage.

Result: On an independent test set of 60 animals and 10,529 observations, BovisTechNet achieved 97.25% accuracy, 97.41% precision, 97.25% recall, 97.29% F1-score and 99.92% ROC-AUC. Four-fold animal-grouped cross-validation yielded 95.61±3.49% accuracy. Multimodal fusion outperformed both the tabular-only (68.93%) and image-only models (92.50%).

Livestock Sector is the backbone of India’s rural economy and the welfare of farming households depends directly on the health of their cattle (Li et al., 2022; Shahab et al., 2024). Although diseases reduce milk yield and productivity, the main challenge remains early detection: continuous monitoring is limited and farmers ability to recognise early signs varies (Gupta et al., 2023; Syarif et al., 2019).
       
To address-these limitations, the study develops BovisTechNet, a multimodal IoT-based machine learning framework for early cattle disease detection. The framework integrates physiological measurements from a wearable neckband with visual information from multiple anatomical regions.
       
The proposed framework classifies nine cattle health conditions, namely, healthy, bovine keratoconjunctivitis, bovine spongiform encephalopathy, foot-and-mouth disease, johne’s disease, leptospirosis, lumpy skin disease, mastitis and ringworm.
       
Internet of things (IoT) sensors stream temperature, heart rate, oxygen saturation and activity wirelessly to cloud platforms for analysis (Chatterjee et al., 2021; Durairaj et al., 2024). Shahab et al., (2024) proposed an IoT system for early lumpy skin disease detection, while Syarif et al., (2019); Chatterjee et al., (2021); Narang et al., (2024) and Kaur and Virk (2025b) demonstrated wearable or collar-based monitoring with cloud analytics. These systems, however, rely mainly on sensor data and are limited to single diseases or threshold-based alerts. Machine learning has extended sensor-based assessment to behaviour classification and disease diagnosis (Dineva and Atanasova, 2023; Kalkan et al., 2025; Kustiyahningsih et al., 2021; Li et al., 2022; Riaboff et al., 2020; Wagner et al., 2020), whereas image-based approaches have addressed individual conditions such as infectious bovine keratoconjunctivitis (Gupta et al., 2023) and infectious cattle diseases through image retrieval (Kittichai et al., 2025). A recent hybrid IoT model combining-synthetic minority oversampling technique (SMOTE), gradient boosting and long short-term memory reached 93.56% accuracy but only 77.77% recall (Kaur and Virk, 2025a). Overall, the studies reviewed above focus on a single modality or a single disease, which is insufficient for farms where several conditions with overlapping signs may occur. Few studies combine wearable physiological signals with multi-region images under animal-level validation. This study therefore presents BovisTechNet, a multimodal IoT and machine-learning framework that fuses wearable-sensor data with visual features from five anatomical regions to classify nine health conditions: Healthy, bovine keratoconjunctivitis (BKC), bovine spongiform encephalopathy (BSE), foot-and-mouth disease (FMD), johne’s disease (JD), leptospirosis (Lepto), lumpy skin disease (LSD) (Bhavani 2026), mastitis and ringworm. Sensors capture physiological and behavioural change -for example, raised temperature in FMD, LSD and mastitis, or irregular movement in BSE, whereas images capture visible signs such as ocular changes in BKC, mouth and hoof in FMD, udder in mastitis, skin in LSD (AlZubi, 2024) and ringworm. BovisTechNet uses YOLOv8l-OBB to localise the body regions and DINOv2 to extract visual features, the fused sensor and image features are then classified using a soft-voting ensemble. The objectives of this study are to (i) develop a fused sensor-image classifier using a diverse soft-voting ensemble; (ii) evaluate its performance using animal-level splitting and grouped cross-validation to prevent data leakage; (iii) quantify the contribution of each modality through ablation analysis and (iv) demonstrate deployment through region localisation and automated alerts. Ensemble learning combines the predictions of several models to improve robustness. Because cattle diseases may present with overlapping symptoms and since sensor and image data contain noise and inter-animal variability, individual models may produce inconsistent predictions. BovisTechNet therefore combines boosting (XGBoost, LightGBM, CatBoost), bagging-based (Random forest Chengathir et al., (2025), extra trees, bagging) and instance-based (KNN) learners through soft voting, thereby reducing dependence on the limitations of any single model (Dineva and Atanasova, 2023; Kaur and Virk, 2025b).
The BovisTechNet pipeline (Fig 1) combines wearable-sensor data and multi-region images into a single multimodal feature vector, classifies the fused representation using an ensemble model, validates performance through animal-grouped splitting and deploys the system as a web service with automated alerts.

Fig 1: BovisTechNet system architecture, spanning data acquisition, feature extraction and fusion, data-integrity safeguards, ensemble classification, validation and deployment.


 
Animals and sensor-based data collection
 
Sensor data were collected from 200 Jersey cows on a cattle farm in Karjat, Maharashtra, India using wearable neckbands (Fig 2). The neckbands non-invasively record body temperature (DS18B20), heart rate and blood oxygen saturation (SpO2) (MAX30102) and three-axis acceleration (ADXL345). An ESP32 DevKit V1 microcontroller transmits readings to a cloud platform every 15 s, linked to the cow identity so that every record can be assigned to a single data partition, where the data are stored for processing and analysis. The DS18B20 monitored fever-related change, the MAX30102 provided heart rate and oxygen saturation and the ADXL345 captured activity patterns. The device was powered by a 400-mAh rechargeable battery and is housed in a lightweight PLA enclosure secured by a rubber strap.

​

Fig 2: Data collection using wearable neckband device.



Image data collection
 
Images of five anatomical regions (eye, mouth, hoof, udder and skin) (Fig 3), each showing disease-specific signs for at least one target class, were obtained from two sources, images captured on the study farm and at the Karjat veterinary polyclinic and images from open datasets (Agarwal, 2022; Faraz, 2022; Deenadayalan, 2025; Ganesh73005, 2024) for conditions not present in the herd during data collection. All images were manually reviewed and labelled by disease class. The images were captured from the same animals at the time of the sensor recordings; sensor records and images were therefore linked by timestamps. For each record, one image per anatomical region taken; the training source images were further divided among the four cross-validation folds in. Within each partition, every record slot received a unique image instance, so that no image is used in more than one record. The resulting multimodal dataset comprises 35,206 records from 200 animals with 176,030 unique image instances; images from all sources were used in both the training and the test partition, but no source image was shared between them (Table 1).

Table 1: Distinct source images per health class and anatomical region and their allocation to the training and test partitions. Each of the 35,206 records received a unique image instance per region (176,030 instances in total).



Fig 3: Representative lesion images of the cattle health conditions: Lumpy skin disease (LSD), bovine keratoconjunctivitis (BKC), foot-and-mouth disease (FMD), mastitis, ringworm, johne’s disease, leptospirosis and bovine spongiform encephalopathy (BSE).


 
Data pre-processing
 
Sensor readings were pre-processed to remove noise, handle missing values and normalize feature ranges. Implausible values caused by sensor noise or neckband detachment were clipped to valid ranges, missing values were mean-imputed after numeric coercion and all six parameters (temperature, heart rate, SpO2 and three acceleration axes) were standardized to zero mean and unit variance (Eq. (1)). A scikit-learn Pipeline (Imputer ® standard scaler® classifier) was fitted exclusively on training data within each split and cross-validation fold, with learned imputation and scaling parameters applied unchanged to validation and test data. No categorical encoding was required. The feature order was fixed as [temperature, heart rate, SpO2, accel-X, accel-Y, accel-Z], followed by 3,840 DINOv2 dimensions.
 
 
 
Here,
x= The original feature value.
μ= The mean of the feature calculated from the training data.
σ= Its standard deviation.
       
Eq. (1) therefore converts each feature to a standardized scale with zero mean and unit variance, allowing variables with different measurement ranges to be processed consistently by the machine-learning models.
 
Image feature extraction using DINOv2
 
Each of the five body-region images was processed using a pretrained DINOv2 ViT-B/14 model on two GPUs. Contrast-limited adaptive histogram equalisation (CLAHE) was applied to eye, mouth, leg, udder and skin images, followed by aspect-ratio-preserving resizing to 518 x 518 pixels and ImageNet normalization. Feature extraction was performed using mixed (fp16) precision, producing a 768-dimensional embedding for each region. The five embeddings were concatenated to form a 3,840-dimensional visual feature vector (Eq. 2) for multimodal fusion and classification, replacing the earlier fixed-resolution feature extractor.
 
ximg = [feye ||  fmouth  || fhoof ||  fudder ||   fskin ]  ∈ R5x768  = R3840
               
 
Where,
fr∈ R768= The 768-dimensional DINOv2 ViT-B/14 embedding of anatomical region r ∈ {eye, mouth, hoof, udder, skin}. 
  = Vector concatenation.
ximg= The resulting 3,840-dimensional visual feature vector.
 
Multimodal feature fusion
 
The six standardized tabular sensor features and the 3,840-dimensional image feature vector were concatenated into a single fused representation for each animal-observation given by Eq. (3).
                                x = [xtab ||  ximg] ∈ R6+3840 = R3846                             
 
Where,
xtab ∈ R6= The vector of the six standardized sensor features [temperature, heart rate, SpO2, accel-X, accel-Y, accel-Z] obtained with Eq. (1).
ximg= The visual feature vector from Eq. (2).
x∈R3846= The fused input vector passed to the ensemble classifier.
 
Leakage prevention and class balancing
 
The dataset was partitioned at animal level using GroupShuffleSplit based on cow identity: 140 animals (24,677 records) for training and 60 animals (10,529 records) to independent testing, with zero animal overlap verified. Splitting by animal, rather than by individual record, is important because repeated observations from the same cow are highly correlated; a record-level split would place near-duplicate observations in both training and test sets and inflate performance. Five label-derived indicator columns were removed and a test-set sizing error caused by a redundant validation split was corrected, consequently all reported results use the full 10,529-record test set.
       
The training set was mildly imbalanced (2,495-2,846 records per class; maximum/minimum ratio 1.14). A custom implementation of the Synthetic Minority Over-sampling Technique (SMOTE; k = 5) was applied to the training partition only, increasing every class to 2,846 records (25,614 in total) without altering the class distribution of the test set, where class counts ranged from 1,066 to 1,282 records. A four-fold cross-validation was performed on the training pool with predefined folds: the 140 training animals were assigned to four folds of 35 animals, each paired only with its own set of source images, so that neither animals nor source images are shared between the training and validation data of any fold; SMOTE was reapplied within each fold.
 
Ensemble classifier and baselines
 
BovisTechNet is a seven-member soft-voting ensemble comprising three gradient-boosting learners (XGBoost, LightGBM, CatBoost), two bagging-based tree ensembles (Random Forest, Extra Trees), K-Nearest Neighbours (KNN) and a general Bagging meta-estimator. The ensemble members used the following settings: XGBoost (200 trees, maximum depth 6, learning rate 0.1, row and column subsampling 0.8 and 0.5, L2 penalty 1, GPU-accelerated); LightGBM (200 trees, 31 leaves, learning rate 0.1, minimum 20 samples per leaf, row and column subsampling 0.8 and 0.5, L2 penalty 1); CatBoost (300 iterations, depth 6, learning rate 0.1, L2 leaf regularisation 3, Bernoulli subsampling 0.8, GPU-accelerated); Random Forest (200 trees, maximum depth 16, square-root feature sampling, GPU-accelerated); Extra Trees (200 fully grown trees, square-root feature sampling); KNN (k = 7, GPU-accelerated); and Bagging (10 decision-tree estimators, bootstrap sampling, 70% of features). Each learner produced a probability vector over the nine classes, allowing diverse learning strategies contribute to the final decision while ensuring that no learner received greater influence than another. The prediction is the class with the highest mean probability under equal weights (1/7, about 14.29% each) (Eq. 4). Equal weights were selected to maintain balanced contributions from all seven classifiers and avoid over-reliance on any individual learner. This approach also avoids introducing additional parameters through weight optimisation, which could increase the risk of overfitting, particularly given the limited number of independent animals.
       
Each base learner was also trained alone on the same SMOTE-balanced data as a baseline (Table 2), using compact, strongly regularised configurations: XGBoost (8 trees, depth 2, L1 and L2 penalties of 80, subsample 0.3); LightGBM (8 trees, depth 2, 3 leaves, penalties of 60); CatBoost (10 trees, depth 3, L2 leaf regularisation 50, GPU-accelerated); Random Forest (20 trees, depth 4, GPU-accelerated); Extra Trees (20 trees, depth 4, minimum leaf size 5); KNN (k = 15, GPU-accelerated) and Bagging (2 estimators, bootstrap sampling, 70% of features). The baselines therefore differ from the ensemble members in model capacity as well as in voting.

Table 2: Comparison of BovisTechNet with individual base learners on the independent test set (n = 10,529).

        ŷ = arg max i ΣM = 1 WmFm (Classi | x) m = 1,…,7     
 
Modality ablation study
 
Tabular-only features reached 68.93% test accuracy, image-only features reached 92.50% and the fused representation reached 97.25%, confirming image features were the dominant modality while fusion still provided a substantial additional improvement. Sensor data alone performed relatively well for the Healthy class (recall = 0.858) but poorly for lumpy skin disease (0.427) and mastitis (0.568). Image features recover most of this performance gap (0.868 and 0.973, respectively) and fusion increased both above 0.97. Fusion also produced marked gain for the healthy class (0.955 vs 0.717) and bovine keratoconjunctivitis (0.970 vs 0.882) relative to image-only features, whereas recall for BSE, Ringworm and Johne’s disease was similar with and without sensor features (0.963 vs 0.963, 0.956 vs 0.956 and 0.945 vs 0.956) (Fig 4).

Fig 4: Per-class test recall across the tabular-only, image-only and fused feature settings.


 
Region localisation and deployment
 
A YOLOv8l-OBB (oriented bounding box) detector was fine-tuned to localise the eye, mouth, hoof, udder and skin regions, which were subsequently cropped and passed to the DINOv2 extractor. Training used 7,600 annotated images, with 558 images reserved for validation (8,158 in total), 640 × 640 inputs, a batch size 16 and up to 50 epochs. Early stopping terminated training at epoch 32 and the epoch-27 checkpoint was retained. The validated ensemble was deployed as a Flask web service with a companion vision service (YOLOv8l-OBB and DINOv2) and a threshold-based alert system notifies farm staff of abnormal sensor readings. Performance was assessed on the held-out test set using accuracy, support-weighted precision, recall and F1-score, ROC-AUC and macro-averaged one-vs-rest specificity and false-positive rate (FPR). Support-weighted recall equals accuracy by construction and the per-class report additionally gives macro averages. Uncertainty in test-set performance was quantified with an animal-level bootstrap (1,000 resamples of the test animals, percentile 95% CIs) and paired differences between feature settings were tested with McNemar’s test on the same test records.
Overall performance and baseline comparison
 
On the independent test set of 10,529-records, BovisTechNet achieved 97.25% accuracy, 97.41% precision, 97.25% recall, 97.29% F1-score and 99.92% ROC-AUC, with a macro specificity of 99.66% (FPR 0.34%). This low false-positive rate matters on farms because frequent unnecessary alerts reduce trust in a monitoring system. Table 2 compares it with each base learner trained on the same data. The ensemble outperformed every individual learner: the strongest, XGBoost (83.56%), trailed by 13.69 percentage points and the weakest, CatBoost (61.08%), by 36.17 points. Even the three boosting learners differed widely (XGBoost 83.56%, LightGBM 80.91%, CatBoost 61.08%), so the settings of each learner strongly affected single-model performance. The main benefit of soft voting in this setting is therefore robustness across model families rather than a large gain over the strongest member.
 
Cross-validation
 
Four-fold animal-grouped cross-validation produced a mean accuracy of 95.61±3.49% (fold range 89.91-98.60%) and a mean ROC-AUC of 0.9980±0.0017 (Table 3); ROC-AUC remained at or above 0.995 in every fold. Because each fold has its own animals and its own source images, the spread across folds reflects how well the images of each fold represent their classes. The slightly lower cross-validated accuracy, compared with the test-set accuracy of 97.25%, is plausibly explained by the smaller number of animals and source images available for training in each fold.

Table 3: 4-fold cross-validation of BovisTechNet on the 140 training animals (35 animals per fold for validation).


 
Per-class performance
 
Leptospirosis was classified perfectly and FMD was classified almost perfectly (Table 4). The lowest recall was for johne’s disease (0.945), where 47 of 1,183 records were assigned to BSE and BSE had the lowest precision (0.869) because it absorbed misclassified records from several classes. The normalised confusion matrix (Fig 5) shows a strong diagonal pattern, indicating good classification performance across the nine cattle health classes. The main misclassifications involved Ringworm (49), Johne’s disease (47) and BKC (26) records predicted as BSE and BSE (39) and Healthy (24) records predicted as BKC; Healthy records were also predicted as BSE (23). These results indicate that the model has most difficulty separating BSE from BKC and from the skin-related classes.

Table 4: Per-class classification report for BovisTechNet on the test set (n = 10,529).



Fig 5: Normalized confusion matrix for BovisTechNet, on the held-out test set (n = 10,529), annotated with counts and row-normalized percentages.


 
Modality ablation
 
Tabular-only features reached 68.93% test accuracy, well above the roughly 11% expected by chance for nine near-balanced classes, whereas image-only features achieved 92.50% and fused features achieved 97.25%. Images were therefore the dominant modality, but fusion added a further 4.75 percentage points over image-only and 28.31 percentage points over tabular-only features, supporting the complementary contribution of physiological signals. This pattern is consistent with the clinical rationale described in the Introduction: several of the target diseases share fever or systemic responses that sensors record but cannot distinguish, whereas images reveal localised lesions in the eye, mouth, hoof, udder and skin that help differentiate the conditions. Fusing both data sources therefore provided the classifiers with complementary information. The large accuracy gap between tabular-only and fused models  also indicates that a sensor-only system, as used in  many earlier IoT-based approaches, would be insufficient for nine-class diagnosis. Image features therefore dominated overall performance and the sensor-only model was substantially weaker; the 97.25% accuracy of BovisTechNet should be interpreted in this context, as it is driven primarily by the visual modality, with the sensor data contributing a smaller, complementary gain. To quantify uncertainty, 95% confidence intervals (CIs) were estimated with an animal-level bootstrap (1,000 resamples of the 60 test animals): test accuracy was 97.25% (95% CI 96.94-97.53%) for the fused model, 92.50% (92.00-92.99%) for the image-only model and 68.93% (68.06-69.74%) for the sensor-only model. The paired improvement of the fused model over the image-only model (4.75 percentage points) had a 95% CI of 4.30-5.19 percentage points and no bootstrap resample showed a difference of zero or less (p<0.001). McNemar’s test on the same 10,529 test records confirmed this difference: 554 records were classified correctly only by the fused model and 54 only by the image-only model (χ² = 409.54, p<0.001). The improvement over the sensor-only model was 28.31 percentage points (95% CI 27.43–29.28; McNemar χ² = 2,693.48, p<0.001) (Table 5).

Table 5: Test accuracy of each feature setting and paired differences, with animal-level bootstrap 95% confidence intervals (1,000 resamples of the 60 test animals) and McNemar’s test (n = 10,529; pp = percentage points).


 
Region localisation
 
Table 6 shows the YOLOv8l-OBB validation performance-Best vs. Final epoch validation. YOLOv8l-OBB detector exhibited stable training behaviour over 32 epochs, with the box loss, classification loss, distribution focal loss and angle loss, all exhibiting a decreasing trend. The best validation performance occurred at epoch 27, with a precision of 96.8%, recall of 97.5%, mAP@50 of 99.0% and mAP@50-95 of 74.1%. At the final epoch (32), the corresponding values were 92.75%, 95.79%, 97.27% and 73.87%, respectively. The epoch-27 checkpoint was selected for deployment because of its superior validation performance. Accurate localisation is important because the subsequent classification pipeline depends on correctly identified anatomical regions. Automating region localisation also reduces the need for manual image cropping.

Table 6: YOLOv8l-OBB validation performance-best vs. final epoch validation.


       
The use of equal-weight soft voting allowed the seven classifiers to contribute equally to the final prediction, reducing dependence on the performance of any single learner. This approach was selected to avoid additional weight-optimisation parameters that could increase the risk of overfitting. However, the present study did not compare equal-weight voting with optimised weighted voting or stacking. Such comparisons could help determine whether alternative ensemble configurations offer further improvements and should be investigated in future studies.
Despite the promising performance of BovisTechNet, several limitations remain. First, the framework was evaluated primarily on Jersey cattle in Maharashtra, India and therefore requires validation across diverse breeds, regions, climatic conditions and farming systems. Second, the wearable neckband may be affected by battery limitations, sensor displacement, physical damage and environmental exposure during long-term use. Although pre-processing procedure addresses moderate noise and missing values, severe sensor failures may cause unrecoverable data loss. Third, the computational requirements of DINOv2 and YOLOv8l-OBB may limit deployment on resource-constrained devices, while variations in image quality, lighting and background conditions may affect classification performance. Finally, the ensemble model offers limited interpretability at the level of individual predictions. Future work should focus on diverse field settings, long-term hardware reliability, computational optimization and explainable artificial intelligence (AI) techniques such as shapley additive explanations (SHAP) and local interpretable model agnostic explanation (LIME) to identify features influencing disease predictions.
Future studies can evaluate the framework across multiple farms, breeds, environmental conditions and longer monitoring periods while also investigating lightweight models suitable for edge-deployment. The framework could also be adapted to other livestock species, such as buffalo, sheep, goats and poultry, by retraining the models with species-specific physiological and behavioural data. In addition, the current machine-learning framework could be enhanced by exploring advanced deep learning and hybrid algorithms, as well as explainable artificial intelligence techniques.
This study presents BovisTechNet, a multimodal IoT and machine-learning framework that combines wearable-sensor measurements with DINOv2 visual embeddings from five anatomical regions to classify nine cattle health conditions. Using animal-level partitioning, the framework achieved 97.25% test accuracy and 99.92% ROC-AUC, while four-fold grouped cross-validation yielded 95.61± 3.49% accuracy. Modality ablation showed that combining sensor and image features outperformed either modality alone. The framework was demonstrated through a Flask-based inference service, anatomical-region localisation and sensor-threshold alerts. Additional assessment across various farms, breeds and environmental conditions is necessary to determine its applicability and practical suitability.
We would like to express our sincere gratitude to Amity University Mumbai for providing the infrastructure and academic support necessary for this research. We also extend our heartfelt thanks to the Assistant Commissioner of Animal Husbandry, Taluka Mini Veterinary Polyclinic, Karjat, Raigad District, for their valuable cooperation and assistance in field-level insights and data collection.
 
Author contributions
 
Pallavi Mangrulkar: Conceptualization, Methodology, Investigation, Formal analysis, Data curation, Writing-original draft. Rajiv Iyer: Conceptualization, Supervision, Writing-review and editing.
 
Ethical statement
 
This study involved non-invasive monitoring of dairy cattle using an externally worn sensor neckband and photography of external body regions. No animals were subjected to invasive procedures, pain, or experimental treatment beyond routine, non-intrusive observation and normal husbandry practices were maintained throughout data collection.
 
Funding declaration
 
This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.
 
Data availability statement
 
The data that support the findings of this study are available from the corresponding author upon reasonable request.
 
Use of generative artificial intelligence
 
The authors used AI-assisted tools to support data analysis, language editing and manuscript drafting; all scientific content, results and conclusions were reviewed and verified by the authors.
The authors declare that they have no conflicts of interest regarding the publication of this manuscript. All authors have approved the final version of the manuscript and agree with its submission for publication. No financial or personal relationships have influenced the research or its findings.

  1. Agarwal, S. (2022). Cow Lumpy Disease Dataset [Data set]. Kaggle. https://www.kaggle.com/datasets/shivamagarwal29/ cow-lumpy-disease-dataset.

  2. AlZubi, A.A. (2024). Lumpy skin disease detection in cattle by a robust approach using advanced convolutional neural networks. Indian Journal of Animal Research. 58(12): 2146-2153. doi: 10.18805/IJAR.BF-1793.

  3. Bhavani, R. (2026). A hybrid deep learning model based smart identification of lumpy skin disease in cattle. Indian Journal of Animal Research. doi: 10.18805/IJAR.B-5927.

  4. Chatterjee, P.S., Ray, N.K. and Mohanty, S.P. (2021). LiveCare: An IoT-based healthcare framework for livestock in smart agriculture. IEEE Transactions on Consumer Electronics. 67(4): 257-265. https://doi.org/10.1109/TCE.2021.3128236.

  5. Chengathir, S.M., Swarnaa, M., Veena, S.T. and Kanagarajadurai, K. (2025). Filter-based optimized feature descriptors for detecting clinical mastitis in cattle using random forest classifier model. Agricultural Science Digest. doi: 10.18805/ ag.D-6273.

  6. Deenadayalan, N. (2025). Cattle Diseases Dataset [Data set]. Roboflow Universe. https://universe.roboflow.com/ niranjana-deenadayalan/cattle-diseases-thuhe.

  7. Dineva, K., and Atanasova, T. (2023). Health status classification for cows using machine learning and data management on AWS Cloud. Animals. 13(20): 3254. https://doi.org/ 10.3390/ani13203254.

  8. Durairaj, K., Dhilip Kumar, V. and Kanagachidambaresan, G.R. (2024). Identification of cow hoof disease in early stage using internet of things (IoT) and machine learning. International Journal of Intelligent Systems and Applications in Engineering. 12(11S): 685-693.

  9. Faraz, W. (2022). FMD Cattle Dataset [Data set]. Kaggle. https:// www.kaggle.com/datasets/wasimfaraz/fmd-cattle-dataset.

  10. Ganesh73005. (2024). Cow Dataset [Data set]. Roboflow Universe. https://universe.roboflow.com/ganesh73005/cow-kmqwy.

  11. Gupta, S., Kuehn, L.A. and Clawson, M.L. (2023). Early detection of infectious bovine keratoconjunctivitis with artificial intelligence. Veterinary Research. 54(1): 122. https:// doi.org/10.1186/s13567-023-01255-w.

  12. Kalkan, A., Tepeli, M. and Göde, A. (2025). Mastitis diagnosis with machine learning algorithms. Neural Computing and Applications. 37: 12351-12372. https://doi.org/10.1007/ s00521-025-11176-8.

  13. Kaur, D. and Virk, A K. (2025a). An IoT-driven hybrid AI model for health monitoring of cows. Discover Artificial Intelligence. 5: 346. https://doi.org/10.1007/s44163-025-00610-4.

  14. Kaur, D. and Virk, A.K. (2025b). Smart neck collar: IoT-based disease detection and health monitoring for dairy cows. Discover Internet of Things. 5: 12. https://doi.org/ 10.1007/s43926-025-00109-5.

  15. Kittichai, V., Kaewthamasorn, M., Arnuphaprasert, A., Jomtarak, R., Naing, K.M., Tongloy, T., Chuwongin, S. and Boonsang, S. (2025). A deep contrastive learning-based image retrieval system for automatic detection of infectious cattle diseases. Journal of Big Data. 12(1): 2. https:// doi.org/10.1186/s40537-024-01057-7.

  16. Kustiyahningsih, Y., Mula’ab, M., Nurhamidin, Q.A. and Purnama, J. (2021). Feature selection and k-nearest neighbor for diagnosis cow disease. International Journal of Science, Engineering and Information Technology. 5(2): 249-253.

  17. Li, Y., Shu, H., Bindelle, J., Xu, B., Zhang, W., Jin, Z., Guo, L. and Wang, W. (2022). Classification and analysis of multiple cattle unitary behaviors and movements based on machine learning methods. Animals. 12(9): 1060. https:// doi.org/10.3390/ani12091060.

  18. Narang, S.K., Arora, S. and Pathania, A. (2024). Data-Driven Early Detection of Livestock Diseases Using IoT-Enabled Smart Collars. In Artificial Intelligence and Internet of Things- Based Augmented Trends for Data-Driven Systems. CRC Press. (pp. 218-238).

  19. Riaboff, L., Poggi, S., Madouasse, A., Couvreur, S., Aubin, S., Bédère, N., Goumand, E., Chauvin, A. and Plantier, G. (2020). Development of a methodological framework for a robust prediction of the main behaviours of dairy cows using a combination of machine learning algorithms on accelerometer data. Computers and Electronics in Agriculture. 169: 105179. https://doi.org/10.1016/ j.compag.2019.105179.

  20. Shahab, H., Iqbal, M., Sohaib, A., Rehman, A. U., Bermak, A. and Munir, K. (2024). Design and implementation of an IoT- based monitoring system for early detection of lumpy skin disease in cattle. Smart Agricultural Technology. 9:  100609. https://doi.org/10.1016/j.atech.2024.100609.

  21. Syarif, I., Ahsan, A.S., Al Rasyid, M.U.H. and Pratama, Y.P. (2019). Health Monitoring and Early Diseases Detection on Dairy Cow Based on Internet of Things and intelligent system. In 2019 International Electronics Symposium (IES). IEEE. (pp. 183-188).

  22. Wagner, N., Antoine, V., Mialon, M.M., Lardy, R., Silberberg, M., Koko, J. and Veissier, I. (2020). Machine learning to detect behavioural anomalies in dairy cows under subacute ruminal acidosis. Computers and Electronics in Agriculture. 170: 105233. https://doi.org/10.1016/j.compag.2020.105233.

BovisTechNet: A Multimodal IoT-Enabled Framework for Cattle Disease Detection Using DINOv2 and Ensemble Learning

P
Pallavi Mangrulkar1,*
R
Rajiv Iyer1
1Amity School of Engineering and Technology, Amity University, Panvel, Mumbai-410 206, Maharashtra, India.

Background: Cattle diseases reduce productivity and compromise animal welfare. However, many existing monitoring systems depend on a single data source or target individual diseases.

Methods: BovisTechNet, a multimodal internet of things (IoT) framework, integrates six wearable-neckband measurements (body temperature, heart rate, blood oxygen saturation and three-axis acceleration) with pretrained DINOv2 ViT-B/14 visual embeddings extracted from five anatomical regions (eye, mouth, hoof, udder and skin). A soft-voting ensemble comprising seven classifiers (XGBoost, LightGBM, CatBoost, random forest, extra trees, K-nearest neighbours and bagging) was used to classify nine health conditions from 35,206 observations obtained from 200 cattle. Animal-level partitioning was used to prevent data leakage.

Result: On an independent test set of 60 animals and 10,529 observations, BovisTechNet achieved 97.25% accuracy, 97.41% precision, 97.25% recall, 97.29% F1-score and 99.92% ROC-AUC. Four-fold animal-grouped cross-validation yielded 95.61±3.49% accuracy. Multimodal fusion outperformed both the tabular-only (68.93%) and image-only models (92.50%).

Livestock Sector is the backbone of India’s rural economy and the welfare of farming households depends directly on the health of their cattle (Li et al., 2022; Shahab et al., 2024). Although diseases reduce milk yield and productivity, the main challenge remains early detection: continuous monitoring is limited and farmers ability to recognise early signs varies (Gupta et al., 2023; Syarif et al., 2019).
       
To address-these limitations, the study develops BovisTechNet, a multimodal IoT-based machine learning framework for early cattle disease detection. The framework integrates physiological measurements from a wearable neckband with visual information from multiple anatomical regions.
       
The proposed framework classifies nine cattle health conditions, namely, healthy, bovine keratoconjunctivitis, bovine spongiform encephalopathy, foot-and-mouth disease, johne’s disease, leptospirosis, lumpy skin disease, mastitis and ringworm.
       
Internet of things (IoT) sensors stream temperature, heart rate, oxygen saturation and activity wirelessly to cloud platforms for analysis (Chatterjee et al., 2021; Durairaj et al., 2024). Shahab et al., (2024) proposed an IoT system for early lumpy skin disease detection, while Syarif et al., (2019); Chatterjee et al., (2021); Narang et al., (2024) and Kaur and Virk (2025b) demonstrated wearable or collar-based monitoring with cloud analytics. These systems, however, rely mainly on sensor data and are limited to single diseases or threshold-based alerts. Machine learning has extended sensor-based assessment to behaviour classification and disease diagnosis (Dineva and Atanasova, 2023; Kalkan et al., 2025; Kustiyahningsih et al., 2021; Li et al., 2022; Riaboff et al., 2020; Wagner et al., 2020), whereas image-based approaches have addressed individual conditions such as infectious bovine keratoconjunctivitis (Gupta et al., 2023) and infectious cattle diseases through image retrieval (Kittichai et al., 2025). A recent hybrid IoT model combining-synthetic minority oversampling technique (SMOTE), gradient boosting and long short-term memory reached 93.56% accuracy but only 77.77% recall (Kaur and Virk, 2025a). Overall, the studies reviewed above focus on a single modality or a single disease, which is insufficient for farms where several conditions with overlapping signs may occur. Few studies combine wearable physiological signals with multi-region images under animal-level validation. This study therefore presents BovisTechNet, a multimodal IoT and machine-learning framework that fuses wearable-sensor data with visual features from five anatomical regions to classify nine health conditions: Healthy, bovine keratoconjunctivitis (BKC), bovine spongiform encephalopathy (BSE), foot-and-mouth disease (FMD), johne’s disease (JD), leptospirosis (Lepto), lumpy skin disease (LSD) (Bhavani 2026), mastitis and ringworm. Sensors capture physiological and behavioural change -for example, raised temperature in FMD, LSD and mastitis, or irregular movement in BSE, whereas images capture visible signs such as ocular changes in BKC, mouth and hoof in FMD, udder in mastitis, skin in LSD (AlZubi, 2024) and ringworm. BovisTechNet uses YOLOv8l-OBB to localise the body regions and DINOv2 to extract visual features, the fused sensor and image features are then classified using a soft-voting ensemble. The objectives of this study are to (i) develop a fused sensor-image classifier using a diverse soft-voting ensemble; (ii) evaluate its performance using animal-level splitting and grouped cross-validation to prevent data leakage; (iii) quantify the contribution of each modality through ablation analysis and (iv) demonstrate deployment through region localisation and automated alerts. Ensemble learning combines the predictions of several models to improve robustness. Because cattle diseases may present with overlapping symptoms and since sensor and image data contain noise and inter-animal variability, individual models may produce inconsistent predictions. BovisTechNet therefore combines boosting (XGBoost, LightGBM, CatBoost), bagging-based (Random forest Chengathir et al., (2025), extra trees, bagging) and instance-based (KNN) learners through soft voting, thereby reducing dependence on the limitations of any single model (Dineva and Atanasova, 2023; Kaur and Virk, 2025b).
The BovisTechNet pipeline (Fig 1) combines wearable-sensor data and multi-region images into a single multimodal feature vector, classifies the fused representation using an ensemble model, validates performance through animal-grouped splitting and deploys the system as a web service with automated alerts.

Fig 1: BovisTechNet system architecture, spanning data acquisition, feature extraction and fusion, data-integrity safeguards, ensemble classification, validation and deployment.


 
Animals and sensor-based data collection
 
Sensor data were collected from 200 Jersey cows on a cattle farm in Karjat, Maharashtra, India using wearable neckbands (Fig 2). The neckbands non-invasively record body temperature (DS18B20), heart rate and blood oxygen saturation (SpO2) (MAX30102) and three-axis acceleration (ADXL345). An ESP32 DevKit V1 microcontroller transmits readings to a cloud platform every 15 s, linked to the cow identity so that every record can be assigned to a single data partition, where the data are stored for processing and analysis. The DS18B20 monitored fever-related change, the MAX30102 provided heart rate and oxygen saturation and the ADXL345 captured activity patterns. The device was powered by a 400-mAh rechargeable battery and is housed in a lightweight PLA enclosure secured by a rubber strap.

​

Fig 2: Data collection using wearable neckband device.



Image data collection
 
Images of five anatomical regions (eye, mouth, hoof, udder and skin) (Fig 3), each showing disease-specific signs for at least one target class, were obtained from two sources, images captured on the study farm and at the Karjat veterinary polyclinic and images from open datasets (Agarwal, 2022; Faraz, 2022; Deenadayalan, 2025; Ganesh73005, 2024) for conditions not present in the herd during data collection. All images were manually reviewed and labelled by disease class. The images were captured from the same animals at the time of the sensor recordings; sensor records and images were therefore linked by timestamps. For each record, one image per anatomical region taken; the training source images were further divided among the four cross-validation folds in. Within each partition, every record slot received a unique image instance, so that no image is used in more than one record. The resulting multimodal dataset comprises 35,206 records from 200 animals with 176,030 unique image instances; images from all sources were used in both the training and the test partition, but no source image was shared between them (Table 1).

Table 1: Distinct source images per health class and anatomical region and their allocation to the training and test partitions. Each of the 35,206 records received a unique image instance per region (176,030 instances in total).



Fig 3: Representative lesion images of the cattle health conditions: Lumpy skin disease (LSD), bovine keratoconjunctivitis (BKC), foot-and-mouth disease (FMD), mastitis, ringworm, johne’s disease, leptospirosis and bovine spongiform encephalopathy (BSE).


 
Data pre-processing
 
Sensor readings were pre-processed to remove noise, handle missing values and normalize feature ranges. Implausible values caused by sensor noise or neckband detachment were clipped to valid ranges, missing values were mean-imputed after numeric coercion and all six parameters (temperature, heart rate, SpO2 and three acceleration axes) were standardized to zero mean and unit variance (Eq. (1)). A scikit-learn Pipeline (Imputer ® standard scaler® classifier) was fitted exclusively on training data within each split and cross-validation fold, with learned imputation and scaling parameters applied unchanged to validation and test data. No categorical encoding was required. The feature order was fixed as [temperature, heart rate, SpO2, accel-X, accel-Y, accel-Z], followed by 3,840 DINOv2 dimensions.
 
 
 
Here,
x= The original feature value.
μ= The mean of the feature calculated from the training data.
σ= Its standard deviation.
       
Eq. (1) therefore converts each feature to a standardized scale with zero mean and unit variance, allowing variables with different measurement ranges to be processed consistently by the machine-learning models.
 
Image feature extraction using DINOv2
 
Each of the five body-region images was processed using a pretrained DINOv2 ViT-B/14 model on two GPUs. Contrast-limited adaptive histogram equalisation (CLAHE) was applied to eye, mouth, leg, udder and skin images, followed by aspect-ratio-preserving resizing to 518 x 518 pixels and ImageNet normalization. Feature extraction was performed using mixed (fp16) precision, producing a 768-dimensional embedding for each region. The five embeddings were concatenated to form a 3,840-dimensional visual feature vector (Eq. 2) for multimodal fusion and classification, replacing the earlier fixed-resolution feature extractor.
 
ximg = [feye ||  fmouth  || fhoof ||  fudder ||   fskin ]  ∈ R5x768  = R3840
               
 
Where,
fr∈ R768= The 768-dimensional DINOv2 ViT-B/14 embedding of anatomical region r ∈ {eye, mouth, hoof, udder, skin}. 
  = Vector concatenation.
ximg= The resulting 3,840-dimensional visual feature vector.
 
Multimodal feature fusion
 
The six standardized tabular sensor features and the 3,840-dimensional image feature vector were concatenated into a single fused representation for each animal-observation given by Eq. (3).
                                x = [xtab ||  ximg] ∈ R6+3840 = R3846                             
 
Where,
xtab ∈ R6= The vector of the six standardized sensor features [temperature, heart rate, SpO2, accel-X, accel-Y, accel-Z] obtained with Eq. (1).
ximg= The visual feature vector from Eq. (2).
x∈R3846= The fused input vector passed to the ensemble classifier.
 
Leakage prevention and class balancing
 
The dataset was partitioned at animal level using GroupShuffleSplit based on cow identity: 140 animals (24,677 records) for training and 60 animals (10,529 records) to independent testing, with zero animal overlap verified. Splitting by animal, rather than by individual record, is important because repeated observations from the same cow are highly correlated; a record-level split would place near-duplicate observations in both training and test sets and inflate performance. Five label-derived indicator columns were removed and a test-set sizing error caused by a redundant validation split was corrected, consequently all reported results use the full 10,529-record test set.
       
The training set was mildly imbalanced (2,495-2,846 records per class; maximum/minimum ratio 1.14). A custom implementation of the Synthetic Minority Over-sampling Technique (SMOTE; k = 5) was applied to the training partition only, increasing every class to 2,846 records (25,614 in total) without altering the class distribution of the test set, where class counts ranged from 1,066 to 1,282 records. A four-fold cross-validation was performed on the training pool with predefined folds: the 140 training animals were assigned to four folds of 35 animals, each paired only with its own set of source images, so that neither animals nor source images are shared between the training and validation data of any fold; SMOTE was reapplied within each fold.
 
Ensemble classifier and baselines
 
BovisTechNet is a seven-member soft-voting ensemble comprising three gradient-boosting learners (XGBoost, LightGBM, CatBoost), two bagging-based tree ensembles (Random Forest, Extra Trees), K-Nearest Neighbours (KNN) and a general Bagging meta-estimator. The ensemble members used the following settings: XGBoost (200 trees, maximum depth 6, learning rate 0.1, row and column subsampling 0.8 and 0.5, L2 penalty 1, GPU-accelerated); LightGBM (200 trees, 31 leaves, learning rate 0.1, minimum 20 samples per leaf, row and column subsampling 0.8 and 0.5, L2 penalty 1); CatBoost (300 iterations, depth 6, learning rate 0.1, L2 leaf regularisation 3, Bernoulli subsampling 0.8, GPU-accelerated); Random Forest (200 trees, maximum depth 16, square-root feature sampling, GPU-accelerated); Extra Trees (200 fully grown trees, square-root feature sampling); KNN (k = 7, GPU-accelerated); and Bagging (10 decision-tree estimators, bootstrap sampling, 70% of features). Each learner produced a probability vector over the nine classes, allowing diverse learning strategies contribute to the final decision while ensuring that no learner received greater influence than another. The prediction is the class with the highest mean probability under equal weights (1/7, about 14.29% each) (Eq. 4). Equal weights were selected to maintain balanced contributions from all seven classifiers and avoid over-reliance on any individual learner. This approach also avoids introducing additional parameters through weight optimisation, which could increase the risk of overfitting, particularly given the limited number of independent animals.
       
Each base learner was also trained alone on the same SMOTE-balanced data as a baseline (Table 2), using compact, strongly regularised configurations: XGBoost (8 trees, depth 2, L1 and L2 penalties of 80, subsample 0.3); LightGBM (8 trees, depth 2, 3 leaves, penalties of 60); CatBoost (10 trees, depth 3, L2 leaf regularisation 50, GPU-accelerated); Random Forest (20 trees, depth 4, GPU-accelerated); Extra Trees (20 trees, depth 4, minimum leaf size 5); KNN (k = 15, GPU-accelerated) and Bagging (2 estimators, bootstrap sampling, 70% of features). The baselines therefore differ from the ensemble members in model capacity as well as in voting.

Table 2: Comparison of BovisTechNet with individual base learners on the independent test set (n = 10,529).

        ŷ = arg max i ΣM = 1 WmFm (Classi | x) m = 1,…,7     
 
Modality ablation study
 
Tabular-only features reached 68.93% test accuracy, image-only features reached 92.50% and the fused representation reached 97.25%, confirming image features were the dominant modality while fusion still provided a substantial additional improvement. Sensor data alone performed relatively well for the Healthy class (recall = 0.858) but poorly for lumpy skin disease (0.427) and mastitis (0.568). Image features recover most of this performance gap (0.868 and 0.973, respectively) and fusion increased both above 0.97. Fusion also produced marked gain for the healthy class (0.955 vs 0.717) and bovine keratoconjunctivitis (0.970 vs 0.882) relative to image-only features, whereas recall for BSE, Ringworm and Johne’s disease was similar with and without sensor features (0.963 vs 0.963, 0.956 vs 0.956 and 0.945 vs 0.956) (Fig 4).

Fig 4: Per-class test recall across the tabular-only, image-only and fused feature settings.


 
Region localisation and deployment
 
A YOLOv8l-OBB (oriented bounding box) detector was fine-tuned to localise the eye, mouth, hoof, udder and skin regions, which were subsequently cropped and passed to the DINOv2 extractor. Training used 7,600 annotated images, with 558 images reserved for validation (8,158 in total), 640 × 640 inputs, a batch size 16 and up to 50 epochs. Early stopping terminated training at epoch 32 and the epoch-27 checkpoint was retained. The validated ensemble was deployed as a Flask web service with a companion vision service (YOLOv8l-OBB and DINOv2) and a threshold-based alert system notifies farm staff of abnormal sensor readings. Performance was assessed on the held-out test set using accuracy, support-weighted precision, recall and F1-score, ROC-AUC and macro-averaged one-vs-rest specificity and false-positive rate (FPR). Support-weighted recall equals accuracy by construction and the per-class report additionally gives macro averages. Uncertainty in test-set performance was quantified with an animal-level bootstrap (1,000 resamples of the test animals, percentile 95% CIs) and paired differences between feature settings were tested with McNemar’s test on the same test records.
Overall performance and baseline comparison
 
On the independent test set of 10,529-records, BovisTechNet achieved 97.25% accuracy, 97.41% precision, 97.25% recall, 97.29% F1-score and 99.92% ROC-AUC, with a macro specificity of 99.66% (FPR 0.34%). This low false-positive rate matters on farms because frequent unnecessary alerts reduce trust in a monitoring system. Table 2 compares it with each base learner trained on the same data. The ensemble outperformed every individual learner: the strongest, XGBoost (83.56%), trailed by 13.69 percentage points and the weakest, CatBoost (61.08%), by 36.17 points. Even the three boosting learners differed widely (XGBoost 83.56%, LightGBM 80.91%, CatBoost 61.08%), so the settings of each learner strongly affected single-model performance. The main benefit of soft voting in this setting is therefore robustness across model families rather than a large gain over the strongest member.
 
Cross-validation
 
Four-fold animal-grouped cross-validation produced a mean accuracy of 95.61±3.49% (fold range 89.91-98.60%) and a mean ROC-AUC of 0.9980±0.0017 (Table 3); ROC-AUC remained at or above 0.995 in every fold. Because each fold has its own animals and its own source images, the spread across folds reflects how well the images of each fold represent their classes. The slightly lower cross-validated accuracy, compared with the test-set accuracy of 97.25%, is plausibly explained by the smaller number of animals and source images available for training in each fold.

Table 3: 4-fold cross-validation of BovisTechNet on the 140 training animals (35 animals per fold for validation).


 
Per-class performance
 
Leptospirosis was classified perfectly and FMD was classified almost perfectly (Table 4). The lowest recall was for johne’s disease (0.945), where 47 of 1,183 records were assigned to BSE and BSE had the lowest precision (0.869) because it absorbed misclassified records from several classes. The normalised confusion matrix (Fig 5) shows a strong diagonal pattern, indicating good classification performance across the nine cattle health classes. The main misclassifications involved Ringworm (49), Johne’s disease (47) and BKC (26) records predicted as BSE and BSE (39) and Healthy (24) records predicted as BKC; Healthy records were also predicted as BSE (23). These results indicate that the model has most difficulty separating BSE from BKC and from the skin-related classes.

Table 4: Per-class classification report for BovisTechNet on the test set (n = 10,529).



Fig 5: Normalized confusion matrix for BovisTechNet, on the held-out test set (n = 10,529), annotated with counts and row-normalized percentages.


 
Modality ablation
 
Tabular-only features reached 68.93% test accuracy, well above the roughly 11% expected by chance for nine near-balanced classes, whereas image-only features achieved 92.50% and fused features achieved 97.25%. Images were therefore the dominant modality, but fusion added a further 4.75 percentage points over image-only and 28.31 percentage points over tabular-only features, supporting the complementary contribution of physiological signals. This pattern is consistent with the clinical rationale described in the Introduction: several of the target diseases share fever or systemic responses that sensors record but cannot distinguish, whereas images reveal localised lesions in the eye, mouth, hoof, udder and skin that help differentiate the conditions. Fusing both data sources therefore provided the classifiers with complementary information. The large accuracy gap between tabular-only and fused models  also indicates that a sensor-only system, as used in  many earlier IoT-based approaches, would be insufficient for nine-class diagnosis. Image features therefore dominated overall performance and the sensor-only model was substantially weaker; the 97.25% accuracy of BovisTechNet should be interpreted in this context, as it is driven primarily by the visual modality, with the sensor data contributing a smaller, complementary gain. To quantify uncertainty, 95% confidence intervals (CIs) were estimated with an animal-level bootstrap (1,000 resamples of the 60 test animals): test accuracy was 97.25% (95% CI 96.94-97.53%) for the fused model, 92.50% (92.00-92.99%) for the image-only model and 68.93% (68.06-69.74%) for the sensor-only model. The paired improvement of the fused model over the image-only model (4.75 percentage points) had a 95% CI of 4.30-5.19 percentage points and no bootstrap resample showed a difference of zero or less (p<0.001). McNemar’s test on the same 10,529 test records confirmed this difference: 554 records were classified correctly only by the fused model and 54 only by the image-only model (χ² = 409.54, p<0.001). The improvement over the sensor-only model was 28.31 percentage points (95% CI 27.43–29.28; McNemar χ² = 2,693.48, p<0.001) (Table 5).

Table 5: Test accuracy of each feature setting and paired differences, with animal-level bootstrap 95% confidence intervals (1,000 resamples of the 60 test animals) and McNemar’s test (n = 10,529; pp = percentage points).


 
Region localisation
 
Table 6 shows the YOLOv8l-OBB validation performance-Best vs. Final epoch validation. YOLOv8l-OBB detector exhibited stable training behaviour over 32 epochs, with the box loss, classification loss, distribution focal loss and angle loss, all exhibiting a decreasing trend. The best validation performance occurred at epoch 27, with a precision of 96.8%, recall of 97.5%, mAP@50 of 99.0% and mAP@50-95 of 74.1%. At the final epoch (32), the corresponding values were 92.75%, 95.79%, 97.27% and 73.87%, respectively. The epoch-27 checkpoint was selected for deployment because of its superior validation performance. Accurate localisation is important because the subsequent classification pipeline depends on correctly identified anatomical regions. Automating region localisation also reduces the need for manual image cropping.

Table 6: YOLOv8l-OBB validation performance-best vs. final epoch validation.


       
The use of equal-weight soft voting allowed the seven classifiers to contribute equally to the final prediction, reducing dependence on the performance of any single learner. This approach was selected to avoid additional weight-optimisation parameters that could increase the risk of overfitting. However, the present study did not compare equal-weight voting with optimised weighted voting or stacking. Such comparisons could help determine whether alternative ensemble configurations offer further improvements and should be investigated in future studies.
Despite the promising performance of BovisTechNet, several limitations remain. First, the framework was evaluated primarily on Jersey cattle in Maharashtra, India and therefore requires validation across diverse breeds, regions, climatic conditions and farming systems. Second, the wearable neckband may be affected by battery limitations, sensor displacement, physical damage and environmental exposure during long-term use. Although pre-processing procedure addresses moderate noise and missing values, severe sensor failures may cause unrecoverable data loss. Third, the computational requirements of DINOv2 and YOLOv8l-OBB may limit deployment on resource-constrained devices, while variations in image quality, lighting and background conditions may affect classification performance. Finally, the ensemble model offers limited interpretability at the level of individual predictions. Future work should focus on diverse field settings, long-term hardware reliability, computational optimization and explainable artificial intelligence (AI) techniques such as shapley additive explanations (SHAP) and local interpretable model agnostic explanation (LIME) to identify features influencing disease predictions.
Future studies can evaluate the framework across multiple farms, breeds, environmental conditions and longer monitoring periods while also investigating lightweight models suitable for edge-deployment. The framework could also be adapted to other livestock species, such as buffalo, sheep, goats and poultry, by retraining the models with species-specific physiological and behavioural data. In addition, the current machine-learning framework could be enhanced by exploring advanced deep learning and hybrid algorithms, as well as explainable artificial intelligence techniques.
This study presents BovisTechNet, a multimodal IoT and machine-learning framework that combines wearable-sensor measurements with DINOv2 visual embeddings from five anatomical regions to classify nine cattle health conditions. Using animal-level partitioning, the framework achieved 97.25% test accuracy and 99.92% ROC-AUC, while four-fold grouped cross-validation yielded 95.61± 3.49% accuracy. Modality ablation showed that combining sensor and image features outperformed either modality alone. The framework was demonstrated through a Flask-based inference service, anatomical-region localisation and sensor-threshold alerts. Additional assessment across various farms, breeds and environmental conditions is necessary to determine its applicability and practical suitability.
We would like to express our sincere gratitude to Amity University Mumbai for providing the infrastructure and academic support necessary for this research. We also extend our heartfelt thanks to the Assistant Commissioner of Animal Husbandry, Taluka Mini Veterinary Polyclinic, Karjat, Raigad District, for their valuable cooperation and assistance in field-level insights and data collection.
 
Author contributions
 
Pallavi Mangrulkar: Conceptualization, Methodology, Investigation, Formal analysis, Data curation, Writing-original draft. Rajiv Iyer: Conceptualization, Supervision, Writing-review and editing.
 
Ethical statement
 
This study involved non-invasive monitoring of dairy cattle using an externally worn sensor neckband and photography of external body regions. No animals were subjected to invasive procedures, pain, or experimental treatment beyond routine, non-intrusive observation and normal husbandry practices were maintained throughout data collection.
 
Funding declaration
 
This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.
 
Data availability statement
 
The data that support the findings of this study are available from the corresponding author upon reasonable request.
 
Use of generative artificial intelligence
 
The authors used AI-assisted tools to support data analysis, language editing and manuscript drafting; all scientific content, results and conclusions were reviewed and verified by the authors.
The authors declare that they have no conflicts of interest regarding the publication of this manuscript. All authors have approved the final version of the manuscript and agree with its submission for publication. No financial or personal relationships have influenced the research or its findings.

  1. Agarwal, S. (2022). Cow Lumpy Disease Dataset [Data set]. Kaggle. https://www.kaggle.com/datasets/shivamagarwal29/ cow-lumpy-disease-dataset.

  2. AlZubi, A.A. (2024). Lumpy skin disease detection in cattle by a robust approach using advanced convolutional neural networks. Indian Journal of Animal Research. 58(12): 2146-2153. doi: 10.18805/IJAR.BF-1793.

  3. Bhavani, R. (2026). A hybrid deep learning model based smart identification of lumpy skin disease in cattle. Indian Journal of Animal Research. doi: 10.18805/IJAR.B-5927.

  4. Chatterjee, P.S., Ray, N.K. and Mohanty, S.P. (2021). LiveCare: An IoT-based healthcare framework for livestock in smart agriculture. IEEE Transactions on Consumer Electronics. 67(4): 257-265. https://doi.org/10.1109/TCE.2021.3128236.

  5. Chengathir, S.M., Swarnaa, M., Veena, S.T. and Kanagarajadurai, K. (2025). Filter-based optimized feature descriptors for detecting clinical mastitis in cattle using random forest classifier model. Agricultural Science Digest. doi: 10.18805/ ag.D-6273.

  6. Deenadayalan, N. (2025). Cattle Diseases Dataset [Data set]. Roboflow Universe. https://universe.roboflow.com/ niranjana-deenadayalan/cattle-diseases-thuhe.

  7. Dineva, K., and Atanasova, T. (2023). Health status classification for cows using machine learning and data management on AWS Cloud. Animals. 13(20): 3254. https://doi.org/ 10.3390/ani13203254.

  8. Durairaj, K., Dhilip Kumar, V. and Kanagachidambaresan, G.R. (2024). Identification of cow hoof disease in early stage using internet of things (IoT) and machine learning. International Journal of Intelligent Systems and Applications in Engineering. 12(11S): 685-693.

  9. Faraz, W. (2022). FMD Cattle Dataset [Data set]. Kaggle. https:// www.kaggle.com/datasets/wasimfaraz/fmd-cattle-dataset.

  10. Ganesh73005. (2024). Cow Dataset [Data set]. Roboflow Universe. https://universe.roboflow.com/ganesh73005/cow-kmqwy.

  11. Gupta, S., Kuehn, L.A. and Clawson, M.L. (2023). Early detection of infectious bovine keratoconjunctivitis with artificial intelligence. Veterinary Research. 54(1): 122. https:// doi.org/10.1186/s13567-023-01255-w.

  12. Kalkan, A., Tepeli, M. and Göde, A. (2025). Mastitis diagnosis with machine learning algorithms. Neural Computing and Applications. 37: 12351-12372. https://doi.org/10.1007/ s00521-025-11176-8.

  13. Kaur, D. and Virk, A K. (2025a). An IoT-driven hybrid AI model for health monitoring of cows. Discover Artificial Intelligence. 5: 346. https://doi.org/10.1007/s44163-025-00610-4.

  14. Kaur, D. and Virk, A.K. (2025b). Smart neck collar: IoT-based disease detection and health monitoring for dairy cows. Discover Internet of Things. 5: 12. https://doi.org/ 10.1007/s43926-025-00109-5.

  15. Kittichai, V., Kaewthamasorn, M., Arnuphaprasert, A., Jomtarak, R., Naing, K.M., Tongloy, T., Chuwongin, S. and Boonsang, S. (2025). A deep contrastive learning-based image retrieval system for automatic detection of infectious cattle diseases. Journal of Big Data. 12(1): 2. https:// doi.org/10.1186/s40537-024-01057-7.

  16. Kustiyahningsih, Y., Mula’ab, M., Nurhamidin, Q.A. and Purnama, J. (2021). Feature selection and k-nearest neighbor for diagnosis cow disease. International Journal of Science, Engineering and Information Technology. 5(2): 249-253.

  17. Li, Y., Shu, H., Bindelle, J., Xu, B., Zhang, W., Jin, Z., Guo, L. and Wang, W. (2022). Classification and analysis of multiple cattle unitary behaviors and movements based on machine learning methods. Animals. 12(9): 1060. https:// doi.org/10.3390/ani12091060.

  18. Narang, S.K., Arora, S. and Pathania, A. (2024). Data-Driven Early Detection of Livestock Diseases Using IoT-Enabled Smart Collars. In Artificial Intelligence and Internet of Things- Based Augmented Trends for Data-Driven Systems. CRC Press. (pp. 218-238).

  19. Riaboff, L., Poggi, S., Madouasse, A., Couvreur, S., Aubin, S., Bédère, N., Goumand, E., Chauvin, A. and Plantier, G. (2020). Development of a methodological framework for a robust prediction of the main behaviours of dairy cows using a combination of machine learning algorithms on accelerometer data. Computers and Electronics in Agriculture. 169: 105179. https://doi.org/10.1016/ j.compag.2019.105179.

  20. Shahab, H., Iqbal, M., Sohaib, A., Rehman, A. U., Bermak, A. and Munir, K. (2024). Design and implementation of an IoT- based monitoring system for early detection of lumpy skin disease in cattle. Smart Agricultural Technology. 9:  100609. https://doi.org/10.1016/j.atech.2024.100609.

  21. Syarif, I., Ahsan, A.S., Al Rasyid, M.U.H. and Pratama, Y.P. (2019). Health Monitoring and Early Diseases Detection on Dairy Cow Based on Internet of Things and intelligent system. In 2019 International Electronics Symposium (IES). IEEE. (pp. 183-188).

  22. Wagner, N., Antoine, V., Mialon, M.M., Lardy, R., Silberberg, M., Koko, J. and Veissier, I. (2020). Machine learning to detect behavioural anomalies in dairy cows under subacute ruminal acidosis. Computers and Electronics in Agriculture. 170: 105233. https://doi.org/10.1016/j.compag.2020.105233.
In this Article
Published In
Indian Journal of Animal Research

Editorial Board

View all (0)