A Lightweight Real-Time Debris Flow Detection Method Based on RF-DETR
Abstract
1. Introduction
2. Dataset Construction
2.1. Data Sources
2.2. Data Preprocessing
- Due to inconsistent data collection formats, there are issues with varying video clarity and frame rates of the collected debris flow video data, and the videos contain subtitles, watermarks, and other interfering information. Therefore, relevant tools were used to regenerate the frame rate and remove subtitles and watermarks from the raw debris flow videos. This standardizes the frame rate of the debris flow videos and reduces the impact of irrelevant interference factors in subsequent dataset annotation and model optimization studies.
- After the aforementioned processing, video frames were extracted from the debris flow video data to construct a debris flow dataset, with a frame extraction interval of 1 s to balance data quality and reduce the impact of data overlap [8]. The resulting image set was manually screened to remove images unrelated to debris flows as well as blurry or distorted images.
2.3. Data Annotation
- Mudslide type: primarily composed of silt and clay, with uniform grain size;
- Mud–Rock type: may contain clay, silt, sand, gravel, cobbles, and boulders of various grain sizes, with highly uneven distribution;
- Water–Rock type: contains very little silt and clay, with highly uneven grain size.
2.4. Data Augmentation and Dataset Split
3. Improved Method Based on RF-DETR
3.1. RF-DETR—End-to-End, Real-Time Object Detection Model
3.2. Improvements to the Lightweight Backbone
3.3. Improvements to the Loss Function
4. Experiments and Analysis
4.1. Environment and Parameter Settings
4.2. Results and Data Analysis
4.2.1. Evaluation Metrics
4.2.2. Comparison of Different Real-Time Object Detectors
4.2.3. Comparison of Different Backbones
4.2.4. Comparison of Different Loss Functions
4.2.5. Ablation Experiments
4.2.6. Benchmark on Edge Devices
5. Discussion
- In this study, all models were trained exclusively based on visible-light debris flow images. Using various data augmentation techniques, we simulated video data corresponding to special scenarios, such as those involving improperly installed monitoring equipment, unclear camera lenses, and overcast or rainy weather. However, the models are incapable of processing infrared images captured at night. As conventional cameras are largely ineffective after dark, supplementary lighting equipment is required, increasing both deployment complexity and cost. Furthermore, under low-visibility conditions, the incomplete characteristics of debris flow in video data inevitably lead to a significant reduction in the model’s recognition rate for debris flow targets. Instances of both false positives and false negatives were also observed in our experiments. Consequently, the model proposed in this paper is subject to certain limitations in terms of applicable scenarios.
- This paper has demonstrated that the series of lightweight modifications applied to RF-DETR are reasonable and effective. However, we also introduce an increase in latency and decrease in recall and AP50:0.5:95. In future research, we will focus on the model’s performance on mobile devices and NPUs, optimizing its architecture and algorithms with a specific focus on real-time inference performance, model conversion, quantization, and memory efficiency.
- This study has certain limitations. RF-DETR is a method based on NAS [16], and the DINOv2 backbone it uses is already an optimal architecture. If we were to replace it with the lightweight EfficientFormerV2 backbone, the overall architecture would need to be redesigned to ensure the resulting model achieves optimal performance. In our future research, we will consider optimizing the overall model architecture to further improve the model’s performance and efficiency.
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Flash Floods, Debris Flows and Their Response Measures. 2024. Available online: https://www.mem.gov.cn/xw/ztzl/2024/fxkhjxs2024/yjkp/202404/t20240419_485508.shtml (accessed on 19 April 2026).
- Overview of National Natural Disasters in 2025. 2026. Available online: https://www.mem.gov.cn/xw/yjglbgzdt/202601/t20260116_592135.shtml (accessed on 19 April 2026).
- Xiao, Y.; Guo, Y.; Wei, L. Design and Implementation of a Debris Flow Monitoring and Warning System in Southeast Tibet. Acta Geol. Sichuan 2024, 44, 708–715. [Google Scholar]
- Li, L.; Li, T.; He, Z.; Li, S.; Dong, J.; Wang, B. Monitoring and Early Warning of Landslide and Debris Flow Disaster Chain Risk Based on Experimental Simulation. Bull. Soil Water Conserv. 2024, 44, 167–175. [Google Scholar] [CrossRef]
- Leng, X.; Feng, L.; Ou, O.; Du, X.; Liu, D.; Tang, X. Debris Flow Infrasound Recognition Method Based on Improved LeNet-5 Network. Sustainability 2022, 14, 15925. [Google Scholar] [CrossRef]
- Hu, Y.; Yuan, L.; Ma, D.; Li, M. Research Progress on Debris Flow Infrasound Warning. Adv. Earth Sci. 2018, 33, 606–613. [Google Scholar]
- Liu, D.; Leng, X.; Wei, F.; Zhang, S.; Hong, Y. Visualized localization and tracking of debris flow movement based on infrasound monitoring. Landslides 2018, 15, 879–893. [Google Scholar] [CrossRef]
- Zhou, J.; Ju, N.; Zhang, Y.; Tian, H.; He, C. Debris Flow Tracking and Detection Method ResearchVia Video Image Analysis. Adv. Earth Sci. 2025, 40, 388–400. [Google Scholar] [CrossRef]
- Hu, M.; Liu, D.; Sang, X.; Zhang, S.; Chen, Q. Intelligent Identification Method of Debris Flow Scene Based on Camera Video Surveillance. Comput. Mod. 2024, 41–46. [Google Scholar] [CrossRef]
- Zhao, C.; Dong, G.; Zhang, S.; Tan, Z.; Basu, A. Frequency Regularization: Reducing Information Redundancy in Convolutional Neural Networks. IEEE Access 2023, 11, 106793–106802. [Google Scholar] [CrossRef]
- T/CAGHP 006-2018; Specification of Geological Investigation for Debris Flow Stabilization. China Association of Geological Disaster Prevention: Bejing, China; University of Geosciences Press: Wuhan, China, 2018.
- Isaac, R.; Peter, R.; Matvei, P.; Deva, R.; Neehar, P. RF-DETR: Neural Architecture Search for Real-Time Detection Transformers. In Proceedings of the 14th International Conference on Learning Representations (ICLR 2026), Rio de Janeiro, Brazil, 23–27 April 2026. [Google Scholar] [CrossRef]
- Chen, Q.; Su, X.; Zhang, X.; Wang, J.; Chen, J.; Shen, Y.; Han, C.; Chen, Z.; Xu, W.; Li, F.; et al. LW-DETR: A Transformer Replacement to YOLO for Real-Time Detection. arXiv 2016, arXiv:2406.03459. [Google Scholar] [CrossRef]
- Zhang, X.; Chen, J.; Yuan, J.; Chen, Q.; Wang, J.; Wang, X.; Han, S.; Chen, X.; Pi, J.; Yao, K.; et al. CAE v2: Context Autoencoder with CLIP Latent Alignment. Trans. Mach. Learn. Res. 2023. [Google Scholar] [CrossRef]
- Oquab, M.; Darcet, T.; Moutakanni, T.; Vo, H.V.; Szafraniec, M.; Khalidov, V.; Fernandez, P.; Haziza, D.; Massa, F.; El-Nouby, A.; et al. DINOv2: Learning Robust Visual Features without Supervision. Trans. Mach. Learn. Res. 2024, 1–31. [Google Scholar] [CrossRef]
- Zoph, B.; Le, Q.V. Neural Architecture Search with Reinforcement Learning. In Proceedings of the 5th International Conference on Learning Representations (ICLR 2017), Toulon, France, 24–26 April 2017. [Google Scholar] [CrossRef]
- Zhu, X.; Su, W.; Lu, L.; Li, B.; Wang, X.; Dai, J. Deformable DETR: Deformable Transformers for End-to-End Object Detection. In Proceedings of the 9th International Conference on Learning Representations (ICLR 2021), Online, 3–7 May 2021. [Google Scholar] [CrossRef]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, L.; Polosukhin, I. Attention is All you Need. In Proceedings of the 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA, 4–9 December 2017. [Google Scholar] [CrossRef]
- Li, Y.; Yuan, G.; Wen, Y.; Hu, E.; Evangelidis, G.; Tulyakov, S.; Wang, Y.; Ren, J. EfficientFormer: Vision Transformers at MobileNet Speed. In Proceedings of the 36th Conference on Neural Information Processing Systems (NeurIPS 2022), New Orleans, LA, USA, 28 November–9 December 2022. [Google Scholar] [CrossRef]
- Li, Y.; Hu, J.; Wen, Y.; Evangelidis, G.; Salahi, K.; Wang, Y.; Tulyakov, S.; Ren, J. Rethinking Vision Transformers for MobileNet Size and Speed. In Proceedings of the 2023 IEEE/CVF International Conference on Computer Vision (ICCV), Paris, France, 1–6 October 2023. [Google Scholar] [CrossRef]
- Graham, B.; El-Nouby, A.; Touvron, H.; Stock, P.; Joulin, A.; J’egou, H.E.; Douze, M. LeViT: A Vision Transformer in ConvNet’s Clothing for Faster Inference. In Proceedings of the 2021 IEEE/CVF International Conference on Computer Vision (ICCV), Montreal, QC, Canada, 10–17 October 2021. [Google Scholar] [CrossRef]
- Jocher, G.; Chaurasia, A.; Qiu, J. Ultralytics YOLOv8. 2023. Available online: https://docs.ultralytics.com/models/yolov8 (accessed on 3 July 2026).
- Rezatofighi, H.; Tsoi, N.; Gwak, J.; Sadeghian, A.; Reid, I.; Savarese, S. Generalized Intersection Over Union: A Metric and a Loss for Bounding Box Regression. In Proceedings of the 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, CA, USA, 15–20 June 2019. [Google Scholar] [CrossRef]
- Lin, T.-Y.; Goyal, P.; Girshick, R.B.; He, K.; Dollár, P. Focal Loss for Dense Object Detection. In Proceedings of the 2017 IEEE International Conference on Computer Vision (ICCV), Venice, Italy, 22–29 October 2017. [Google Scholar] [CrossRef]
- Zhao, H.; Gallo, O.; Frosio, I.; Kautz, J. Loss Functions for Image Restoration with Neural Networks. IEEE Trans. Comput. Imaging 2017, 3, 47–57. [Google Scholar] [CrossRef]
- Zhang, Y.F.; Ren, W.; Zhang, Z.; Jia, Z.; Wang, L.; Tan, T. Focal and efficient IOU loss for accurate bounding box regression. Neurocomputing 2022, 506, 146–157. [Google Scholar] [CrossRef]
- Zheng, Z.; Wang, P.; Liu, W.; Li, J.; Ye, R. Distance-IoU Loss: Faster and Better Learning for Bounding Box Regression. In Proceedings of the 34th AAAI Conference on Artificial Intelligence (AAAI-20), New York, NY, USA, 7–12 February 2020. [Google Scholar] [CrossRef]
- Wang, C.; Yeh, I.; Mark Liao, H. YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information. In Proceedings of the Computer Vision—ECCV 2024, Milan, Italy, 29 September–4 October 2024. [Google Scholar] [CrossRef]
- Jocher, G.; Qiu, J. Ultralytics YOLO11, 2024. Available online: https://docs.ultralytics.com/models/yolo11/ (accessed on 3 July 2026).
- Aharon, S.; Louis-Dupont; Masad, O. Super-Gradients. 2021. Available online: https://zenodo.org/records/7789328 (accessed on 3 July 2026).
- Tan, M.; Pang, R.; Le, Q.V. EfficientDet: Scalable and Efficient Object Detection. In Proceedings of the 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR 2020), Seattle, WA, USA, 13–19 June 2020. [Google Scholar] [CrossRef]
- Lv, W.; Zhao, Y.; Chang, Q.; Huang, K.; Wang, G.; Liu, Y. RT-DETRv2: Improved Baseline with Bag-of-Freebies for Real-Time Detection Transformer. arXiv 2024, arXiv:2407.17140. [Google Scholar] [CrossRef]
- Zhao, Y.; Lv, W.; Xu, S.; Wei, J.; Wang, G.; Dang, Q.; Liu, Y.; Chen, J. DETRs Beat YOLOs on Real-time Object Detection. In Proceedings of the 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR 2024), Seattle, WA, USA, 16–22 June 2024. [Google Scholar] [CrossRef]
- Wang, A.; Chen, H.; Lin, Z.; Han, J.; Ding, G. Rep ViT: Revisiting Mobile CNN From ViT Perspective. In Proceedings of the 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 16–22 June 2024. [Google Scholar] [CrossRef]
- Gevorgyan, Z. SIoU Loss: More Powerful Learning for Bounding Box Regression. arXiv 2022, arXiv:2205.12740. [Google Scholar] [CrossRef]



