| As people pursue a better quality of life,the health of water resources is receiving more and more attention.In lakes and rivers,there are floating objects that can harm the health of the water.To prevent these floating objects from further threatening water resources,timely removal is crucial.Although existing automated salvaging equipment has good results for collecting large floating objects,it is not suitable for small ones.Among the floating objects that can harm water resources,bottled floating objects make up the vast majority.Due to their small size and scattered distribution,they present difficulties for water resource management and monitoring.Although the increase in data volume and hardware computing power has promoted the rapid development of deep learning-based object detection algorithms,the detection of small floating objects on the water surface remains an important and challenging task due to their small size(accounting for only 1%~2% of the image)and scattered distribution.Therefore,this article focuses on the detection difficulties of small objects on the water surface,and the specific work and research content are as follows:(1)Construct a dataset for detecting small floating objects on the water surface.As the sample size of the current dataset captured by unmanned boats is limited,the model may overly rely on training data,leading to overfitting.To solve this problem,this paper first analyzes and introduces the existing dataset of small floating objects on the water surface,including the annotation of the dataset and the introduction of annotation file format.Secondly,three data augmentation methods,including random brightness,horizontal flipping,and random contrast,are used to augment the training set in the dataset.Finally,the augmented dataset is visualized and statistically analyzed to provide data foundation for the subsequent detection algorithms of small objects on the water surface.(2)Propose an object detection model that combines feature enhancement and attention mechanism.Small targets usually only occupy a small number of pixels in the image,making it difficult to capture the details of the target.At the same time,due to the relatively small amount of context information around the small target,the model finds it difficult to accurately judge the position and category of the target.To solve this problem,this paper first introduces and analyzes the YOLOv7 object detection model structure in detail.Secondly,a feature enhancement module is proposed to obtain multi-scale context information and low-level features of small targets.In the feature fusion process,different levels of feature maps may have semantic-level conflicts and redundant information,causing the features of small targets to be submerged in conflict information.Therefore,a convolutional block attention module is introduced in the model to avoid the features of small targets being submerged in conflict information.Finally,through experiments,the algorithm proposed in this paper improves the detection performance of small floating objects on the water surface.(3)A scale-penalized intersection-over-union based object detection model is proposed.Due to the relatively small size of bounding boxes for small objects,slight errors in computing intersection-over-union may lead to a lower overlap area than the threshold,resulting in missed detections.Therefore,regular-sized objects can usually match more positive samples,providing richer gradient information during training.To address this issue,the calculation method of intersection-over-union is first introduced and analyzed in detail.Then,a scale-penalized intersection-over-union calculation method is proposed to penalize small objects of different sizes,increasing the gradient information during training and improving their detection performance.Finally,the model is quantized using the PPQ tool for INT8 quantization,and the results show that the performance of the quantized model does not significantly decrease while there are significant improvements in speed and memory usage. |