رسم خرائط الفيضانات السريع من الصور الجوية باستخدام SAM المعدل وU-Net المدعوم بـ ResNet Rapid flood mapping from aerial imagery using fine-tuned SAM and ResNet-backboned U-Net

شارك:
المجلة: Hydrology and earth system sciences، المجلد: 30، العدد: 3
DOI: https://doi.org/10.5194/hess-30-743-2026
تاريخ النشر: 2026-02-09
المؤلف: Hadi Shokati وآخرون
الموضوع الرئيسي: تقييم وإدارة مخاطر الفيضانات

نظرة عامة

تتناول هذه الدراسة الحاجة الملحة لرسم خرائط الفيضانات بسرعة للتخفيف من آثار الفيضانات من خلال تقييم الأضرار بشكل فعال. تقيم الدراسة نهجين للتجزئة لتحديد المناطق المتأثرة بالفيضانات باستخدام الصور الجوية: (1) نموذج Segment Anything (SAM) المعدل الذي يقارن بين نقاط التحفيز وصناديق الحدود، و(2) نموذج U-Net الذي يستخدم ResNet-50 وResNet-101 كأعمدة مدربة مسبقًا. تشير النتائج إلى أن SAM المعدل تفوق على نموذج U-Net، محققًا دقة قدرها 0.96 وIntersection over Union (IoU) قدره 0.90 مع نقاط التحفيز، بينما أدت صناديق الحدود إلى انخفاض ملحوظ في الأداء (الدقة: 0.82، IoU: 0.67). يُعزى هذا التباين إلى طبيعة صور الفيضانات، التي تمتد غالبًا عبر الإطار بالكامل، مما يجعل اكتشاف الحدود أكثر تحديًا مع صناديق الحدود.

بالنسبة لنموذج U-Net، حقق العمود الفقري ResNet-50 دقة قدرها 0.87 وIoU قدره 0.72، مع تحسين طفيف لوحظ باستخدام العمود الفقري ResNet-101 (الدقة: 0.88، IoU: 0.74). يرتبط الأداء المحسن لـ ResNet-101 بهيكله الأعمق، مما يسهل استخراج ميزات أكثر تعقيدًا، وبالتالي تحسين دقة التجزئة. من المتوقع أن تساعد نتائج هذا البحث فرق الاستجابة الطارئة في تحديد المناطق المتأثرة بالفيضانات بسرعة، ويمكن أن تكون أيضًا مفيدة لشركات التأمين في تقييم الأضرار. علاوة على ذلك، فإن الصور المجزأة للفيضانات التي تنتجها هذه النماذج لديها القدرة على أن تكون بيانات تدريب لتطبيقات التعلم الآلي الأخرى، مما يعزز تطوير أنظمة تحليل وتنبؤ متقدمة للفيضانات.

مقدمة

تسلط مقدمة ورقة البحث الضوء على تزايد انتشار وشدة الفيضانات كأحد التحديات العالمية الكبيرة، والتي تفاقمت بسبب تغير المناخ. تُعتبر الفيضانات من أكثر الكوارث الطبيعية فتكًا، مع وقوع أحداث كارثية مؤخرًا في دول مختلفة، بما في ذلك أستراليا واليابان وإسبانيا وألمانيا. تؤكد الورقة على الحاجة الملحة لإدارة الفيضانات بشكل فعال، والتي تشمل مراحل الوقاية والاستعداد والاستجابة والتعافي. تلعب بيانات الاستشعار عن بعد، وخاصة من الصور الفضائية، دورًا حيويًا في تقييم أضرار الفيضانات وتسهيل جهود التعافي. ومع ذلك، فإن القيود مثل الغيوم وأوقات إعادة الزيارة تعيق التوافر الفوري للبيانات الفضائية بعد الفيضانات.

