Dr.LADA: Diagnosing Black Pepper Pest and Diseases with Decision Tree

Malaysia has the distinction of being the world’s fifth largest pepper producer country whereby 98% of the country's annual production comes from the State of Sarawak. However, crop loss due to pest and disease incidence has been identified as one of the major pepper production constraints. Inefficient advisory mechanism and assistance from extension staff due to technical and logistic limitations have hindered the pest and disease diagnosis effort for pepper. Currently, extension staff from MPB will have to travel to the rural farms when contacted, or during their visits to advice or treat the plants. Therefore, by the Malaysian Pepper Board and Universiti Kebangsaan Malaysia has jointly developed Dr.LADA apps to diagnose six pests and ten diseases of pepper, which commonly found in Malaysia. This agriculture app can recommend appropriate management measures to solve the problems. This an interactive Android-based mobile app with an inference engine utilizes the decision tree with forward-backward chaining methods to trigger the correct disease or pest based on syndromes. The knowledge is interconnected symptoms extracted and validated by Malaysian Pepper Board experts. Dr.LADA is a native mobile app developed on a Java-based platform, which provides fast performance, a high degree of reliability and can be used without any internet connection. The app has been tested with 10 case studies carried out by the Malaysian Pepper Board and scored 97% of accuracy. Having Dr.LADA, the user can identify problems by answering a series of questions from symptoms shown by several plant parts. Therefore, the dependency of farmers on extension staff is reduced, and indirectly minimizing the extension activity costs. Keywords— agriculture app; diagnosing plant disease; decision tree.


I. INTRODUCTION
Black pepper (Piper nigrum L.) is the most widely used spice in the world and has gained global recognition as the "King of Spices" due to its monetary value and trade in the international spice market. It is one of the crucial commodities in Malaysia, known for its exquisite aroma and pungency. Malaysia is the world's fifth largest pepper producer country whereby 98% of the country's annual production comes from the State of Sarawak [1]. Sarawak pepper is widely considered to be one of the best peppers in the world with geographical indication (GI) status recognition since 2003 [2]. According to the International Pepper Community [1], Malaysia pepper production rose to 29,245 tonnes with the total export of 12,199 tonnes which worth RM490.1 million in 2016. In addition, domestic consumption of pepper shot up by 11% to 13,500 tons in 2015, compared to 12,000 tons in 2014. The demands of pepper-based products are expected to increase in future. However, despite the quantity and commercial values, pepper has always been grown intensively as a smallholder crop, averagely 0.1 to 0.4 hectare each or equivalent to about 200-800 vines.
Crop loss due to pest and disease incidence has been identified as one of the major pepper production constraints. This has resulted in a yearly reduction of about 2% of the total pepper area [3]. In Malaysia, lack of efficient tools to assist farmers in crop protection has constrained efficiency of pest and disease control. Currently, the advisory services only implemented through conventional way, whereby the farmers need to inform MPB of any problems they encountered on their plant and seek assistance through extension officers. In addition, most farms are distributed widely in remote areas with accessibility constrain. This conventional working procedure is time consuming, inefficient and costly [4].
Technology has changed the way people work and communicate. Hardware advances enclosing Petabytes of storage with million pixels of visualization tools are becoming more affordable. Software too is becoming more prominent with the cloud, crowdsourcing technology and artificial intelligence achievements causing technology embedded into almost every task. For example, transferring knowledge and technology into farmers has proven to increase their productivity [5], and implementing social media among black peppers farmers in Indonesia has been suggested as a way to improve its business and quality [6]. In Colorado, cloud-based irrigation scheduling tools have been developed and tested, as the water resources are minimal [7]. Meanwhile, researchers in Samut Singkhram Province, Thailand integrates geographical information system and remote sensing from Lidar to estimate water demands and balances as their natural water resources are from fresh, salt and brackish water sources [8].
Existing system to help agriculture domain has been developed to diagnose pests and diseases includes for tomatoes [9], pulse crops [10], bell peppers [11], lemon [12] and Paddy [13]. Zhang, on the other hand, tried to cluster diseased of many plants [14], while other researcher used a rule-based approach for a population of agriculture [15] and medicinal herbs [16]. Some implementation combines the usage of many sensors such as UV detector for pesticides residue [17] and temperature and humidity [18] for aquaculture of shrimps pool and paddy fields.
In relation to this, the use of the smartphone-based application in farming and agriculture industries was believed able to improve crops and yields. Latest reviews of mobile-phone-based agriculture application reported in India has been used mainly as a portal to push and share information regarding the sales, pricing, stocks, suppliers, transport and delivery status, as well as weather forecasting [19]. However, attempt to develop a smart agriculture model for predicting cost and maximize crops using big data analytics integrating IoT, mobile and cloud data has begun [20]. Concurrently, the same tools were used for a framework for urban farmers such as community and educational gardens [21]. While in the United States, 2 out of the 17 apps recommended for farmers for 2017 [22] are for diagnosing purposes, but only one is mobile application while the other is a web-based.
Currently, in the United States's agriculture sector, a mobile application such as AgriSync and Yara ImageIT has been widely used [22]. AgriSync is a web-based platform for farmers and multiple advisors to engage real-time in resolving the problem, including advice and diagnosis of plant disease. It accessable via mobile phone as it is using dynamic web technology. Yara ImageIT, on the other hand, is an app to measure nitrogen uptake in crops and generate a nitrogen recommendation based on a photograph of the plant's leaf.
Therefore, the implementation of mobile application technology is believed to cater to the problems faced by rural farmers of Sarawak Black Pepper, as discussed in the introduction part. In order to know the farmer's readiness in adapting the technology, surveys conducted on these farmers [23] shown that majority of the pepper farmers in Sarawak own a smartphone. Thus, a model of intention to use a disease advisory app was developed [24].
As a continuation of that, this paper intends to look into details in identifying the problems of pests and diseases for pepper. Then a proposed architecture for a mobile app will be discussed and evaluated. Finally, we conclude and endeavor to explain what is the strength of DrLada, as well as its weakness for future works.

