A Hybrid Deep Learning Model based Smart Identification of Lumpy Skin Disease in Cattle

1Department of Computer Science and Engineering, Government College of Engineering Srirangam, Trichy-620 012, Tamil Nadu, India.

Background: Health care in livestock farming is an essential task as it ensures the food security of a nation. Many traditional methods are followed in monitoring the health of cattle in cattle farming. The recent development in deep learning models in the field of image classification has gained attraction towards early detection of diseases in cattle.

Methods: A hybrid deep learning model is developed for identifying lumpy skin disease in cattle. It encompasses two blocks viz., one to extract features and another to identify disease using the extracted features. Convolutional neural networks (CNN) were utilized in feature extraction from the images of cattle and support vector machine (SVM) were used to distinguish lumpy skin and healthy skin from the learned features.

Result: The developed model was trained with 80% of the collected cattle images. Experimental test output of the CNN-SVM model with remaining images yielded an overall accuracy of 92.59% (95% Confidence Interval: 86.90-95.93%). This system speeds up the screening process by reducing manual inspection and helps in early decision making to protect animals and support farmers.

In India, animal husbandry is important to develop the rural economy. It plays a significant role in improving the income of farmers and landless labourers and also provides employment opportunities both in rural and urban areas (Ponnusamy and Pachaiyappan, 2018). There are many forms of animal husbandry like cattle farming, poultry farming, bee keeping, fish farming and livestock farming. Cattle farming involve many different activities and produce several products like meat and milk. Its economic impact depends on how land, resources and fertilizers are used, as well as how intensive the farming is (Perin et al., 2022). Apart from revenue generated through the sale of livestock products, cattle production systems contribute additional socioeconomic and agricultural benefits, including the provision of draft power, livestock-based financial security and the enhancement of soil fertility, subject to local management practices and resource availability (Gerber et al., 2005).
       
The health of cattle is a vital factor in the growth and success of cattle farming. Cattle are affected by various diseases caused by bacteria, viruses, parasites and poor management practices. These diseases hinder the production of milk and meat, weaken animals and sometimes lead them to death (Herrero et al., 2009). Cattle are vulnerable to several diseases such as foot-and-mouth disease, lumpy skin disease, mastitis and parasitic infections (Yadav et al., 2023). Lumpy skin disease virus (LSDV) that belongs to the genus capripoxvirus in poxviridae family causes lumpy skin disease (LSD) which is a spreadable viral disease in cattle (Al-Salihi, 2014). Unidentified situations may lead to less milk production, loss of weight, impaired fertility which will lead to economic losses in both dairy and meat production. Early monitoring of cattle health and timely disease detection are essential for controlling the spread of infections and minimizing production losses. The definitive diagnosis of LSD in cattle requires an organised approach involving a medical history, clinical examination and proper laboratory investigations. Conventional methods for identifying LSD primarily rely on specialized laboratory based techniques which are often time-consuming and require trained personnel.
       
Serological tests are commonly used to diagnose LSD. But, they require extended processing times and the potential for false-positive results arising from cross-reactivity with other poxviruses (Zeedan et al., 2019). In contrast, molecular approaches such as PCR offer faster results but they require purified DNA, specialized laboratory instruments and well-equipped facilities that make them impractical for field-based diagnosis (Vidic et al., 2017). These limitations have motivated the development of alternative approaches for LSD identification. Generally, the initial screening of cattle skin diseases begins with a complete visual examination of the animal’s skin under proper lighting (Moriello, 2025). However, accurate diagnosis of LSD using conventional approaches requires advanced diagnostic equipment and depends significantly on the expertise of skilled veterinary professionals, limiting their accessibility in resource-constrained settings.
       
The development of modern technologies like computer vision, deep learning and artificial intelligence has proven their importance in disease identification tasks in cattle. It helps to increase the competence of cattle farming by automating the health care process and detecting disease in the early stage. Deep learning models such as EfficientNetB7, MobileNetV2 and DenseNet201 with a softmax activation function was employed for skin disease recognition in cattle, sheep and goats (Girmaw, 2025). A Sequential CNN was developed to classify five categories of canine skin lesions (Cho, 2025). Similarly, the VGG-19 deep learning model was employed to detect six common fish diseases (Kyung-Won et al., 2025). As many researchers found it useful to employ deep learning models for identifying disease in animals, the following paragraph explores how deep learning is used for lumpy skin disease identification in cattle. Artificial neural networks proved the highest forecasting for LSDV infection (Afshari, 2022). Furthermore, a stacked ensemble model integrating a capsule network, extreme learning machine (ELM) and linear regression was developed to identify LSD in cattle using a self-curated dataset (Mallikarjun and Narayana, 2024). In dairy cows, an image based identification of LSD was done from GLCM features and statistical features obtained from the images of lumpy skin infected dairy cows. A customized CNN model was used to identify LSD in calves (AlZubi, 2024). DenseNet-121 model was employed with additional classification layer to classify disease in cows as LSD or healthy (Alkhanifer and AlZubi, 2025).
       
Despite the increasing adoption of machine learning for identifying LSD, robust image-based deep learning approaches capable of directly detecting and classifying disease lesions with high accuracy and computational efficiency remain limited. This gap motivates the development of a hybrid CNN-SVM model in which a task-specific customized CNN learns visual representations from images and the resulting deep features are classified using SVM. Unlike conventional CNN approaches that use a Softmax layer for disease classification, the proposed model employs a margin-based classification that improves LSD identification under limited training data.
The overall system architecture of the proposed method for the identification of LSD in cattle is presented in Fig 1. Initially, lumpy skin infected cattle images and healthy cattle images are collected from the data sources and pre-processed. The collected images are subsequently split into two sets in a ratio of 80:20 for training and testing. The first half is considered for training the proposed model and comprises 80% of the images from both the LSD and healthy skin categories, while the remaining 20% of the images are reserved for testing. Finally, after training the CNN-SVM model for LSD identification in cattle, it is evaluated using standard performance metrics. This work was carried out from July 2023 to May 2026 at Government College of Engineering Srirangam, Trichy.

