A Model for Early Detection of Lumpy Skin Disease in Cattle Using Ensemble Technique
Saqib Ali Khaskheli1, Muhammad Yaqoob Koondhar1, Zulfikar Ahmed Maher1, Gul Bahar Khaskheli1 and Azhar Ali Khaskheli2
1Information Technology Centre, Sindh Agriculture University, Tandojam
2Department of Computer Science, Virtual University of Pakistan
ABSTRACT
Lumpy skin disease in cattle is endemic disease showing a threat to overall livestock industries. In the past several traditional practices have been used to analyse these types of diseases such as poly chain reaction (PCR), clinical practices, laser, photonics technologies etc. Although these types of technologies were very efficient and effective but have some flaws such as they are expensive, vey time consuming, costly for large area farms and demand continuous human observation and engagement. The present study was planned to overcome these flaws by introducing a new method by designing a model for earlier detection of lumpy skin disease in cattle using ensemble techniques. The model was trained and tested with dataset, which detects the lumpy skin disease. The dataset was collected from 3 different districts of Sindh province (Tando Muhammad Khan, Tando Allahyar and Matiari) and consisted of 500 images among which 75% was used for training purpose while remaining 25% for testing. The collected data was further processed with image pre-processing techniques, to enhance the quality of images and to detect the region of interest. The model categorized the cattle into “normal”, “high” and “severe” stages based on their physical conditions and temperature value. The experimental result showed that, the ensemble technique achieved around 86% accuracy.
Article Information
Received 10 August 2023
Revised 25 February 2024
Accepted 10 March 2024
Available online 27 May 2024
(early access)
Published 21 June 2025
Authors’ Contribution
SAK, MYK, ZAM, GBK: Research idea and designed the study; SAK, ZAK: Visited the dairy farms and collected the data; SAK, MYK, GBK: performed data analysis: SAK, ZAK: wrote the paper.
Key words
Lumpy skin disease, Machine learning, Random Forest, Decision tree, Logistic regression, Support Vector Machine, Image processing
DOI: https://dx.doi.org/10.17582/journal.pjz/20230810102300
* Corresponding author: [email protected]
0030-9923/2025/0004-1797 $ 9.00/00
Copyright 2025 by the authors. Licensee Zoological Society of Pakistan.
This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Introduction
The human being lives have become more comfortable and effortless due to the leading-edge technologies of Information technology including machine learning, Cloud Computing, computer vision, Artificial Intelligence (AI), Internet of things (IoT) etc. (Meng and Saddeh, 2020). These emerging technologies are playing a dynamic role in nearly every domain and field for example agriculture, education, transportation, engineering, medical science etc., (Bernacki et al., 2020). According to Saranya et al. (2020), cattle play a significant part in agricultural activities. Because their manure contains a lot of nitrogen, cattle are a valuable source of food, nutrition, and milk. They also help to rebuild soils. The skin diseases are very infectious and anxious problem. It has a serious impact on mental stability and the appearance of patient. The lumpy skin disease (LSD) is the one of skin diseases (Kabuga and El-Zowalaty, 2019) which is widely spreading and is a huge threat to overall livestock industries (Li et al., 2020). It is an endemic disease caused by a virus capri-poxvirus genus of a poxviridae family and is characterized by high fever and skin nodules that are found on overall body of cattle (Saranya et al., 2020). According to report of Yashika Singla dated on 30th June 2022, the LSD was firstly reported in Sindh, province of Pakistan, where it had killed around large number of cows and is spreading countrywide. It is important to detect such disaster at early stages in order to prevent it from further spreading and providing the proper treatment to affected ones. Traditionally, there are several methods used to diagnose LSD (Afshari, 2022), among which, one is to diagnose it through sign, symptoms and behavioural conditions of patient. These traditional practices requires continuous monitoring of large farms, constant human engagement and observation for accurate estimation of disease that tends to be very cumbersome, time consuming and costly for larger area farms (Khaitova and Nazokat, 2020). Keeping these issues in mind the research is planned to diagnose such diseases using modern digital technologies of Information Technology including artificial intelligence, digital image processing, computer vision and machine learning techniques. In this regard, a model has been proposed and validate for early detect of LSD in cattle by using ensemble technique.
Materials and Methods
In this study, conducted in 2022, a two-phase approach was employed. In the first phase, a model was designed to detect lumpy skin disease in cattle at early stages. In the second phase, the designed system was validated through the development and testing of a system. Empirical results were analyzed to draw conclusions.
Data collection
The data was collected from different districts of Sindh province including Tando Muhammad Khan, Tando Allahyar and Matiari and consisted of 500 images among which 75% was used for training purpose while remaining 25% for testing.
Designed model for earlier detection of LSD
Figure 1 represents the designed model for earlier detection of lumpy skin disease in cattle. The designed model consists of 2 layers, first one for processing side and second one for client side. The processing layer was used for the detection of lumpy skin disease basically it consists of sensors in which camera sensor was used to continuous monitor and capture the affected cattle after that image was pre-processed in which image was resized and segmented, further after the image segmentation. Gray level co-occurrence matrix (GLCM) is used for feature extraction from those images of cattle that can be used for classification using ensemble technique. Once lumpy skin disease was detected, success notifications was sent to client side and the temperature sensor was also used to perceive the temperature of cattle.
The client-side layer was for the veterinary doctor or livestock farm manager who works in the public or private organizations. Firstly, they were authenticated to login by username and password credentials. After login credentials this layer made use and validated it based on the standard defined. The standards consisted of sign and symptoms, high temperature and nodules on the skin.
After the data was successfully validated, it was stored in cloud database.
Image pre-processing
Image pre-processing is crucial for improving the performance of computer vision and image analysis tasks (Girma, 2021). The pre-processing steps are designed to standardize the image data, reduce noise and irrelevant information, and extract relevant features that can be used in image analysis algorithms. These steps help to remove any unwanted information and enhance the important features in the image data, resulting in a better representation of the image for further processing.
Grayscale conversion: In this step the RGB (red, green blue) images were converted into grayscale. The grayscale images were easier and faster to process as compared with colour images (Rai et al., 2021). In this proposed model RGB or coloured images were converted into grayscale by using following equation.
Gray = 0.2989 * r + 0.5870 * g + 0.1140 * b
Noise removal: The main objective to use noise removal is to identify and remove unknown noise from coloured images. In this proposed model, median filter and Gaussian filter were used for unwanted noises (Mulatu and Feyisa, 2018).
Image segmentation: Such as colour, intensity, texture, etc. Image segmentation is an important step in image analysis as it helps to separate objects or parts of objects of interest from the background. This information is then used for further processing, such as object recognition, object tracking, and image classification. There are various techniques for image segmentation, including thresholding, region-growing, edge detection, and clustering methods such as k-means (Schenket al., 2020). In this proposed model or system region-based segmentation for image segmentation.
Feature extraction: In this proposed model, GLCM (Gray level co-occurrence matrix) is a method for texture analysis in image processing. It captures the spatial relationship between pixels in an image by constructing a matrix that represents the frequency of occurrence of gray-level pairs at a certain distance and orientation. The matrix is then used to calculate various texture features such as contrast, mean, energy, homogeneity, etc., that describe the texture of the image. These features can then be used for various tasks such as image classification, object recognition, and scene analysis (Pintelas and Livieris, 2020).
Classifier: Soft voting is a process of combining the results from multiple classifiers in which each classifier has a weight proportional to its accuracy, and the final prediction is based on the class with the highest average weighted score (Lutins, 2017). In this case, the proposed ensemble technique is using soft voting to make the final prediction of lumpy skin disease by combining the results of multiple classifiers such as Random Forest, Decision Tree, Logistic Regression, and Support Vector Machine. In this proposed model result of GLCM were given as an input to ensemble technique which takes testing and training data that classifies either given image was lumpy skin disease or not.
Calculating accuracy
The accuracy is simply a ratio of properly predicted observations to all observations.
In proposed model accuracy was calculated by following equation.
Accuracy = (TP + TN) / (TP + TN + FP +FN)
where TP is total phosphorus, FP is for false positive, TN stands for true negative, and FN is for false negative.
Precision is defined as the proportion of accurately predicted positive observations to all the expected positive observations.
Precision = TP/TP+FP
Recall is the ratio of accurately predicted positive observations to all observations in the actual class.
Recall =TP/TP=FN
F1 Score is an average of precision and recall.
F1 = (Recall*Precision / Recall + Precision) *2
Validating the proposed model
To validate the designed model, a system was developed. The system consisted of two components one for client side and another for server side. For both of these components, different applications were developed. The developed system was further tested through 3 different evaluations, which were performed in different districts of Sindh province including Tando Muhammad Khan, Tando Allahyar and Matiari.
The client side, an android base application was developed by using Android studio IDE, Java programming language and XML language to design the user interface. However for the server side, a web base service was developed using Python programming language, AI libraries and machine learning techniques.
Testing the developed system/ calculating the empirical result
The evaluation involved a total of 50 cattle selected randomly from districts in the Sindh province, including 10 from Tando Muhammad Khan, 20 from Tando Allahyar, and 20 from Matiari. In each evaluation, an expert was invited to participate in the validation process. They were instructed to install the application and log in using registered credentials. If the provided login credentials were not authenticated by the system, an error message appeared, indicating ‘username or password incorrect. It’s worth noting that unauthorized individuals had the option to create an account. However, when the credentials matched the authorized ones, the main page was opened, featuring a dashboard displaying notifications detected by the developed system. Furthermore, the application provided an option to view the records. Upon selecting ‘view,’ another page displayed the data detected by the system according to defined criteria, along with two options for the expert to validate or not.
RESULTS AND DISCUSSION
Accuracy of proposed model
The accuracy of proposed model was tested on the dataset which was collected from 3 different district of Sindh province including Tando Muhammad khan, Tando Allahyar and Matiari. The dataset consisted of 500 images among which 75% was used for training purpose while remaining 25% for testing. The data given below shows that the proposed model got 86% accuracy.
|
Accuracy |
86% |
|
Precision |
86% |
|
Recall |
86% |
|
F1 score |
86.01% |
The empirical results of developed system for earlier detection of lumpy skin disease in cattle evaluated and calculated in 3 different districts of Sindh Province including Tando Muhammad Khan, Tando Allahyar and Matiari on different time and dates. The description of each calculated result are given below.
The result of evaluation
The evaluation of developed system for earlier detection of lumpy skin disease in cattle, was performed on the 1st June 2023 in the district Matiari of Sindh province. The total of 50 cattle were selected, after that they were further divided into different groups on the basis of their ages. First group was consisted of 16 cattle of ages 2-4, however the second one was consisting of 25 cattle of 5-8 years ages, the third one consisting of 9-1, while the remaining 4 cattle were falling the 4th and final group which was of 12-14 ages (Table I).
Table II shows the observed temperature of selected cattle. Further developed system detected 45 of 50 cattle which have normal temperature, although the remaining 5 were perceived abnormal among which 3 with high temperature and 2 were with severe (Fig. 2). Further based on their temperature values along with their physical symptoms the developed system recognized 7 cattle with lumpy skin disease. Further after the physical validation by expert, it was observed that 5 cattle had lumpy skin disease and remaining 2 had just normal fever, however among 5 cattle, 2 cattle were identified with just physical symptoms, with normal temperature.
Table I. Age group of selected cattle for evaluation and their quantities.
|
S. No. |
Age group (yr) |
Quantity |
|
1 |
2 to 4 |
16 |
|
2 |
5 to 8 |
25 |
|
3 |
9 to 11 |
5 |
|
4 |
12 to 14 |
4 |
Table II. Temperature value of selected cattle for evaluation based on their tag number.
|
Tag no. (temperature value) |
|
CAT-01 (101.1), CAT-02 (102), CAT-03 (102.1), CAT-04 (101.4), CAT-05 (101.5), CAT-06 (101.2), CAT-07 (101.4), CAT-08 (101.2), CAT-09 (100.5), CAT-10 (100.7), CAT-11 (100.4), CAT-12 (100.1), CAT-13 (100.9), CAT-14 (101), CAT-15 (101.2), CAT-16 (102.2), CAT-17 (102.4), CAT-18 (102.3), CAT-19 (102.2), CAT-20 (101.6), CAT-21 (102.3), CAT-22 (103.4), CAT-23 (101.4), CAT-24 (102.2), CAT-25 (104.1), CAT-26 (106.1), CAT-27 (101.1), CAT-28 (101.6), CAT-29 (101.7), CAT-30 (101.8), CAT-31 (101.2), CAT-32 (102.1), CAT-33 (102.3), CAT-34 (102.4), CAT-35 (103.8), CAT-36 (101.4), CAT-37 (101.3), CAT-38 (102.1), CAT-39 (102.3), CAT-40 (101.2), CAT-41 (106.4), CAT-42 (102.1), CAT-43 (102.4), CAT-44 (102.1), CAT-45 (102), CAT-46 (101.9), CAT-47 (101.8), CAT-48 (101.8), CAT-49 (102.1), CAT-50 (102.3). |
Figure 3 showing the successful record various selected cattle for evaluation validated by the expert which was stored in Google cloud firebase.
Conclusion
It was concluded that, based on the developed system, accuracy and calculated empirical results, in this study, image pre-processing techniques, such as resizing, segmentation, and feature extraction, were utilized alongside ensemble techniques to identify lumpy skin disease at an earlier stage. To make a final prediction, four distinct machine learning classification algorithms, namely random forest, decision tree, logistic regression, and support vector machine, were combined. The results showed an accuracy of approximately 86%. The evaluation was also performed to validate the proposed model, the evaluation were performed in three different district of Sindh province including Tando Muhammad Khan, Tando Allahyar and Matiari, the empirical results proved that this proposed model was an effective and efficient way to diagnose such disease at earlier stages. It was also proved that it was not only effective for lumpy skin disease but also helps to detect other disease as well such as high fever, viral infections characterized by fever etc.
It was also observed that detecting the lumpy skin diseases at earlier stages could save the lives of cattle, which directly or indirectly affect the economy of individual as well as nation.
Statement of conflict of interest
The authors have declared no conflict of interest.
References
Afshari, S.E., 2022. Assessing machine learning techniques in forecasting lumpy skin disease occurrence based on meteorological and geospatial features. Trop. Anim. Hlth. Prod., 54: 1-11. https://doi.org/10.1007/s11250-022-03073-2
Bernacki, M.L., Vosicka, L., Utz, J.C. and Warren, C.B., 2020. Effects of digital learning skill training on the academic performance of undergraduates in science and mathematics. J. Educ. Psychol., 113: 1107–1125. https://doi.org/10.1037/edu0000485
Girma, E., 2021. Identify animal lumpy skin disease using image processing and machine learning. Doctoral dissertation, St. Mary’s University.
Kabuga, A.I. and El-Zowalaty, M.E., 2019. A review of the monkeypox virus and a recent outbreak of skin rash disease in Nigeria. J. med. Virol., 91: 533-540. https://doi.org/10.1002/jmv.25348
Khaitova, N., 2020. The importance of teaching algorithms and programming languages in the creation of electronic education resources. Архив Научных Публикаций JSPI.
Li, L.F., Wang, X., Hu, W.J., Xiong, N.N., Du, Y.X. and Li, B.S., 2020. Deep learning in skin disease image recognition: A review. IEEE Access, 8: 208264-208280. https://doi.org/10.1109/ACCESS.2020.3037258
Lutins, E., 2017. Ensemble methods in machine learning: What are they and why use them. University of Maryland, Graduate Current Data Scientist at Pinpoint.
Meng, G. and Saddeh, H., 2020. Applications of machine learning and soft computing techniques in real world. Int. J. comp. appl. Inf. Technol., 12: 298-302.
Mulatu, E. and Feyisa, A., 2018. Review: Lumpy skin disease. J. Vet. Sci. Technol., 9: 1-8. https://doi.org/10.4172/2157-7579.1000535
Pintelas, P. and Livieris, I.E., 2020. Special issue on ensemble learning and applications. Algorithms, 13: 140. https://doi.org/10.3390/a13060140
Rai, G., Hussain, A., Kumar, A., Ansari, A. and Khanduja, N., 2021. A deep learning approach to detect lumpy skin disease in cows. In: Computer networks, big data and IoT. Springer, Singapore. pp. 369-377. https://doi.org/10.1007/978-981-16-0965-7_30
Saranya, P., Krishneswari, K. and Kavipriya, K., 2020. Identification of diseases in dairy cow based on image texture feature and suggestion of therapeutical measures. https://doi.org/10.22214/ijraset.2020.2082
Schenk, E., Schaeffer, V. and Pénin, J., 2020. Blockchain and the future of open innovation intermediaries: The case of crowdsourcing platforms. In: Managing Digital Open Innovation. World Scientific Publishing Co.: Singapore, 2020. https://doi.org/10.1142/9789811219238_0015