The Palm Killer

Freshmen URD Track; Entrepreneurship and Innovation

Oil palm fruits are essential in our daily lives, finding uses in biodiesel, food, cosmetics, detergents, and more. Thailand ranks as the world's third-largest oil palm producer, earning over 50 billion baht solely from exports. However, Thailand incurs a yearly loss of 3 billion baht due to unripe harvests. Losing one percent of oil yields translates to a loss of 0.3 baht, summing up to 3 billion baht annually.

Thus, this research project is centered around the issue of the policy that unripe harvests cannot be sold due to a low oil yield percentage.

In response to this issue, our proposed solution is “The Palm Killer”, a reliable and accurate method for assessing the ripeness stage of palm fruits. This project aims to address the issues of time, energy, and monetary losses for farmers by using the technology of computer vision to solve this issue. This involves a systematic process that includes data collection, data preprocessing, image annotation, data augmentation, and model training. As a result of this process, the model can classify images of unripe, almost ripe, and ripe palm fruits.

Collecting Data

We collected data from the actual farm in Pathum Thani. We collected many types of palm including Yangambi, Deli x Compact, Univanich, Tenera, and Huti. the fact that oil palm fruits rip at different times even though they are on the same tree each fruit might have a different maturity. Since we have limited time we can only collect 2000 images after cleaning data, resulting in a total of 1614 images including 721 ripe oil palm fruit, 308 almost ripe oil palm fruit, and 585 unripe oil palm fruit.

Methods:

3 different models such as Resnet, Densenet, and YOLOv8. While testing Resnet and Densenet, we received an incredibly low accuracy (50% to 65%) but at that time it was unable to detect an error in the code even though adjusting epoch and even learning rate but the accuracy remained the same. Later k-fold techniques were used with Resnet but the problem remained but later it was concluded that the Resnet and Densenet model didn’t have object detection though it can be adapted but will be very complicated to understand.

Meanwhile, YOLO has a single-shot object detection algorithm, which means that it can detect objects in a single pass through the image. This makes YOLO also much faster than other CNN-based algorithms such as Densenet and Resnet, which typically require multiple passes through the image to detect objects. Finally, YOLOv8 is used as the final model due to its speed and ability to detect images with a number of 150 epochs and a learning rate of 0.001.

Results
After trying different models, such as ResNet, DenseNet, and YOLO. The selection of YOLOv8 models is made for the project. YOLOv8 is the latest version of YOLO from Ultralytics. It has gained around 72.5% accuracy from 3876 images (augmented images included). The background for both predicted and actual categories is ignored because only the middle fruit is annotated, leading to an incorrect result when the model detects the fruits beside. 

Prototype Website

The website is the prototype that can distinguish the oil palm fruit maturity stage. It is made using the Flask framework, which means the Python file serves as the backend and is currently hosted on APEX. There are five steps after the code is run. Firstly, the YOLOv8 model will be hosted on APEX. Secondly, once the picture is uploaded, it will be sent to APEX. Thirdly, the picture will undergo augmenting procedures, including cropping and exposure adjustment. Fourthly, the model will predict the ripeness stage of the fruits in the picture and send the picture back to the local computer. Finally, the website will redirect to the display webpage and display annotated pictures.

Summary of Accomplishments

After gathering the oil palm fruit dataset from more than two thousand images, we cleaned it up by removing any grainy, poorly lit, or disorganized images. Additionally, be able to develop a machine learning model for predicting the ripeness of oil palm fruit using YOLOv8 with 72.5% accuracy. We can create a website for users to upload the oil palm fruit image from a gallery or take real-time from the user’s camera and display the maturity stages of the oil palm fruit.

Future Directions

Our project will be continued next semester. Making hardware for farmers that is user-friendly. We will also collect more data to boost our model's accuracy by 90%. Additionally, constructing a dashboard for the owner will be extremely beneficial in a variety of fields.

Researcher
Chavakorn Arunkunarax
Student
CMKL University
Woraphan Pruchyanimit
Student
CMKL University
Natcha Soranathavornkul
Student
CMKL University
Chutikarn Kanchanaart
Student
CMKL University
Kasidith Sae-tang
Student
CMKL University
Advisor
Adil Siripatana
Assistant Professor
CMKL University