Fig 1: Work flow diagram of the proposed CNN-SVM model.



Dataset description
 
Data play an essential role in developing and training deep learning models, as they directly influence the model in learning meaningful representations and works well on new unseen data to obtain high accuracy. High-quality, diverse and well-labelled data is the base for any deep learning model to learn meaningful features automatically from visual images. This study utilizes the dataset reported by Kumar et al., (2022) that has two image classes: LSD and healthy skin. This dataset is image-based and does not provide reliable animal level identifiers. The metadata about the image acquisition process is not available. There are 324 images in LSD category and 700 images in healthy skin category. Having a well-balanced dataset is essential when building a deep learning model, as it helps the model develop an equal understanding of features across all categories rather than leaning toward the most frequently represented ones. This bias leads to unreliable predictions, poor generalization and skewed evaluation metrics (Salunkhe and Mali, 2016). So, to balance the dataset and avoid over-representation of healthy skin category, only 350 images from healthy skin category were taken for experimentation. Since the dataset contains processed images, 350 images of healthy skin images were chosen manually. Fig 2 displays some sample images of LSDV infected cows and healthy cows.

Fig 2: Sample images of LSDV infected and healthy cows.


 
Data preprocessing
 
The preprocessing stage converts raw image data into a standardized and informative format, enabling the deep learning model in learning more discriminative features and achieve improved classification performance (Maharana et al., 2022). The proposed CNN-SVM model accepts images 224 × 224 pixels in three channels. So, in the first step of image preprocessing, all the images considered for this study are converted to an unvarying size of 224 × 224 pixels to be processed by the proposed feature extraction part of the CNN-SVM model.
       
Raw image data can vary widely in brightness, contrast or intensity across different images, which may cause models to focus on irrelevant differences rather than meaningful features. Image normalization helps minimize these variations. It also ensures the data is on a consistent and comparable scale allowing models to learn more effectively. Next, all the resized images are normalized using z-score normalization given by equation (1).

 
                                                                                                               
Where,
X= The pixel value.
xmean= The overall mean of.
xstd= The standard deviation of x and x2  is the normalized pixel value.
 
CNN based feature extraction
 
Deep learning models highly rely on the features extracted from the visual images as it helps in identifying the hidden patterns to discriminate between classes. Effective feature extraction is therefore essential for improving model performance and generalization. In deep learning, features from raw images are extracted using CNN models (Taye, 2023).  In this paper, a hybrid deep learning model using CNN and SVM is developed for lumpy skin identification. CNN is employed to extract spatial features automatically from raw images of cattle, while SVM utilizes these extracted features to classify the images as either LSD-infected or normal.
       
The layer description of the proposed hybrid CNN-SVM model developed for smart identification of LSD in cattle is shown in Fig 3 and the complete architecture is presented in Table 1. The CNN employed for extracting spatial features in this study is designed with five sequential blocks comprising convolutional layers and max-pooling layers. The first three blocks each consist of a single convolutional layer and a max-pooling layer. The initial layers are important for detecting edges and textures in the image and hence 64 filters are applied in each layer to perform convolution operation.  A convolution kernel of size (3 × 3) with a stride of 1 is employed in all convolutional layers. During the convolution operation and the pixel values within each (3 × 3) sliding window of the input feature map are multiplied element-wise with the corresponding kernel weight. Finally, the resulting products are added to produce a single value in the output feature map, as expressed in equation (2).
 
                                                                              
Where,
I= Input feature map to the convolutional layer.
K= The kernel.

Fig 3: Layer description in the proposed CNN-SVM model.



Table 1: Architecture of the customized CNN model.


       
Since a stride of 1 is employed in this study, the spatial dimensions of the output feature map are computed using Equation (3).
 
                    Cdim = Idim - Kdim + 1                                       ...(3)
 
Next, the rectified linear unit activates the output of the convolution operation in order to eliminate negative value in the final output. Equation (4) gives the relu activation function.


Next, the spatial dimension of the feature maps is reduced using the pooling operation which aggregates the information in a particular sliding window to one value. In this study, max-pooling is employed, in which the maximum value within each sliding window is retained while the remaining values are discarded. This down sampling process reduces computational complexity, preserves the most salient features and enhances the robustness of the CNN against minor spatial variations. With 3×3 sliding window size, maxpooling is given by equation (5).
 
                Poolmax = max [C (x, y)] ; 0 < x ≤ 3 ; 0 < y ≤ 3                   ...(5)             
                                      
The fourth block and the fifth block were developed with two convolutional layers and one max pooling layer. The last two blocks are used to extract features such as shapes and object parts. The fourth block contains 64 filters and the fifth block contains 32 filters. The output feature map from the fifth block is finally flattened to a feature vector of size 1568. Thus the 224×224×3 input image is processed by the CNN to obtain the feature vector of size 1568 which is then used by the SVM to identify the LSD in cattle.
 
Lumpy skin disease identification using SVM
 
The next step after extracting features from raw images of cattle is to classify the images with lumpy skin and healthy skin. This problem could be designed as a binary classification problem as there are only two classes considered in the study. Given a set of inputs, binary classification aims to assign each input to one of two possible classes. SVM algorithm is best suited for binary classification problem. It works by finding the optimal hyperplane that separates data points by maximizing the margin between the nearest data points, thereby improving classification accuracy and generalization. It finds the hyperplane given by:
 
wTx + b = 0           ...(6)
                                                                                                                        
that separates the data and maximizes margin


Where,
x= The input data vector.
w= The weight associated with it and b is the bias value.
       
This paper develops a SVM model using scikit-learn library in python to classify the features learned from cattle images into LSD and normal skin.
 
Learning phase of CNN-SVM model
 
