Dual Path Attention Fusion Network for Automated Lumpy Skin Disease Detection

S
Satish Singh Verma1,*
H
Harsh Dev1
A
Anurag Tiwari2
1Department of Computer Science and Engineering, Babu Banarasi Das University, Lucknow-226 028, Uttar Pradesh, India.
2Department of Computer Science and Engineering, Babu Banarasi Das Institute of Technology and Management, Lucknow-226 028, Uttar Pradesh, India.
Background: Lumpy skin disease (LSD) is still a big threat to animal health and it results in heavy losses in the farming industry. In general, deep learning, based image analysis for automated disease screening has achieved quite promising outcomes. However, a lot of them are only based on single, backbone models or simply combine features in a straightforward manner, which could restrict representational diversity and model generalization.

Methods: This study develops a dual-path attention fusion network (DPAF-Net) to detect LSD automatically from images of cattle. In order to extract complementary feature representations, the framework uses two convolutional backbones that are integrated via channel attention and an adaptive gating mechanism. Frames taken from real field-condition videos were combined with publicly accessible image datasets to create a multi-source dataset. Strict video-level splitting was carried out before frame extraction in order to preserve evaluation integrity and duplicate and nearly duplicate samples were eliminated. Leading high-accuracy models from earlier research were re-implemented and assessed under the same experimental conditions to ensure fair evaluation.

Result: On the test dataset, the suggested DPAF-Net obtained an accuracy of 98.98% and a recall of 99.27%. While maintaining strong overall classification performance, the high recall value indicates improved sensitivity in identifying infected cattle.
Cattle can contract lumpy skin disease (LSD), a highly contagious viral illness that causes skin nodules, fever, reduced milk production and large financial losses for the livestock sector. LSD is a transboundary animal disease that has presented a significant obstacle to veterinary health infrastructure in a number of areas (Choudhari et al., 2020). Controlling the disease and reducing financial losses depend on the early identification of infected animals and their isolation.
       
Conventional diagnosis relies mostly on skilled veterinarians’ visual observations supported by laboratory testing such as PCR, ELISA and serological assays (Choudhari et al., 2020). Despite its effectiveness, this method can be time-consuming, arbitrary and less useful in rural or large-scale environments. Computer-assisted image analysis has become a feasible substitute for automated disease screening due to the growing accessibility of digital imaging technology (Saqib et al., 2024; Alam et al., 2025; Patil et al., 2025). Recent studies have also demonstrated the effectiveness of AI-driven approaches in veterinary disease diagnosis, highlighting improved accuracy and efficiency in detecting conditions such as lumpy skin disease (Alkhanifer and AlZubi, 2025).
       
Automated disease classification has greatly improved with the advent of machine learning and deep learning algorithms. Using manually created features, early research on LSD detection relied on conventional machine learning models like Random Forest and Support Vector Machines (Ujjwal et al., 2022; Kumar et al., 2023; Olaniyan et al., 2023; Patil et al., 2023). Although moderate results were obtained, these methods’ reliance on manually created descriptors made them susceptible to changes in lesion patterns, lighting and environmental complexity. According to Pal et al., (2024), the feature design continued to have a significant impact on classification accuracy.
       
A significant breakthrough in image-based LSD detection was made possible by the introduction of convolutional neural networks (CNNs). Deep CNN models have been used in a number of recent studies to distinguish between images of healthy and infected (Patil et al., 2024; Senthilkumar et al., 2024; Shakeel et al., 2024; Velugoti et al., 2024). CNN-based approaches enable automatic extraction of discriminative features from images and improve early disease detection accuracy (AlZubi, 2024). In addition, efficient deep learning architectures such as MobileNetV3 have been proposed to achieve high accuracy with reduced computational complexity, making them suitable for real-world and resource-constrained applications (Howard et al., 2019). Girmaw (2025) used EfficientNet architectures inspired by compound scaling principles (Tan and Le, 2019) to achieve high classification accuracy, while Shakeel et al., (2024) showed effective early detection using CNN models. CNN-based methods for severity-level detection were investigated in other studies, such as Narayan et al., (2023) and Kumar et al., (2024).
       
Hybrid and feature fusion approaches have also been investigated in addition to single-backbone architectures. A deep feature fusion framework that combines multiple CNN backbones, dimensionality reduction and classification was proposed by Raj et al., (2023). Similar research has been done on ensemble learning techniques to increase robustness (Ananda and Prasanna-Kumar, 2025; Khaskheli et al., 2025). The majority of these techniques relied on ensemble averaging or static concatenation, where feature contributions were not adaptively weighted, even though they occasionally improved discriminative performance.
       
Modern image classification systems have been impacted by recent architectural developments such as transformer-based feature representations (Dosovitskiy et al., 2021), compound scaling models like EfficientNet (Tan and Le, 2019) and residual learning (He et al., 2016). Lightweight and efficient model designs have also been explored to balance accuracy and computational cost, particularly for deployment in practical environments (Un et al., 2019). Interpretability and feature focus have been further enhanced by attention mechanisms and gradient-based localization methods like Grad-CAM (Selvaraju et al., 2019). However, the majority of LSD detection models currently in use do not specifically incorporate adaptive attention-driven fusion mechanisms; instead, they rely on simple feature concatenation or single CNN backbones.
       
The main limitations of existing approaches include lack of hierarchical modeling in classical methods, architectural bias in single-backbone CNNs, reliance on static fusion strategies and limited focus on reducing false negatives.
       
In order to solve these problems, this work presents a Dual-Path Attention Fusion Network (DPAF-Net) for LSD image classification. The suggested model combines complementary deep features from two convolutional backbones through channel attention and gated adaptive fusion, allowing the dynamic weighting of features and the identification of different lesions to be more accurate thus lowering misclassification.
This study was carried out at Babu Banarasi Das University, Lucknow, India. The experimental work and model development were conducted during the period July 2025 -February 2026.

Proposed methodology
 
Existing LSD detection systems based on single-backbone CNN architectures (Shakeel et al., 2024; Girmaw, 2025) have demonstrated promising performance; however, their representational capacity remains limited by architectural bias. Similarly, most feature fusion strategies rely on static concatenation or ensemble averaging (Raj et al., 2023; Khaskheli et al., 2025), without adaptively adjusting feature contributions during inference.
       
