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.
Ko et al. (Wed,) studied this question.