The coding for the proposed CNN-SVM model for LSD identification was written using Python programming language. CNN was built using keras library and SVM was developed using scikit-learn library. The learning phase of the proposed CNN-SVM model was accomplished via the Google Colab platform with a T4 GPU runtime environment featuring 12 GB of GPU memory. Following hyperparameter fine-tuning, the optimal configuration for the proposed CNN model was obtained with a dropout rate of 10% for a batch size of 64 with learning rate 0.0001 while using Adam optimizer and the binary cross-entropy loss function. The hyperparameter setting for training the SVM classifier is given in Table 2. The fine tuning of SVM classifier using grid search with stratified 5-fold cross-validation resulted in the best scores for regularization parameter (C) with 10 and kernel coefficient (γ) with 0.01.

Table 2: Hyperparameters used for SVM training.


       
After configuring the environment and setting the hyperparameters, the proposed CNN-SVM model to identify LSD in cattle is trained using 80% of the input images. To ensure unbiased evaluation, stratified k-fold cross-validation is performed on the 80% training dataset. In stratified k-fold cross-validation, the training data is divided into k folds. During each iteration, k-1 folds are used in training process and the remaining fold is user for validation process. Finally, the average obtained from the classification performance across all folds gives the overall cross-validation performance. As the number of images in the k-1 fold is very small, they are augmented to generate modified versions of the existing images using flipping, scaling and cropping techniques. This enables artificially expanding and diversifying the training dataset. This process is done to boost the generalization ability of the proposed LSD identification model. Upon completion of training, the reserved 20% of the images are tested over the trained CNN-SVM model for LSD identification and their classification performance is evaluated.
       
The trained CNN-SVM model is evaluated using precision, recall (or) sensitivity, specificity and F1-score (Bhavani, 2025). The macro average of these metrics is used in the following section for discussion. Accuracy of the classifier is determined using equation (8).


The uncertainty in model predictions is estimated using 95% confidence interval. In addition to that, receiver operating characteristic–area under the curve (ROC-AUC) is considered to assess how well the proposed model discriminates the LSD and healthy skin images (Khotimah et al., 2026).
The results presented in this section discuss the effectiveness of the proposed CNN-SVM model for the early visual identification of LSD in cattle. The model demonstrated a strong ability to discriminate between LSD images and healthy images.
 
Training performance of CNN-SVM 
 
The proposed CNN-SVM model was trained using 80% of the dataset. The training and validation performance are tabulated for epochs in the interval of ten. As observed from Table 3, a considerable variation exists between the training and validation performance during the initial 30 epochs. The proposed CNN-SVM model gradually stabilizes between the 40th and 50th epochs, indicating improved convergence and consistent learning. After training the CNN-SVM model for 50 epochs the loss observed was 0.06. Training of the proposed CNN-SVM model was terminated after 50 epochs, as no significant improvement was observed in the training and validation performance beyond this point, indicating that the model had converged. The training and validation accuracy and loss of the proposed CNN-SVM model are presented in Fig 4. The learning curves indicate that the model exhibits lower performance during the initial training epochs, followed by a steady improvement in both training and validation accuracy. The model converges by the 50th epoch, achieving a classification accuracy of 94%. Beyond this point, no significant improvement in performance is observed. Therefore, the training process was terminated after 50 epochs to prevent overfitting.

Table 3: Performance of CNN-SVM during training over different epochs.



Fig 4: Training time accuracy and loss comparison.


 
Testing performance of CNN-SVM 
 
The trained CNN-SVM model was then evaluated for its performance with the unseen testing images. 20% of the testing images that consists of 65 images in LSD category and 70 images in healthy category were used in testing the trained CNN-SVM model. As an initial step, a confusion matrix was created to assess the classification performance of the proposed CNN-SVM model by quantifying the numbers of correctly classified and misclassified images for both the LSD and healthy classes. As shown in Fig 5, the proposed CNN-SVM model achieved a misclassification rate of 6.15% for the LSD class and 8.50% for the healthy class. These results indicate that the model effectively categorizes the two classes, with only a small proportion of images being incorrectly classified. The performance metrics were calculated from the confusion matrix and its summary is presented in Table 4. It is evident from the evaluation report that the proposed CNN-SVM model discriminates images with LSD infected and images of healthy cattle effectively.

Fig 5: Confusion matrix for lumpy skin disease identification.



Table 4: LSD identification using CNN-SVM model-evaluation report.


       
The evaluation metrics obtained for both the LSD and healthy classes exceeds 0.91 in terms of precision, recall (or) sensitivity, specificity and F1-score proving the effectiveness of the proposed CNN-SVM model. The overall accuracy of 92.59% (95% Confidence Interval: 86.90-95.93%) further confirms the strength of the classifier. Also, the ROC-AUC of 94.61 from Fig 6, proves that the model distinguishes the LSD and the healthy classes very well. Overall, these performance outcomes indicate that the proposed CNN-SVM demonstrates good performance in automatic image based identification of LSD in cattle.

Fig 6: ROC-AUC of CNN-SVM model.


       
Furthermore, Fig 7 gives the comparison of the classification performance of the proposed CNN-SVM model with those of the CNN model with softmax layer and SVM model for the identification of LSD. The accuracy obtained from the SVM model, CNN model and the proposed CNN-SVM model for identification of LSD are 86.28%, 90.12% and 92.59% respectively. These accuracy values indicate that the proposed model outperforms both standalone models. These results show that by incorporating deep spatial feature extraction of CNN for SVM classification, the overall classification performance is enhanced for LSD identification in cattle.

Fig 7: Performance comparison-standalone vs CNN-SVM model.


       
However, some bovine skin conditions can also have similar appearances, such as nodules, lesions, swelling, redness, or skin abnormalities (Ambilo and Melaku, 2013). The proposed system struggles to categorise these appearances. Therefore, the model’s predictions should not be considered definitive evidence of infection. The proposed system is used primarily as a rapid screening and decision-support tool to assist veterinarians and farmers in identifying LSD in cattle that may require further examination.
       
