# YOLOv5-FF: Detecting Floating Objects on the Surface of Fresh Water Environments
## 1 Introduction  
Rivers, lakes and reservoirs play an important role in water supply and ecological balance. However, floating objects often occur on the surface of rivers, lakes and reservoirs [1; 2; 3; 4]. The frequent floating objects can be divided into two categories, one is plant-related floating objects consisting of floating algae and fallen branches and leaves, and the other is garbage-related floating objects mainly including plastic products like plastic bottles, bags and so on. Plant-related floating objects come from nature, while garbage-related floating objects result from human activities. These floating objects can damage water quality, affecting water supply and aquaculture, as well as posing a threat to navigation and water projects [5; 6]. Therefore, it is very important and necessary to detect floating objects in time and treat them effectively. Remote sensing image analysis has been utilized to detect floating objects. Compared with remote sensing images, the images collected by handheld cameras [7] or airborne/shipborne cameras [8; 9] are more accessible and suitable for detecting the small objects floating on rivers, lakes and reservoirs. In recent years, deep learning has exhibited a distinct advantage in floating object detection [10; 11]. You Only Look Once (YOLO) [12] is eminently suitable for real-time object detection considering its high detection speed. YOLOv5 is an improved version of YOLO. It has attracted more and more attention and applications because it emphasizes both accuracy and speed. YOLOv5 has been applied to detect floating objects [13]. However, it suffers from the problem of the false detection and missed detection of floating objects especially of small floating objects. The problem ismainly caused by the interference of background, the lack of obvious visual features and the loss of features in downsampling operations. Many efforts have been made to improve the performance of YOLOv5 in detecting floating objects. Enhancing the feature extraction ability of YOLOv5 is one of those efforts. A common way to enhance the ability is to apply attention mechanism. [PERSON] et al. [14] and [PERSON] et al. [3] have adopted coordinate attention mechanism [15] and an attention layer in the process of feature extracting, respectively. Optimizing the feature fusion of YOLOv5 is another effort devoted to improving the performance in detecting floating objects. There are multiple ways to optimize the feature fusion. For example, [PERSON] et al. use bidirectional feature pyramid network(BiFPN) [16] to replace the feature pyramid network(FPN) [17], and [PERSON] et al. [18] apply attention mechanism to the feature fusion. Moreover, the introduction of a dedicated detection layer for small floating objects also helps to improve the performance of YOLOv5 [18]. Besides floating object detection, a lot of work has been carried out to improve the performance of YOLOv5 in other areas. [PERSON] et al. [19] employed attention mechanism and transformer to extract the features of objects in aerial images. [PERSON] et al. [20] proposed Shuffle-ECANet to extract the features of road damages. [PERSON] et al. [21], [PERSON] et al. [22] and [PERSON] et al. exploited BiFPN to optimize the feature fusion of foreign objects on airport runways, faces and road damages, respectively. [PERSON] et al. [23] introduced wavelet transform into PANet to deal with the feature loss problem of traffic signs after multiple downsampling and pooling operations. [PERSON] et al. [24] and [PERSON] et al. [19] added a small target detection layer in their works. Although a lot of work has been devoted to improving the performance of YOLOv5 in object detection, how to improve the accuracy of YOLOv5 in detecting floating objects especially small even extra small floating objects on rivers, lakes and reservoirs in real time is still an open problem. In this work, we propose an improved version of YOLOv5 to alleviate the problem. The improved version is named as YOLOv5-FF.