In order to overcome these shortcomings, a dual-path attention fusion network (DPAF-Net) is introduced for the automatic LSD image classification. The design includes two parallel convolutional backbones that extract complementary feature representations and combine them via channel attention and gated adaptive fusion. The entire setup is depicted in Fig 1.

Fig 1: Architecture of the proposed dual-path attention fusion network (DPAF-Net) for binary LSD classification.


 
Dual-path feature extraction
 
Let the input image be denoted as:
 
I ∈ RH × W × 3
 
Where H = W = 224.
Two parallel convolutional backbones are employed:
• An EfficientNet-B4-inspired branch.
• A ConvNeXt-Tiny-inspired branch.
       
The extracted feature representations are defined as:
 
F1 = f1 (I)
 
F2 = f1 (I)
 
Where,
 
F1 ∈ Rd1
 
F2 ∈ Rd2
 
In the above equations, f1(•) and f2(•) represent the nonlinear feature extraction functions realized by the two convolutional backbones.
 
Channel attention mechanism
 
To highlight the relevant feature channels and downplay the background information, channel attention is applied separately to each feature vector.
       
For each feature vector Fi (i = 1, 2), attention weights are computed as:
 
Ai = Sigmoid [W2 • ReLU (W1 • Fi)]
 
The refined feature representation is then computed as:

 
Gated adaptive feature fusion
 
Unlike the static concatenation methods (Raj et al., 2023),  which just line up features, the new framework builds in a gating component that is learnable and works for adaptive feature fusion.
       
Initially, the features that are attended to are concatenated:
 
 
Where,
 
Fconcat = ∈ Rd1 + d2
A gating vector is computed as:
 
G = Sigmoid (Wg · F_concat).
 
The fused representation is obtained as:
 
F_fused = F_concat    G.
 
Classification head
 
The combined feature vector goes through a fully connected classification layer:
 
Z = Wc . F_fused + b
 
For a binary classification (Healthy vs. Lumpy), the predicted probability of the positive class is obtained through the sigmoid function:
 
pi = Sigmoid (Zi)
 
Binary cross-entropy loss
 
Since the task is binary, the model is trained using Binary Cross Entropy (BCE) loss:
 
L =  - (1/N) Σ-{i = 1 to N} [yi log (pi) + (1 - yi) log (1 - pi)]
 
Where,
yi ∈ {0,1}= The ground-truth label and N is the batch size.
 
Experimental setup
 
Dataset construction
 
Because big, well, curated LSD datasets are hardly available, a consolidated dataset from multiple sources was constructed by merging publicly available Kaggle datasets with frames extracted from videos taken under field conditions and available to the public. Only videos indisputably displaying visible LSD symptoms were taken into account. A diagram illustrating the dataset construction process is presented in Fig 2.

Fig 2: Construction of LSD classification dataset.


 
Video-level splitting and frame extraction
 
To prevent data leakage, a strict video-level splitting protocol was applied. Videos were first divided into training, validation and test sets and frame extraction was performed only after this assignment. Frames were extracted at fixed rate (1 frame/second) to capture variations in lesion appearance, camera angle and lighting conditions while reducing redundancy.
 
Data cleaning and splitting
 
A multi-stage cleaning process was implemented. Images without visible cattle were removed. Exact duplicates were eliminated using hash-based filtering and near-duplicate images were filtered using similarity-based measures. No lesion-based filtering was performed in order to preserve variability.
       
The final dataset consisted of two classes: Healthy and Lumpy. The data were divided into 70% training, 15% validation and 15% testing sets. All models were evaluated on the same split.
 
Preprocessing and training configuration
 
All images were resized to 224 × 224 pixels. Data augmentation (horizontal flipping and small-angle rotation) was applied only to the training set. Validation and test sets were not augmented.
       
Models were implemented in PyTorch with ImageNet-initialized weights. Training was performed using the Adam optimizer with an initial learning rate of 0.0001, batch size of 16 and 10-12 epochs. The best-performing model on the validation set was evaluated on the test set.
 
Evaluation metrics and implementation details
 
The model’s performance was evaluated using a set of metrics; Accuracy, precision, recall, F1-score and area under the ROC curve (AUC). Since recall is a critical measure of how few negative cases are missed in disease screenings, it was given special attention.
       
Experiments were conducted in PyTorch using CUDA-enabled GPU acceleration.
Experimental design and fair evaluation protocol
 
All models were evaluated under identical preprocessing, dataset splits and training conditions. No hyperparameter tuning was performed on the test set to ensure fair comparison. 
 
Quantitative performance evaluation
 
The comparative performance of all models on the test set is presented in Table 1.

Table 1: Comparative test set performance.


       
The overall accuracy of the proposed DPAF-Net is the largest one compared with all the models discussed (98.98%). What is more important is that it has the greatest recall (99.27%), thus the false negative rate is reduced.
       
The importance of recall is especially relevant to the livestock disease detection. The absence of a single ill animal can be the cause of infecting the disease and a false positive will only need a further test. Therefore, the increase in the recall with the proposed model not only represents a statistical advancement but also has an epidemiological meaning.
       
Despite the competitive results of the form of the Xception-based model implementation Shakeel et al., (2024) and the good recall of the EfficientNet-B7 model Girmaw (2025), the proposed model demonstrates the increase in recall with a high precision and a general trade-off.
       
The confusion matrices (Fig 3) give a class-level perspective on the prediction behavior. Compared to the baseline models, DPAF-Net has fewer false negatives and a low false positive rate. This verifies that the performance improvement is not solely due to accuracy enhancement but also due to better class-level discrimination.

Fig 3: Confusion matrices of evaluated models.


 
ROC curve analysis
 
ROC curves were generated to evaluate model discrimination ability across varying thresholds.
       
As shown in Fig 4, all the models that were tested had AUC values exceeding 0. 99, which means that the models can very well distinguish between the healthy and infected classes. The model that has the highest AUC value is the proposed DPAF-Net, with a value of 0. 9992.

