Prediction of Optimal Harvest Timing for Melons Through Integration of RGB Images and Greenhouse Environmental Data: A Practical Approach Including Marker Effect Analysis
Abstract
1. Introduction
2. Related Works
2.1. Research on Image-Based Fruit Detection and Growth Monitoring
2.2. Research Connecting Environmental Data and Growth
2.3. Research on Yield Prediction Through the Fusion of Image and Environmental Data
2.4. Comparative Research on Marker-Based and No-Marker-Based Approaches
3. Materials and Methods
3.1. Experimental Environment in the Greenhouse
3.2. Image Data Acquisition System
3.3. Data Labeling and Alignment
3.4. Organization of Dataset
3.5. Fusion Model Design
3.6. Environmental Data–Based Prediction Model
3.6.1. Overview of Environmental, Growth, and Fertigation Data
3.6.2. Derived Environmental Variables
3.6.3. Regression Model Construction
3.6.4. Cross-Validation Procedure
3.7. Integrated Data Preprocessing and Harvest Prediction Procedure
3.8. Model Performance Metrics
3.8.1. Evaluating Object Detection Performance
3.8.2. Metrics for Growth Prediction
3.8.3. Comparative Analysis of Conditions
4. Results
4.1. Evaluation of Melon and Marker Detection Performance
4.1.1. Dataset, Labeling, Model Training, and Evaluation Protocol
- (1)
- Data and labeling
- (2)
- Settings for data partitioning and evaluation
- (3)
- Model and training configuration
- (4)
- Inference and aggregation rules
4.1.2. Quantitative Performance
4.1.3. Qualitative Analysis
4.2. Prediction of Diameters and Weights
4.2.1. Performance of Diameter Estimation
4.2.2. Weight Prediction Performance
4.2.3. Correlation and Comprehensive Analysis of Diameter–Weight
4.3. Results of Environmental Data–Based Harvest Prediction
4.4. Prediction of Optimal Harvest Timing Based on Integrated Data
5. Discussion
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Abbreviations
| CNN | Convolutional Neural Network |
| YOLO | You Only Look Once |
| LSTM | Long Short-Term Memory |
| MLP | Multi-Layer Perceptron |
| RNN | Recurrent Neural Network |
| mAP | mean Average Precision |
| IoU | Intersection over Union |
| R2 | Coefficient of Determination |
| MAE | Mean Absolute Error |
| RMSE | Root Mean Squared Error |
| VPD | Vapor Pressure Deficit |
| GDD | Growing Degree Days |
| EC | Electrical Conductivity |
| PAR | Photosynthetically Active Radiation |
| DAT | Days After Transplanting |
| CVAT | Computer Vision Annotation Tool |
References
- Nikolaou, G.; Neocleous, D.; Katsoulas, N.; Kittas, C. Irrigation of Greenhouse Crops: An Overview. Horticulturae 2019, 5, 7. [Google Scholar] [CrossRef]
- Soussi, M.; Chaibi, M.T.; Buchholz, M.; Saghrouni, Z. Comprehensive review on climate control and cooling systems in greenhouses under hot and arid conditions. Agronomy 2022, 12, 626. [Google Scholar] [CrossRef]
- Savvas, D.; Giannothanasis, E.; Ntanasi, T.; Karavidas, I.; Ntatsi, G. State of the Art and New Technologies to Recycle the Fertigation Effluents in Closed Soilless Cropping Systems Aiming to Maximise Water and Nutrient Use Efficiency in Greenhouse Crops. Agronomy 2024, 14, 61. [Google Scholar] [CrossRef]
- Lim, M.Y.; Choi, S.H.; Choi, G.L.; Kim, S.H.; Jeong, H.J. Effects of Irrigation Amount on Fruiting Period and EC Level by Growth Period on Growth and Quality of Melon (Cucumis melo L.) Using Coir Substrate Hydroponics During Autumn Cultivation. Hortic. Sci. Technol. 2021, 39, 446–455. [Google Scholar] [CrossRef]
- Choi, S.H.; Lim, M.Y.; Choi, G.L.; Kim, S.H.; Jeong, H.J. Growth and Quality of Two Melon Cultivars in Hydroponics Affected by Mixing Ratio of Coir Substrate and Different Irrigation Amount on Spring Season. J. Bio-Environ. Control 2019, 28, 376–387. [Google Scholar] [CrossRef]
- Qian, C.; Du, T.; Sun, S.; Liu, W.; Zheng, H.; Wang, J. An Integrated Learning Algorithm for Early Prediction of Melon Harvest. Sci. Rep. 2022, 12, 18199. [Google Scholar] [CrossRef] [PubMed]
- Xu, S.; Shen, J.; Wei, Y.; Li, Y.; He, Y.; Hu, H.; Feng, X. Automatic Plant Phenotyping Analysis of Melon (Cucumis melo L.) Germplasm Resources Using Deep Learning Methods and Computer Vision. Plant Methods 2024, 20, 166. [Google Scholar] [CrossRef] [PubMed]
- Jing, X.; Wang, Y.; Li, D.; Pan, W. Melon Ripeness Detection by an Improved Object Detection Algorithm for Resource-Constrained Environments (MRD-YOLO). Plant Methods 2024, 20, 127. [Google Scholar] [CrossRef]
- Chen, G.; Yang, Y.; Zhang, X.; Fan, M.; Li, Z.; Zhai, Y. A Lightweight Color-Changing Melon Ripeness Detection Algorithm Based on Model Pruning and Knowledge Distillation Leveraging Dilated Residual and Multi-Screening Path Aggregation. Front. Plant Sci. 2024, 15, 1406593. [Google Scholar] [CrossRef]
- Blok, C.; Voogt, W.; Barbagli, T. Reducing Nutrient Imbalance in Recirculating Drainage Solution of Stone Wool Grown Tomato. Agric. Water Manag. 2023, 285, 108360. [Google Scholar] [CrossRef]
- Neocleous, D.; Savvas, D. Validating a Smart Nutrient Solution Replenishment Strategy to Save Water and Nutrients in Hydroponic Crops. Front. Environ. Sci. 2022, 10, 965964. [Google Scholar] [CrossRef]
- Malík, M.; Praus, L.; Tlustoš, P. Comparison of recirculation and drain-to-waste hydroponic systems in relation to medical cannabis (Cannabis sativa L.) plants. Ind. Crops Prod. 2023, 202, 117059. [Google Scholar] [CrossRef]
- Feldmann, M.J.; Tabb, A. Cost-effective, high-throughput phenotyping system for 3D reconstruction of fruit form. Plant Phenome J. 2022, 5, e20029. [Google Scholar] [CrossRef]
- Neupane, C.; Koirala, A.; Walsh, K.B. Fruit Sizing in Orchard: A Review from Caliper to Machine Vision with Deep Learning. Sensors 2023, 23, 3868. [Google Scholar] [CrossRef]
- Espejo-Garcia, B.; Mylonas, N.; Athanasakos, L.; Fountas, S. Towards Practical Artificial Intelligence Applications in Agriculture: A Review. Comput. Electron. Agric. 2021, 190, 106414. [Google Scholar] [CrossRef]
- Bargoti, S.; Underwood, J. Image segmentation for fruit detection and yield estimation in apple orchards. J. Field Robot. 2017, 34, 1039–1060. [Google Scholar] [CrossRef]
- Mirhaji, H.; Asakereh, A.; Mehdizadeh, S.A. Fruit detection and load estimation of an orange orchard using the YOLO models through simple approaches in different imaging and illumination conditions. Comput. Electron. Agric. 2021, 191, 106533. [Google Scholar] [CrossRef]
- Afonso, M.; Fonteijn, H.; Fiorentin, F.S.; Lensink, D.; Mooij, M.; Faber, N.; Polder, G.; Wehrens, R. Tomato fruit detection and counting in greenhouses using deep learning. Front. Plant Sci. 2020, 11, 571299. [Google Scholar] [CrossRef] [PubMed]
- Kim, E.-C.; Hong, S.-J.; Kim, S.-Y.; Lee, C.-H.; Kim, S.; Kim, H.-J.; Kim, G. CNN-based object detection and growth estimation of plum fruit (Prunus mume) using RGB-D imaging techniques. Sci. Rep. 2022, 12, 21251. [Google Scholar] [CrossRef]
- Ferrer-Ferrer, M.; Ruiz-Hidalgo, J.; Gregorio, E. Simultaneous fruit detection and size estimation using multitask deep neural networks. Biosyst. Eng. 2023, 233, 63–75. [Google Scholar] [CrossRef]
- Abebe, A.M.; Kim, Y.; Kim, J.; Kim, S.L.; Baek, J. Image-Based High-Throughput Phenotyping in Horticultural Crops. Plants 2023, 12, 2061. [Google Scholar] [CrossRef]
- Tong, Y.-S.; Lee, T.-H.; Yen, K.-S. Deep Learning for Image-Based Plant Growth Monitoring: A Review. Int. J. Eng. Technol. Innov. 2022, 12, 225–246. [Google Scholar] [CrossRef]
- Xiao, F.; Wang, H.; Xu, Y.; Zhang, R. Fruit Detection and Recognition Based on Deep Learning for Automatic Harvesting: An Overview and Review. Agronomy 2023, 13, 1625. [Google Scholar] [CrossRef]
- Mohmed, G.; Heynes, X.; Naser, A.; Sun, W.; Hardy, K.; Grundy, S.; Lu, C. Modelling daily plant growth response to environmental conditions in Chinese solar greenhouse using Bayesian neural network. Sci. Rep. 2023, 13, 4379. [Google Scholar] [CrossRef] [PubMed]
- Gong, L.; Yu, M.; Jiang, S.; Cutsuridis, V.; Pearson, S. Deep learning-based prediction on greenhouse crop yield combined TCN and RNN. Sensors 2021, 21, 4537. [Google Scholar] [CrossRef] [PubMed]
- Sim, H.S.; Kim, D.S.; Ahn, M.G.; Ahn, S.R.; Kim, S.K. Prediction of Strawberry Growth and Fruit Yield based on Environmental and Growth Data in a Greenhouse for Soil Cultivation with Applied Autonomous Facilities. Hortic. Sci. Technol. 2020, 38, 840–849. Available online: https://www.hst-j.org/articles/article/Qbad/ (accessed on 10 November 2025). [CrossRef]
- Mahmood, F.; Govindan, R.; Bermak, A.; Yang, D.; Al-Ansari, T. Data-driven robust model predictive control for greenhouse temperature control and energy utilisation assessment. Appl. Energy 2023, 343, 121190. [Google Scholar] [CrossRef]
- Wang, A.; Lv, J.; Wang, J.; Shi, K. CO2 enrichment in greenhouse production: Towards a sustainable approach. Front. Plant Sci. 2022, 13, 1029901. [Google Scholar] [CrossRef]
- Wen, J.; Abeel, T.; de Weerdt, M. “How sweet are your strawberries?”: Predicting sugariness using non-destructive and affordable hardware. Front. Plant Sci. 2023, 14, 1160645. [Google Scholar] [CrossRef]
- Abd-Elrahman, A.; Wu, F.; Agehara, S.; Britt, K. Improving strawberry yield prediction by integrating ground-based canopy images in modeling approaches. ISPRS Int. J. Geo-Inf. 2021, 10, 239. [Google Scholar] [CrossRef]
- Nakano, S.; Fujii, N.; Koyama, R.; Uno, Y. Prediction of Lettuce Harvest Date and Evaluation of Data for Yield Estimation Using Artificial Intelligence Analysis of Aerial Drone Images. Hortic. J. 2025, advance online publication. [Google Scholar] [CrossRef]
- Lin, Z.; Liu, W.; Wang, S. Strawberry harvest date prediction using multi-feature fusion deep learning in plant factory. Comput. Electron. Agric. 2025, 234, 110174. [Google Scholar] [CrossRef]
- Gongal, A.; Karkee, M.; Amatya, S. Apple fruit size estimation using a 3D machine vision system. Inf. Process. Agric. 2018, 5, 498–503. [Google Scholar] [CrossRef]
- Gené-Mola, J.; Vilaplana, V.; Rosell-Polo, J.R.; Gregorio, E.; Morros, J.R.; Ruiz-Hidalgo, J.; Sanz, R. Multi-modal deep learning for Fuji apple detection using RGB-D cameras. Comput. Electron. Agric. 2019, 162, 689–698. [Google Scholar] [CrossRef]
- Bortolotti, G.; Piani, M.; Gullino, M.; Mengoli, D.; Franceschini, C.; Corelli Grappadelli, L.; Manfrini, L. A computer vision system for apple fruit sizing by means of low-cost depth camera and neural network application. Precis. Agric. 2024, 25, 2740–2757. [Google Scholar] [CrossRef]
- Marzahl, C.; Aubreville, M.; Bertram, C.A.; Maier, J.; Maier, R.; Klopfleisch, R.; Maier, A.; Bergler, C.; Kröger, C.; Voigt, J. EXACT: A collaboration toolset for algorithm-aided annotation of images with annotation version control. arXiv 2020, arXiv:2004.14595. [Google Scholar] [CrossRef]
- Miao, R.; Toth, R.; Zhou, Y.; Madabhushi, A.; Janowczyk, A. Quick Annotator: An open-source digital pathology based rapid image annotation tool. arXiv 2021, arXiv:2101.02183. [Google Scholar] [CrossRef]