لمعالجة هذه التحديات، تقترح الدراسة استخدام الصور الجوية من الطائرات بدون طيار والمروحيات، والتي يمكن أن توفر صورًا عالية الدقة وخالية من الغيوم بشكل أكثر مرونة وفعالية من حيث التكلفة. تناقش الورقة قيود نماذج التعلم الآلي التقليدية في اكتشاف الفيضانات ومزايا أساليب التعلم العميق، وخاصة الشبكات العصبية التلافيفية (CNNs)، في تحديد المناطق المتأثرة بالفيضانات بدقة. تهدف الدراسة إلى استكشاف تقنيات التعلم الانتقالي المتقدمة، وتحديدًا نموذج Segment Anything (SAM) المعدل وهياكل U-Net مع أعمدة ResNet، لتعزيز الكشف الآلي عن مناطق الفيضانات ورسم الخرائط. تسعى الدراسة للإجابة على أسئلة حاسمة تتعلق بأداء هذه النماذج وفعاليتها في ظروف بيئية مختلفة، بهدف تحسين تقييم الأضرار السريع واستراتيجيات الاستجابة في إدارة الفيضانات.

الطرق

في هذه الدراسة، تم تدريب نموذج التجزئة باستخدام 70% من مجموعة بيانات منطقة الفيضانات، والتي تتكون من 204 عينات، مع تطبيق تقنيات تعزيز البيانات حصريًا لتعزيز تنوع مجموعة التدريب. شملت التعزيزات التحولات الهندسية (الانعكاسات العشوائية والدوران حتى 30°) والتحولات اللونية (التحويلات العشوائية إلى الرمادي وضبابية غاوسية بحجم نواة 3)، حيث تم تطبيق كل منها باحتمالية 0.5. خضع النموذج للتدريب لمدة 50 دورة، مستخدمًا حجم دفعة قدره 4 ومعدل تعلم قدره \(1 \times 10^{-3}\). تم تنفيذ جدولة معدل التعلم لتقليل معدل التعلم بعامل 0.1 إذا لم يتحسن فقدان التحقق على مدى 10 دورات متتالية. تم إجراء التحقق على 15% من مجموعة البيانات (43 عينة)، وتم اختيار النموذج الذي حقق أقل فقدان للتحقق للاختبار على العينات المتبقية.

تم استخدام مُحسِّن آدم لمرونته، وتم تقييم أداء النموذج باستخدام دالة فقدان مركبة، وهي Dice-Cross-Entropy Loss، التي تجمع بين فقدان Dice وفقدان الانتروبيا المتقاطعة. من المعروف أن هذه الطريقة تعزز سرعة التقارب وتحسن الأداء النهائي، خاصة من حيث معامل Dice، الذي يعد حاسمًا لتقييم التداخل المكاني بين المناطق المتوقعة والحقيقية للفيضانات بدقة. تم تعريف خسائر Dice والانتروبيا المتقاطعة رياضيًا كما يلي:

\[
L_{\text{Dice}} = 1 – \frac{2 \sum_{c=1}^{C} \sum_{i=1}^{N} g_{c,i} S_{c,i}}{\sum_{c=1}^{C} \sum_{i=1}^{N} g_{c,i} + \sum_{c=1}^{C} \sum_{i=1}^{N} S_{c,i}}
\]

\[
L_{\text{CE}} = -\frac{1}{N} \sum_{c=1}^{C} \sum_{i=1}^{N} g_{c,i} \log S_{c,i}
\]

حيث يمثل \(L_{\text{Dice}}\) و\(L_{\text{CE}}\) خسائر Dice والانتروبيا المتقاطعة، على التوالي، و\(N\) هو عدد البكسلات، و\(g_{c,i}\) هو المؤشر الثنائي للحقيقة الأرضية لفئة التسمية \(c\) عند البكسل \(i\)، و\(S_{c,i}\) هو احتمال التجزئة المتوقع. تم إجراء التجارب باستخدام Python وإطار PyTorch على نظام Windows 11 مزود ببطاقة رسومات NVIDIA GeForce RTX 4070 Ti.