Fig 4: ROC curve comparison of all models.


       
The ROC curve of DPAF-Net is near the top, left corner of the ROC space all the time.
 
Training dynamics and generalization behavior
 
To evaluate convergence behavior and optimization stability, validation accuracy and loss trends were analyzed.
       
The validation accuracy curve (Fig 5) shows smooth and stable convergence. The validation accuracy grows very quickly in the initial epochs and becomes stable after around epoch 8, which shows successful feature learning without any long-lasting instability.

Fig 5: Validation accuracy curve (proposed model).


       
The training and validation loss curve (Fig 6) also verifies that:
• There is a continuous decrease in the training loss.
• There is no divergence between the training and validation loss.
• There is no sign of overfitting.

Fig 6: Training and validation loss curve (Proposed model).


 
Comparative confusion matrix analysis
 
Fig 3 illustrates the confusion matrices of all compared models under the same testing environment.
       
Based on the analysis of the confusion matrices, the following points can be noted:
Raj et al., (2023) has a relatively higher number of false positives and false negatives.
Shakeel et al., (2024) has better class-wise performance but still has a slightly higher misclassification rate than the previous models.
Girmaw (2025) has a better true positive rate but has a moderate number of false positives.
• The Proposed DPAF-Net has the lowest number of false negatives and a lower number of false positives than all the other models.
In the proposed model:
• True Negatives (Healthy correctly classified): 1062.
• False Positives: 13.
• False Negatives: 5.
• True Positives: 677.
       
The very low number of false negatives directly results in the high value of recall (99.27%).
       
The comparison of the confusion matrix verifies that the performance advantage of DPAF-Net is not only in terms of accuracy but also in terms of better class-wise distribution and error reduction.
 
Failure case analysis
 
To further understand model limitations, misclassified samples were examined.

Representative misclassification examples are shown in Fig 7.

Fig 7: Representative false positive and false negative samples.


 
Observations
 
False Positives are mainly caused by:
• Irregular patches of pigmentation.
• Strong shadowing.
• Skin discoloration outside the lesion area.

False Negatives are found in:
• Early lesions with subtle texture changes.
• Distant or low-resolution images.
• Mildly visible swelling.
       
These observations indicate that the errors of the model are mainly due to the ambiguity of the images and not due to instability in the model.
 
Architectural impact on performance
 
The reasons for the enhanced performance of DPAF-Net can be summarized as follows:
Feature extraction through dual paths:
• Fine texture details are extracted by EfficientNet-B4.
• Structural and context-based features are extracted by ConvNeXt-Tiny.
Channel attention:
• Boosts the channels of relevant features.
Gated feature fusion:
• Complementary feature maps are dynamically fused.
• Redundancy is minimized, unlike simple concatenation.
       
The organized fusion strategy allows for more comprehensive multi-scale representation learning, which is presumably responsible for the enhanced recall and AUC values.
 
Practical and clinical implications
 
The high recall (99.27%) indicates improved sensitivity for detecting infected cattle, while maintaining high precision. This balance is important for practical livestock disease screening systems.
 
Summary of findings
 
The experimental outcomes show that:
• Deep CNN models perform better than traditional feature-based approaches.
• Very deep models enhance recall but can cause increased computational complexity.
• The proposed DPAF-Net model performs well.
• Attention-guided dual-path fusion improves discriminative power and suppresses false negatives.
       
