Implementing a deep learning model for defect classification in Thai Arabica green coffee beans

Arabica coffee is a significant economic driver in Northern Thailand and has substantial opportunities for market growth. However, the Thai coffee business must ensure consistent quality standards and is currently heavily dependent on manual labor, to first identify, and then remove substandard unro...

Full description

Saved in:
Bibliographic Details
Main Authors: Sujitra Arwatchananukul, Dan Xu, Phasit Charoenkwan, Sai Aung Moon, Rattapon Saengrayap
Format: Article
Language:English
Published: Elsevier 2024-12-01
Series:Smart Agricultural Technology
Subjects:
Online Access:http://www.sciencedirect.com/science/article/pii/S2772375524002855
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1846124965668061184
author Sujitra Arwatchananukul
Dan Xu
Phasit Charoenkwan
Sai Aung Moon
Rattapon Saengrayap
author_facet Sujitra Arwatchananukul
Dan Xu
Phasit Charoenkwan
Sai Aung Moon
Rattapon Saengrayap
author_sort Sujitra Arwatchananukul
collection DOAJ
description Arabica coffee is a significant economic driver in Northern Thailand and has substantial opportunities for market growth. However, the Thai coffee business must ensure consistent quality standards and is currently heavily dependent on manual labor, to first identify, and then remove substandard unroasted coffee beans. This research developed a classification model based on a Convolutional Neural Network to detect 17 types of defects in green coffee beans. The image augmentation phase was enhanced by rotating images at 45, 90, 135, 180, 225, and 270° and expanding the dataset from 979 original images across 17 defect types to a robust 6,853 images. Several architectures including MobileNetV2, MobileNetV3, EfficientNetV2, InceptionV2, and ResNetV2 were assessed. Following extensive evaluations, MobileNetV3 emerged as the best-performing model and underwent further fine-tuning, achieving significant accuracy improvements through hyperparameter optimization. The model's robustness and generalizability were validated via 5-fold cross-validation, with accuracy ranging from 98.78 % to 99.84 % across all defect types. When tested with unseen data, the model achieved an accuracy of 88.63 %. A web application prototype was also developed for real-time coffee bean defect classification and its usability was tested. Seven farmers reported high satisfaction with the ease of use and effectiveness of the application in classifying coffee bean defects, with 71.4 % expressing a strong likelihood of recommending the application to others. These promising results demonstrate the practical utility of the model in enhancing quality sorting processes in the coffee industry.
format Article
id doaj-art-960e34a9dce6402ea8b11a3c85505468
institution Kabale University
issn 2772-3755
language English
publishDate 2024-12-01
publisher Elsevier
record_format Article
series Smart Agricultural Technology
spelling doaj-art-960e34a9dce6402ea8b11a3c855054682024-12-13T11:08:18ZengElsevierSmart Agricultural Technology2772-37552024-12-019100680Implementing a deep learning model for defect classification in Thai Arabica green coffee beansSujitra Arwatchananukul0Dan Xu1Phasit Charoenkwan2Sai Aung Moon3Rattapon Saengrayap4School of Applied Digital Technology, Mae Fah Luang University, Chiang Rai, Thailand; Integrated AgriTech Ecosystem Research Group (IATE), Mae Fah Luang University, ThailandSchool of Information Science and Engineering, Yunnan University, Kunming, PR ChinaModern Management and Information Technology, College of Arts, Media and Technology, Chiang Mai University, Chiang Mai, ThailandSchool of Agro-Industry, Mae Fah Luang University, Chiang Rai, ThailandSchool of Agro-Industry, Mae Fah Luang University, Chiang Rai, Thailand; Integrated AgriTech Ecosystem Research Group (IATE), Mae Fah Luang University, Thailand; Coffee Quality Research Group (CQR), Mae Fah Luang University, Thailand; Corresponding author.Arabica coffee is a significant economic driver in Northern Thailand and has substantial opportunities for market growth. However, the Thai coffee business must ensure consistent quality standards and is currently heavily dependent on manual labor, to first identify, and then remove substandard unroasted coffee beans. This research developed a classification model based on a Convolutional Neural Network to detect 17 types of defects in green coffee beans. The image augmentation phase was enhanced by rotating images at 45, 90, 135, 180, 225, and 270° and expanding the dataset from 979 original images across 17 defect types to a robust 6,853 images. Several architectures including MobileNetV2, MobileNetV3, EfficientNetV2, InceptionV2, and ResNetV2 were assessed. Following extensive evaluations, MobileNetV3 emerged as the best-performing model and underwent further fine-tuning, achieving significant accuracy improvements through hyperparameter optimization. The model's robustness and generalizability were validated via 5-fold cross-validation, with accuracy ranging from 98.78 % to 99.84 % across all defect types. When tested with unseen data, the model achieved an accuracy of 88.63 %. A web application prototype was also developed for real-time coffee bean defect classification and its usability was tested. Seven farmers reported high satisfaction with the ease of use and effectiveness of the application in classifying coffee bean defects, with 71.4 % expressing a strong likelihood of recommending the application to others. These promising results demonstrate the practical utility of the model in enhancing quality sorting processes in the coffee industry.http://www.sciencedirect.com/science/article/pii/S2772375524002855Green Bean DefectsCNNMobileNetV3Artificial intelligenceNon-DestructiveWeb Application
spellingShingle Sujitra Arwatchananukul
Dan Xu
Phasit Charoenkwan
Sai Aung Moon
Rattapon Saengrayap
Implementing a deep learning model for defect classification in Thai Arabica green coffee beans
Smart Agricultural Technology
Green Bean Defects
CNN
MobileNetV3
Artificial intelligence
Non-Destructive
Web Application
title Implementing a deep learning model for defect classification in Thai Arabica green coffee beans
title_full Implementing a deep learning model for defect classification in Thai Arabica green coffee beans
title_fullStr Implementing a deep learning model for defect classification in Thai Arabica green coffee beans
title_full_unstemmed Implementing a deep learning model for defect classification in Thai Arabica green coffee beans
title_short Implementing a deep learning model for defect classification in Thai Arabica green coffee beans
title_sort implementing a deep learning model for defect classification in thai arabica green coffee beans
topic Green Bean Defects
CNN
MobileNetV3
Artificial intelligence
Non-Destructive
Web Application
url http://www.sciencedirect.com/science/article/pii/S2772375524002855
work_keys_str_mv AT sujitraarwatchananukul implementingadeeplearningmodelfordefectclassificationinthaiarabicagreencoffeebeans
AT danxu implementingadeeplearningmodelfordefectclassificationinthaiarabicagreencoffeebeans
AT phasitcharoenkwan implementingadeeplearningmodelfordefectclassificationinthaiarabicagreencoffeebeans
AT saiaungmoon implementingadeeplearningmodelfordefectclassificationinthaiarabicagreencoffeebeans
AT rattaponsaengrayap implementingadeeplearningmodelfordefectclassificationinthaiarabicagreencoffeebeans