Computer Vision and Field Validation of an Artificial Intelligence-Based Tomato Grader for Large-Scale Production in Northeastern Thailand

Main Article Content

Khunnithi Doungpueng
Kittikun Pituprompan
Chainarong Lomchangkum
Kantapon Premprayoon
Thanaporn Singhpoo
Anuwat Pachanawan

Abstract

Tomato (Solanum lycopersicum L.) quality grading based on visual inspection often yields inconsistent results and reduces market value. The 'Perfect Gold 111' variety presents distinct morphological traits, including a characteristic green-to-red color transition, specific calyx structure, and defect patterns such as greenback distribution and suberization. These characteristics differ substantially from internationally studied cultivars, rendering generic pre-trained models insufficient for accurate grading under the Thai TACFS 1503–2007 standard. This study developed an automated grading model for 'Perfect Gold 111' tomatoes using a deep learning model based on a flow-based (node-based) architecture integrated with the Robot Operating System (ROS) framework and implemented on the CiRA CORE platform. A total of 220 samples were collected and graded according to the TACFS 1503–2007 standard. Top and side-view images were used to create a dataset comprising 165 tomatoes for training and 55 for testing. Model performance was evaluated using Precision, Recall, F1-Score, and Accuracy, and was compared with manual grading performed by farmers. The AI model achieved 80.00% of accuracy, outperforming farmer grading, which achieved 52.72% accuracy.  In addition, the model reduced misclassification among visually similar grades and provided consistent, quantitative assessments of color, shape, and defects. These findings highlight the potential of AI-based grading systems to improve quality consistency, reduce labor, and support automated postharvest sorting for both smallholder and industrial tomato production.

Article Details

How to Cite
Doungpueng, K. ., Pituprompan , K. . ., Lomchangkum , C. ., Premprayoon , K. ., Singhpoo , T., & Pachanawan, A. . (2026). Computer Vision and Field Validation of an Artificial Intelligence-Based Tomato Grader for Large-Scale Production in Northeastern Thailand. Asia-Pacific Journal of Science and Technology, 31(04), APST–31. https://doi.org/10.22299/apst.2026.284363
Section
Research Articles

References

Liu W, Liu K, Chen D, Zhang Z, Li B, El-Mogy MM, Tian S, Chen T. Solanum lycopersicum, a model plant for the studies in developmental biology, stress biology and food science. Foods (Basel, Switzerland). 2022;11(16):2402.

Yosying S, Choenkwan S, Phumchantuk P, Palinthorn F. Fresh tomato production of small-scale farmers along Mekong River in northeastern region of Thailand. KKU Research Journal (Graduate Studies). 2022;22(2):61-69.

Malawal P, Ueasin N. The study of technical efficiency in tomato production: A case study of Mekong River Bank, Thailand. GMSARN Int J. 2020;14(3):125-131.

Singh R, Jaiswal UC. An innovative machine learning framework for precise quantification of leaf disease severity via proposed hybrid segmentation and color manipulation technique. Engineering Journal. 2024;29(5).

Uddin MS, Bansal JC, editors. Computer vision and machine learning in agriculture. Singapore: Springer; 2021.

Khan A, Hassan T, Shafay M, Fahmy I, Werghi N, Seneviratne L, Hussain I. Tomato maturity recognition with convolutional transformers. Sci Rep. 2023;13:22885.

Wang S, Xiang J, Chen D, Zhang C. A method for detecting tomato maturity based on deep learning. Appl Sci. 2024;14(23):11111.

He Y, Fan B, Sun L, Fan X, Zhang J, Li Y, Suo X. Rapid appearance quality of rice based on machine vision and convolutional neural network research on automatic detection system. Front Plant Sci. 2023;14:1190591.

Nguyen TH, Nguyen HL, Bui NT, Bui TH, Vu VB, Duong HN, Hoang HH. Vision-based system for black rubber roller surface inspection. Appl Sci. 2023;13(15):8999.