II. MATERIAL AND METHOD
In order to build the inference engine, a series of processes need to be carried out. This includes knowledge extraction, knowledge representation, filtering, symptomword relationship, and filtering, building a decision tree and finally the rules extractions. These steps illustrated in figure 2, and will be explained in detail in the following sub-topic.

A. Knowledge extractions
The symptoms of black pepper diseases have been excerpted by a team of MPB experts from various sources including the Pepper Production Technology in Malaysia [25] and Pepper Technology Package [26]. These excerpts include thorough information for six pests and ten diseases of pepper which commonly found in Malaysia. The scientific names are coded for representation that is more natural is shown in Table 1. To ensure all symptoms are mapped to correct diseases or pests, a decision table as in Table 1 was created. The table consists of all the symptoms that necessary to diagnose all 16 pests and diseases. This is to ensure distinctive symptoms on different stages of problems for each pest and diseases are represented correctly. The decision table is vital for revealing the shared symptoms as well as a non-symptom condition. In addition, small details in knowledge extraction could finely sift through with this method. Thirdly, symptoms from the complete decision table were eliminated from suffixes, prefixes, connectives and few others to ensure only meaningful terms, which could stand by their own, were gathered. Then, a histogram of words was generated from this cleaned symptom-word to find the most common symptoms of affected trees. The histogram is illustrated in Figure 3, where the word "kekuningan" in Malay which means yellowish; appeared the most, followed by others characteristics. A decision tree was developed by using XMind software based on the frequency of the symptom-words in the histogram. The more frequent symptom-word appeared the biggest in the histogram, indicated that it is the most common symptom of pepper pests and diseases.

B. Knowledge representation
Symptoms, diseases, and pesticides in the extracted knowledge were treated as an object each. Framing representation was selected as it can connect objects while maintaining its value and characteristics.
Usually, the diagnosis was carried out by inferring the current condition with the existing knowledge of possible pest or disease. The knowledge can be passed formally through education, and further enriched with incidents and cases that have been experienced by a person. Similarly, experts are using their knowledge and experience in identifying the symptoms that relate to its possible causal agents to diagnose pests and diseases in black pepper.
Knowledge needs to be transformed into a representation that is understood by a computer. A decision tree was at this stage, to represent the chain of knowledge. Frequencies of symptom-words were used to rank the symptoms into a hierarchy of general to a specific sign. The relationship or connections between each symptom-word were determined from the decision table.
The tree starts with the most common symptoms, which are yellowish leaves. From there, it connects to the condition of the pepper plant to other part or the plant. All symptoms can be represented with one decision tree, which produced 24 rules for diagnosing 6 pests and 10 diseases of the black pepper plant. The tree structure is flexible enough for any node addition or deletion, which is useful for future expansion of the app. Figure 4 shows only a quarter of the whole tree in Dr.LADA inference engine, where it triggers down from yellowish leaves (one of the common symptoms). This particular branch of the decision tree leads to 4 diseases and 1 pest alone. The other 3 branches were not expanded here.

