1.Key Laboratory of Mountain Hazards and Engineering Resilience,Institute of Mountain Hazards and Environment,Chinese Academy of Sciences,Chengdu,Sichuan 610213,China
2.University of Chinese Academy of Sciences,Beijing 100049,China
Objective An image segmentation method for large wood based on the segment anything model (SAM) was introduced, in order to provide theoretical support for its application in investigating and assessing large wood disasters. Methods The Zebagou area in Gongjue County, Chamdo City, Xizang Autonomous Region was selected as the study area, based on SAM, a segmentation method for large wood images—large wood SAM (LWSAM)-was developed by introducing a lightweight adapter, simplifying the mask decoder, designing a multi-task loss function, and adding an auxiliary classifier. During training, the parameters of the original image encoder and the prompt encoder were frozen to improve large wood segmentation performance at a low training cost. The model was trained and tested on two datasets, LW_CAM_dataset and LW_UAV_dataset, and compared with current state-of-the-art image segmentation models. Results ① The proposed multi-task loss function could optimize segmentation quality from different perspectives, effectively address the issues of sparse foreground and class imbalance in large wood recognition, and enhance the model’s adaptability to various large wood morphologies. ② Compared with the SAM method, under point prompt conditions, LWSAM achieved improvements of 15.9%, 15.9%, and 10.0% in MDice, MIoU, and F1 score, respectively, on the LW_CAM_dataset, and improvements of 21.6%, 29.6%, and 16.7% on the LW_UAV_dataset, respectively. ③ The performance of large wood segmentation was influenced by dataset quality, with models trained on higher-quality datasets achieving better segmentation results. Conclusion Using LWSAM for large wood image segmentation is feasible, and it demonstrates high accuracy and strong robustness in practical applications, enabling accurate segmentation of large wood images. This approach can be applied to large wood disaster investigations in small watersheds.
文献参数: 刘海涛, 陈剑刚, 陶紫琴, 等.基于人工智能模型的小流域沟道漂木识别方法[J].水土保持通报,2025,45(6):158-168. Citation:Liu Haitao, Chen Jiangang, Tao Ziqin, et al. Identification method for large wood in small watershed channels based on segment anything model [J]. Bulletin of Soil and Water Conservation,2025,45(6):158-168.
ChenJiangang, FeiGaogao, WangXi’an, et al. Advances on disaster effects of drift wood in flash flood debris flows [J]. Advances in Science and Technology of Water Resources, 2022,42(3):104-111.
[4]
FeiGaogao, WangXiekang. A review of large wood dynamics relevant to hazard characteristics for built structures [J]. Geomorphology, 2024,453:109152.
[5]
ChenJiangang, LiuWenrun, ZhaoWanyu, et al. Magnitude amplification of flash floods caused by large woody in Keze gully in Jiuzhaigou National Park, China [J]. Geomatics, Natural Hazards and Risk, 2021,12(1):2277-2299.
[6]
SchalkoI, FollettE, NepfH. Impact of lateral gap on flow distribution, backwater rise, and turbulence generated by a logjam [J]. Water Resources Research, 2023,59(10):e2023WR034689.
[7]
SchalkoI, LagederC, SchmockerL, et al. Laboratory flume experiments on the formation of spanwise large wood accumulations: Part Ⅱ. Effect on local scour [J]. Water Resources Research, 2019,55(6):4871-4885.
[8]
Ruiz-VillanuevaV, PiégayH, GaertnerV, et al. Wood density and moisture sorption and its influence on large wood mobility in rivers [J]. Catena, 2016,140:182-194.
[9]
De CiccoP N, ParisE, SolariL, et al. Bridge pier shape influence on wood accumulation:Outcomes from flume experiments and numerical modelling [J]. Journal of Flood Risk Management, 2020,13(2):e12599.
YangHuaquan, LiuJinfeng, SunHao, et al. Analysis of the characteristics and development trends of the “7 · 5”catastrophic debris flow in Xiangjiao gully, Muli County, Sichuan [J]. The Chinese Journal of Geological Hazard and Control, 2024,35(1):100-107.
[12]
MayC L, GresswellR E. Processes and rates of sediment and wood accumulation in headwater streams of the Oregon Coast Range, USA [J]. Earth Surface Processes and Landforms, 2003,28(4):409-424.
[13]
MacVicarB, PiégayH. Implementation and validation of video monitoring for wood budgeting in a wandering piedmont river, the Ain River (France) [J]. Earth Surface Processes and Landforms, 2012,37(12):1272-1289.
[14]
HeKaiming, GkioxariG, DollárP, et al. Mask R-CNN [C]∥2017 IEEE International Conference on Computer Vision (ICCV). October 22-29, 2017, Venice, Italy. IEEE, 2017:2980-2988.
[15]
HanKai, WangYunhe, ChenHanting, et al. A survey on vision transformer [J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2023,45(1):87-110.
[16]
KirillovA, MintunE, RaviN, et al. Segment anything [C]∥2023 IEEE/CVF International Conference on Computer Vision (ICCV). 2023, Paris, France. IEEE, 2024:3992-4003.
ZhangZhenwei, CaiKetian, GaoXuan, et al. Calculation method and verification of rockfill gradation based on SAM image processing [J]. Water Power, 2025,51(2):80-86.
ZhangHong, YangJunya, LiuKexin, et al. Portable intelligent detection of coarse aggregate gradation based on stone-SAM [J]. Journal of Building Materials, 2025,28(6):581-590.
FuLiqun, JinFeng, ZhangXixi, et al. Obtaining particle size distribution curves for rock-filled concrete dams by combining mask R-CNN and SAM [J]. Water Resources and Power, 2024,42(11):7-11.
MaXiaochuan, FuJia, WangL, et al. Application of active learning to defect detection guided by SAM feature [J]. Electro-Mechanical Engineering, 2025,41(3):80-86.
TaoPan, FangYu, WangXin, et al. Multi-task track defect detection method based on improved SAM model [J]. Journal of Nanjing University (Natural Sciences), 2024,60(5):776-784.
LiuNa, FengJun, HuoYiru, et al. SAMCP: Lightweight SAM fine-tuning method for colon polyp segmentation [J/OL]. Journal of Computer Applications, 2025:1-14.(2025-02-27).
LiuFuchang, CaiYuchen, MiaoYongwei, et al. Prompt-based three-dimensional tooth segmentation method based on pre-trained SAM [J]. Journal of Zhejiang University (Science Edition), 2025,52(1):59-69.
[33]
LiXiaoya, SunXiaofei, MengYuxian, et al. Dice loss for data-imbalanced NLP tasks [C]∥Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics. Online. Stroudsburg, PA, USA:ACL, 2020:465-476.
[34]
RahmanM A, WangYang. Optimizing intersection-over-union in deep neural networks for image segmentation [C]∥Advances in Visual Computing. Cham:Springer, 2016:234-244.
[35]
MannorS, PelegD, RubinsteinR. The cross entropy method for classification [C]∥Proceedings of the 22nd International Conference on Machine Learning. 2005, Bonn, Germany. ACM, 2005:561-568.
[36]
RonnebergerO, FischerP, BroxT. U-Net:Convolutional networks for biomedical image segmentation [C]∥Medical Image Computing and Computer-Assisted Intervention-MICCAI 2015. Cham: Springer, 2015:234-241.
[37]
CastroR, RamosL, RománS, et al. U-net vs. transunet: performance comparison in medical image segmentation[C] ∥ International Conference on Applied Technologies. Cham: Springer Nature Switzerland, 2022: 212-226.
[38]
ChenL C, ZhuYukun, PapandreouG, et al. Encoder-decoder with atrous separable convolution for semantic image segmentation [C]∥Computer Vision-ECCV 2018. Cham:Springer, 2018:833-851.
[39]
VakaI R, SundharakumarK B. Comparative Analysis for SAM, FastSAM, EfficientSAM, Detectron 2 for Semantic Segmentation in Self Driving Cars[C] ∥ International Conference on Computer Vision and Image Processing. Cham: Springer Nature Switzerland, 2024: 281-294.