Swin-Base Transformer with Progressive Fine-Tuning and Test-Time Augmentation for Accurate Lumpy Skin Disease Detection in Cattle

    DOI: https://doie.org/10.10399/JBSE.2026419826

    Nishant Keshri, Aditi Sharma, Divyanshu Chauhan


    Keywords:

    Lumpy Skin Disease, Swin Transformer, Transfer Learning, Deep Learning, Cattle Disease Detection, Test-Time Augmentation, Veterinary Diagnostics.


    Abstract:

    Lumpy is a contagious viral disease that affects cattle globally and, thus, causes significant financial loss ($2.4bn) globally. During 2022-2023, the loss for India itself is expected to be more than $2.4bn. Traditional methods for the diagnosis of Lumpy Skin Disease (LSD) rely on visual examination and laboratory tests which are time-consuming; subjective; or not easily accessible to rural communities. Because of this it is imperative that we develop an automated, accurate image based solution for diagnosing LSD in cattle. This paper proposes an image diagnostic framework that is based on a deep learning model known as Swin-Base Transformer that has been pretrained using weights from ImageNet-21K, and has been trained on a dataset comprised of 3,522 images of cattle skins (1,531 images of LSD affected cattle and 1,991 images of healthy cattle) collected from two Kaggle datasets. The proposed model is trained using a two-phase fine-tuning strategy, including different differential learning rates on a layer-by-layer basis, AdamW optimiser, cosine annealing learning rate scheduling, MixUp/CutMix regularizes and weighted cross entropy loss with label smoothing and 4×Test-Time Augmentation ensemble inference to maximise generalisation. The proposed framework has achieved an overall accuracy of 97.92% across both the training and testing datasets, as well as very good values for precision, recall, and F1-score. The confusion matrix analysis indicates that the model has very low misclassification rates between the healthy and infected classes. A ROC curve and Precision-Recall curve indicate that the model has excellent discriminative ability against the two classes (healthy and infected). Hence, the proposed model shows promise for providing accurate and reliable assistance to veterinarians in the field when diagnosing LSD in cattle.


    PDF

Indexed By