In conclusion, the results validate the efficiency of adaptive dual-path feature fusion for LSD detection.
This study proposed a Dual-Path Attention Fusion Network (DPAF-Net) for automated detection of Lumpy Skin Disease (LSD) in cattle using image data. By integrating dual-path feature extraction with attention-guided gated fusion, the model effectively captures complementary deep features and improves lesion representation. Experimental results demonstrate strong performance across multiple metrics, particularly achieving high recall, which is crucial for early disease detection. The proposed approach maintains end-to-end trainability while reducing false negatives and enhancing classification reliability. These findings highlight the potential of attention-based fusion models in developing robust and scalable livestock disease detection systems. Future work can focus on extending the model to multi-class scenarios, incorporating transformer-based architectures and improving real-world applicability through diverse datasets and explainable AI techniques.
The authors declare that there is no conflict of interest regarding the publication of this paper.

  1. Alam, F., Ullah, A., Rohaim, M.A., Munir, M. and Hussain, A. (2025). An automatic approach for the classification of lumpy skin disease in cattle. Tropical Animal Health and Production. 57(2): 210-219. doi: 10.1007/s11250-025- 04475-8.

  2. Alkhanifer, A.  and AlZubi, A. (2025). Artificial intelligence for enhancing veterinary healthcare: An experiment. Indian Journal of Animal Research. 59(5): 761-768. doi: 10.18805/IJAR.BF-1763.

  3. 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.

  4. Ananda, A.K. and Kumar, M.J.P. (2025). Machine Learning-Based Detection of Lumpy Skin Disease in Cattle Using Deep Feature Extraction Techniques. Proceedings of the International Conference on Intelligent and Innovative Technologies in Computing, Electrical and Electronics (IITCEE), Bangalore, India. doi: 10.1109/IITCEE64140. 2025.10915237.

  5. Choudhari, A.N., Moregaonkar, S.D., Gangane, G.R., Markandeya, N.M. and Narladkar, B.W. (2020). Lumpy skin disease (LSD), an emerging disease in India: A review. Agricultural Reviews. 41(4): 398-402. doi: 10.18805/ag.R-2018.

  6. Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold, G., Gelly, S., Uszkoreit, J. and Houlsby, N. (2021). An Image is Worth 16×16 Words: Transformers for Image Recognition at Scale. Proceedings of the International Conference on Learning Representations (ICLR), Virtual Conference. doi: 10.48550/arXiv.2010.11929.

  7. Girmaw, D.W. (2025). Livestock animal skin disease detection and classification using deep learning approaches. Biomedical Signal Processing and Control. 102: 107334. doi: 10.1016/j.bspc.2024.107334.

  8. He, K., Zhang, X., Ren, S. and Sun, J. (2016). Deep Residual Learning for Image Recognition. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, pp. 770-778. doi: 10.1109/CVPR.2016.90.

  9. Howard, A., Sandler, M., Chu, G., Chen, L.C., Chen, B., Tan, M., Wang, W., Zhu, Y., Pang, R., Vasudevan, V., Le, Q.V. and Adam, H. (2019). Searching for MobileNetV3. Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, South Korea. doi: 10.48550/arXiv.1905.02244.

  10. Khaskheli, S.A., Koondhar, M.Y., Maher, Z.A., Khaskheli, G.B. and Khaskheli, A.A. (2025). A model for early detection of lumpy skin disease in cattle using ensemble technique. Pakistan Journal of Zoology.  doi: 10.17582/journal.pjz/20230810102300.

  11. Kumar, A., Kumar, B. and Negi, H.S. (2023). Predicting Lumpy Skin Disease Using Various Machine Learning Models. Proceedings of the International Conference on Computational Intelligence and Smart Embedded Systems (CISES), Greater Noida, India. doi: 10.1109/CISES58720.2023.10183604.

  12. Kumar, V., Maurya, J.P. and Shrivastava, A. (2024). Leveraging the Effect of CNN to Identify Severity of Lumpy Skin Disease in Cattle. Proceedings of the International Conference on Artificial Intelligence and Quantum Signal Analysis (ICAIQSA), Nagpur, India. doi: 10.1109/ICAIQ SA64000.2024.10882283.

  13. Narayan, V., Kumar, R. and Yadav, S. (2023). Severity of Lumpy Disease Detection Using Deep Learning Techniques. Proceedings of the International Conference on Disruptive Technologies (ICDT), Greater Noida, India. doi: 10.1109/ ICDT57929.2023.10150925.

  14. Olaniyan, O.M., Adetunji, J.K. and Ajayi, T.O. (2023). Prediction of lumpy skin disease using machine learning techniques. ABUAD Journal of Engineering Research and Development. 6(2): 100-112. doi: 10.53982/ajerd.2023.0602.10-j.

  15. Pal, M., Panda, G. and Bal, R. (2024). Random Forest-Based Enhanced Detection of Lumpy Skin Disease Under Two Data Types. Proceedings of the International Conference on Signal Processing, Communication, Power and Embedded System (SCOPES), Odisha, India. doi: 10.1109/SCOPES64467.2024.10991952.

  16. Patil, D., Kulkarni, A. and Shinde, V. (2024). Implementation of Lumpy Skin Disease Detection Using Machine Learning Approach. Proceedings of the Recent Advances in Intelligent Computational Systems (RAICS), Kothamangalam, Kerala, India. doi: 10.1109/RAICS61201.2024.10689922.

  17. Patil, D.H., Deshmukh, P.R. and Patil, S.V. (2023). Lumpy Skin Disease Prediction Using Machine Learning. Proceedings of the IEEE Global Conference for Advancement in Technology (GCAT), Bangalore, India. doi: 10.1109/ GCAT59970.2023.10353350. 

  18. Patil, R.G.E., Pati, A., Raj, A., Patidar, N., Ali, B.F. and Priya, S. (2025). AI and IoT Based Algorithm for cattle lumpy disease detection. Proceedings of the International Conference on Computational Robotics, Testing and Engineering Evaluation (ICCRTEE), Virudhunagar, India. doi: 10.1109/ICCRTEE64519.2025.11052944. 

  19. Raj, R., Panda, S., Nitya, N., Patel, D. and Muduli, D. (2023). Automated Diagnosis of Lumpy Skin Diseases Based on Deep Learning Feature Fusion. Proceedings of the International Conference on Computing, Communication and Networking Technologies (ICCCNT), Delhi, India. doi: 10.1109/ICCCNT56998.2023.10306613.

  20. Saqib, M.S., Iqbal, M., Ben Othman, M.T., Shahazad, T., Ghadi, Y.Y., Al-Amro, S. and Mazhar, T. (2024). Lumpy skin disease diagnosis in cattle: A deep learning approach optimized with RMSProp and MobileNetV2. Plos One. 19(8): e0302862. doi: 10.1371/journal.pone.0302862.

  21. Selvaraju, R.R., Cogswell, M., Das, A., Vedantam, R., Parikh, D. and Batra, D. (2019). Grad-CAM: Visual explanations from deep networks via gradient-based localization. International Journal of Computer Vision. 128: 336-359. doi: 10.1007/s11263-019-01228-7.

  22. Senthilkumar, C., Vadivu, G. and Neethirajan, S. (2024). Comparative analysis of deep learning models for early detection of lumpy skin disease in cattle. International Journal of Advanced Computer Science and Applications. 15(4): 22-30. doi: 10.2139/ssrn.4950272.

  23. Shakeel, M.Z., Tauheed, N., Javaid, M.T., Aslam, T., Ubaidullah, M., Yaqoob, N. and Zafar, M.A. (2024). A deep learning tool for early detection and control of lumpy skin disease using convolutional neural networks. Journal of Computing and Biomedical Informatics. 7(2). doi: 10.56979/702/ 2024.

  24. Tan, M. and Le, Q.V. (2019). EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks. Proceedings of the International Conference on Machine Learning (ICML), Long Beach, California, USA. doi: 10.48550/arXiv.1905.1194.

  25. Ujjwal, N., Singh, A., Jain, A.K. and Tiwari, R.G. (2022). Exploiting Machine Learning for Lumpy Skin Disease Occurrence Detection. Proceedings of the 10th International Conference on Reliability, Infocom Technologies and Optimization (ICRITO), Noida, India. pp.1-6. doi: 10.1109/ICRITO56286. 2022.9964656.

  26. Un, H., Yumusak, N., Özgünlük, Ý., Yilmaz, R.  and Çabalar, M. (2019). A lumpy skin disease case in the southeast Turkey: A threat for Eurasia. Indian Journal of Animal Research. 53(1): 129-135. doi: 10.18805/ijar.B-732.

  27. Velugoti, T., Sharma, R. and Rao, V. (2024). Lumpy skin Disease Detection Using Deep Learning. Proceedings of the IEEE Students Conference on Engineering and Systems (SCES), Prayagraj, India. doi: 10.1109/SCES61914. 2024.10652331.

Dual Path Attention Fusion Network for Automated Lumpy Skin Disease Detection