| Data Source | Type | Description | Source |
|---|---|---|---|
| Video platforms | Video | Debris flow video records | BiliBili, TikTok, YouTube |
| Kaggle open datasets | Image | Flood images | https://www.kaggle.com/datasets/naiyakhalid/flood-prediction-dataset (accessed on 3 July 2026) |
| GitHub | Image | Visible-light images of debris flow | https://github.com/anzhi1211/debris-flow-automatic-annotation-dataset (accessed on 3 July 2026) |
| Field data | Image and video | Data collected on-site | Field data collection in debris flow-prone areas |
| Method | Param | Value |
|---|---|---|
| Horizontal flipping | None | None |
| Random shifting | None | None |
| Random rotation | Angle of rotation | −8–+8° |
| Brightness adjustment | Brightness | 0.55–1 |
| Gaussian noise | Mean and variance | Mean is 1 and variance is 0.01 |
| Label Category | Count | Percentage/% | ||||
|---|---|---|---|---|---|---|
| Train | Valid | Test | Train | Valid | Test | |
| Mudslide type | 1428 | 214 | 438 | 24.6 | 24.6 | 23.7 |
| Mud–rock type | 2353 | 359 | 398 | 40.5 | 41.2 | 21.5 |
| Water–rock type | 300 | 41 | 454 | 5.2 | 4.7 | 24.6 |
| Flash flood | 273 | 41 | 191 | 4.7 | 4.7 | 10.3 |
| Negative samples | 1461 | 216 | 367 | 25.1 | 24.8 | 19.9 |
| Total | 5815 | 871 | 1848 | 100 | 100 | 100 |
| Name | Detailed Configuration |
|---|---|
| Operating System | Ubuntu 22.04.4 LTS (x86_64) |
| CPU | AMD EPYC 7K62,2-core |
| GPU | NVIDIA GeForce RTX 4060 Ti, 16 GB |
| Memory | 377 GB |
| Deep Learning Framework | PyTorch |
| Integrated Development Environment | Python v3.10.19 Torch v2.2.0+cu118 TorchAudio v2.2.0+cu118 TorchVision v0.17.0+cu118 |
| Training Parameters | Value |
|---|---|
| Epochs | 150 |
| Learning Rate (lr) | 0.0001 |
| Batch size | 16 |
| Random seed | 42 |
| Pretrain_weights | None |
| Automatic Mixed Precision (amp) | True |
| Optimizer | AdamW |
| Model | Precision | Recall | AP50 | AP50:0.5:95 | Latency | Params | GFLOPs |
|---|---|---|---|---|---|---|---|
| RFDETRSmall [12] (baseline) | 91.3 | 90.3 | 91.5 | 75.5 | 31.4 ms | 32.1 M | 12.9 |
| YOLOv8n [22] | 86.7 | 80.3 | 83.5 | 61.8 | 23.5 ms | 2.7 M | 0.9 |
| YOLOv8s [22] | 89.2 | 83.9 | 88.3 | 65.6 | 22 ms | 9.8 M | 2.9 |
| YOLOv9s [28] | 89.1 | 81.2 | 86.3 | 63.7 | 35.5 ms | 6.3 M | 2.8 |
| YOLO11s [29] | 88.7 | 81.8 | 86.3 | 58.7 | 24.3 ms | 9.4 M | 2.6 |
| YOLO11m [29] | 90.5 | 83.3 | 88.4 | 67 | 28.6 ms | 20.1 M | 8.4 |
| YOLO-NAS-S [30] | 81.6 | 76.9 | 79.1 | 54.2 | 32.4 ms | 19 M | 4.1 |
| EfficientDet-D0 [31] | 68.1 | 84.7 | 66.2 | 52.3 | 45.7 ms | 3.9 M | 4.9 |
| RT-DETRv2-S [32,33] | 90 | 86.3 | 90.9 | 75.7 | 45.8 ms | 20.1 M | 61.2 |
| Backbone | Type | Projector Simplify | Precision | Recall | AP50 | AP50:0.5:95 | Latency | Params | GFLOPs |
|---|---|---|---|---|---|---|---|---|---|
| DINOv2 [15] | Attention | - | 91.3 | 90.3 | 91.5 | 75.5 | 31.4 ms | 32.1 M | 12.9 |
| RepViT [34] | Conv | - | 93.9 | 82.9 | 87.5 | 70.1 | 40.3 ms | 19.7 M | 7.34 |
| EfficientFormerV2 [20] | Hybrid | No | 94 | 84.9 | 88 | 71.5 | 48.4 ms | 17.4 M | 32.6 |
| Yes | 94.1 | 84.7 | 88.7 | 71.8 | 37.8 ms | 14.7 M | 8.21 |
| Loss Function | Precision | Recall | AP50 | AP50:0.5:95 | Latency | Params | GFLOPs |
|---|---|---|---|---|---|---|---|
| GIoU (baseline) | 91.3 | 90.3 | 91.5 | 75.5 | 31.4 ms | 32.1 M | 12.9 |
| DIoU | 91.3 | 90.4 | 91.8 | 75.8 | 31.2 ms | 32.1 M | 12.9 |
| CIoU | 91.8 | 90.7 | 92.1 | 76.1 | 32.4 ms | 32.1 M | 12.9 |
| EIoU | 92.5 | 91.2 | 92.8 | 76.8 | 30.2 ms | 32.1 M | 12.9 |
| SIoU | 92.2 | 91 | 92.3 | 76.1 | 30.9 ms | 32.1 M | 12.9 |
| Backbone | Loss Function | Projector Simplify | Precision | Recall | AP50 | AP50:0.5:95 | Latency | Params | GFLOPs |
|---|---|---|---|---|---|---|---|---|---|
| DINOv2 (baseline) | GIoU | No | 91.3 | 90.3 | 91.5 | 75.5 | 31.4 ms | 32.1 M | 12.9 |
| DIoU | No | 91.3 | 90.4 | 91.8 | 75.8 | 31.2 ms | 32.1 M | 12.9 | |
| CIoU | No | 91.8 | 90.7 | 92.1 | 76.1 | 32.4 ms | 32.1 M | 12.9 | |
| EIoU | No | 92.5 | 91.2 | 92.8 | 76.8 | 30.2 ms | 32.1 M | 12.9 | |
| SIoU | No | 92.2 | 91 | 92.3 | 76.1 | 30.9 ms | 32.1 M | 12.9 | |
| EfficientFormerV2 (ours) | GIoU | No | 94 | 84.9 | 88 | 71.5 | 48.4 ms | 20.1 M | 32.6 |
| GIoU | Yes | 94.1 | 84.7 | 88.7 | 71.8 | 37.8 ms | 14.7 M | 8.21 | |
| DIoU | Yes | 94.1 | 84.6 | 88.7 | 72.2 | 38.8 ms | 14.7 M | 8.21 | |
| CIoU | Yes | 94.6 | 84.4 | 88.8 | 72.5 | 36 ms | 14.7 M | 8.21 | |
| EIoU | Yes | 95.2 | 85.1 | 88.9 | 72.6 | 36.4 ms | 14.7 M | 8.21 | |
| SIoU | Yes | 94.9 | 85.1 | 88.8 | 72.5 | 38.8 ms | 14.7 M | 8.21 | |
| YOLOv8s | - | - | 89.2 | 83.9 | 88.3 | 65.6 | 22 ms | 9.8 M | 2.9 |
| Name | Detailed Configuration |
|---|---|
| Operating System | Ubuntu 22.04.4 LTS |
| Hardware | NVIDIA Jetson AGX Orin |
| Jtop | Version 4.2.8 |
| Jetpack | 6.0 |
| L4T | 36.3.0 |
| CUDA | 12.2.140 |
| cuDNN | 8.9.4.25 |
| Memory | 64 GB |
| Deep Learning Framework | PyTorch |
| Integrated Development Environment | Python v3.10.19 torch 2.4.0a0+3bcc3cddb5.nv24.7 torchvision 0.19.0 |
| Backbone | Loss Function | Projector Simplify | Latency | Params | FPS |
|---|---|---|---|---|---|
| DINOv2 (baseline) | GIoU | No | 43.3 ms | 32.1 M | 23.1 |
| EfficientFormerV2 (ours) | GIoU | No | 87.6 ms | 20.1 M | 11.4 |
| GIoU | Yes | 68.8 ms | 14.7 M | 14.5 | |
| EIoU | Yes | 68.7 ms | 14.7 M | 14.6 | |
| YOLOv8n [22] | - | - | 31 ms | 2.7 M | 34 |
| YOLOv8s [22] | - | - | 31.5 ms | 9.8 M | 33.2 |
| YOLO11s [29] | - | - | 35.6 ms | 9.43 M | 30.1 |
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
Hu, Z.; Ou, O.; Ma, F.; Zhao, J. A Lightweight Real-Time Debris Flow Detection Method Based on RF-DETR. Electronics 2026, 15, 2982. https://doi.org/10.3390/electronics15142982
Hu Z, Ou O, Ma F, Zhao J. A Lightweight Real-Time Debris Flow Detection Method Based on RF-DETR. Electronics. 2026; 15(14):2982. https://doi.org/10.3390/electronics15142982
Chicago/Turabian StyleHu, Zhen, Ou Ou, Fuming Ma, and Jiabao Zhao. 2026. "A Lightweight Real-Time Debris Flow Detection Method Based on RF-DETR" Electronics 15, no. 14: 2982. https://doi.org/10.3390/electronics15142982
APA StyleHu, Z., Ou, O., Ma, F., & Zhao, J. (2026). A Lightweight Real-Time Debris Flow Detection Method Based on RF-DETR. Electronics, 15(14), 2982. https://doi.org/10.3390/electronics15142982