C. Rules extraction
Rules extraction is an important part, which further divided into system completeness and rules development. Therefore, in some complicated diagnoses, which require more than one confirmation symptoms, the decision tree allows back propagation inference, which enables diagnosis from any plant parts. For example, it allows cross-checking with the other plant parts such as inflorescence, stem, or root even if the user starts the diagnosis with the leaf or vice versa.
In addition, the flexibility of the decision tree structure enable rules represented differently. This can be shown by analyzing Figure 4 and 5, containing part of the whole decision tree. Figure 4 was extracted directly from the inference engine where all rules and knowledge were interconnected, while Figure 5 were rules extracted particularly from inflorescence part of the plant. Figure 5 is important to show and understands how we can represent and diagnose black pepper abnormality from parts of the tree, without having to browse through the entire tree in inference engine.
Following nodes and arch in Figure 4, Pepper weevil bug (P11) will be triggered when leaves turn yellowish, and a hole in stem OR hollow stem OR larvae inside stem were spotted. However, the same conclusions can be triggered by symptoms in other parts of plants. This can be seen from Figure 5, where the user starts from inflorescence. Fig. 3 A branch of the decision tree in the inference engine, with yellowish leaves as the first symptom; which is the most common sign of tree health . Fig. 4 A branch of decision tree generated from the main decision tree, to diagnose plant abnormality from inflorescence part. Figure 5 on the other hands, shows a diagnosis of pepper weevil-P11 too, but on the user perspectives which starts from inflorescence. The user will continue to choose the next option based on the plant condition at that time. Using the app, if a farmer noticed that the symptoms of inflorescence turned yellowish or black and dropped as well as incomplete fruit set, the app will show a pest picture and will ask whether the farmer can spot the same pest on the plant.
If it Is 'yes' then Pepper Tingid Bug-P13 will be triggered, or else farmer is requested to contact MPB experts. While, if the fruit set is full, the app will ask the farmer to check whether there is a hole on the stem or node, or if the stem is hollow or if they can find a larva inside the stem. If it is yes, Pepper Weevil will be triggered, or else the farmer is requested to contact MPB experts.
Algorithm 1 shows the rules to trigger P11 for Figure 4 and 5 generated from the whole decision tree. It shows that to trigger P11, there are two rules, which branch out from yellowish leaves. However, both rules include the yellow leaves, as well as the hollow stem OR larvae inside the stem.

D. Proposed system architecture
In order to offer advice on common diseases and a pest to the pepper farmers, as well as educating them with minimum cost possible, a mobile app for pepper advisory was developed. As most farmers were using Android-based smartphone [24], the advisory app, known as Dr.LADA were developed with Android Studio. Android Studio is a Java-based integrated development platform for mobile apps.
Dr.LADA proposed architecture is stand-alone, as farmers are scattered in remote areas, and access to the internet are limited. The rules databases are updated separately, and the user will have to update their Dr.LADA apps when it is released, at their own time. Figure 1 shows the use case diagram for Dr.LADA, showing the interactivity between the user (farmers) and the app's inference engine in order to diagnose a disease or pesticides based on symptoms given. The inference engine will prompt more questions related to the user's input (if needed) to choose the correct rules.
The inference engine uses the symptoms provided by the user and relates, connects or infers them with the rules the extracted rules. A correct chain of symptom will trigger the app to the right pest or disease and suggests an appropriate control measure. At this stage, the user can choose to see only the disease or pesticide name, or information to control them.

E. The mobile app development
There are 24 rules as the key knowledge in the app's inference engine, enable it to trigger the next questions for the user, as well as finalizing the outcome. However, different representations were used in the user's interest where rules are separated into a different part of the black pepper tree such as leaves, branches, inflorescences, shoots, fruits, and roots. This is for user's smooth navigation in checking their plant's condition, while consulting the app.
The app was developed with a Java-based programming language. The first prototype is subject to Android users.