S
Satish Singh Verma1,*
H
Harsh Dev1
A
Anurag Tiwari2
1Department of Computer Science and Engineering, Babu Banarasi Das University, Lucknow-226 028, Uttar Pradesh, India.
2Department of Computer Science and Engineering, Babu Banarasi Das Institute of Technology and Management, Lucknow-226 028, Uttar Pradesh, India.
Background: Lumpy skin disease (LSD) is still a big threat to animal health and it results in heavy losses in the farming industry. In general, deep learning, based image analysis for automated disease screening has achieved quite promising outcomes. However, a lot of them are only based on single, backbone models or simply combine features in a straightforward manner, which could restrict representational diversity and model generalization.

Methods: This study develops a dual-path attention fusion network (DPAF-Net) to detect LSD automatically from images of cattle. In order to extract complementary feature representations, the framework uses two convolutional backbones that are integrated via channel attention and an adaptive gating mechanism. Frames taken from real field-condition videos were combined with publicly accessible image datasets to create a multi-source dataset. Strict video-level splitting was carried out before frame extraction in order to preserve evaluation integrity and duplicate and nearly duplicate samples were eliminated. Leading high-accuracy models from earlier research were re-implemented and assessed under the same experimental conditions to ensure fair evaluation.

Result: On the test dataset, the suggested DPAF-Net obtained an accuracy of 98.98% and a recall of 99.27%. While maintaining strong overall classification performance, the high recall value indicates improved sensitivity in identifying infected cattle.
Cattle can contract lumpy skin disease (LSD), a highly contagious viral illness that causes skin nodules, fever, reduced milk production and large financial losses for the livestock sector. LSD is a transboundary animal disease that has presented a significant obstacle to veterinary health infrastructure in a number of areas (Choudhari et al., 2020). Controlling the disease and reducing financial losses depend on the early identification of infected animals and their isolation.
       
Conventional diagnosis relies mostly on skilled veterinarians’ visual observations supported by laboratory testing such as PCR, ELISA and serological assays (Choudhari et al., 2020). Despite its effectiveness, this method can be time-consuming, arbitrary and less useful in rural or large-scale environments. Computer-assisted image analysis has become a feasible substitute for automated disease screening due to the growing accessibility of digital imaging technology (Saqib et al., 2024; Alam et al., 2025; Patil et al., 2025). Recent studies have also demonstrated the effectiveness of AI-driven approaches in veterinary disease diagnosis, highlighting improved accuracy and efficiency in detecting conditions such as lumpy skin disease (Alkhanifer and AlZubi, 2025).
       
Automated disease classification has greatly improved with the advent of machine learning and deep learning algorithms. Using manually created features, early research on LSD detection relied on conventional machine learning models like Random Forest and Support Vector Machines (Ujjwal et al., 2022; Kumar et al., 2023; Olaniyan et al., 2023; Patil et al., 2023). Although moderate results were obtained, these methods’ reliance on manually created descriptors made them susceptible to changes in lesion patterns, lighting and environmental complexity. According to Pal et al., (2024), the feature design continued to have a significant impact on classification accuracy.
       
A significant breakthrough in image-based LSD detection was made possible by the introduction of convolutional neural networks (CNNs). Deep CNN models have been used in a number of recent studies to distinguish between images of healthy and infected (Patil et al., 2024; Senthilkumar et al., 2024; Shakeel et al., 2024; Velugoti et al., 2024). CNN-based approaches enable automatic extraction of discriminative features from images and improve early disease detection accuracy (AlZubi, 2024). In addition, efficient deep learning architectures such as MobileNetV3 have been proposed to achieve high accuracy with reduced computational complexity, making them suitable for real-world and resource-constrained applications (Howard et al., 2019). Girmaw (2025) used EfficientNet architectures inspired by compound scaling principles (Tan and Le, 2019) to achieve high classification accuracy, while Shakeel et al., (2024) showed effective early detection using CNN models. CNN-based methods for severity-level detection were investigated in other studies, such as Narayan et al., (2023) and Kumar et al., (2024).
       
Hybrid and feature fusion approaches have also been investigated in addition to single-backbone architectures. A deep feature fusion framework that combines multiple CNN backbones, dimensionality reduction and classification was proposed by Raj et al., (2023). Similar research has been done on ensemble learning techniques to increase robustness (Ananda and Prasanna-Kumar, 2025; Khaskheli et al., 2025). The majority of these techniques relied on ensemble averaging or static concatenation, where feature contributions were not adaptively weighted, even though they occasionally improved discriminative performance.
       
Modern image classification systems have been impacted by recent architectural developments such as transformer-based feature representations (Dosovitskiy et al., 2021), compound scaling models like EfficientNet (Tan and Le, 2019) and residual learning (He et al., 2016). Lightweight and efficient model designs have also been explored to balance accuracy and computational cost, particularly for deployment in practical environments (Un et al., 2019). Interpretability and feature focus have been further enhanced by attention mechanisms and gradient-based localization methods like Grad-CAM (Selvaraju et al., 2019). However, the majority of LSD detection models currently in use do not specifically incorporate adaptive attention-driven fusion mechanisms; instead, they rely on simple feature concatenation or single CNN backbones.
       
The main limitations of existing approaches include lack of hierarchical modeling in classical methods, architectural bias in single-backbone CNNs, reliance on static fusion strategies and limited focus on reducing false negatives.
       
In order to solve these problems, this work presents a Dual-Path Attention Fusion Network (DPAF-Net) for LSD image classification. The suggested model combines complementary deep features from two convolutional backbones through channel attention and gated adaptive fusion, allowing the dynamic weighting of features and the identification of different lesions to be more accurate thus lowering misclassification.
This study was carried out at Babu Banarasi Das University, Lucknow, India. The experimental work and model development were conducted during the period July 2025 -February 2026.

Proposed methodology
 
Existing LSD detection systems based on single-backbone CNN architectures (Shakeel et al., 2024; Girmaw, 2025) have demonstrated promising performance; however, their representational capacity remains limited by architectural bias. Similarly, most feature fusion strategies rely on static concatenation or ensemble averaging (Raj et al., 2023; Khaskheli et al., 2025), without adaptively adjusting feature contributions during inference.
       