| Study | Crop | Data Type | Model/Method | Main Findings | Limitations |
|---|---|---|---|---|---|
| Bargoti & Underwood (2017) [16] | Apple, Mango, Almond | RGB images | Faster R-CNN | Achieved stable fruit detection in complex orchard environments | Did not include fruit size or maturity estimation |
| Mirhaji et al. (2021) [17] | Orange | RGB images | YOLO-V4 | Quantified fruit load under varying lighting conditions | Limited to a specific crop and environment |
| Afonso et al. (2020) [18] | Tomato | RGB images | Mask R-CNN | Accurate fruit detection and counting in greenhouse | No time-series growth estimation |
| Kim et al. (2022) [19] | Plum | RGB-D images | Faster R-CNN, EfficientDet, SSD | Improved fruit diameter estimation; validated RGB-D fusion | Needs extension to broader multimodal learning |
| Ferrer-Ferrer et al. (2023) [20] | Multiple fruits | RGB images | Multitask DNN | Performed detection and size estimation simultaneously | Limited dataset diversity |
| Mohmed et al. (2023) [24] | Tomato (greenhouse) | Environmental data (T, RH, CO2, radiation) | Bayesian Neural Network | Quantified effects of environment on growth and yield | No image data included |
| Gong et al. (2021) [25] | Tomato | Environmental data | TCN + RNN | Improved yield prediction by capturing time-series patterns | Restricted to tomato dataset |
| Sim et al. (2020) [26] | Strawberry | Environmental + growth data | Regression/ML | Identified key variables (VPD, PAR, RH) for yield prediction | Did not use RGB images |
| Wen et al. (2023) [29] | Strawberry | RGB + environmental data (T, RH, light, irrigation) | Feature fusion | Improved sugar content prediction; reduced error vs. unimodal | Small-scale dataset |
| Nakano et al. (2025) [31] | Lettuce | Drone images + weather data | AI-based fusion | Predicted harvest date with mean error of 2.35 days | Outdoor crop; limited greenhouse application |
| Lin et al. (2025) [32] | Strawberry | Time-series images + environmental data | Multi-feature fusion DL | Enhanced harvest date prediction performance | Lack of application to other crops (e.g., melon) |
| Gongal et al. (2018) [33] | Apple | 3D machine vision + marker | Machine vision | Achieved accurate diameter and volume estimation | Marker installation is cumbersome |
| Gené-Mola et al. (2019) [34] | Apple | RGB-D (markerless) | Multimodal DL | Estimated fruit size without markers | Requires complex modeling and large training data |
| Bortolotti et al. (2024) [35] | Apple | Depth camera (markerless) | DL-based CV system | Demonstrated field-level markerless fruit sizing | Limited to specific orchard conditions |
| Category | Description |
|---|---|
| Location | Energy-Self-Sufficient Smart Farm Research Greenhouse, Jeonnam Agricultural Research and Extension Services(1508, Senam-ro, Sanpo-myeon, Naju-si, Jeollanam-do, Republic of Korea, 58213) |
| Cultivars | ‘Damas’, ‘Supia’ |
| Transplanting | 10 June 2025 |
| Pollination | 1–4 July 2025 |
| Harvesting | 28 August 2025 |
| Cultivation Type | Soil-less culture with coir substrate, automated irrigation and drainage system |
| Climate Control | Daytime 25–30 °C, Nighttime 18–22 °C, RH 60–70%, CO2 400–800 μmol·mol−1 |
| Nutrient Control | Drainage ratio ≈ 30%, EC 1.5–2.0 dS·m−1 |
| Class | Type | Attribute | Description |
|---|---|---|---|
| Melon | Polygon | Occluded (True/False) | Presence or absence of visual obstruction (occluded: true/false) |
| Marker | Polygon | - | 100 mm × 100 mm ArUco marker for calibration |
| Date | Camera | Marker Condition | Training | Validation | Test | Total |
|---|---|---|---|---|---|---|
| 25 August 2025 | Webcam A | Marker | 206 | 60 | - | 266 |
| 25 August 2025 | Webcam A | No-marker | 124 | 31 | - | 155 |
| 25 August 2025 | Webcam B | Marker | 139 | 38 | 177 | |
| 25 August 2025 | Webcam B | No-marker | 76 | 20 | 96 | |
| 18 August 2025 | Webcam A | No-marker | - | - | 85 | 85 |
| 18 August 2025 | Webcam B | No-marker | - | - | 52 | 52 |
| 12 August 2025 | Webcam A | No-marker | - | - | 85 | 85 |
| 12 August 2025 | Webcam B | No-marker | - | - | 52 | 52 |
| 8 August 2025 | Webcam A | No-marker | - | - | 90 | 90 |
| 8 August 2025 | Webcam B | No-marker | - | - | 54 | 54 |
| Metric | Type | Definition | Equation |
|---|---|---|---|
| mAP@0.5 | Detection | Mean Average Precision at IoU threshold 0.5; evaluates overall detection accuracy | |
| Precision | Detection | Ratio of correctly detected objects among all detected objects | |
| Recall | Detection | Ratio of correctly detected objects among all ground-truth objects | |
| R2 | Regression | Proportion of variance in observed values explained by predictions | |
| MAE | Regression | Mean absolute difference between predicted and observed values | |
| RMSE | Regression | Root of mean squared error; penalizes larger errors more heavily |
| Condition | Class | mAP@0.5 | Precision | Recall |
|---|---|---|---|---|
| Marker | Melon | 0.92 | 0.91 | 0.90 |
| Marker | Marker | 0.95 | 0.94 | 0.93 |
| No-marker | Melon | 0.89 | 0.88 | 0.87 |
| Condition | R2 | MAE (mm) | RMSE (mm) |
|---|---|---|---|
| Marker | 0.92 | 5.8 | 7.2 |
| No-marker | 0.90 | 6.5 | 8.1 |
| Condition | R2 | MAE (g) | RMSE (g) |
|---|---|---|---|
| Marker | 0.91 | 84.2 | 102.5 |
| No-marker | 0.89 | 95.7 | 118.3 |
| Category | Harvest Date | DAT (Days After Transplanting) | Fruit Diameter (mm) | Fruit Weight (kg) |
|---|---|---|---|---|
| Predicted | 28 August 2025 | 79 | 150.0 (threshold) | 1.65 (model est.) |
| Measured | 28 August 2025 | 79 | 147.7 | 1.68 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Yang, K.; Jung, S.; Lee, J.; Jung, U.; Lee, M. Prediction of Optimal Harvest Timing for Melons Through Integration of RGB Images and Greenhouse Environmental Data: A Practical Approach Including Marker Effect Analysis. Agriculture 2026, 16, 169. https://doi.org/10.3390/agriculture16020169
Yang K, Jung S, Lee J, Jung U, Lee M. Prediction of Optimal Harvest Timing for Melons Through Integration of RGB Images and Greenhouse Environmental Data: A Practical Approach Including Marker Effect Analysis. Agriculture. 2026; 16(2):169. https://doi.org/10.3390/agriculture16020169
Chicago/Turabian StyleYang, Kwangho, Sooho Jung, Jieun Lee, Uhyeok Jung, and Meonghun Lee. 2026. "Prediction of Optimal Harvest Timing for Melons Through Integration of RGB Images and Greenhouse Environmental Data: A Practical Approach Including Marker Effect Analysis" Agriculture 16, no. 2: 169. https://doi.org/10.3390/agriculture16020169
APA StyleYang, K., Jung, S., Lee, J., Jung, U., & Lee, M. (2026). Prediction of Optimal Harvest Timing for Melons Through Integration of RGB Images and Greenhouse Environmental Data: A Practical Approach Including Marker Effect Analysis. Agriculture, 16(2), 169. https://doi.org/10.3390/agriculture16020169