A limitation of the present work is the absence of independent external validation. The proposed model was evaluated only using available dataset. The datasets reported in related studies were reviewed. Some appear to overlap with the dataset used in the present work and therefore could not be considered truly independent. Future research will focus on validating the model using independently collected datasets.
This study introduces a hybrid deep learning model using CNN and SVM for automated early identification of LSD in cattle by combining the strengths of both the models. The proposed CNN-SVM model for LSD identification utilizes the deep feature learning competency of CNN and powerful classification competency of SVM to achieve better results in automatic identification of LSD from cattle skin images. The overall results prove the effectiveness of the proposed CNN-SVM models which yielded 92.59% (95% Confidence Interval: 86.90-95.93%) of classification accuracy which is higher compared to the standalone CNN and SVM models. This proposed hybrid deep learning approach can significantly contribute to disease monitoring and management in livestock populations by reducing the dependence on manual inspection.
The author declares no conflict of interest.

  1. Afshari, S.E. (2022). Assessing machine learning techniques in forecasting lumpy skin disease occurrence based on meteorological and geospatial features. Tropical Animal Health and Production. 54(1): 55. doi: 10.1007/s11250- 022-03073-2.

  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. Al-Salihi, K. (2014). Lumpy skin disease: Review of literature. Mirror of Research in Veterinary Sciences and Animals. 3(3): 6-23.

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

  5. Ambilo, A. and Melaku, A. (2013). Major skin diseases of cattle: prevalence and risk factors in and around Hawassa, Southern Ethiopia. Journal of Advanced Veterinary Research. 3(4): 147-153.

  6. Bhavani R. (2025). Smart detection of macro nutrient deficiency in soybean plant using convolutional neural network. Legume Research. 48(11): 1855-1862. doi: 10.18805/LR-5534.

  7. Cho, H.O. (2025). Sequential convolutional neural network techniques to improve detection of lesions in dogs. Indian Journal of Animal Research. 59(6): 926-933. doi: 10.18805/IJAR.BF-1821.

  8. Gerber, P., Chilonda, P., Franceschini, G. and Menzi, H. (2005). Geographical determinants and environmental implications of livestock production intensification in Asia. Bioresource Technology. 96(2): 263-276.

  9. Girmaw, D.W. (2025). Livestock animal skin disease detection and classification using deep learning approaches. Biomedical Signal Processing and Control. 102: 107334.

  10. Herrero, M., Thornton, P.K., Gerber, P. and Reid, R.S. (2009). Livestock, livelihoods and the environment: Understanding the trade-offs. Current Opinion in Environmental Sustainability. 1(2): 111-120.

  11. Khotimah, B.K., Satoto, B.D., Pramudita, Y.D., Dewi, D.A. and Ayuni, F. (2026). A robust ensemble deep learning model for lumpy skin disease identification. Engineering, Technology and Applied Science Research. 16(1): 31285-31293.

  12. Kumar, S.  and Shastri, S. (2022). Lumpy skin images dataset. Mendeley Data. V1. doi: 10.17632/w36hpf86j2.1.

  13. Kyung-Won, C., Kim, T. and NA, I.S. (2025). A deep convolutional neural network for multi-class fish disease classification using VGGNet-19 architecture. Indian Journal of Animal Research. 60(6): 981-988. doi: 10.18805/IJAR.BF-1946.

  14. Maharana, K., Mondal, S. and Nemade, B. (2022). A review: Data pre-processing and data augmentation techniques. Proceedings of International Conference on Intelligent Engineering Approach. 3(1): 91-99.

  15. Mallikarjun, G. and Narayana, V.A. (2024). Stacking ensemble of capsule network and multi-hidden layer extreme learning machine for enhanced lumpy skin disease diagnosis.  Informatica. 48(20): 167-186.

  16. Moriello, K.A. (2025). Diagnosis of Skin Diseases in Small Animals. MSD Manual. https://www.msdvetmanual.com/ integumentary-system/integumentary-system-introduction/ diagnosis-of-skin-diseases-in-small-animals.

  17. Ponnusamy, K. and Pachaiyappan, K. (2018). Strengthening extension research in animal husbandry: Review of issues and strategies. The Indian Journal of Animal Sciences. 88(2): 137-143.

  18. Perin, L., Dumas, P. and Vigne, M. (2022). Representing cattle farming around the world: A conceptual and holistic framework for environmental and economic impact assessment. Ruminants. 2(4): 360-381. 

  19. Salunkhe, U.R. and Mali, S.N. (2016). Classifier ensemble design for imbalanced data classification: A hybrid approach.  Procedia Computer Science. 85: 725-732.

  20. Taye, M.M. (2023). Theoretical understanding of convolutional neural network: Concepts, architectures, applications, future directions. Computation. 11(3): 52. https://doi.org/10.3390/ computation11030052.

  21. Vidic, J., Manzano, M., Chang, C.M. and Jaffrezic-Renault, N. (2017). Advanced biosensors for detection of pathogens related to livestock and poultry. Veterinary Research. 48(1): 1-22. https://doi.org/10.1186/s13567-017-0418-5.

  22. Yadav, A.K., Verma, D. and Solanki, P.R. (2023). Introduction to Numerous Diseases of the Livestock. In Nanobiotechnology for the Livestock Industry (Animal Health and Nutrition). pp 141-156. 

  23. Zeedan, G.S.G., Mahmoud, A.H., Abdalhamed, A.M., Abd El, K.A.E.H., Khafagi, M.H. and Abou, Z.H.A.A. (2019). Detection of lumpy skin disease virus in cattle using real-time polymerase chain reaction and serological diagnostic assays in different governorates in Egypt in 2017. Veterinary World. 12(7): 1093-1100.