In order to overcome these shortcomings, a dual-path attention fusion network (DPAF-Net) is introduced for the automatic LSD image classification. The design includes two parallel convolutional backbones that extract complementary feature representations and combine them via channel attention and gated adaptive fusion. The entire setup is depicted in Fig 1.

Fig 1: Architecture of the proposed dual-path attention fusion network (DPAF-Net) for binary LSD classification.


 
Dual-path feature extraction
 
Let the input image be denoted as:
 
I ∈ RH × W × 3
 
Where H = W = 224.
Two parallel convolutional backbones are employed:
• An EfficientNet-B4-inspired branch.
• A ConvNeXt-Tiny-inspired branch.
       
The extracted feature representations are defined as:
 
F1 = f1 (I)
 
F2 = f1 (I)
 
Where,
 
F1 ∈ Rd1
 
F2 ∈ Rd2
 
In the above equations, f1(•) and f2(•) represent the nonlinear feature extraction functions realized by the two convolutional backbones.
 
Channel attention mechanism
 
To highlight the relevant feature channels and downplay the background information, channel attention is applied separately to each feature vector.
       
For each feature vector Fi (i = 1, 2), attention weights are computed as:
 
Ai = Sigmoid [W2 • ReLU (W1 • Fi)]
 
The refined feature representation is then computed as:

 
Gated adaptive feature fusion
 
Unlike the static concatenation methods (Raj et al., 2023),  which just line up features, the new framework builds in a gating component that is learnable and works for adaptive feature fusion.
       
Initially, the features that are attended to are concatenated:
 
 
Where,
 
Fconcat = ∈ Rd1 + d2
A gating vector is computed as:
 
G = Sigmoid (Wg · F_concat).
 
The fused representation is obtained as:
 
F_fused = F_concat    G.
 
Classification head
 
The combined feature vector goes through a fully connected classification layer:
 
Z = Wc . F_fused + b
 
For a binary classification (Healthy vs. Lumpy), the predicted probability of the positive class is obtained through the sigmoid function:
 
pi = Sigmoid (Zi)
 
Binary cross-entropy loss
 
Since the task is binary, the model is trained using Binary Cross Entropy (BCE) loss:
 
L =  - (1/N) Σ-{i = 1 to N} [yi log (pi) + (1 - yi) log (1 - pi)]
 
Where,
yi ∈ {0,1}= The ground-truth label and N is the batch size.
 
Experimental setup
 
Dataset construction
 
Because big, well, curated LSD datasets are hardly available, a consolidated dataset from multiple sources was constructed by merging publicly available Kaggle datasets with frames extracted from videos taken under field conditions and available to the public. Only videos indisputably displaying visible LSD symptoms were taken into account. A diagram illustrating the dataset construction process is presented in Fig 2.

Fig 2: Construction of LSD classification dataset.


 
Video-level splitting and frame extraction
 
To prevent data leakage, a strict video-level splitting protocol was applied. Videos were first divided into training, validation and test sets and frame extraction was performed only after this assignment. Frames were extracted at fixed rate (1 frame/second) to capture variations in lesion appearance, camera angle and lighting conditions while reducing redundancy.
 
Data cleaning and splitting
 
A multi-stage cleaning process was implemented. Images without visible cattle were removed. Exact duplicates were eliminated using hash-based filtering and near-duplicate images were filtered using similarity-based measures. No lesion-based filtering was performed in order to preserve variability.
       
The final dataset consisted of two classes: Healthy and Lumpy. The data were divided into 70% training, 15% validation and 15% testing sets. All models were evaluated on the same split.
 
Preprocessing and training configuration
 
All images were resized to 224 × 224 pixels. Data augmentation (horizontal flipping and small-angle rotation) was applied only to the training set. Validation and test sets were not augmented.
       
Models were implemented in PyTorch with ImageNet-initialized weights. Training was performed using the Adam optimizer with an initial learning rate of 0.0001, batch size of 16 and 10-12 epochs. The best-performing model on the validation set was evaluated on the test set.
 
Evaluation metrics and implementation details
 
The model’s performance was evaluated using a set of metrics; Accuracy, precision, recall, F1-score and area under the ROC curve (AUC). Since recall is a critical measure of how few negative cases are missed in disease screenings, it was given special attention.
       
Experiments were conducted in PyTorch using CUDA-enabled GPU acceleration.
Experimental design and fair evaluation protocol
 
All models were evaluated under identical preprocessing, dataset splits and training conditions. No hyperparameter tuning was performed on the test set to ensure fair comparison. 
 
Quantitative performance evaluation
 
The comparative performance of all models on the test set is presented in Table 1.

Table 1: Comparative test set performance.


       
The overall accuracy of the proposed DPAF-Net is the largest one compared with all the models discussed (98.98%). What is more important is that it has the greatest recall (99.27%), thus the false negative rate is reduced.
       
The importance of recall is especially relevant to the livestock disease detection. The absence of a single ill animal can be the cause of infecting the disease and a false positive will only need a further test. Therefore, the increase in the recall with the proposed model not only represents a statistical advancement but also has an epidemiological meaning.
       
Despite the competitive results of the form of the Xception-based model implementation Shakeel et al., (2024) and the good recall of the EfficientNet-B7 model Girmaw (2025), the proposed model demonstrates the increase in recall with a high precision and a general trade-off.
       
The confusion matrices (Fig 3) give a class-level perspective on the prediction behavior. Compared to the baseline models, DPAF-Net has fewer false negatives and a low false positive rate. This verifies that the performance improvement is not solely due to accuracy enhancement but also due to better class-level discrimination.

Fig 3: Confusion matrices of evaluated models.


 
ROC curve analysis
 
ROC curves were generated to evaluate model discrimination ability across varying thresholds.
       
As shown in Fig 4, all the models that were tested had AUC values exceeding 0. 99, which means that the models can very well distinguish between the healthy and infected classes. The model that has the highest AUC value is the proposed DPAF-Net, with a value of 0. 9992.

Fig 4: ROC curve comparison of all models.


       
The ROC curve of DPAF-Net is near the top, left corner of the ROC space all the time.
 
