# Multizone Leak Detection Method for Metal Hose Based on YOLOv5 and OMD-ViBe Algorithm
## 4 Conclusions  
This papers proposes the multizone leakage detection of metal hose based on the YOLOv5 and OMD-ViBe algorithm for metal hose gas tightness detection. The accuracy, recall rate and mAP of the YOLOv5 model with the correction target box were 100% and 99.5%, respectively. The OMD-ViBe algorithm improved the F-measure to 83.97% and reduced the PWC to 0.081%. The F-measure was increased by 1.79-16.41%, and the PWC was decreased by 0.003-0.165%. Finally, after the OMD-ViBe recognition results were superimposed at each moment, the calculation errors of the multizone leakage rate of the leaky metal hose were 0.37% and 3.45%, the comprehensive leakage error was reduced by 1.53-25.19%, and the positioning error was 1.2-9.11%. Compared with the traditional manual visual inspection, the method of machine vision combined with pressure drop analysis can better detect the leakage of metal hoses, which can realize the calculation of leakage location and leakage rate. The use of industrial cameras can help avoid the false detection caused by artificial long-term observation. Through the construction of the device platform in this study, no close observation is required, which ensures safety and certain economic benefits.  
In future work, we will study the identification of small air bubble leaks, which requires higher resolution industrial cameras. It should be noted that the research objects in this paper included only a few types of metal hoses. In future studies, this method will be applied to more models and expanded to a wider variety of conditions.  
Data curation, R.C.; formal analysis, R.C.; resources, J.C. and D.Z.; validation, R.C.; writing--original draft, R.C.; writing--review and editing, J.C., D.Z. and Z.W. All authors have read and agreed to the published version of the manuscript.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Algorithm** & **Leak 1 Location** & **Leak 2 Location** & **Leak 1 Error** & **Leak 2 Error** \\ \hline ViBe & 91.97\% & 86.22\% & 2.44\% & 0.74\% \\ GMM & 80.12\% & 86.48\% & 9.41\% & 1\% \\ DPPriaMediod & 81.33\% & 86.88\% & 8.2\% & 1.53\% \\ PBAS & 91.16\% & 86.35\% & 1.63\% & 0.87\% \\ KNN & 85.54\% & 86.48\% & 3.99\% & 1\% \\ ViBeImp & 91.16\% & 87.14\% & 1.63\% & 1.66\% \\ SigmaDelta & 86.55\% & 86.35\% & 2.98\% & 0.87\% \\ Adaptive Background Learning & 85.54\% & 86.35\% & 3.99\% & 0.87\% \\ Proposed Method & 90.36\% & 85.95\%\% & 0.83\% & 0.47\% \\ \hline \hline \end{tabular}
\end{table}
Table 6: Leakage rate comparison between the proposed method and eight traditional methods.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Pressure** & **YOLOv5 Detection Time** & **OMD-ViBe Detection Time** & **YOLOv5 Recognition Accuracy** \\ (**Mpa**) & **Number** & **(ms/image)** & **(ms/image)** & **YOLOv5 Recognition Accuracy** \\ \hline \multirow{3}{*}{0.2} & 1 & 32.5 & 6.2 & 98.7\% \\  & 2 & 32.8 & 5.8 & 98.4\% \\  & 3 & 34.1 & 5.9 & 99.2\% \\ \hline \multirow{3}{*}{0.3} & 1 & 33.2 & 6.0 & 98.5\% \\  & 2 & 33.4 & 6.0 & 98.4\% \\  & 3 & 31.7 & 5.9 & 98.2\% \\ \hline \multirow{3}{*}{0.4} & 1 & 32.4 & 6.0 & 98.7\% \\  & 2 & 30.6 & 6.1 & 99.1\% \\ \cline{1-1}  & 3 & 33.8 & 6.1 & 98.6\% \\ \hline \hline \end{tabular}
\end{table}
Table 7: YOLOv5 and OMD-ViBe performance test.  
This research received no external funding.