A Hybrid Deep Learning Model based Smart Identification of Lumpy Skin Disease in Cattle

1Department of Computer Science and Engineering, Government College of Engineering Srirangam, Trichy-620 012, Tamil Nadu, India.

Background: Health care in livestock farming is an essential task as it ensures the food security of a nation. Many traditional methods are followed in monitoring the health of cattle in cattle farming. The recent development in deep learning models in the field of image classification has gained attraction towards early detection of diseases in cattle.

Methods: A hybrid deep learning model is developed for identifying lumpy skin disease in cattle. It encompasses two blocks viz., one to extract features and another to identify disease using the extracted features. Convolutional neural networks (CNN) were utilized in feature extraction from the images of cattle and support vector machine (SVM) were used to distinguish lumpy skin and healthy skin from the learned features.

Result: The developed model was trained with 80% of the collected cattle images. Experimental test output of the CNN-SVM model with remaining images yielded an overall accuracy of 92.59% (95% Confidence Interval: 86.90-95.93%). This system speeds up the screening process by reducing manual inspection and helps in early decision making to protect animals and support farmers.

In India, animal husbandry is important to develop the rural economy. It plays a significant role in improving the income of farmers and landless labourers and also provides employment opportunities both in rural and urban areas (Ponnusamy and Pachaiyappan, 2018). There are many forms of animal husbandry like cattle farming, poultry farming, bee keeping, fish farming and livestock farming. Cattle farming involve many different activities and produce several products like meat and milk. Its economic impact depends on how land, resources and fertilizers are used, as well as how intensive the farming is (Perin et al., 2022). Apart from revenue generated through the sale of livestock products, cattle production systems contribute additional socioeconomic and agricultural benefits, including the provision of draft power, livestock-based financial security and the enhancement of soil fertility, subject to local management practices and resource availability (Gerber et al., 2005).
       
The health of cattle is a vital factor in the growth and success of cattle farming. Cattle are affected by various diseases caused by bacteria, viruses, parasites and poor management practices. These diseases hinder the production of milk and meat, weaken animals and sometimes lead them to death (Herrero et al., 2009). Cattle are vulnerable to several diseases such as foot-and-mouth disease, lumpy skin disease, mastitis and parasitic infections (Yadav et al., 2023). Lumpy skin disease virus (LSDV) that belongs to the genus capripoxvirus in poxviridae family causes lumpy skin disease (LSD) which is a spreadable viral disease in cattle (Al-Salihi, 2014). Unidentified situations may lead to less milk production, loss of weight, impaired fertility which will lead to economic losses in both dairy and meat production. Early monitoring of cattle health and timely disease detection are essential for controlling the spread of infections and minimizing production losses. The definitive diagnosis of LSD in cattle requires an organised approach involving a medical history, clinical examination and proper laboratory investigations. Conventional methods for identifying LSD primarily rely on specialized laboratory based techniques which are often time-consuming and require trained personnel.
       
Serological tests are commonly used to diagnose LSD. But, they require extended processing times and the potential for false-positive results arising from cross-reactivity with other poxviruses (Zeedan et al., 2019). In contrast, molecular approaches such as PCR offer faster results but they require purified DNA, specialized laboratory instruments and well-equipped facilities that make them impractical for field-based diagnosis (Vidic et al., 2017). These limitations have motivated the development of alternative approaches for LSD identification. Generally, the initial screening of cattle skin diseases begins with a complete visual examination of the animal’s skin under proper lighting (Moriello, 2025). However, accurate diagnosis of LSD using conventional approaches requires advanced diagnostic equipment and depends significantly on the expertise of skilled veterinary professionals, limiting their accessibility in resource-constrained settings.
       
The development of modern technologies like computer vision, deep learning and artificial intelligence has proven their importance in disease identification tasks in cattle. It helps to increase the competence of cattle farming by automating the health care process and detecting disease in the early stage. Deep learning models such as EfficientNetB7, MobileNetV2 and DenseNet201 with a softmax activation function was employed for skin disease recognition in cattle, sheep and goats (Girmaw, 2025). A Sequential CNN was developed to classify five categories of canine skin lesions (Cho, 2025). Similarly, the VGG-19 deep learning model was employed to detect six common fish diseases (Kyung-Won et al., 2025). As many researchers found it useful to employ deep learning models for identifying disease in animals, the following paragraph explores how deep learning is used for lumpy skin disease identification in cattle. Artificial neural networks proved the highest forecasting for LSDV infection (Afshari, 2022). Furthermore, a stacked ensemble model integrating a capsule network, extreme learning machine (ELM) and linear regression was developed to identify LSD in cattle using a self-curated dataset (Mallikarjun and Narayana, 2024). In dairy cows, an image based identification of LSD was done from GLCM features and statistical features obtained from the images of lumpy skin infected dairy cows. A customized CNN model was used to identify LSD in calves (AlZubi, 2024). DenseNet-121 model was employed with additional classification layer to classify disease in cows as LSD or healthy (Alkhanifer and AlZubi, 2025).
       
Despite the increasing adoption of machine learning for identifying LSD, robust image-based deep learning approaches capable of directly detecting and classifying disease lesions with high accuracy and computational efficiency remain limited. This gap motivates the development of a hybrid CNN-SVM model in which a task-specific customized CNN learns visual representations from images and the resulting deep features are classified using SVM. Unlike conventional CNN approaches that use a Softmax layer for disease classification, the proposed model employs a margin-based classification that improves LSD identification under limited training data.
The overall system architecture of the proposed method for the identification of LSD in cattle is presented in Fig 1. Initially, lumpy skin infected cattle images and healthy cattle images are collected from the data sources and pre-processed. The collected images are subsequently split into two sets in a ratio of 80:20 for training and testing. The first half is considered for training the proposed model and comprises 80% of the images from both the LSD and healthy skin categories, while the remaining 20% of the images are reserved for testing. Finally, after training the CNN-SVM model for LSD identification in cattle, it is evaluated using standard performance metrics. This work was carried out from July 2023 to May 2026 at Government College of Engineering Srirangam, Trichy.