Training dynamics and generalization behavior
 
To evaluate convergence behavior and optimization stability, validation accuracy and loss trends were analyzed.
       
The validation accuracy curve (Fig 5) shows smooth and stable convergence. The validation accuracy grows very quickly in the initial epochs and becomes stable after around epoch 8, which shows successful feature learning without any long-lasting instability.

Fig 5: Validation accuracy curve (proposed model).


       
The training and validation loss curve (Fig 6) also verifies that:
• There is a continuous decrease in the training loss.
• There is no divergence between the training and validation loss.
• There is no sign of overfitting.

Fig 6: Training and validation loss curve (Proposed model).


 
Comparative confusion matrix analysis
 
Fig 3 illustrates the confusion matrices of all compared models under the same testing environment.
       
Based on the analysis of the confusion matrices, the following points can be noted:
Raj et al., (2023) has a relatively higher number of false positives and false negatives.
Shakeel et al., (2024) has better class-wise performance but still has a slightly higher misclassification rate than the previous models.
Girmaw (2025) has a better true positive rate but has a moderate number of false positives.
• The Proposed DPAF-Net has the lowest number of false negatives and a lower number of false positives than all the other models.
In the proposed model:
• True Negatives (Healthy correctly classified): 1062.
• False Positives: 13.
• False Negatives: 5.
• True Positives: 677.
       
The very low number of false negatives directly results in the high value of recall (99.27%).
       
The comparison of the confusion matrix verifies that the performance advantage of DPAF-Net is not only in terms of accuracy but also in terms of better class-wise distribution and error reduction.
 
Failure case analysis
 
To further understand model limitations, misclassified samples were examined.

Representative misclassification examples are shown in Fig 7.

Fig 7: Representative false positive and false negative samples.


 
Observations
 
False Positives are mainly caused by:
• Irregular patches of pigmentation.
• Strong shadowing.
• Skin discoloration outside the lesion area.

False Negatives are found in:
• Early lesions with subtle texture changes.
• Distant or low-resolution images.
• Mildly visible swelling.
       
These observations indicate that the errors of the model are mainly due to the ambiguity of the images and not due to instability in the model.
 
Architectural impact on performance
 
The reasons for the enhanced performance of DPAF-Net can be summarized as follows:
Feature extraction through dual paths:
• Fine texture details are extracted by EfficientNet-B4.
• Structural and context-based features are extracted by ConvNeXt-Tiny.
Channel attention:
• Boosts the channels of relevant features.
Gated feature fusion:
• Complementary feature maps are dynamically fused.
• Redundancy is minimized, unlike simple concatenation.
       
The organized fusion strategy allows for more comprehensive multi-scale representation learning, which is presumably responsible for the enhanced recall and AUC values.
 
Practical and clinical implications
 
The high recall (99.27%) indicates improved sensitivity for detecting infected cattle, while maintaining high precision. This balance is important for practical livestock disease screening systems.
 
Summary of findings
 
The experimental outcomes show that:
• Deep CNN models perform better than traditional feature-based approaches.
• Very deep models enhance recall but can cause increased computational complexity.
• The proposed DPAF-Net model performs well.
• Attention-guided dual-path fusion improves discriminative power and suppresses false negatives.
       