النتائج

في هذه الدراسة، تم تقييم أداء التجزئة لنماذج SAM وU-Net لتحديد المناطق المغمورة بالمياه، مما كشف أن نموذج SAM-Points تفوق بشكل كبير على جميع التكوينات الأخرى، بما في ذلك SAM-Bbox وU-Net. يُعزى الأداء المتفوق لـ SAM-Points إلى استخدامه لنقاط التحفيز، التي توفر معلومات مكانية دقيقة تعزز التعرف على الحدود في المناطق المتأثرة بالفيضانات، خاصة في المناطق ذات شدة الضوء المتغيرة. على النقيض من ذلك، بينما حقق SAM-Bbox معدل استرجاع مرتفع قدره 0.96، فإن دقته المنخفضة البالغة 0.69 تشير إلى تحديات في تحديد الحدود بدقة، ويرجع ذلك أساسًا إلى المعلومات المحدودة التي توفرها نقاط التحفيز لصناديق الحدود.

أظهرت نماذج U-Net أداءً معتدلاً، حيث تفوق العمود الفقري ResNet-101 قليلاً على ResNet-50، على الرغم من أن الفرق كان ضئيلاً. يشير ذلك إلى أن تعقيد أنماط الفيضانات قد لا يتطلب هياكل أعمق لتحقيق التجزئة الفعالة. على الرغم من الكفاءة الحاسوبية لـ U-Net، قدم نموذج SAM، وخاصة مع نقاط التحفيز، أعلى دقة لرسم خرائط الفيضانات، على الرغم من أنه يتطلب موارد حاسوبية أكبر بكثير. بالإضافة إلى ذلك، كان لوجود عناصر السماء تأثير سلبي على دقة التجزئة عبر جميع النماذج، حيث أظهر SAM-Points مرونة أفضل تجاه هذه المشكلة مقارنة بـ SAM-Bbox. بشكل عام، تسلط النتائج الضوء على الدور الحاسم لاختيار التحفيز في مهام التجزئة وحساسية أداء النموذج لخصائص مجموعة البيانات.

المناقشة

في هذه الدراسة، تم استخدام مجموعة بيانات منطقة الفيضانات التي تتكون من 290 صورة مع الأقنعة المقابلة لتقييم أداء نماذج التجزئة، وتحديدًا نموذج Segment Anything (SAM) المعدل وهياكل U-Net مع أعمدة ResNet. تضمنت مجموعة البيانات صورًا متنوعة من أحداث الفيضانات المختلفة عبر مناطق جغرافية مختلفة، تم التقاطها في ظروف غير متسقة، والتي تم توحيدها إلى حجم موحد قدره 256 × 256 بكسل للتحليل. تم تعديل نموذج SAM، الذي يستفيد من بنية Vision Transformer القوية، باستخدام كل من صناديق الحدود ونقاط التحفيز، بينما استخدم نموذج U-Net ResNet-50 وResNet-101 كأعمدة. أظهرت النتائج أن نموذج SAM تفوق باستمرار على نموذج U-Net عبر جميع مقاييس التحقق، بما في ذلك Intersection-over-Union (IoU) والدقة، مما يدل على فعاليته في تجزئة المناطق المتأثرة بالفيضانات على الرغم من التباينات في جودة الصورة والظروف.

كما أبرزت الدراسة أهمية تنوع مجموعة البيانات وحجمها في التعلم الانتقالي، مشيرة إلى أن التباين الجغرافي والبيئي داخل مجموعة البيانات ساهم في قدرات تعميم النماذج. حقق نموذج SAM المعدل IoU قدره 0.90 ودقة قدرها 0.96 على البيانات غير المرئية، مما يبرز كفاية مجموعة البيانات لتجزئة الفيضانات بشكل موثوق. تشير النتائج إلى أن هذه النماذج يمكن نشرها بفعالية في السيناريوهات الواقعية لتحديد المناطق المغمورة بالمياه بسرعة، مما يساعد في الاستجابة الطارئة وتقييمات التأمين، وبالتالي تعزيز جهود إدارة أزمات الفيضانات.