Fig 1: Work flow diagram of the proposed CNN-SVM model.



Dataset description
 
Data play an essential role in developing and training deep learning models, as they directly influence the model in learning meaningful representations and works well on new unseen data to obtain high accuracy. High-quality, diverse and well-labelled data is the base for any deep learning model to learn meaningful features automatically from visual images. This study utilizes the dataset reported by Kumar et al., (2022) that has two image classes: LSD and healthy skin. This dataset is image-based and does not provide reliable animal level identifiers. The metadata about the image acquisition process is not available. There are 324 images in LSD category and 700 images in healthy skin category. Having a well-balanced dataset is essential when building a deep learning model, as it helps the model develop an equal understanding of features across all categories rather than leaning toward the most frequently represented ones. This bias leads to unreliable predictions, poor generalization and skewed evaluation metrics (Salunkhe and Mali, 2016). So, to balance the dataset and avoid over-representation of healthy skin category, only 350 images from healthy skin category were taken for experimentation. Since the dataset contains processed images, 350 images of healthy skin images were chosen manually. Fig 2 displays some sample images of LSDV infected cows and healthy cows.

Fig 2: Sample images of LSDV infected and healthy cows.


 
Data preprocessing
 
The preprocessing stage converts raw image data into a standardized and informative format, enabling the deep learning model in learning more discriminative features and achieve improved classification performance (Maharana et al., 2022). The proposed CNN-SVM model accepts images 224 × 224 pixels in three channels. So, in the first step of image preprocessing, all the images considered for this study are converted to an unvarying size of 224 × 224 pixels to be processed by the proposed feature extraction part of the CNN-SVM model.
       
Raw image data can vary widely in brightness, contrast or intensity across different images, which may cause models to focus on irrelevant differences rather than meaningful features. Image normalization helps minimize these variations. It also ensures the data is on a consistent and comparable scale allowing models to learn more effectively. Next, all the resized images are normalized using z-score normalization given by equation (1).

 
                                                                                                               
Where,
X= The pixel value.
xmean= The overall mean of.
xstd= The standard deviation of x and x2  is the normalized pixel value.
 
CNN based feature extraction
 
Deep learning models highly rely on the features extracted from the visual images as it helps in identifying the hidden patterns to discriminate between classes. Effective feature extraction is therefore essential for improving model performance and generalization. In deep learning, features from raw images are extracted using CNN models (Taye, 2023).  In this paper, a hybrid deep learning model using CNN and SVM is developed for lumpy skin identification. CNN is employed to extract spatial features automatically from raw images of cattle, while SVM utilizes these extracted features to classify the images as either LSD-infected or normal.
       
The layer description of the proposed hybrid CNN-SVM model developed for smart identification of LSD in cattle is shown in Fig 3 and the complete architecture is presented in Table 1. The CNN employed for extracting spatial features in this study is designed with five sequential blocks comprising convolutional layers and max-pooling layers. The first three blocks each consist of a single convolutional layer and a max-pooling layer. The initial layers are important for detecting edges and textures in the image and hence 64 filters are applied in each layer to perform convolution operation.  A convolution kernel of size (3 × 3) with a stride of 1 is employed in all convolutional layers. During the convolution operation and the pixel values within each (3 × 3) sliding window of the input feature map are multiplied element-wise with the corresponding kernel weight. Finally, the resulting products are added to produce a single value in the output feature map, as expressed in equation (2).
 
                                                                              
Where,
I= Input feature map to the convolutional layer.
K= The kernel.

Fig 3: Layer description in the proposed CNN-SVM model.



Table 1: Architecture of the customized CNN model.


       
Since a stride of 1 is employed in this study, the spatial dimensions of the output feature map are computed using Equation (3).
 
                    Cdim = Idim - Kdim + 1                                       ...(3)
 
Next, the rectified linear unit activates the output of the convolution operation in order to eliminate negative value in the final output. Equation (4) gives the relu activation function.


Next, the spatial dimension of the feature maps is reduced using the pooling operation which aggregates the information in a particular sliding window to one value. In this study, max-pooling is employed, in which the maximum value within each sliding window is retained while the remaining values are discarded. This down sampling process reduces computational complexity, preserves the most salient features and enhances the robustness of the CNN against minor spatial variations. With 3×3 sliding window size, maxpooling is given by equation (5).
 
                Poolmax = max [C (x, y)] ; 0 < x ≤ 3 ; 0 < y ≤ 3                   ...(5)             
                                      
The fourth block and the fifth block were developed with two convolutional layers and one max pooling layer. The last two blocks are used to extract features such as shapes and object parts. The fourth block contains 64 filters and the fifth block contains 32 filters. The output feature map from the fifth block is finally flattened to a feature vector of size 1568. Thus the 224×224×3 input image is processed by the CNN to obtain the feature vector of size 1568 which is then used by the SVM to identify the LSD in cattle.
 
Lumpy skin disease identification using SVM
 
The next step after extracting features from raw images of cattle is to classify the images with lumpy skin and healthy skin. This problem could be designed as a binary classification problem as there are only two classes considered in the study. Given a set of inputs, binary classification aims to assign each input to one of two possible classes. SVM algorithm is best suited for binary classification problem. It works by finding the optimal hyperplane that separates data points by maximizing the margin between the nearest data points, thereby improving classification accuracy and generalization. It finds the hyperplane given by:
 
wTx + b = 0           ...(6)
                                                                                                                        
that separates the data and maximizes margin


Where,
x= The input data vector.
w= The weight associated with it and b is the bias value.
       
This paper develops a SVM model using scikit-learn library in python to classify the features learned from cattle images into LSD and normal skin.
 
Learning phase of CNN-SVM model
 
