Improved greenhouse segmentation <i>via</i> YOLOv8 and segment anything model for energy and hydrogen demand forecasting

Greenhouse agriculture plays a vital role in sustainable food production but also entails challenges such as high energy consumption and significant carbon emissions. To address these issues and evaluate the feasibility of adopting alternative energy sources such as green hydrogen, it is essential to precisely understand the spatial structure of agricultural facilities and accurately predict their energy demands. However, effectively processing real-world datasets—characterized by complex aerial imagery and severe class imbalance—remains a technical challenge. This study proposes a deep learning-based framework for accurately detecting and segmenting greenhouses using high-resolution aerial images. To improve object detection performance, a class-weighted loss function and a class-aware sampling strategy were integrated into the You Only Look Once 8 (YOLOv8) model to mitigate the effects of class imbalance. The proposed model achieved an overall mean average precision (mAP)@0.5:0.95 of 0.566, with precision increasing to 0.881 and recall improving to 0.822, demonstrating balanced and robust performance across classes. Additionally, the model was combined with the Segment Anything Model (SAM) to enhance segmentation precision, and its performance was compared against Open-World Localization Vision Transformer (OWL-ViT) + SAM and YOLOv8-only segmentation approaches. Experimental results show that the YOLOv8 + SAM (Fusion) configuration achieved the highest Intersection over Union (IoU) of 0.7588 and Dice coefficient (Dice) of 0.8578, demonstrating superior boundary accuracy and mask consistency compared to other methods. The joint application of class weighting and sampling improved recall for minority classes such as greenhouses, while SAM-based segmentation enhanced boundary fidelity and shape preservation. Based on the segmented areas, greenhouse surface areas were calculated, and a conservative energy consumption benchmark was applied to estimate annual energy demand. This research presents a practical baseline for evaluating the potential of renewable energy integration in agriculture and is expected to contribute to future strategies for achieving carbon neutrality and green hydrogen utilization in the agricultural sector.

Authors

Publication Details

Journal
PeerJ Computer Science
Published
2026-03-04
DOI
https://doi.org/10.7717/peerj-cs.3665
Primary Topic
Smart Agriculture and AI
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Improved greenhouse segmentation via YOLOv8 and segment anything model for energy and hydrogen demand forecasting

Yong-Woon Kim, Jiyoung Ko, Yung-Cheol Byun
PeerJ Computer Science
Smart Agriculture and AI
article

Improved greenhouse segmentation via YOLOv8 and segment anything model for energy and hydrogen demand forecasting

Yong-Woon Kim, Jiyoung Ko, Yung-Cheol Byun
article en

Abstract

Greenhouse agriculture plays a vital role in sustainable food production but also entails challenges such as high energy consumption and significant carbon emissions. To address these issues and evaluate the feasibility of adopting alternative energy sources such as green hydrogen, it is essential to precisely understand the spatial structure of agricultural facilities and accurately predict their energy demands. However, effectively processing real-world datasets—characterized by complex aerial imagery and severe class imbalance—remains a technical challenge. This study proposes a deep learning-based framework for accurately detecting and segmenting greenhouses using high-resolution aerial images. To improve object detection performance, a class-weighted loss function and a class-aware sampling strategy were integrated into the You Only Look Once 8 (YOLOv8) model to mitigate the effects of class imbalance. The proposed model achieved an overall mean average precision (mAP)@0.5:0.95 of 0.566, with precision increasing to 0.881 and recall improving to 0.822, demonstrating balanced and robust performance across classes. Additionally, the model was combined with the Segment Anything Model (SAM) to enhance segmentation precision, and its performance was compared against Open-World Localization Vision Transformer (OWL-ViT) + SAM and YOLOv8-only segmentation approaches. Experimental results show that the YOLOv8 + SAM (Fusion) configuration achieved the highest Intersection over Union (IoU) of 0.7588 and Dice coefficient (Dice) of 0.8578, demonstrating superior boundary accuracy and mask consistency compared to other methods. The joint application of class weighting and sampling improved recall for minority classes such as greenhouses, while SAM-based segmentation enhanced boundary fidelity and shape preservation. Based on the segmented areas, greenhouse surface areas were calculated, and a conservative energy consumption benchmark was applied to estimate annual energy demand. This research presents a practical baseline for evaluating the potential of renewable energy integration in agriculture and is expected to contribute to future strategies for achieving carbon neutrality and green hydrogen utilization in the agricultural sector.

PeerJ Computer ScienceVol. 12
Zero hunger
Openalex Percentile: Top 36%
Smart Agriculture and AI
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.