Prediction of the ripeness level of avocado using image processing method
โดย สิรวิชญ์ เดชอธิรัชช์
ปี 2566
บทคัดย่อ
ปัจจุบันอะโวคาโดเป็นผลไม้ที่ได้รับความนิยมจากผู้บริโภคที่รักสุขภาพเป็นอย่างมากการเลือกซื้ออะโวคาโดมักจะสังเกตที่สีผิวของเปลือกอะโวคาโดหรือไม่ก็จากการบีบผลอะโวคาโดส่งทำให้เนื้อช้ำ ดังนั้นงานวิจัยนี้จึงมีวัตถุประสงค์เพื่อศึกษาหาความสัมพันธ์ของความแน่นเนื้อกับค่าสีของเปลือกผลอะโวคาโดและเพื่อวัดความสุกของผลอะโวคาโดด้วยวิธีการประมวลผลภาพร่วมกับโมเดลแบบจำลองทางคณิตศาสตร์์มาช่วยในการทำนายระดับความสุกของผลอะโวคาโด
เทคนิคการประมวลผลภาพถูกนำมาประยุกต์ร่วมกับอัลกอริทึมโครงข่ายประสาทเทียมเพอร์เซ็ปตรอนหลายชั้น (MLP), ซัพพอร์ตเวกเตอร์รีเกรสชั่น (SVR) และเคเนียร์เรสเนเบอร์ (KNN) มาใช้ในการทำนายความสุกของผลอะโวคาโด ขั้นตอนการทดลองเริ่มต้นด้วยการประมวลผลภาพของผลอะโวคาโดเพื่อแยกองค์ประกอบค่าสีของเปลือกในระบบสี L*a*b* และส่งข้อมูลไปยังโมเดลที่ทำการแบ่งข้อมูลที่ใช้ฝึกกับข้อมูลที่ใช้ในการทดสอบโมเดลเป็น 70/30, 80/20 และ 90/10
ผลการทดลองพบว่าโมเดลที่เหมาะสมที่สุดในการทำนายความสุกของผลอะโวคาโด คือโมเดล MLP (90/10) ซึ่งมีค่า R2, RMSE และ MAE เท่ากับ 0.990, 0.341 และ 0.321 ตามลำดับ ต่อมาคือโมเดล KNN (80/20) มีค่า R2, RMSE และ MAE เท่ากับ 0.787, 6.953 และ 1.672 ตามลำดับ และสุดท้ายคือโมเดล SVR (90/10) มีค่า R2, RMSE และ MAE เท่ากับ 0.776, 8.310 และ 1.993 ตามลำดับ ทั้งนี้โมเดล MLP สามารถทำนายได้สูงถึงร้อยละ 99.4 ในขณะที่โมเดล KNN และโมเดล SVR สามารถทำได้นายได้ร้อยละ 95.2 และ 94.9 ตามลำดับ ผลการศึกษานี้สามารถใช้เป็นแนวทางในการพัฒนาโมเดลในการทำนายความสุกของผลอะโวคาโด
Abstract
Avocados have become a popular fruits among health- conscious consumers. People often choose ripe avocados based on the skin color of the avocado peel or from squeezing the avocado causing the flesh to bruise. Therefore, this research aimed to investigate the relationship of firmness with the color value of avocado peel, and to measure the ripeness of avocado fruits using image processing method and a mathematical model to predict the ripeness level of avocados.
Image processing techniques were applied in combination with the multi-layer perceptron (MLP), Support Vector Regression (SVR), and K- Nearest Neighbors (KNN) models to predict the ripeness of avocado fruits. The experiments started with extracting the color value from avocado peels using image processing in the L*a*b* color space. The extracted data were sent to a model that splits the training data and testing data into the ratios of 70/30, 80/20, and 90/10.
The results revealed that the most suitable model for predicting avocado ripeness was the MLP model (90/10) with R2, RMSE and MAE values of 0.990, 0.341, and 0. 321, respectively. The R2, RMSE and MAE values of KNN model (80/ 20) were 0. 787, 6.953, and 1.672, respectively. The R2, RMSE and MAE values of SVR model (90/10) were 0. 776, 8. 310, and 1. 993, respectively. The MLP model could accurately predict up to 99.4%, while the KNN and SVR models were 95.2 and 94.9%, respectively. These results can be useful in developing models for predicting the ripening of avocados.
Download : การทำนายระดับความสุกของผลอะโวคาโดด้วยวิธีการประมวลผลภาพ