The coding for the proposed CNN-SVM model for LSD identification was written using Python programming language. CNN was built using keras library and SVM was developed using scikit-learn library. The learning phase of the proposed CNN-SVM model was accomplished via the Google Colab platform with a T4 GPU runtime environment featuring 12 GB of GPU memory. Following hyperparameter fine-tuning, the optimal configuration for the proposed CNN model was obtained with a dropout rate of 10% for a batch size of 64 with learning rate 0.0001 while using Adam optimizer and the binary cross-entropy loss function. The hyperparameter setting for training the SVM classifier is given in Table 2. The fine tuning of SVM classifier using grid search with stratified 5-fold cross-validation resulted in the best scores for regularization parameter (C) with 10 and kernel coefficient (γ) with 0.01.

Table 2: Hyperparameters used for SVM training.


       
After configuring the environment and setting the hyperparameters, the proposed CNN-SVM model to identify LSD in cattle is trained using 80% of the input images. To ensure unbiased evaluation, stratified k-fold cross-validation is performed on the 80% training dataset. In stratified k-fold cross-validation, the training data is divided into k folds. During each iteration, k-1 folds are used in training process and the remaining fold is user for validation process. Finally, the average obtained from the classification performance across all folds gives the overall cross-validation performance. As the number of images in the k-1 fold is very small, they are augmented to generate modified versions of the existing images using flipping, scaling and cropping techniques. This enables artificially expanding and diversifying the training dataset. This process is done to boost the generalization ability of the proposed LSD identification model. Upon completion of training, the reserved 20% of the images are tested over the trained CNN-SVM model for LSD identification and their classification performance is evaluated.
       
The trained CNN-SVM model is evaluated using precision, recall (or) sensitivity, specificity and F1-score (Bhavani, 2025). The macro average of these metrics is used in the following section for discussion. Accuracy of the classifier is determined using equation (8).


The uncertainty in model predictions is estimated using 95% confidence interval. In addition to that, receiver operating characteristic–area under the curve (ROC-AUC) is considered to assess how well the proposed model discriminates the LSD and healthy skin images (Khotimah et al., 2026).
The results presented in this section discuss the effectiveness of the proposed CNN-SVM model for the early visual identification of LSD in cattle. The model demonstrated a strong ability to discriminate between LSD images and healthy images.
 
Training performance of CNN-SVM 
 
The proposed CNN-SVM model was trained using 80% of the dataset. The training and validation performance are tabulated for epochs in the interval of ten. As observed from Table 3, a considerable variation exists between the training and validation performance during the initial 30 epochs. The proposed CNN-SVM model gradually stabilizes between the 40th and 50th epochs, indicating improved convergence and consistent learning. After training the CNN-SVM model for 50 epochs the loss observed was 0.06. Training of the proposed CNN-SVM model was terminated after 50 epochs, as no significant improvement was observed in the training and validation performance beyond this point, indicating that the model had converged. The training and validation accuracy and loss of the proposed CNN-SVM model are presented in Fig 4. The learning curves indicate that the model exhibits lower performance during the initial training epochs, followed by a steady improvement in both training and validation accuracy. The model converges by the 50th epoch, achieving a classification accuracy of 94%. Beyond this point, no significant improvement in performance is observed. Therefore, the training process was terminated after 50 epochs to prevent overfitting.

Table 3: Performance of CNN-SVM during training over different epochs.



Fig 4: Training time accuracy and loss comparison.


 
Testing performance of CNN-SVM 
 
The trained CNN-SVM model was then evaluated for its performance with the unseen testing images. 20% of the testing images that consists of 65 images in LSD category and 70 images in healthy category were used in testing the trained CNN-SVM model. As an initial step, a confusion matrix was created to assess the classification performance of the proposed CNN-SVM model by quantifying the numbers of correctly classified and misclassified images for both the LSD and healthy classes. As shown in Fig 5, the proposed CNN-SVM model achieved a misclassification rate of 6.15% for the LSD class and 8.50% for the healthy class. These results indicate that the model effectively categorizes the two classes, with only a small proportion of images being incorrectly classified. The performance metrics were calculated from the confusion matrix and its summary is presented in Table 4. It is evident from the evaluation report that the proposed CNN-SVM model discriminates images with LSD infected and images of healthy cattle effectively.

Fig 5: Confusion matrix for lumpy skin disease identification.



Table 4: LSD identification using CNN-SVM model-evaluation report.


       
The evaluation metrics obtained for both the LSD and healthy classes exceeds 0.91 in terms of precision, recall (or) sensitivity, specificity and F1-score proving the effectiveness of the proposed CNN-SVM model. The overall accuracy of 92.59% (95% Confidence Interval: 86.90-95.93%) further confirms the strength of the classifier. Also, the ROC-AUC of 94.61 from Fig 6, proves that the model distinguishes the LSD and the healthy classes very well. Overall, these performance outcomes indicate that the proposed CNN-SVM demonstrates good performance in automatic image based identification of LSD in cattle.

Fig 6: ROC-AUC of CNN-SVM model.


       
Furthermore, Fig 7 gives the comparison of the classification performance of the proposed CNN-SVM model with those of the CNN model with softmax layer and SVM model for the identification of LSD. The accuracy obtained from the SVM model, CNN model and the proposed CNN-SVM model for identification of LSD are 86.28%, 90.12% and 92.59% respectively. These accuracy values indicate that the proposed model outperforms both standalone models. These results show that by incorporating deep spatial feature extraction of CNN for SVM classification, the overall classification performance is enhanced for LSD identification in cattle.

Fig 7: Performance comparison-standalone vs CNN-SVM model.


       
However, some bovine skin conditions can also have similar appearances, such as nodules, lesions, swelling, redness, or skin abnormalities (Ambilo and Melaku, 2013). The proposed system struggles to categorise these appearances. Therefore, the model’s predictions should not be considered definitive evidence of infection. The proposed system is used primarily as a rapid screening and decision-support tool to assist veterinarians and farmers in identifying LSD in cattle that may require further examination.
       
