# Multizone Leak Detection Method for Metal Hose Based on YOLOv5 and OMD-ViBe Algorithm
## 1 Introduction  
Air tightness testing is widely used in industry and is an essential standard for evaluating metal hoses' safety and quality. Products should be tested for leaks before leaving the factory according to the standards set by the industry. Various methods have been applied to leak detection, such as pressure detection, ultrasonic detection, infrared thermal imaging detection and machine vision. Leak detection can be detected by pressure changes, flow noise and image information. [PERSON] et al., [PERSON] et al., [PERSON] et al. and [PERSON] et al. located the leakage position and quantified leakage volume based on the pressure change [1; 2; 3; 4]. If more than one leakage occurs, finding it becomes easier. [PERSON] et al., [PERSON] et al., [PERSON] et al., [PERSON] et al., [PERSON] et al., [PERSON] and [PERSON] et al. located leakage position by detecting flow noise [5; 6; 7; 8; 9; 10; 11]. Flow noise can overwrite leak point information and interfere with leak detection results. [PERSON] et al., [PERSON] et al., [PERSON] et al., [PERSON] et al., [PERSON] et al. and [PERSON] et al. used infrared thermal imaging to locate the leakage position [12; 13; 14; 15; 16; 17; 18]. The infrared thermal image detection method requires there to be a temperature difference between the leakage media and the environment. At present, deep learning is widely used in the field of ROI recognition due to its high recognition accuracy and high detection speed, and deep learning is being increasingly applied to image detection. [PERSON] et al. and [PERSON] et al. used two-stage target detection methods, but the detection speed needed to be faster [19; 20]. Subsequently, [PERSON] et al. [21], [PERSON] et al. [22] and Nepal al. [23] compared the two-stage detection methods and then improved the detection speed using the one-stage target detection method [21; 22; 23]. Based on the extracted ROI area, it is possible to continually identify the leaking bubbles in the area. [PERSON] et al. obtained bubbles at the leaky point of the underwater confinement deviceusing machine vision [24]. They extracted the bubble contour of the leaky end using a interframe difference algorithm combined with edge detection. [PERSON] et al. combined infrared video data and machine vision techniques to extract frame feature blocks using principal component analysis and removed them with the K nearest neighbor method to classify the frame feature blocks and detect and locate the leakage point of liquid pipes [25]. [PERSON] and [PERSON] combined a visual flow-splitting strategy with the Horn-Schunck algorithm to detect underwater bubbles and estimate the bubble size [26]. Several of the above machine vision methods use single-frame image segmentation methods to overcome the problem of ignoring the concentration of bubbles that are difficult to detect when the leakage rate is too fast. Some researchers have proposed using the image information in video to detect leaks, which has a better detection effect than does the abovementioned method of using single-frame image information. Furthermore, [PERSON] et al. used the background modeling algorithm to improve the bubble recognition efficiency using the video capture data method [27]. The background modeling algorithm is an image processing algorithm applied when significant differences between the current frame and the background model are shown, which generally includes the Gaussian mixture algorithm, ViBe algorithm, PBAS algorithm, etc. [28; 29; 30; 31; 32]. The ViBe algorithm proposed by [PERSON] et al., among other background modeling algorithms, is widely used as one of the features of faster and more accurate detection of moving targets. Several researchers have used improvements of the ViBe algorithm in target detection. [PERSON] et al. improved PWC detection by inputting image depth information into the background model [33]. [PERSON] et al. applied ViBe combined with the frame difference method to a vehicle detection system to remove the shadowing problem in ViBe detection [34]. [PERSON] et al.