CN116188421A - Oil leakage detection method and computer storage medium - Google Patents

Oil leakage detection method and computer storage medium Download PDF

Info

Publication number
CN116188421A
CN116188421A CN202310146969.9A CN202310146969A CN116188421A CN 116188421 A CN116188421 A CN 116188421A CN 202310146969 A CN202310146969 A CN 202310146969A CN 116188421 A CN116188421 A CN 116188421A
Authority
CN
China
Prior art keywords
oil
detection
data
model
yolov3
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310146969.9A
Other languages
Chinese (zh)
Inventor
于祥凯
秦磊
尹波
胡博
冯彧超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Chengyuan Aviation Oil Co ltd
Original Assignee
Shenzhen Chengyuan Aviation Oil Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Chengyuan Aviation Oil Co ltd filed Critical Shenzhen Chengyuan Aviation Oil Co ltd
Priority to CN202310146969.9A priority Critical patent/CN116188421A/en
Publication of CN116188421A publication Critical patent/CN116188421A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • FMECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
    • F17STORING OR DISTRIBUTING GASES OR LIQUIDS
    • F17DPIPE-LINE SYSTEMS; PIPE-LINES
    • F17D5/00Protection or supervision of installations
    • F17D5/02Preventing, monitoring, or locating loss
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Multimedia (AREA)
  • General Engineering & Computer Science (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Molecular Biology (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Physics (AREA)
  • Mechanical Engineering (AREA)
  • Examining Or Testing Airtightness (AREA)
  • Pipeline Systems (AREA)

Abstract

A method for detecting oil leakage and a computer storage medium, the method comprises: acquiring image data of a preset acquisition point of an oil pipeline to form a data set; processing the data set to obtain a training set and a testing set according to a preset proportion; carrying out iterative training on the data in the training set to a YOLOv3 network model to obtain an optimal detection model; positioning the detection model to obtain an oil leakage area, and performing oil dripping and/or oil injection detection on the oil leakage area to obtain a detection result; and feeding back the detection result to an intelligent analysis system of the oil depot safety management center. Through the mode, the lightweight YOLOv3 model is obtained, the operation efficiency is improved while the accuracy is ensured, the oil dripping and/or oil injection detection is carried out on the oil leakage area to obtain the detection result, the detection accuracy can be improved through different detection modes, the detection result is fed back to the intelligent analysis system of the oil depot safety management center, the daily operation and maintenance efficiency of the oil depot safety management system is improved, and more labor cost is saved.

Description

Oil leakage detection method and computer storage medium
Technical Field
The application relates to the technical field of oil depot safety management, in particular to a detection method for oil leakage and a computer storage medium.
Background
In the oil depot management process, the running and leaking is a potential safety hazard existing in the oil storage and transportation processes, and the traditional method for treating the running and leaking is mainly to strengthen patrol inspection by strengthening enterprise management and quality control, strengthening management standardized format and standardized operation process. Part of petrochemical enterprises establish a field maintenance database, perform on-line monitoring on equipment, popularize and perform predictive maintenance, and strengthen personal requirements and job requirements on staff.
The further oil depot inspection work is carried out by inspecting the monitoring picture of the camera basically through manual warehousing inspection and partial area inspection, and the main aims are to realize fire prevention, explosion prevention and leakage prevention.
The inventors of the present application have found in long-term development that continuous leakage is mostly caused by weld defects or equipment aging, etc., because the amount of leakage is relatively small and is difficult to detect. The length span of the oil delivery pipeline of the oil depot ranges from a few kilometers to tens of kilometers, and the overall situation is difficult to control only by manual management of management staff. In the aspect of oil pipeline continuous leakage problem inspection, management staff may not be aware of oil leakage points, and thus pipeline leakage stopping work is affected. In the aspect of oil depot oil pipeline management, a manager may have behavior consciousness such as thought-unconsciousness or careless play, so that potential safety hazards appear in oil pipeline management. Therefore, in the aspect of the problem treatment of the leakage of the aviation oil pipeline, a manager can hardly find the leakage problem in a short time, the development of the repair management work of the aviation oil leakage accident can be influenced, the traditional inspection operation is time-consuming and labor-consuming, low in efficiency and difficult to discover the potential safety hazard in time, and meanwhile, the safety inspection of the camera is mainly carried out by manual monitoring, so that the working intensity and the requirement on the personnel are high, and the potential safety hazard is easy to miss.
Disclosure of Invention
The application provides a detection method for oil leakage and a computer storage medium, which are used for solving the problem that whether oil leakage points exist in an oil pipeline or not is difficult to perceive by management staff in the prior art.
In order to solve the technical problems, one technical scheme adopted by the application is as follows: provided is a method for detecting oil leakage, wherein the method comprises the following steps:
acquiring image data of a preset acquisition point of an oil pipeline to form a data set;
processing the data set to obtain a training set and a testing set according to a preset proportion;
carrying out iterative training on the data in the training set to a YOLOv3 network model to obtain an optimal detection model;
positioning the detection model to obtain a planned oil leakage area, and detecting oil dripping and/or oil spraying of the oil leakage area to obtain a detection result;
and feeding the detection result back to an intelligent analysis system of the oil depot safety management center.
In order to solve the technical problems, another technical scheme adopted by the application is as follows: there is provided a system for detecting oil leakage, wherein the detection comprises a processor and a memory coupled to each other, the memory for storing a computer program, the processor for loading and executing the computer program of any of the methods of the above embodiments.
In order to solve the technical problem, another technical scheme adopted by the application is as follows: there is provided a computer storage medium having stored thereon a computer program for carrying out the steps of the method of any of the above embodiments.
The beneficial effects of this application are: in distinction from the prior art, the present application provides a method for detecting oil leakage and a computer storage medium, the method comprising: acquiring image data of a preset acquisition point of an oil pipeline to form a data set; processing the data set to obtain a training set and a testing set according to a preset proportion; carrying out iterative training on the data in the training set to a YOLOv3 network model to obtain an optimal detection model; positioning the detection model to obtain an oil leakage area, and performing oil dripping and/or oil injection detection on the oil leakage area to obtain a detection result; and feeding back the detection result to an intelligent analysis system of the oil depot safety management center. The basic network of the YOLOv3 network model is simplified, the lightweight YOLOv3 model is obtained, the operation efficiency is improved while the accuracy is ensured, the oil dripping and/or oil spraying detection is carried out on an oil leakage area to obtain a detection result, the detection accuracy can be improved through different detection modes, the detection result is fed back to the intelligent analysis system of the oil depot safety management center, so that operation and maintenance personnel can quickly browse the intelligent identification result to carry out manual recheck confirmation, the daily operation and maintenance efficiency of the oil depot safety management system is improved, more labor cost is saved, and the problem that whether an oil leakage point exists in an oil delivery pipeline is difficult to perceive by management personnel in the prior art is solved.
Drawings
For a clearer description of the technical solutions in the embodiments of the application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the application, from which, without inventive effort, further drawings can be obtained for a person skilled in the art, in which:
FIG. 1 is a flow chart of an embodiment of a method for detecting oil leakage according to the present application;
FIG. 2 is a flow chart of another embodiment of a method for detecting oil leakage according to the present application;
FIG. 3 is a schematic diagram of a modified YOLOv3 network architecture;
FIG. 4 is a schematic illustration of drip detection and oil leak detection;
fig. 5 is a schematic structural diagram of an embodiment of the oil leakage detection system of the present application.
Description of the embodiments
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
It should be noted that, if there is a description of "first", "second", etc. in the embodiments of the present application, the description of "first", "second", etc. is only for descriptive purposes, and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be regarded as not exist and not within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a flow chart illustrating an embodiment of a method for detecting oil leakage according to the present application. The method disclosed by the embodiment comprises the following steps:
s11: and acquiring image data of a preset acquisition point of the oil pipeline to form a data set.
And presetting an acquisition point in the oil pipeline, and pre-installing monitoring to acquire image data. And storing the acquired image data into an xml file in a VOC data format, and converting the VOC data format into a YOLOv3 data format as a data set.
S12: and processing the data set to obtain a training set and a testing set according to a preset proportion.
Preprocessing the obtained data set, removing interference data in the data set, and dividing the data set into a training set and a testing set according to a preset proportion. For example, cleaning data which does not contain targets and data with larger noise, dividing the data set into a training set and a testing set according to a preset proportion, and storing the training set and the testing set into txt files in a YOLOv3 data format.
S13: and deleting the basic network of the YOLOv3 network model to form a simplified YOLOv3 network model, and carrying out iterative training on the simplified YOLOv3 network model by data in the training set to obtain an optimal detection model.
And respectively carrying out iterative training on the YOLOv3 network model by utilizing data in the training set in the data set, and testing on the testing set to obtain the optimal flange detection model.
YOLOv3 is an end-to-end target object detection algorithm based on Convolutional Neural Network (CNN), which converts the target detection problem into a regression problem, and the method remarkably improves the object detection speed. Specifically, the input image is divided into a grid of s×s: the grid is responsible for detecting objects if the real center of the object is within its boundaries. The object is then predicted by one bounding box on each grid, and the final coordinates of the bounding box and class probabilities are generated by a regression algorithm. For Anchor box (Anchor Boxes) clustering, in order to accurately detect insulators of different scales in aerial images, a k-means (k-means) clustering algorithm is adopted in an acquired data set so as to obtain more proper Anchor box sizes in advance.
The original Yolov3 backbox adopts the Darknet53, and because the Darknet53 has more calculation resources consumed in the practical application of the network, a large number of parameters lead to slow network training and detection speed. And carrying out iterative training on the simplified YOLOv3 network model by the data in the training set to obtain an optimal detection model.
S14: and positioning the detection model to obtain an oil leakage area, and performing oil dripping and/or oil injection detection on the oil leakage area to obtain a detection result.
And positioning a flange detection model at the joint of the oil transmission pipeline to obtain an oil leakage area in which oil leakage is likely to occur, dividing the oil leakage area, and detecting oil dripping and/or oil injection by using a traditional image processing method and an application network classification algorithm respectively to obtain a final detection result whether oil leakage occurs or not.
S15: and feeding back the detection result to an intelligent analysis system of the oil depot safety management center.
The oil leakage detection method can be applied to the intelligent analysis system of the oil depot safety management center, and can assist in judging whether oil leakage occurs in the oil depot or not by feeding back detection results to the intelligent analysis system of the oil depot safety management center, so that the detection results are fed back to the positions of operation and maintenance personnel, front-end software developed based on the operation process of an operation and maintenance business team is convenient for the operation and maintenance personnel to quickly browse intelligent identification results for manual recheck confirmation, and daily operation and maintenance efficiency of the oil depot safety management system is improved.
The application provides a detection method of oil leakage, which comprises the following steps: acquiring image data of a preset acquisition point of an oil pipeline to form a data set; processing the data set to obtain a training set and a testing set according to a preset proportion; carrying out iterative training on the data in the training set to a YOLOv3 network model to obtain an optimal detection model; positioning the detection model to obtain an oil leakage area, and performing oil dripping and/or oil injection detection on the oil leakage area to obtain a detection result; and feeding back the detection result to an intelligent analysis system of the oil depot safety management center. The basic network of the YOLOv3 network model is simplified, the light simplified YOLOv3 model is obtained, the operation efficiency is improved while the accuracy is ensured, the oil dripping and/or oil spraying detection is carried out on an oil leakage area to obtain a detection result, the detection accuracy can be improved through different detection modes, the detection result is fed back to the intelligent analysis system of the oil depot safety management center, so that operation and maintenance personnel can quickly browse the intelligent identification result to carry out manual re-detection confirmation, the daily operation and maintenance efficiency of the oil depot safety management system is improved, and more labor cost is saved.
On the basis of the above embodiments, please refer to fig. 2, fig. 2 is a flow chart of another embodiment of the oil leakage detection method of the present application. The method disclosed by the embodiment comprises the following steps:
s20: and presetting a collection point on a flange plate at the joint of the oil pipeline.
The preset collection points are flanges at the connection positions of the oil pipelines.
S21: and acquiring image data of a preset acquisition point of the oil pipeline to form a data set.
And obtaining the category information and the position information of the flange plate to obtain image data. The image data is converted into YOLOv3 format to form a data set.
The oil pipeline is pre-provided with a monitoring device at a preset acquisition point so as to acquire image data. And marking the flange plate body at the joint of the oil transmission pipeline in the image data by using a marking tool, storing the flange plate body into an xml file in a VOC data format, wherein the xml file can contain category information and position information, and converting the VOC data format into a YOLOv3 data format as a data set.
S22: and processing the data set to obtain a training set and a testing set according to a preset proportion.
And after cleaning, data enhancement and splicing are carried out on the data set, the data set in the Yolov3 format is stored as a preset type file. And obtaining the training set and the testing set according to the proportion that the training set is larger than the data set.
Preprocessing the obtained data set, cleaning and expanding the data, such as cleaning data without targets and data with larger noise, adopting a data enhancement strategy, performing processing such as splicing in a random scaling, random cutting and random arrangement mode, enriching the background and small targets of detected objects, dividing the data set into a training set and a testing set according to a preset proportion, and storing the training set and the testing set into txt files in a YOLOv3 data format. For example, the data set is divided into 80% training set and 20% test set, i.e. the ratio of training set to test set is 4:1.
s23: and deleting the basic network of the YOLOv3 network model to form a simplified YOLOv3 network model, and carrying out iterative training on the simplified YOLOv3 network model by data in the training set to obtain an optimal detection model.
Before data is fed to the neural network, the data sets are shuffled and fed into the network. Therefore, the data sequence received by each epoch (the number of iterations) is different during training, the model cannot learn the image sequence, an artifact with good learning effect is generated, and the robustness of the model can be increased. The image is then normalized, for example, in this embodiment, the long side of the image may be scaled to a uniform size of 416 x 416 pixels, and the label position information in the image may be transformed identically.
Iterative training is carried out on the simplified YOLOv3 network model by the data in the training set, and the step of obtaining the optimal detection model further comprises S231-S234:
s231: the standard convolution structure in the base network of the YOLOv3 network model is replaced with a depth separable convolution structure, and the full connection layer and the normalization layer are deleted.
Referring to fig. 3 together, fig. 3 is a schematic diagram of an improved YOLOv3 network structure. First, the standard convolution structure in the original YOLOv3 base network dark net53 is replaced with a depth separable convolution structure, and then the full connection layer and Softmax (normalized) layer behind dark net53 are removed. The convolution operation is divided into two steps of depth convolution and point convolution by the depth separable convolution module, wherein 3*3 depth convolution adopts different convolution kernels for different input channels to carry out convolution, and integration of the depth convolution output characteristic diagram is completed through 1*1 point convolution, so that the defect that any one convolution kernel in a common convolution layer needs to operate all channels is avoided. The network model established through the depth separable convolution structure has the parameter quantity of about 1/9 of that of the common convolution, so that the scale of the whole model is greatly simplified, and the calculated quantity is greatly reduced.
S232: and optimizing the original loss function of the simplified YOLOv3 network model to obtain a new loss function.
And taking the sum of squares of the predicted value and the actual value as the loss of the wide and high part in the original loss function of the simplified YOLOv3 network model.
For YOLOv3, the loss function is divided into:
Figure SMS_1
prediction of bounding box (bounding box prediction), +.>
Figure SMS_2
Confidence level calculation (confidence prediction), ++>
Figure SMS_3
The total loss can be defined as equation (1):
Figure SMS_4
wherein each partial loss is represented by formula (2), formula (3) and formula (4):
Figure SMS_5
Figure SMS_6
Figure SMS_7
prediction for bounding boxes in the above
Figure SMS_8
The square of the error between the true and predicted coordinates is used, and confidence is calculated +.>
Figure SMS_9
And category prediction->
Figure SMS_10
Cross entropy loss functions are used. For coordinate prediction of a bounding box, the images acquired in the free scene may be of different sizes, so that the effect of YOLOv3 detecting a small object may be affected.
Because the oil reservoir oil leakage scene also has the demand of detecting small target, in order to fit data better, this patent improves the wide high part loss function of YOLOv3 coordinate error: the sum of squares of the predicted and actual values is used as the loss. This is because the error of a larger target has a smaller influence on the final loss value than the error of a smaller target, and if the loss function is unchanged, the loss function is difficult to drop, and the detection result for a small target is poor. The boundary box prediction loss function of the YOLOv3 is simplified according to the technical scheme and is shown as a formula (5)
Figure SMS_11
And an activation function tanh is added after the coordinate error to reduce the error generated by the oversized prediction frame, so that the prediction frame can more accurately detect the oil leakage of the oil reservoir. The final total loss function is formula (6)
Figure SMS_12
S233: and extracting the characteristics of the simplified YOLOv3 network model to obtain a characteristic diagram.
And extracting features of the simplified YOLOv3 network model to obtain three feature graphs with different sizes of a first scale, a second scale and a third scale. The feature map is subjected to 2-time up-sampling processing.
The idea of YOLOv3 prediction bbox is that the feature_map size (13, 13) output in backbone is regarded as a coordinate reference system, the so-called grid. Thus 13x13 grids can be divided, and the corresponding of the grids to the original image is equivalent to the establishment of a coordinate system. Each cell predicts three bboxes, each of which is responsible for predicting an object, and each of which has a pre-set anchor reference, and information (x, y, w, h, c, …, class …) identifying the bbox is placed in the channel of each cell. Therefore, the shape of one scale output raw_policy of the network should be: (13, 13,3*85). There are a total of 13x13 positions, each having 3 bboxes, and a maximum of 13x13x3 bboxes (while requiring 13x13x3 preset anchors) can be calculated, each bbox being independent of the other. The data afferent neural network performs feature extraction to obtain three feature graphs (first scale 13×13, second scale 26×26, and third scale 52×52) with different scales.
In order to better learn the feature information in the image, the deep feature map is adopted for 2 times, the feature map of the first scale 13x13 is adopted for 2 times, and is fused with the feature map of the second scale 26 x 26, and the feature map of the second scale 26 x 26 is fused with the feature map of the third scale 52 x 52 by the same method through 2 times up sampling.
S234: and calculating the category according to the feature map.
Classification uses the extracted three-scale feature graphs to calculate categories, and three targets of small, medium and large targets are detected respectively.
In this example, three tests were performed, each at 32 times downsampling, 16 times downsampling, and 8 times downsampling. The use of up-sample in the network can make the deeper the network the better the feature expression, e.g. in a 16-fold downsampling test, if the fourth downsampled feature is used directly for the test, the shallower features are used, which is generally not good. If the feature after 32 times downsampling is to be used, but the size of the deep feature is too small, so yolo_v3 uses up-sample with step length of 2, and the size of the feature map obtained by 32 times downsampling is increased by one time, so that 16 times downsampling is also achieved. Similarly, 8 times sampling is to up-sample the 16 times down-sampled features by a step length of 2, so that deep features can be used for detection. The simplified YOLOv3 network model well enables 16 times downsampling and 8 times downsampling to use deep features in an upsampling mode, but shallow feature map sizes obtained by 4 times downsampling and 3 times downsampling are the same. The simplified YOLOv3 network model wants to take advantage of these shallow features as well, with a route layer. And splicing the feature map obtained by 16 times of downsampling and the layer obtained by four times of downsampling together, and splicing in the channel dimension. The following splicing benefits: the network can learn the deep and shallow features at the same time, and the expression effect is better. This is also the case for 8-fold downsampling, which concatenates three downsampled feature maps together. By IoU algorithm: firstly, calculating the area of the minimum closure area of two frames (colloquially understood: the area of the minimum frame comprising a prediction frame and a real frame), removing samples below an IOU threshold, then obtaining a final prediction frame through an NMS algorithm, calculating a loss value, after each EPOCH is finished, transmitting a verification set into a network, verifying the reliability of a model, and calculating the loss value and the accuracy.
And repeating the steps S233 to S234, improving the accuracy of the verification set, and reducing the loss of the training set and the verification set until the training set and the verification set remain stable, so as to reach the set iteration target.
S24: and positioning the detection model to obtain an oil leakage area, and performing oil dripping and/or oil injection detection on the oil leakage area to obtain a detection result.
In this embodiment, a YOLOv3 algorithm is first used, and the algorithm firstly calls a flange detection model to determine the position coordinate information of the image flange, and the position coordinate information is used as auxiliary information for locating the oil dripping and oil spraying detection areas. The oil drop detection and the oil leakage detection can be detected simultaneously, or one mode can be selected for detection.
Referring to fig. 4, fig. 4 is a schematic diagram of oil drip detection and oil leakage detection, and fig. 4 includes three areas of a flange prediction frame a, an oil drip detection area B, and an oil injection detection area C. Two different detection methods of oil drip detection and oil leakage detection are described below.
In the oil drip detection, the following steps S241-S243 are included:
s241: and presetting an oil dripping detection area according to the flange plate prediction frame, wherein the oil dripping detection area is positioned in an area right below the flange plate prediction frame.
The approximate oil dripping detection area is preset through the position and the size information of the flange plate prediction frame, and the oil dripping detection area is arranged in the area right below the flange plate connected with the oil pipeline.
S242: and detecting oil drops based on a background subtraction algorithm of the Gaussian mixture model.
In the drop detection zone, the drop is detected using an algorithm based on background subtraction of the gaussian mixture model. The algorithm principle is that the pixel value of a region with changed pixel value is set to 255 by subtracting the previous frame from the next frame of the video, and the pixel value of a region with unchanged pixel value is reset to 0, so that the dropped oil drops are extracted from a static background.
The method of subtracting the previous frame from the next frame can not be influenced by the change of ambient illumination, and the static background information is updated in real time. The opencv corrosion algorithm is used to filter out some noise, such as noise generated by background changes due to very small camera jitter. Because the oil drops are smaller, in order to more obviously extract the oil drops, an opencv library expansion algorithm is utilized to expand the area of the oil drops. The outline area detection is carried out according to the binary image in the oil drop detection area, an area threshold is set, and the size of oil drops is approximately 0.5-3, so that the interference caused by other people, biological passes, rainy weather and the like is eliminated.
S243: judging whether oil drops according to the state of oil drops in the oil drop detection area.
Since dripping is a continuous process, if dynamic drops are continuously detected in the dripping detection zone, a warning message is issued. If only one or two oil drops are detected in a period of time, the false detection is judged, and no warning information is sent out.
In the oil injection detection, the following steps S244-S247 are included:
s244: and presetting an oil injection detection area according to the flange plate prediction frame, wherein the oil injection detection area covers the area of the flange plate prediction frame.
The oil injection is different from the oil dripping in that the direction of the injected oil is arbitrary, the injected oil cannot pass through the oil dripping detection area as fixed as the oil dripping, and the injected oil amount cannot be predicted, so that whether the oil injection occurs cannot be judged through background subtraction. And (3) arranging an oil injection detection area in advance according to a flange plate prediction frame connected with the oil pipe in the same way as oil dripping, wherein the oil injection detection area approximately covers the flange plate prediction frame.
S245: the fuel injection detection area is divided into at least two sub-detection areas.
And equally dividing the oil injection detection area into at least two sub-detection areas, and simultaneously carrying out oil injection detection on the at least two sub-detection areas. In this embodiment, 4 sub-detection areas are described. Because the injection area generated during oil injection can not be the whole joint but a small area at the joint, but the oil injection detection is carried out on the whole oil injection detection area C, the area is large, the detection effect is poor, and therefore the oil injection detection is carried out on 4 sub-detection areas simultaneously.
S246: and establishing an oil injection three-classification algorithm model, wherein the training data are leakage-free data at the joint of the oil pipeline, flange image data of oil injection at the joint of the oil pipeline and raining data taking the flange as a background, and training the oil injection three-classification algorithm model.
And (3) establishing an oil injection three-classification algorithm model, and training by taking Resnet_50 as a classification network, wherein training data are non-leakage data of a connecting pipeline, flange image data of oil injection at a pipeline connecting position and rainy data taking a flange as a background. And (3) training the accuracy of the classification of the oil injection data by the test model while training, and stopping training when the accuracy is no longer improved.
S247: and applying the oil injection three-classification algorithm model to at least two sub-detection areas, and judging whether oil injection is performed or not according to the oil injection state of the sub-detection areas.
The classification model was applied to 4 oil injection detection zones simultaneously to monitor whether oil injection occurred in the oil pipe. And in the same way, only 1-2 times of oil injection is detected, the false alarm is judged, and if the oil injection detection area C is continuously classified as oil injection, a warning is sent out, and then the detection is manually repeated.
S25: and feeding back the detection result to an intelligent analysis system of the oil depot safety management center.
The oil leakage detection method can be applied to the intelligent analysis system of the oil depot safety management center, and can assist in judging whether oil leakage occurs in the oil depot or not by feeding back detection results to the intelligent analysis system of the oil depot safety management center, so that the detection results are fed back to the positions of operation and maintenance personnel, front-end software developed based on the operation process of an operation and maintenance business team is convenient for the operation and maintenance personnel to quickly browse intelligent identification results for manual recheck confirmation, and daily operation and maintenance efficiency of the oil depot safety management system is improved.
After the advent of artificial intelligence computer vision technology, more and more tedious manual operations were replaced, freeing up hands. Computer vision technology is a technology that computer simulates the visual process of human beings, and has the ability to feel the environment and the visual function of human beings. Image processing, artificial intelligence, pattern recognition, and the like. The traditional image processing method is to divide the image background and extract the target feature with complex environment. Typically, features of objects in an image include texture, shape, color, gradient, edges, and the like. Therefore, edge detection, morphology, SIFT, wavelet transformation, etc. are commonly used to extract features and separate objects from complex backgrounds, and mathematical models of the detected objects also need to be built. This approach requires complex computation and feature extraction, or is difficult to handle across multiple complex scenarios.
The intelligent oil depot safety management system adopts the latest artificial intelligence computer vision technology, combines the traditional image processing technology to monitor the leakage of the oil pipe in real time, prevents accidents, improves the efficiency and quality of oil depot safety management by using an AI vision intelligent means, and provides important technical guarantee for enterprise safety operation.
The technical scheme provides a data processing method and system for establishing a whole set of rapid analysis and judgment on whether oil in an oil reservoir is leaked or not based on camera images by combining the traditional image processing technology, the deep learning target detection and classification technology, the GPU computing cluster module management scheduling technology, the network file NFS sharing system and other technologies. Compared with the traditional manual maintenance method, the oil leakage can be found in time, the loss is reduced, the labor cost is reduced, and the working safety is improved; and thirdly, the designed system operation flow reduces the manual operation difficulty in a mode of image processing and deep learning algorithm judgment and manual rechecking.
The technical scheme is also characterized in that:
1. the simplified YOLOv3 model based on the lightweight convolutional neural network Mobilene improvement is adopted to perform initial judgment on the region to be detected, so that the number of parameters of the model is greatly reduced while the accuracy and recall rate are ensured to be within the allowable range of engineering application, the calculation efficiency of the model is improved, and the model can be conveniently deployed to an embedded calculation platform.
2. According to the oil reservoir oil leakage detection scene requirement, the wide and high part loss function of the YOLOv3 coordinate error is improved, so that the small target detection and positioning effect of the model is obviously improved.
3. The region to be detected is divided into an oil dripping detection region and an oil spraying detection region.
4. The oil drop detection area is used for removing partial false detection through a corrosion algorithm by a background differential technology based on a Gaussian mixture model, improving the detection area of oil drops through a noise expansion algorithm, and then setting a noise area threshold value to eliminate the interference of walking of pedestrians and other organisms.
5. The oil injection detection area is divided into a plurality of small areas, and detection classification is carried out on each small area at the same time, so that the classification accuracy is improved.
6. The system is developed and designed based on a GPU computing cluster module scheduling technology, a container technology and an NFS file management technology, so that the operation efficiency of GPU hardware is improved, front-end software developed based on the operation process of an operation and maintenance service team is convenient for operation and maintenance personnel to quickly browse intelligent identification results for manual recheck confirmation, and the daily operation and maintenance efficiency of the oil depot safety management system is improved.
The application provides a detection method of oil leakage, which comprises the following steps: presetting a sampling point on a flange plate at the joint of an oil pipeline; acquiring image data of a preset acquisition point of an oil pipeline to form a data set; processing the data set to obtain a training set and a testing set according to a preset proportion; carrying out iterative training on the data in the training set to a YOLOv3 network model to obtain an optimal detection model; positioning the detection model to obtain an oil leakage area, and performing oil dripping and/or oil injection detection on the oil leakage area to obtain a detection result; and feeding back the detection result to an intelligent analysis system of the oil depot safety management center. The basic network of the YOLOv3 network model is simplified, the lightweight YOLOv3 model is obtained, the operation efficiency is improved while the accuracy is ensured, the oil dripping and/or oil spraying detection is carried out on an oil leakage area to obtain a detection result, the detection accuracy can be improved through different detection modes, the detection result is fed back to the intelligent analysis system of the oil depot safety management center, so that operation and maintenance personnel can quickly browse the intelligent identification result to carry out manual recheck confirmation, the daily operation and maintenance efficiency of the oil depot safety management system is improved, and more labor cost is saved. The technical scheme is that a whole set of data processing method and system for rapidly analyzing and judging oil leakage of an oil depot based on monitoring images are established by utilizing the technologies of computer vision technology, a traditional image processing algorithm, a deep learning target detection algorithm, a GPU cluster management scheduling technology, a network file NFS sharing system and the like. Compared with the traditional manual overhaul method, the method greatly improves the efficiency and safety of operation; compared with the traditional image processing method, the deep learning target detection technology can eliminate the need of separating the background aiming at different scenes, and the need of establishing different mathematical models for insulators with different sizes and models, and has the characteristics of high robustness, good applicability and the like. And in combination with the cascade algorithm used in the invention, the first model is used for positioning the target area of the flange plate on the oil pipe, and then the second algorithm is used for judging whether the oil material leaks on the flange plate, and meanwhile, the model also comprises a judging algorithm for eliminating the interference of other organisms, pedestrians, rains and the like, so that the robustness of the algorithm can be greatly improved, and the possibility of misjudgment is greatly reduced. Meanwhile, the operation and maintenance personnel can quickly dock the identification result with the existing system by combining information such as the standing account of the aviation oil company and the like in the submitted data through the processes of data judgment, report generation and submission of the production command system and the like, the system can timely identify and report damage identification conditions, and the operation and maintenance personnel can manually recheck and confirm through images, so that the daily operation, management and maintenance efficiency of the aviation oil pipeline is improved, the probability of accidents is reduced, and the working efficiency of an operation and maintenance team of an aviation oil depot is greatly improved.
In response to the above-mentioned method, the present application provides a system for detecting oil leakage, and referring to fig. 5, fig. 5 is a schematic structural diagram of an embodiment of a system for detecting oil leakage. The disclosed oil leak detection system 100 includes a memory 12 and a processor 14 coupled to each other, the memory 12 for storing a computer program, and the processor 14 for executing the computer program to perform the steps of the method of any of the above embodiments.
Specifically, the processor 14 is configured to:
and acquiring image data of a preset acquisition point of the oil pipeline to form a data set.
And processing the data set to obtain a training set and a testing set according to a preset proportion.
And carrying out iterative training on the data in the training set to the YOLOv3 network model to obtain an optimal detection model.
And positioning the detection model to obtain a planned oil leakage area, and detecting oil dripping and/or oil spraying of the oil leakage area to obtain a detection result.
And feeding back the detection result to an intelligent analysis system of the oil depot safety management center.
The mobile terminal 100 of the embodiment can improve the daily operation and maintenance efficiency of the oil depot safety management system and save more labor cost.
In the several embodiments provided in the present application, it should be understood that the systems, devices, and methods disclosed in the present application may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist alone physically, or two or more units may be integrated into one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution, in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is only the embodiments of the present application, and not the patent scope of the present application is limited by the foregoing description, but all equivalent structures or equivalent processes using the contents of the present application and the accompanying drawings, or directly or indirectly applied to other related technical fields, which are included in the patent protection scope of the present application.

Claims (10)

1. A method of detecting oil leakage, the method comprising:
acquiring image data of a preset acquisition point of an oil pipeline to form a data set;
processing the data set to obtain a training set and a testing set according to a preset proportion;
deleting a basic network of the YOLOv3 network model to form a simplified YOLOv3 network model, and carrying out iterative training on the simplified YOLOv3 network model by data in the training set to obtain an optimal detection model;
positioning the detection model to obtain an oil leakage area, and detecting oil dripping and/or oil injection of the oil leakage area to obtain a detection result;
and feeding the detection result back to an intelligent analysis system of the oil depot safety management center.
2. The method of claim 1, wherein the step of acquiring image data of a predetermined acquisition point of the oil pipeline to form a dataset is preceded by:
presetting a sampling point on a flange plate at the joint of the oil pipeline;
the step of obtaining image data of a preset acquisition point of the oil pipeline to form a data set comprises the following steps:
acquiring category information and position information of the flange plate to obtain the image data;
the image data is converted into YOLOv3 format to form a data set.
3. The method of claim 2, wherein the step of processing the data set to obtain the training set and the test set according to a predetermined ratio comprises:
after cleaning, data enhancement and splicing are carried out on the data set, the data set in the Yolov3 format is stored as a preset type file;
and obtaining the training set and the testing set according to the proportion that the training set is larger than the data set.
4. The method of claim 3 wherein the step of pruning the underlying network of the YOLOv3 network model to form a simplified YOLOv3 network model, iteratively training the simplified YOLOv3 network model with the data in the training set, and obtaining an optimal detection model comprises:
replacing a standard convolution structure in a basic network of the YOLOv3 network model with a depth separable convolution structure, and deleting a full connection layer and a normalization layer;
performing optimization treatment on the original loss function of the simplified YOLOv3 network model to obtain the new loss function;
performing feature extraction on the simplified YOLOv3 network model to obtain a feature map;
and calculating the category according to the characteristic diagram.
5. The method of claim 4, wherein optimizing the original loss function of the simplified YOLOv3 network model to obtain the new loss function comprises:
and taking the sum of squares of the predicted value and the actual value as the loss of the wide and high part in the original loss function of the simplified YOLOv3 network model.
6. The method of claim 5, wherein the step of feature extracting the simplified YOLOv3 network model to obtain a feature map comprises:
extracting features of the simplified YOLOv3 network model to obtain three feature graphs with different sizes of a first scale, a second scale and a third scale;
carrying out 2 times of adoption treatment on the characteristic map;
the step of calculating the category according to the feature map comprises the following steps:
and calculating categories by using the extracted three-scale feature graphs, and respectively detecting three targets of small, medium and large targets.
7. The method of claim 2, wherein a flange predicting frame is preset according to the position information of the flange, the detection model is positioned to obtain an oil leakage area, and the step of detecting oil dripping and/or oil spraying of the oil leakage area to obtain a detection result comprises the following steps:
in the oil drip detection, an oil drip detection area is preset according to the flange plate prediction frame, and the oil drip detection area is positioned in an area right below the flange plate prediction frame;
detecting oil drops based on a background subtraction algorithm of a Gaussian mixture model;
judging whether oil drops according to the state of the oil drops in the oil drop detection area.
8. The method of claim 7, wherein the step of locating the detection model to obtain an oil leakage area, and detecting oil dripping and/or oil spraying on the oil leakage area to obtain a detection result further comprises:
in the oil injection detection, an oil injection detection area is preset according to the flange plate prediction frame, and the oil injection detection area covers the area of the flange plate prediction frame;
dividing the oil injection detection area into at least two sub-detection areas;
establishing an oil injection three-classification algorithm model, wherein training data are leakage-free data at the joint of the oil transmission pipeline, flange plate image data of oil injection at the joint of the oil transmission pipeline and raining data taking the flange plate as a background, and training the oil injection three-classification algorithm model;
and applying the oil injection three-classification algorithm model to at least two sub-detection areas, and judging whether oil injection is performed or not according to the oil injection state of the sub-detection areas.
9. An oil leakage detection system, wherein the detection system comprises a processor and a memory coupled to each other, the memory is used for storing a computer program, and the processor is used for loading and executing the computer program of the method of any one of claims 1-8.
10. A computer storage medium having a computer program stored thereon, characterized in that the computer program is adapted to implement the steps of the method of any of the claims 1-8.
CN202310146969.9A 2023-02-22 2023-02-22 Oil leakage detection method and computer storage medium Pending CN116188421A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310146969.9A CN116188421A (en) 2023-02-22 2023-02-22 Oil leakage detection method and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310146969.9A CN116188421A (en) 2023-02-22 2023-02-22 Oil leakage detection method and computer storage medium

Publications (1)

Publication Number Publication Date
CN116188421A true CN116188421A (en) 2023-05-30

Family

ID=86434189

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310146969.9A Pending CN116188421A (en) 2023-02-22 2023-02-22 Oil leakage detection method and computer storage medium

Country Status (1)

Country Link
CN (1) CN116188421A (en)

Similar Documents

Publication Publication Date Title
US20210319561A1 (en) Image segmentation method and system for pavement disease based on deep learning
JP7138753B2 (en) Image defect detection method, device, electronic device, storage medium and product
Li et al. Automatic crack recognition for concrete bridges using a fully convolutional neural network and naive Bayes data fusion based on a visual detection system
CN109858367B (en) Visual automatic detection method and system for worker through supporting unsafe behaviors
CN115131283A (en) Defect detection and model training method, device, equipment and medium for target object
CN112613375A (en) Tire damage detection and identification method and device
US20230222643A1 (en) Semantic deep learning and rule optimization for surface corrosion detection and evaluation
CN114898097B (en) Image recognition method and system
Tao et al. Automatic smoky vehicle detection from traffic surveillance video based on vehicle rear detection and multi‐feature fusion
CN115223054A (en) Remote sensing image change detection method based on partition clustering and convolution
Li et al. RoadID: a dedicated deep convolutional neural network for multipavement distress detection
CN115995056A (en) Automatic bridge disease identification method based on deep learning
CN110837941B (en) Method and device for risk prediction of oil and gas pipeline
CN113762247A (en) Road crack automatic detection method based on significant instance segmentation algorithm
CN115239733B (en) Crack detection method and apparatus, terminal device and storage medium
CN116188421A (en) Oil leakage detection method and computer storage medium
Ibrahim et al. Smart monitoring of road pavement deformations from UAV images by using machine learning
CN117078585A (en) Method, device, equipment and medium for detecting defect damage of pipeline
CN116109954A (en) House potential safety hazard identification method, device and storage medium
Segundo et al. Measuring economic activity from space: a case study using flying Airplanes and COVID-19
CN112283595B (en) Pipeline oil spilling path analysis method and device, computer equipment and storage medium
CN115187880A (en) Communication optical cable defect detection method and system based on image recognition and storage medium
CN115100546A (en) Mobile-based small target defect identification method and system for power equipment
Li et al. Automated bridge crack detection based on improving encoder–decoder network and strip pooling
CN115082650A (en) Implementation method of automatic pipeline defect labeling tool based on convolutional neural network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination