Foreground detection is the main way to identify regions of interest. The detection effectiveness determines the accuracy of subsequent behavior analysis. In order to enhance the detection effect and optimize the problems of low accuracy, this paper proposes an improved Vibe algorithm combining the frame difference method and adaptive thresholding. First, we adopt a shallow convolutional layer of VGG16 to extract the lower-level features of the image. Features images with high correlation are fused into a new image. Second, adaptive factors based on the spatio-temporal domain are introduced to divide the foreground and background. Finally, we construct an inter-frame average speed value to measure the moving speed of the foreground, which solves the mismatch problem between background change rate and model update rate. Experimental results show that our algorithm can effectively solve the drawback of the traditional method and prevent the background model from being contaminated. It suppresses the generation of ghosting, significantly improves detection accuracy, and reduces the false detection rate.
Image-based detection of concrete water tank damage in mining areas holds promise for practical applications. However, current deep learning-based detection algorithms often face challenges in balancing accuracy with computational complexity for real-world deployment. This paper presents an improved YOLOv5 detection method for concrete water tank damage. Firstly, the conventional convolution module in the CSPDarknet backbone is optimized with GSConv (Grouped Shuffle Convolution) to enhance feature extraction while reducing the number of parameters. Secondly, a weight transformation attention mechanism is integrated into the C3 structure to strengthen the feature representation of crack regions. Finally, the Minimum Point Distance IoU (MPDIoU) is employed for precise localization of irregular damage. On a dataset of over 11,000 images, the proposed method achieves a mean average precision (mAP@0.5) of 84.3% (precision: 88.7%; recall: 85.9%). It outperforms the original YOLOv5s, with a 6.5% higher mAP and an 11.1% faster inference speed, while maintaining a compact model size of 7.5M parameters and running at 86 FPS. Ablation studies confirm the individual contributions of each proposed module to these improvements. The algorithm thus provides an efficient and accurate solution that is suitable for deployment on resource-constrained devices.