| In urban and industrial discharge,a large number of drainage pipelines have been laid,and their working conditions directly affect the life of urban people and the operation of factories.In order to find the damage of the pipeline and repair it in time,it is necessary to evaluate the defect of the drainage pipeline through regular monitoring.Drainage pipelines are usually buried underground,with complex paths and small pipe diameters.It is difficult for manual personnel to directly enter the pipeline to detect its defects.At present,robots are mainly used to carry cameras into the pipeline to shoot videos,and then judge by manually analyzing massive video data on the ground.This will make the staff misjudge due to fatigue after watching the video for a long time,and the efficiency is low.With the development of machine vision technology,it is possible to use computer to automatically analyze video images to detect pipeline internal defects.Combined with machine vision technology,this thesis studies the defect detection algorithm of drainage pipeline.The main research content are as follows:Firstly,according to the demand of automatic recognition of drainage pipeline defects using machine vision technology,the statistical feature extraction technology based on HOG and the machine learning algorithm based on SVM are studied.The construction process of gradient histogram for HOG defect feature extraction and the basic principle and mathematical model of SVM classification algorithm are introduced in detail.The whole algorithm inputs the training data set image into HOG algorithm for feature extraction,uses SVM machine learning algorithm to train feature parameters,and then verifies the performance of the algorithm on the test data set.Experiments show that the m AP of pipeline defect recognition based on HOG + SVM detection algorithm is 66.94%,and the designed detection algorithm can effectively identify pipeline defects.Secondly,aiming at the poor performance of traditional defect detection technology,the YOLOX detection algorithm based on deep learning is studied.The backbone network structure,prediction and training process of YOLOX are introduced in detail.At the same time,mosaic and mixup data expansion methods are introduced to expand the original data set.After using migration learning and freezing backbone network to optimize the training process,the maximum m AP of pipeline defect identification based on YOLOX defect detection algorithm is 87.61%,and the detection speed is 21 ms.Experiments show that under the same test data set,compared with traditional defect detection algorithms and other detection algorithms based on deep learning,YOLOX algorithm achieves the best balance between detection accuracy and detection speed.Finally,aiming at the problems of high missed detection rate and detection accuracy to be improved in YOLOX algorithm,it is improved from four aspects.Firstly,the attention mechanism module is introduced to improve the network structure and strengthen feature extraction;Secondly,the CIo U Loss is introduced to improve the loss function to solve the problem of gradient disappearance in the training process;Thirdly,the FRe LU designed for visual tasks is introduced to expand the spatial attributes of the network;Fourth,Soft-NMS is introduced to improve the missed detection rate.The experimental results show that the m AP of the improved YOLOX algorithm for drainage pipeline defect recognition is 90.64%and the detection time is 25 ms.Compared with other deep learning algorithms,its detection accuracy and detection speed are the best. |