In conclusion, the results validate the efficiency of adaptive dual-path feature fusion for LSD detection.
This study proposed a Dual-Path Attention Fusion Network (DPAF-Net) for automated detection of Lumpy Skin Disease (LSD) in cattle using image data. By integrating dual-path feature extraction with attention-guided gated fusion, the model effectively captures complementary deep features and improves lesion representation. Experimental results demonstrate strong performance across multiple metrics, particularly achieving high recall, which is crucial for early disease detection. The proposed approach maintains end-to-end trainability while reducing false negatives and enhancing classification reliability. These findings highlight the potential of attention-based fusion models in developing robust and scalable livestock disease detection systems. Future work can focus on extending the model to multi-class scenarios, incorporating transformer-based architectures and improving real-world applicability through diverse datasets and explainable AI techniques.
The authors declare that there is no conflict of interest regarding the publication of this paper.

  1. Alam, F., Ullah, A., Rohaim, M.A., Munir, M. and Hussain, A. (2025). An automatic approach for the classification of lumpy skin disease in cattle. Tropical Animal Health and Production. 57(2): 210-219. doi: 10.1007/s11250-025- 04475-8.

  2. Alkhanifer, A.  and AlZubi, A. (2025). Artificial intelligence for enhancing veterinary healthcare: An experiment. Indian Journal of Animal Research. 59(5): 761-768. doi: 10.18805/IJAR.BF-1763.

  3. 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.

  4. Ananda, A.K. and Kumar, M.J.P. (2025). Machine Learning-Based Detection of Lumpy Skin Disease in Cattle Using Deep Feature Extraction Techniques. Proceedings of the International Conference on Intelligent and Innovative Technologies in Computing, Electrical and Electronics (IITCEE), Bangalore, India. doi: 10.1109/IITCEE64140. 2025.10915237.

  5. Choudhari, A.N., Moregaonkar, S.D., Gangane, G.R., Markandeya, N.M. and Narladkar, B.W. (2020). Lumpy skin disease (LSD), an emerging disease in India: A review. Agricultural Reviews. 41(4): 398-402. doi: 10.18805/ag.R-2018.

  6. Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold, G., Gelly, S., Uszkoreit, J. and Houlsby, N. (2021). An Image is Worth 16×16 Words: Transformers for Image Recognition at Scale. Proceedings of the International Conference on Learning Representations (ICLR), Virtual Conference. doi: 10.48550/arXiv.2010.11929.

  7. Girmaw, D.W. (2025). Livestock animal skin disease detection and classification using deep learning approaches. Biomedical Signal Processing and Control. 102: 107334. doi: 10.1016/j.bspc.2024.107334.

  8. He, K., Zhang, X., Ren, S. and Sun, J. (2016). Deep Residual Learning for Image Recognition. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, pp. 770-778. doi: 10.1109/CVPR.2016.90.

  9. Howard, A., Sandler, M., Chu, G., Chen, L.C., Chen, B., Tan, M., Wang, W., Zhu, Y., Pang, R., Vasudevan, V., Le, Q.V. and Adam, H. (2019). Searching for MobileNetV3. Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, South Korea. doi: 10.48550/arXiv.1905.02244.

  10. Khaskheli, S.A., Koondhar, M.Y., Maher, Z.A., Khaskheli, G.B. and Khaskheli, A.A. (2025). A model for early detection of lumpy skin disease in cattle using ensemble technique. Pakistan Journal of Zoology.  doi: 10.17582/journal.pjz/20230810102300.

  11. Kumar, A., Kumar, B. and Negi, H.S. (2023). Predicting Lumpy Skin Disease Using Various Machine Learning Models. Proceedings of the International Conference on Computational Intelligence and Smart Embedded Systems (CISES), Greater Noida, India. doi: 10.1109/CISES58720.2023.10183604.

  12. Kumar, V., Maurya, J.P. and Shrivastava, A. (2024). Leveraging the Effect of CNN to Identify Severity of Lumpy Skin Disease in Cattle. Proceedings of the International Conference on Artificial Intelligence and Quantum Signal Analysis (ICAIQSA), Nagpur, India. doi: 10.1109/ICAIQ SA64000.2024.10882283.

  13. Narayan, V., Kumar, R. and Yadav, S. (2023). Severity of Lumpy Disease Detection Using Deep Learning Techniques. Proceedings of the International Conference on Disruptive Technologies (ICDT), Greater Noida, India. doi: 10.1109/ ICDT57929.2023.10150925.

  14. Olaniyan, O.M., Adetunji, J.K. and Ajayi, T.O. (2023). Prediction of lumpy skin disease using machine learning techniques. ABUAD Journal of Engineering Research and Development. 6(2): 100-112. doi: 10.53982/ajerd.2023.0602.10-j.

  15. Pal, M., Panda, G. and Bal, R. (2024). Random Forest-Based Enhanced Detection of Lumpy Skin Disease Under Two Data Types. Proceedings of the International Conference on Signal Processing, Communication, Power and Embedded System (SCOPES), Odisha, India. doi: 10.1109/SCOPES64467.2024.10991952.

  16. Patil, D., Kulkarni, A. and Shinde, V. (2024). Implementation of Lumpy Skin Disease Detection Using Machine Learning Approach. Proceedings of the Recent Advances in Intelligent Computational Systems (RAICS), Kothamangalam, Kerala, India. doi: 10.1109/RAICS61201.2024.10689922.

  17. Patil, D.H., Deshmukh, P.R. and Patil, S.V. (2023). Lumpy Skin Disease Prediction Using Machine Learning. Proceedings of the IEEE Global Conference for Advancement in Technology (GCAT), Bangalore, India. doi: 10.1109/ GCAT59970.2023.10353350. 

  18. Patil, R.G.E., Pati, A., Raj, A., Patidar, N., Ali, B.F. and Priya, S. (2025). AI and IoT Based Algorithm for cattle lumpy disease detection. Proceedings of the International Conference on Computational Robotics, Testing and Engineering Evaluation (ICCRTEE), Virudhunagar, India. doi: 10.1109/ICCRTEE64519.2025.11052944. 

  19. Raj, R., Panda, S., Nitya, N., Patel, D. and Muduli, D. (2023). Automated Diagnosis of Lumpy Skin Diseases Based on Deep Learning Feature Fusion. Proceedings of the International Conference on Computing, Communication and Networking Technologies (ICCCNT), Delhi, India. doi: 10.1109/ICCCNT56998.2023.10306613.

  20. Saqib, M.S., Iqbal, M., Ben Othman, M.T., Shahazad, T., Ghadi, Y.Y., Al-Amro, S. and Mazhar, T. (2024). Lumpy skin disease diagnosis in cattle: A deep learning approach optimized with RMSProp and MobileNetV2. Plos One. 19(8): e0302862. doi: 10.1371/journal.pone.0302862.

  21. Selvaraju, R.R., Cogswell, M., Das, A., Vedantam, R., Parikh, D. and Batra, D. (2019). Grad-CAM: Visual explanations from deep networks via gradient-based localization. International Journal of Computer Vision. 128: 336-359. doi: 10.1007/s11263-019-01228-7.

  22. Senthilkumar, C., Vadivu, G. and Neethirajan, S. (2024). Comparative analysis of deep learning models for early detection of lumpy skin disease in cattle. International Journal of Advanced Computer Science and Applications. 15(4): 22-30. doi: 10.2139/ssrn.4950272.

  23. Shakeel, M.Z., Tauheed, N., Javaid, M.T., Aslam, T., Ubaidullah, M., Yaqoob, N. and Zafar, M.A. (2024). A deep learning tool for early detection and control of lumpy skin disease using convolutional neural networks. Journal of Computing and Biomedical Informatics. 7(2). doi: 10.56979/702/ 2024.

  24. Tan, M. and Le, Q.V. (2019). EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks. Proceedings of the International Conference on Machine Learning (ICML), Long Beach, California, USA. doi: 10.48550/arXiv.1905.1194.

  25. Ujjwal, N., Singh, A., Jain, A.K. and Tiwari, R.G. (2022). Exploiting Machine Learning for Lumpy Skin Disease Occurrence Detection. Proceedings of the 10th International Conference on Reliability, Infocom Technologies and Optimization (ICRITO), Noida, India. pp.1-6. doi: 10.1109/ICRITO56286. 2022.9964656.

  26. Un, H., Yumusak, N., Özgünlük, Ý., Yilmaz, R.  and Çabalar, M. (2019). A lumpy skin disease case in the southeast Turkey: A threat for Eurasia. Indian Journal of Animal Research. 53(1): 129-135. doi: 10.18805/ijar.B-732.

  27. Velugoti, T., Sharma, R. and Rao, V. (2024). Lumpy skin Disease Detection Using Deep Learning. Proceedings of the IEEE Students Conference on Engineering and Systems (SCES), Prayagraj, India. doi: 10.1109/SCES61914. 2024.10652331.
In this Article
Published In
Indian Journal of Animal Research

Editorial Board

View all (0)