A limitation of the present work is the absence of independent external validation. The proposed model was evaluated only using available dataset. The datasets reported in related studies were reviewed. Some appear to overlap with the dataset used in the present work and therefore could not be considered truly independent. Future research will focus on validating the model using independently collected datasets.
This study introduces a hybrid deep learning model using CNN and SVM for automated early identification of LSD in cattle by combining the strengths of both the models. The proposed CNN-SVM model for LSD identification utilizes the deep feature learning competency of CNN and powerful classification competency of SVM to achieve better results in automatic identification of LSD from cattle skin images. The overall results prove the effectiveness of the proposed CNN-SVM models which yielded 92.59% (95% Confidence Interval: 86.90-95.93%) of classification accuracy which is higher compared to the standalone CNN and SVM models. This proposed hybrid deep learning approach can significantly contribute to disease monitoring and management in livestock populations by reducing the dependence on manual inspection.
The author declares no conflict of interest.

  1. Afshari, S.E. (2022). Assessing machine learning techniques in forecasting lumpy skin disease occurrence based on meteorological and geospatial features. Tropical Animal Health and Production. 54(1): 55. doi: 10.1007/s11250- 022-03073-2.

  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. Al-Salihi, K. (2014). Lumpy skin disease: Review of literature. Mirror of Research in Veterinary Sciences and Animals. 3(3): 6-23.

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

  5. Ambilo, A. and Melaku, A. (2013). Major skin diseases of cattle: prevalence and risk factors in and around Hawassa, Southern Ethiopia. Journal of Advanced Veterinary Research. 3(4): 147-153.

  6. Bhavani R. (2025). Smart detection of macro nutrient deficiency in soybean plant using convolutional neural network. Legume Research. 48(11): 1855-1862. doi: 10.18805/LR-5534.

  7. Cho, H.O. (2025). Sequential convolutional neural network techniques to improve detection of lesions in dogs. Indian Journal of Animal Research. 59(6): 926-933. doi: 10.18805/IJAR.BF-1821.

  8. Gerber, P., Chilonda, P., Franceschini, G. and Menzi, H. (2005). Geographical determinants and environmental implications of livestock production intensification in Asia. Bioresource Technology. 96(2): 263-276.

  9. Girmaw, D.W. (2025). Livestock animal skin disease detection and classification using deep learning approaches. Biomedical Signal Processing and Control. 102: 107334.

  10. Herrero, M., Thornton, P.K., Gerber, P. and Reid, R.S. (2009). Livestock, livelihoods and the environment: Understanding the trade-offs. Current Opinion in Environmental Sustainability. 1(2): 111-120.

  11. Khotimah, B.K., Satoto, B.D., Pramudita, Y.D., Dewi, D.A. and Ayuni, F. (2026). A robust ensemble deep learning model for lumpy skin disease identification. Engineering, Technology and Applied Science Research. 16(1): 31285-31293.

  12. Kumar, S.  and Shastri, S. (2022). Lumpy skin images dataset. Mendeley Data. V1. doi: 10.17632/w36hpf86j2.1.

  13. Kyung-Won, C., Kim, T. and NA, I.S. (2025). A deep convolutional neural network for multi-class fish disease classification using VGGNet-19 architecture. Indian Journal of Animal Research. 60(6): 981-988. doi: 10.18805/IJAR.BF-1946.

  14. Maharana, K., Mondal, S. and Nemade, B. (2022). A review: Data pre-processing and data augmentation techniques. Proceedings of International Conference on Intelligent Engineering Approach. 3(1): 91-99.

  15. Mallikarjun, G. and Narayana, V.A. (2024). Stacking ensemble of capsule network and multi-hidden layer extreme learning machine for enhanced lumpy skin disease diagnosis.  Informatica. 48(20): 167-186.

  16. Moriello, K.A. (2025). Diagnosis of Skin Diseases in Small Animals. MSD Manual. https://www.msdvetmanual.com/ integumentary-system/integumentary-system-introduction/ diagnosis-of-skin-diseases-in-small-animals.

  17. Ponnusamy, K. and Pachaiyappan, K. (2018). Strengthening extension research in animal husbandry: Review of issues and strategies. The Indian Journal of Animal Sciences. 88(2): 137-143.

  18. Perin, L., Dumas, P. and Vigne, M. (2022). Representing cattle farming around the world: A conceptual and holistic framework for environmental and economic impact assessment. Ruminants. 2(4): 360-381. 

  19. Salunkhe, U.R. and Mali, S.N. (2016). Classifier ensemble design for imbalanced data classification: A hybrid approach.  Procedia Computer Science. 85: 725-732.

  20. Taye, M.M. (2023). Theoretical understanding of convolutional neural network: Concepts, architectures, applications, future directions. Computation. 11(3): 52. https://doi.org/10.3390/ computation11030052.

  21. Vidic, J., Manzano, M., Chang, C.M. and Jaffrezic-Renault, N. (2017). Advanced biosensors for detection of pathogens related to livestock and poultry. Veterinary Research. 48(1): 1-22. https://doi.org/10.1186/s13567-017-0418-5.

  22. Yadav, A.K., Verma, D. and Solanki, P.R. (2023). Introduction to Numerous Diseases of the Livestock. In Nanobiotechnology for the Livestock Industry (Animal Health and Nutrition). pp 141-156. 

  23. Zeedan, G.S.G., Mahmoud, A.H., Abdalhamed, A.M., Abd El, K.A.E.H., Khafagi, M.H. and Abou, Z.H.A.A. (2019). Detection of lumpy skin disease virus in cattle using real-time polymerase chain reaction and serological diagnostic assays in different governorates in Egypt in 2017. Veterinary World. 12(7): 1093-1100.
In this Article
Published In
Indian Journal of Animal Research

Editorial Board

View all (0) Â