# 22_23-J 07

AI and ML based King Coconut Assistant for Farmers and Exporters

**Main objective**

    Developed a mobile application for king-coconut grown farmers and export buyers to easily carry out their cultivation and export activities without any problem.
    



**Main Research questions**

    The agricultural sector has always been a powerful economic force in Sri Lanka, contributing significantly to the nation's economy, food security and workforce. According to the World Bank, 23.7% of Sri Lanka's total labor force in 2020 was employed in the agricultural sector. Moreover, in 2019, the sector contributed 7.4% of the country's gross domestic product (GDP). However, in recent times, the contribution of agricultural production to Sri Lanka's national GDP has decreased significantly, from 20% of GDP in 2000 to 7.4% in 2019. In monthly analysis, compared to December 2020 Export earnings of coconut-based classified kernel products, fiber products and shell products increased by 30.15%, 6.3% and 46.3% respectively in December 2021.
    Year-on-year, export earnings of coconut oil, desiccated coconut, coconut milk powder, coconut cream and liquid coconut milk classified under coconut milk products rose by 8.15%, 50.62%, 40.27%, 18.69% and 33% respectively in December. 2021.
    Being the largest contributor to the coconut-related segment, Coco Peat, Fiber Pith and molded products, classified under coconut fiber products, increased by 8.83% to US$ 11.96 Month in December 2021 as compared to December 2020. Earnings from Activated Carbon classified under coconut shell products increased by 47.07% to USD 14.68 million in December 2021 compared to December 2020.
    Diseases of Crops - Crops are more susceptible to various diseases due to the large number of pathogens present in the environment. Some of these disease pathogens are viral organisms, while others are fungi or bacteria. In addition, diseases caused by insects and pathogens can reduce productivity by 10% to 95%.[3]As a result, the quantity and quality of agricultural production is significantly reduced. Therefore, early detection of diseases is very important to avoid huge losses and reduce excessive use of pesticides that can harm human health and the environment. In most cases, especially in developing countries and on small farms, farmers diagnose crop diseases with the naked eye based on visual symptoms. This is a laborious task that requires expertise in plant pathology and extensive treatment time.
    Failure to manage the cropping process according to external factors- Farmers in Sri Lanka face massive crop wastage every year. Therefore, our country loses 40% of the harvest after one year. The biggest reason for that is that all the farmers’ plant and collect their harvest during the same period. During the harvest season, a very large crop reaches the market, but because Sri Lanka does not have a proper system to manage the food surplus, a large crop is disposed of as waste. Also crop yields vary with a combination of factors including soil properties, climate, and altitude and irrigation technology. Technical developments in yield estimation based on this combined dependence of the above factors have slowed down.
    
                Lack of proper management for crop distribution and export – Sri Lankan farmers face problems in selling their crops immediately after harvest. On the other hand, traders are also facing problems in getting goods. Meanwhile, a middleman comes between the farmer and the trader and helps in the buying and selling process. Sometimes the middle man has difficulty getting crops.
    Also, farmers in remote areas have little contact with outsiders and may face problems in marketing the produce while it is still fresh. Because of this, a large crop is left as waste. But through this app, the middleman can quickly connect with the farmer and the farmer can sell his crops before they rot or get wasted. We can see these kinds of things as the problems faced by the farmer as well as the middleman today.
    Every day, technology improves and becomes more powerful in simplifying daily tasks. However, there is an undiscovered or partially known side. When it comes to agriculture, many studies have been done to cure various diseases and ailments, but some problems continue to go undiagnosed. This group studies the coconut kings and introduces the export market to the farmers, collects past data on exports, predicts them and finds the reason for the decrease or increase in export volume, lays the foundation for developing the export market.
    Several authorized parties, governments and non-governmental organizations, have already negotiated to collect our data sets and all requests have been dismissed by the companies.
    Those companies and individuals.


**Individual research question**

    Member 1: G.T.Madushanka – IT19960364
    
         Growing Detection and given solutions
    
        •	This application basically detects the growing procedure of the tree and help to make better way of doing that. 
        •	The user has to capture a photo between 0 - 1 meter from the destination tree.
        •	This image can be a leaves, nuts or trunk of the tree. 
        •	After they need to select the age of the tree.
        •	After entering the age of the relevant photo, the system will compare above photo with well grown plant and identify the weakness of the plant and provide the solution via document.
        •	For create that we use machine learning, image recognition and CNN.
        •	Get the photo as closest proximately with including the object. whole tree doesn’t represent the object.
        •	We can capture whole tree to a single photo if age of the tree between 1-2 years. 
        Above 2-year trees cannot capture to single picture. we need to upload one part like trunk, leaf, and nut.
    
    Member 2: S.B.M.H Senavirathna – IT19956268
    
        Predict the export details and give future solution
    
        •	This task focus in the collecting king coconut exporting data and give future solution to the suppliers.
        •	create Business Intelligence analytical Dashboard using this exporting data set price, quantity, supplies, buyers, export country, the king coconut exporting category (There are four ways to export king coconut). 
        •	By identifying the columns of data set can be predicted the exporting is increased or decreased, what is the king coconut quantity is to be in the future, how is the price going in the future, how quantity going on the future, which country has the most exports in the future, In which way is the export of king coconut the most and the east in the future. 
        •	For doing these predictions train a machine learning model by python Tensor Flow using king coconut exporting details. 
    
    
    Member 3: G.B.E.M.K Ekanayake – IT19956718
    
        Diseases Detection and given solutions
    
        •	Farmers should take the photo of the diseased plant and upload it in the mobile app. Then using the uploaded image, the disease will be diagnosed by app. After identifying a disease then user interface will be displayed some solutions for these diseases. 
        •	The following diseases that mainly occur in coconut trees are to be identified by recognizing leaves pattern.
            Stem bleeding disease, bud rot, coconut bug disease, coconut leaf rot, coconut rhinoceros beetle , eriophyid coconut mite, lethal yellowing leaf .
        •	For identified these diseases will be used image recognition and classification using OpenCV and CNN. Past data sets (diseases images) are used for create CNN model. 
    
    
     Member 4: B.M.P.S.K Basnayake – IT19956336
    
        FAQ & Manage Feedback
        
        •	While using this mobile application, farmers may encounter problems in their cultivation and businessmen in their transactions, this component will be used to ask for more information and get feedback from users.
        •	All users have the ability to use this component.  When the user comes to this interface a chatbot is dedicated to ask him his problem or comment.  There will be automatic responses while chatting.  NLP Machine learning technique like AI bot will be used for this.
        •	To better understand the user's problem or intentions to AI bot, to avoid possible mistakes when he writes the comment, and thus to give well-understood and suitable answers to the automatic AI bot. NLP techniques such as spell checking, keyword searching, information extraction and text mining are used.
        •	Data storage (Interaction history & Analysis), Knowledge Base (Source content) and Google are used to obtain data for training this module.


**Individual Objectives**

    Sub Objective 1: Growing Detection and given solutions
    Sub Objective 2: Predict the export details and give future solution
    Sub Objective 3: Diseases Detection and give solutions
    Sub Objective 4: FAQ & Manage Feedback

**Other necessary information**
