Abstract:In order to solve the problems of small target size and complex background in the river channel “four chaos” detection image, an improved YOLO v8n-SPE-SL (Small SPD-Conv-ECA SiLuan) model was proposed to quickly and accurately identify the “four chaos” targets in the river channel. By adding a small target detection layer, the difficult problem of small target recognition in the river was solved. By introducing the SPD-Conv module to replace the partial convolution with step size of 2 in the original model, the loss of detail information was reduced. By adding the efficient channel attention (ECA) mechanism to some C2f modules, the ability to recognize small targets of the “four chaos” in the river was improved, and on this basis, the “four chaos” patrol system of the river was designed. Based on the constructed dataset, the results showed that the average accuracy, recall rate and average accuracy of the YOLO v8n-SPE-SL model reached 96.3%, 91.9% and 95.7%, which were improved by 1, 2.5 and 1.6 percentage points respectively compared with that of the YOLO v8n model. The introduction of the small target detection layer improved the mAP@50 by 0.7 percentage points, the SPD-Conv module reduced the false detection rate by 23.6%, and the ECA mechanism increased the mAP@50-95 by 2.7 percentage points. The inspection system can be used to achieve precise identification and display of the four “chaos” phenomena (“unauthorized occupation,” “illegal construction,” “random piling,” and “illegal mining”) within river management areas, contributing to the construction of happy rivers and lakes.