Journal: Hydrology and earth system sciences, Volume: 30, Issue: 3
DOI: https://doi.org/10.5194/hess-30-743-2026
Publication Date: 2026-02-09
Author(s): Hadi Shokati et al.
Primary Topic: Flood Risk Assessment and Management

Overview

This study addresses the critical need for rapid flood mapping to mitigate the impacts of flooding through effective damage assessment. It evaluates two segmentation approaches for identifying flood-affected areas using aerial imagery: (1) a fine-tuned Segment Anything Model (SAM) that compares point prompts and bounding box prompts, and (2) a U-Net model utilizing ResNet-50 and ResNet-101 as pre-trained backbones. The findings indicate that the fine-tuned SAM outperformed the U-Net model, achieving an accuracy of 0.96 and an Intersection over Union (IoU) of 0.90 with point prompts, while bounding box prompts resulted in a notable decline in performance (Accuracy: 0.82, IoU: 0.67). This discrepancy is attributed to the nature of flood images, which often extend across the entire frame, making boundary detection more challenging with bounding boxes.

For the U-Net model, the ResNet-50 backbone achieved an accuracy of 0.87 and an IoU of 0.72, with a slight improvement observed using the ResNet-101 backbone (Accuracy: 0.88, IoU: 0.74). The enhanced performance of the ResNet-101 is linked to its deeper architecture, which facilitates the extraction of more complex features, thereby improving segmentation accuracy. The outcomes of this research are poised to assist emergency response teams in swiftly identifying flood-affected regions and could also be instrumental for insurance companies in damage assessments. Furthermore, the segmented flood images produced by these models have the potential to serve as training data for other machine learning applications, fostering the development of advanced flood analysis and prediction systems.

Introduction

The introduction of the research paper highlights the increasing prevalence and severity of floods as a significant global challenge, exacerbated by climate change. Floods are noted as the most lethal natural disasters, with recent catastrophic events occurring in various countries, including Australia, Japan, Spain, and Germany. The paper emphasizes the critical need for effective flood management, which encompasses prevention, preparedness, response, and recovery stages. Remote sensing data, particularly from satellite imagery, plays a vital role in assessing flood damage and facilitating recovery efforts. However, limitations such as cloud cover and revisit times hinder the immediate availability of satellite data post-flood.

To address these challenges, the study proposes the use of aerial imagery from UAVs and helicopters, which can provide high-resolution, cloud-free images more flexibly and cost-effectively. The paper discusses the limitations of conventional machine learning models in flood detection and the advantages of deep learning approaches, particularly convolutional neural networks (CNNs), in accurately identifying flood-affected areas. The research aims to explore advanced transfer learning techniques, specifically a fine-tuned Segment Anything Model (SAM) and U-Net architectures with ResNet backbones, to enhance automated flood area detection and mapping. The study seeks to answer critical questions regarding the performance of these models and their effectiveness in different environmental conditions, ultimately aiming to improve rapid damage assessment and response strategies in flood management.

Methods

In this study, a segmentation model was trained using 70% of a flood area dataset, comprising 204 samples, with data augmentation techniques applied exclusively to enhance the training set’s diversity. The augmentation included geometric transformations (random flips and rotations up to 30°) and color transformations (random grayscale and Gaussian blurs with a kernel size of 3), each applied with a probability of 0.5. The model underwent training for 50 epochs, utilizing a batch size of 4 and a learning rate of \(1 \times 10^{-3}\). A learning rate scheduler was implemented to reduce the learning rate by a factor of 0.1 if the validation loss did not improve over 10 consecutive epochs. Validation was conducted on 15% of the dataset (43 samples), and the model with the lowest validation loss was selected for testing on the remaining samples.