F. The user interface
This diagnosing app is developed with the user interest as one of the primary concern. Specific requirements related to them are considered while designing the interface. Based on the preliminary surveys by Kamarudin et al. [23], usually pepper farmers in Malaysia are more than 40 years old and own a smartphone. They practice traditional cultivation method, which is passed down from generations to generations. Most of the pepper farms are scattered in the rural areas, which have limited access to network coverage.
By considering these factors, the mobile app was developed with a minimum requirement of 16MB memory and can be used without internet access. Also, the interface uses a high visual contrast theme which is suitable for outdoor. Apart from the portrait mode, the app has been designed to suit another screen style when the device is in a landscape mode. Both designs are shown in Figure 6a and Figure 6b. For better visualization, the font size in the app is adjustable, and all menus are translated into graphic icons for easier navigations and understandings. Besides, the app also contains information such as images, symptoms, and treatments of pepper pests and diseases. Furthermore, the additional directory links and glossary are also provided for better understanding of the problems. User interface examples are shown in Figure 6.

III. RESULTS AND DISCUSSION
The evaluation of the application gives a significantly valuable idea about how the Dr.LADA app would be accepted. Three types of evaluation were conducted for this app, which is the usability test with design experts, usability test with users (farmers) and the diagnosis accuracy test.
The first usability test has been conducted by the Universiti Kebangsaan Malaysia, by inviting eight interface experts to explore and use the application as they wish. There is no command or systematic manual given, but the researcher is on standby at the location to entertain any questions. Experts were asked to choose the answer for 43 question across 10 principals of usability on 5 Likert scales; where 1 has no problem and 5 is a disaster for usability.
The ten principles of usability are the apps status visibility, apps, and real-world matching, User freedom and controls, Consistencies, error avoidance, recognition vs. memorization, Flexibility, and reliability, minimalist and astatic design, helps and documentation as well as skills. The mean score among eight experts in each principle is shown as in figure 7. The results shown in figure 7 shows that the strength of Dr.Lada apps is in the eight's principles; minimalist design and aesthetic values. On the other hand, the app's weakness is in Principles no 3: User's freedom and controls. Overall, the app has scored 67% for the highest scale, and 17% on the second highest score. The rest was distributed almost evenly among the rest of the scale. This has shown that the interfaces are intuitive, friendly, and acceptable.
The second usability test has been conducted with 35 farmers whereby the respondents were invited to use the application without any instructions and user manual given. Respondents were required to answer 43 questions across 10 principals of usability on five Likert scales (0 to 4): where scale 4 indicated no problem on the usability and scale 0 indicated very poor usability. The app has scored 67% for the highest scale, and 17% on the second highest score. The rest was distributed almost evenly among scale 0, 1 and 2. The results are tally with the expert's reviews, proving that the interface design is suitable for outdoor usage, middle to older age user, friendly and intuitive enough for them to explore and understand.
The accuracy test was conducted with 20 MPB crop protection staff, and the respondents were divided into four groups. The groups are tested with ten pest and disease problems. The app scored 97% of accuracy, indicated that Dr.LADA app is useful, informative and capable of diagnosing black pepper pest and disease problems effectively IV. CONCLUSIONS Dr.LADA is a standalone mobile app, which provides fast performance, a high degree of reliability and can be used without any internet connection. Dr.LADA enable the user to identify problems by answering a series of questions from symptoms shown by several plant parts including leaves, branches, inflorescences, shoots, fruits, and root. After that, the system will trigger the correct output, following a set of rules to diagnose the problems. The pictorial guide in this app serves to render virtual help to pepper farmers in identifying and treating common pepper pests and diseases. Besides, the additional directory links and glossary are also provided for better understanding of the problems. This is beneficial to pepper farmers as most of their farms located in the rural areas with limited access to network coverage. Dr.LADA app can reduce farmers' dependency on extension staff and indirectly minimize the extension activities cost. Also, this Android-based mobile app serves as a platform for users to access pests and diseases information effectively.
Nevertheless, a study on farmer's demand from a different platform such as iOS, as well as the need to update the knowledge base has to be carried out from time to time. The impact of having Dr.LADA as part of the handy consultant for rural farmers can be evaluated, not only by surveys questions but also by reflecting it into the productivity of the crop from this year onwards. Also, the implementation of image processing might also help, especially for new cases.