Liakos KG, Busato P, Moshou D, Pearson S, Bochtis D. Machine learning in agriculture: a review. Sensors. 2018;18(8):2674.

Akther J, Nayan A-A, Harun-Or-Roshid M. Potato leaves blight disease recognition and categorization using deep learning. Engineering Journal. 2023;27(9).

National Bureau of Agricultural Commodity and Food Standards. Tomato (TACFS 1503–2007). Bangkok: Ministry of Agriculture and Cooperatives. 2007.

Noyunsan C, Katanyukul T, Saikaew K. Performance evaluation of supervised learning algorithms with various training data sizes and missing attributes. Eng Appl Sci Res. 2018;45(3):221-229.

Butkhot T, Reungsang P. Assessment of machine learning on sugarcane classification using Landsat-8 and Sentinel-2 satellite imagery. Asia-Pac J Sci Technol. 2021;26(04):APST-26-04-08.

Pornpanomchai C. Image-based orange (Citrus reticulata and Citrus reticulata Blanco) sweetness measurement by ResNet50. Asia-Pac J Sci Technol. 2025;30(05):APST-30-05-02.

Lu T, Han B, Chen L, et al. A generic intelligent tomato classification system for practical applications using DenseNet-201 with transfer learning. Sci Rep. 2021;11:15824.

Vazquez DV, Spetale FE, Nankar AN, Grozeva S, Rodríguez GR. Machine learning-based tomato fruit shape classification system. Plants. 2024;13(17):2357.

Alzahrani M. Automated tomato defect detection using CNN feature fusion for enhanced classification. Processes. 2025;13(1):115.

Hou L, Liu Z, You J, Liu Y, Xiang J, Zhou J, Pan Y. Tomato sorting system based on machine vision. Electronics. 2024;13(11):2114.

Mputu HS, Abdel-Mawgood A, Shimada A, Sayed MS. Tomato quality classification based on transfer learning feature extraction and machine learning algorithm classifiers. IEEE Access. 2024;12:8283-8295.

Vo HT, Mui KC, Nguyen Thien N, Pham Tien P. Automating tomato ripeness classification and counting with YOLOv9. Int J Adv Comput Sci Appl. 2024;15(4).

Inuwa AB, Ahmad AS, Auwal ST, Muhammad M, Rabiu AL, Babangida I. Advances in sensor-based and machine learning techniques for automated tomato sorting and grading: A review. J Sustainable Eng & Technol. 2025;2(1):1-12.

Logeshwaran J, Srivastava D, Kumar KS, et al. Improving crop production using an agro-deep learning framework in precision agriculture. BMC Bioinformatics. 2024;25:341.

Hossen MI, Awrangjeb M, Pan S, et al. Transfer learning in agriculture: a review. Artif Intell Rev. 2025;58:97.

Sriprateep K, Khonjun S, Golinska-Dawson P, Pitakaso R, Luesak P, Srichok T, Chiaranai S, Gonwirat S, Buakum B. Automated classification of agricultural species through parallel artificial multiple intelligence system–ensemble deep learning. Mathematics. 2024;12(2):351.

Zuo H. Analysis and detection of tomatoes quality using machine learning algorithm and image processing. Int J Adv Comput Sci Appl. 2022;13(12).

Apostolopoulos ID, Tzani M, Aznaouridis SI. A general machine learning model for assessing fruit quality using deep image features. AI. 2023;4(4):812-830.

Zhou Z, Zahid U, Majeed Y, Nisha, Mustafa S, Sajjad MM, Butt HD, Fu L. Advancement in artificial intelligence for on-farm fruit sorting and transportation. Front Plant Sci. 2023;14:1082860.

Chuquimarca LE, Vintimilla BX, Velastin SA. A review of external quality inspection for fruit grading using CNN models. Artif Intell Agric. 2024;14:1-20.

Naqvi LH, Balasubramaniam B, Li J, Liu L, Li B. Four-dimensional hyperspectral imaging for fruit and vegetable grading. Agriculture. 2025;15(15):1702.