The Adam optimizer was employed for its adaptability, and the model’s performance was evaluated using a composite loss function, the Dice-Cross-Entropy Loss, which combines the Dice loss and cross-entropy loss. This approach is known to enhance convergence speed and improve final performance, particularly in terms of the Dice coefficient, which is crucial for accurately assessing the spatial overlap between predicted and actual flood areas. The Dice and cross-entropy losses were defined mathematically as follows:

\[
L_{\text{Dice}} = 1 – \frac{2 \sum_{c=1}^{C} \sum_{i=1}^{N} g_{c,i} S_{c,i}}{\sum_{c=1}^{C} \sum_{i=1}^{N} g_{c,i} + \sum_{c=1}^{C} \sum_{i=1}^{N} S_{c,i}}
\]

\[
L_{\text{CE}} = -\frac{1}{N} \sum_{c=1}^{C} \sum_{i=1}^{N} g_{c,i} \log S_{c,i}
\]

where \(L_{\text{Dice}}\) and \(L_{\text{CE}}\) represent the Dice and cross-entropy losses, respectively, \(N\) is the number of pixels, \(g_{c,i}\) is the ground truth binary indicator for class label \(c\) at pixel \(i\), and \(S_{c,i}\) is the predicted segmentation probability. The experiments were conducted using Python and the PyTorch framework on a Windows 11 system equipped with an NVIDIA GeForce RTX 4070 Ti GPU.

Results

In this study, the segmentation performance of the SAM and U-Net models for identifying flooded areas was evaluated, revealing that the SAM-Points model significantly outperformed all other configurations, including SAM-Bbox and U-Net variants. The superior performance of SAM-Points is attributed to its use of point prompts, which provide precise spatial information that enhances boundary recognition in flood-affected regions, particularly in areas with variable light intensity. In contrast, while SAM-Bbox achieved a high recall of 0.96, its lower precision of 0.69 indicates challenges in accurately delineating boundaries, primarily due to the limited information provided by bounding box prompts.

The U-Net models demonstrated moderate performance, with the ResNet-101 backbone slightly outperforming ResNet-50, although the difference was minimal. This suggests that the complexity of flooding patterns may not necessitate deeper architectures for effective segmentation. Despite the computational efficiency of U-Net, the SAM model, particularly with point prompts, provided the highest accuracy for flood mapping, although it requires significantly more computational resources. Additionally, the presence of sky elements negatively impacted segmentation accuracy across all models, with SAM-Points exhibiting better resilience to this issue compared to SAM-Bbox. Overall, the findings highlight the critical role of prompt selection in segmentation tasks and the sensitivity of model performance to dataset characteristics.

Discussion

In this study, a flood area dataset comprising 290 images with corresponding masks was utilized to evaluate the performance of segmentation models, specifically the fine-tuned Segment Anything Model (SAM) and U-Net architectures with ResNet backbones. The dataset included diverse imagery from various flood events across different geographical regions, captured under inconsistent conditions, which were standardized to a uniform size of 256 × 256 pixels for analysis. The SAM model, leveraging a robust Vision Transformer architecture, was fine-tuned using both bounding box and point prompts, while the U-Net model employed ResNet-50 and ResNet-101 as backbones. The results indicated that the SAM model consistently outperformed the U-Net model across all validation metrics, including Intersection-over-Union (IoU) and accuracy, demonstrating its effectiveness in segmenting flood-affected areas despite variations in image quality and conditions.

The study also highlighted the importance of dataset diversity and size in transfer learning, noting that the geographic and environmental variability within the dataset contributed to the models’ generalization capabilities. The fine-tuned SAM model achieved an IoU of 0.90 and an accuracy of 0.96 on unseen data, underscoring the dataset’s adequacy for reliable flood segmentation. The findings suggest that these models can be effectively deployed in real-world scenarios for rapid identification of flooded areas, aiding emergency response and insurance assessments, thus enhancing flood crisis management efforts.