CN112989901A - Deep learning-based liquid level meter reading identification method - Google Patents

Deep learning-based liquid level meter reading identification method Download PDF

Info

Publication number
CN112989901A
CN112989901A CN202010219945.8A CN202010219945A CN112989901A CN 112989901 A CN112989901 A CN 112989901A CN 202010219945 A CN202010219945 A CN 202010219945A CN 112989901 A CN112989901 A CN 112989901A
Authority
CN
China
Prior art keywords
liquid level
level meter
instrument
image
target detection
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
CN202010219945.8A
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.)
Changyang Tech Beijing Co ltd
Original Assignee
Changyang Tech Beijing 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 Changyang Tech Beijing Co ltd filed Critical Changyang Tech Beijing Co ltd
Priority to CN202010219945.8A priority Critical patent/CN112989901A/en
Publication of CN112989901A publication Critical patent/CN112989901A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/41Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • 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/20Image preprocessing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/02Recognising information on displays, dials, clocks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Evolutionary Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Measurement Of Levels Of Liquids Or Fluent Solid Materials (AREA)

Abstract

The application provides a deep learning-based liquid level meter reading identification method, computer equipment and storage medium, wherein the method comprises the following steps: acquiring a plurality of corrected liquid level instrument images; extracting the liquid level instrument in each corrected liquid level instrument image and labeling the liquid level instrument to obtain a plurality of labeled liquid level instrument images; inputting the marked liquid level instrument images into a target detection algorithm, training to obtain a liquid level instrument target detection model, and determining the coordinates of the liquid level surface and the liquid level range of each liquid level instrument in the corresponding liquid level instrument image according to the target detection model; and determining the reading of each liquid level meter according to the corresponding coordinates of the liquid level surface and the liquid level range of each liquid level meter in the liquid level meter image. The method can save manpower and improve the recognition efficiency and the reusability.

Description

Deep learning-based liquid level meter reading identification method
Technical Field
The application relates to the technical field of industrial control safety, in particular to a computer device and a storage medium for a deep learning-based identification method of liquid level meter reading.
Background
The gas gathering station of natural gas production plant is the most basic unit for gathering and transporting production of gas field, and its main task is to collect the oil-gas mixture produced in the gas field, and transfer it to user or store after primary treatment. The main production equipment in the gas gathering station is as follows: the device comprises a dehydrator, a natural gas heating furnace, a metering separator, an oil-gas delivery pump, an oil storage tank, a ball-passing and pipe-cleaning facility, a gas transmission pipeline, a production automatic control system and the like. The natural gas has the characteristics of no color, no odor, flammability and the like, so that the continuous monitoring of the operation states of a heating furnace and a separator in the production process of the natural gas has very important significance for preventing safety accidents, and the liquid level measurement of equipment such as the natural gas heating furnace, a metering separator, an oil storage tank and the like is very important for the safe operation of natural gas processing. Taking an oil storage tank as an example, if the oil level exceeds a preset oil tank maximum oil level alarm value, crude oil can overflow, and accidents are easily caused. Therefore, the continuous monitoring of the liquid level and the guarantee of the liquid level in a normal range all the time have important significance on the safe and economic operation of production equipment of a gas gathering station of a gas production plant and the comprehensive energy management of the gas production plant.
The manual visual reading is a commonly used reading method of the traditional liquid level meter, and the method is greatly influenced by human factors and wastes time and labor. In addition, some places where people can not patrol are also provided, which is not beneficial to the automation and high-efficiency management in energy production. Therefore, the research of the automatic liquid level detection and identification method which is rapid, accurate and strong in robustness has very important practical significance.
With the continuous development of scientific technology, video monitoring systems are increasingly applied to various industries, are an important component in security technology prevention systems, are advanced comprehensive systems with extremely strong prevention capability, and can directly watch all conditions of monitored places through remote control cameras and auxiliary equipment (lenses, holders and the like). The video monitoring system can reflect the picture of the monitored object in real time, vividly and really in the situation that people can not observe directly, and becomes an extremely effective observation tool for people to monitor in modern management. Therefore, with the popularization of video monitoring, liquid level meter identification based on digital image processing is an important means of non-contact measurement, and great progress is made in recent years. However, in practical application, because the shooting range of the camera is large, the image not only contains the liquid level meter, but also contains a large amount of background information, which causes interference to the processing of the liquid level image. The existing liquid level image processing algorithm adopts a traditional image detection algorithm (such as Canny edge detection) to extract a liquid level meter from a complex background, but the traditional image foreground and background separation method is greatly influenced by artificial empirical thresholds and has poor generalization, so that the identification requirements of a large number of liquid level meters in the field of actual industrial production cannot be met. In addition, due to installation reasons or monitoring requirements, the angle of the camera can be changed, so that the object viewing direction is not completely perpendicular to the shot object, perspective distortion is generated on an image, and the accuracy of liquid level measurement is influenced. The existing liquid level image detection method has the outstanding problem that the dynamic calibration and identification of the liquid level cannot be realized.
At present, the image processing and recognition of a liquid level instrument are rarely researched, and the existing recognition algorithm is mainly based on the traditional digital image processing algorithm, such as color threshold segmentation, Canny edge detection, template matching algorithm and the like, the liquid level instrument is positioned by utilizing the color threshold segmentation, and the liquid level surface is extracted by adopting the edge detection algorithm. The algorithm also realizes the automatic identification of the non-contact liquid level meter, but the threshold values are empirical values, different liquid level meters need different threshold values, the calculation amount is large, and the generalization and the robustness are poor. The actual industrial safety production environment is extremely complex, the liquid level meter has various styles, and the traditional digital image processing algorithm cannot meet the requirements of complex and variable industrial production.
Disclosure of Invention
In view of this, an object of the present application is to provide a method, a computer device, and a storage medium for recognizing a reading of a liquid level meter based on deep learning, so as to save labor and improve recognition efficiency and reusability.
In view of the above, the present application provides a method for identifying a reading of a liquid level meter based on deep learning, the method including:
acquiring a plurality of corrected liquid level instrument images;
extracting the liquid level instrument in each corrected liquid level instrument image and labeling the liquid level instrument to obtain a plurality of labeled liquid level instrument images;
inputting the marked liquid level instrument images into a target detection algorithm, training to obtain a liquid level instrument target detection model, and determining the coordinates of the liquid level surface and the liquid level range of each liquid level instrument in the corresponding liquid level instrument image according to the target detection model;
and determining the reading of each liquid level meter according to the corresponding coordinates of the liquid level surface and the liquid level range of each liquid level meter in the liquid level meter image.
In one embodiment, the acquiring the plurality of corrected level gauge images comprises:
acquiring an initial liquid level instrument image through a video monitoring system;
recording and replaying the initial liquid level instrument image by utilizing a video processing mode of the video monitoring system to obtain a plurality of target liquid level instrument images with different weather, different time and different illumination conditions;
and preprocessing the plurality of target liquid level instrument images to obtain a plurality of corrected liquid level instrument images.
In one embodiment, the preprocessing the target level gauge images to obtain corrected level gauge images includes:
removing edges, removing noise, filtering and binarizing each target liquid level instrument image in the target liquid level instrument images to obtain a plurality of preprocessed liquid level instrument images;
determining the central point, the width, the height and the rotation angle of the liquid level meter in each preprocessed liquid level meter image according to the minimum external rectangle method of OpenCV;
and obtaining a plurality of corrected liquid level instrument images according to the central point, the width, the height and the rotation angle of the liquid level instrument in each preprocessed liquid level instrument image and an image rotation method of OpenCV.
In one embodiment, the extracting the level gauge in each corrected level gauge image and labeling the level gauge to obtain a plurality of labeled level gauge images includes:
and identifying the liquid level instrument in each corrected liquid level instrument image, marking the position of the liquid level surface and the liquid level range of the liquid level instrument and labeling to obtain a plurality of marked liquid level instrument images.
In one embodiment, the extracting the level gauge in each corrected level gauge image and labeling the level gauge to obtain a plurality of labeled level gauge images includes:
the process of establishing the target detection model comprises the following steps:
dividing the marked liquid level instrument images to obtain a training set and a test set;
acquiring an initial target detection algorithm, and training the initial target detection algorithm by adopting the training set to obtain a target detection model;
and determining the precision of the target detection model according to the target detection model and the test set.
In one embodiment, the determining the accuracy of the target detection model from the target detection model and the test set comprises:
and inputting the test set into the target detection model, and if the test label of the target detection model is consistent with a preset label and the test threshold reaches a preset threshold, determining that the target detection model is predicted correctly, thereby obtaining the precision of the target detection model.
In one embodiment, the determining the corresponding coordinates of the liquid level and the liquid level range of each level gauge in the liquid level gauge image according to the target detection model comprises:
acquiring a preset algorithm and an actual measuring range of the liquid level meter;
and inputting the coordinates of the liquid level surface and the liquid level range of each liquid level meter in the corresponding liquid level meter image and the actual range of the liquid level meter into the preset algorithm to obtain the reading of each liquid level meter.
In one embodiment, the preset algorithm is:
Figure 100002_DEST_PATH_IMAGE002
in the formula, reading is the reading of the level meter, H is the height of the liquid level (i.e. the coordinate of the liquid level of the level meter in the corresponding level meter image), H is the height of the liquid level range (i.e. the coordinate of the liquid level range in the corresponding level meter image), and maxValue is the actual range of the level meter.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the method as claimed in any one of the above when the computer program is executed.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of the preceding claims.
The application provides a deep learning-based liquid level meter reading identification method, computer equipment and storage medium, wherein the method comprises the following steps: acquiring a plurality of corrected liquid level instrument images; extracting the liquid level instrument in each corrected liquid level instrument image and labeling the liquid level instrument to obtain a plurality of labeled liquid level instrument images; inputting the marked liquid level instrument images into a target detection algorithm, and training to obtain a target detection model so as to obtain coordinates of the liquid level surface and the liquid level measuring range of each liquid level instrument in the corresponding liquid level instrument image; and determining the reading of each liquid level meter according to the corresponding coordinates of the liquid level surface and the liquid level range of each liquid level meter in the liquid level meter image. The method can save manpower and improve the recognition efficiency and the reusability.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for identifying a reading of a liquid level meter based on deep learning according to an embodiment of the present application;
fig. 2(a) is a schematic diagram of a high-definition (initial) level gauge image according to an embodiment of the present application;
FIG. 2(b) is a schematic diagram of a corrected level gauge image according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an annotated liquid level gauge image according to an embodiment of the present application;
FIG. 4 is a graph of model training loss according to an embodiment of the present application;
fig. 5 is a schematic diagram of an automatic identification result of the YoloV3 liquid level meter according to the embodiment of the present application;
FIG. 6 is a diagram illustrating reading results of a liquid level meter according to an embodiment of the present disclosure;
fig. 7 is a schematic internal structure diagram of a computer device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is further described in detail below with reference to the accompanying drawings in combination with specific embodiments.
It should be noted that technical terms or scientific terms used in the embodiments of the present application should have a general meaning as understood by those having ordinary skill in the art to which the present disclosure belongs, unless otherwise defined. The use of "first," "second," and similar terms in this disclosure is not intended to indicate any order, quantity, or importance, but rather is used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that the element or item listed before the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", and the like are used merely to indicate relative positional relationships, and when the absolute position of the object being described is changed, the relative positional relationships may also be changed accordingly.
In order to facilitate understanding of the present application, the following keywords are required to be described, specifically as follows:
the video monitoring system comprises: the system consists of a front-end camera shooting part, a middle-end transmission part, a control part and a rear-end display recording part, so that a manager can observe and record all activity conditions in a front-end monitoring area in a control room, and simultaneously can provide real-time dynamic image information.
Deep Learning (DL): the neural network with multiple hidden layers is a distributed characteristic representation of data, which is formed by combining lower-layer characteristics to form more abstract high-layer representation attribute categories or characteristics, and the concept of the distributed characteristic representation is derived from the research of artificial neural networks.
Object detection (Object detection): also called target extraction, refers to finding a target object from a picture, and includes two processes of detection (where the object is in the image) and identification (what the object is).
Convolutional Neural Networks (CNN): the method is characterized in that the method is a feedforward neural network which comprises convolution calculation and has a deep structure, has a characteristic learning capability, can perform translation invariant classification on input information according to a hierarchical structure, and is one of representative algorithms of deep learning. The purpose of the invention can be realized by the following technical scheme:
the deep learning-based liquid level meter reading identification method is based on target detection, performs automatic detection and identification aiming at a video frame of a video monitoring system, aims to realize an end-to-end liquid level meter automatic reading function based on a real-time video frame, is combined with a high-efficiency high-precision YooloV 3 target detection algorithm which is widely applied in the field of computer vision at present, and finally provides the deep learning-based liquid level meter automatic reading identification method. With reference to fig. 1, a method for identifying a reading of a liquid level gauge based on deep learning includes:
step S10: acquiring a plurality of corrected liquid level instrument images;
step S20: extracting the liquid level instrument in each corrected liquid level instrument image and labeling the liquid level instrument to obtain a plurality of labeled liquid level instrument images;
step S30: inputting the marked liquid level instrument images into a target recognition model to obtain the coordinates of the liquid level surface and the liquid level measuring range of each liquid level instrument in the corresponding liquid level instrument image;
step S40: and determining the reading of each liquid level instrument according to the corresponding coordinates of the liquid level surface and the liquid level range of each liquid level instrument in the marked liquid level instrument image.
In one embodiment, the step S10 includes:
step S101: acquiring an initial liquid level instrument image through a video monitoring system;
step S102: recording and replaying the initial liquid level instrument image by utilizing a video processing mode of the video monitoring system to obtain a plurality of target liquid level instrument images with different weather, different time and different illumination conditions;
step S103: and preprocessing the plurality of target liquid level instrument images to obtain a plurality of corrected liquid level instrument images.
In one embodiment, the step S103 includes:
step S103 a: removing edges, removing noise, filtering and binarizing each target liquid level instrument image in the target liquid level instrument images to obtain a plurality of preprocessed liquid level instrument images;
step S103 b: determining the central point, the width, the height and the rotation angle of the liquid level meter in each preprocessed liquid level meter image according to the minimum external rectangle method of OpenCV;
step S103 c: and obtaining a plurality of corrected liquid level instrument images according to the central point, the width, the height and the rotation angle of the liquid level instrument in each preprocessed liquid level instrument image and an image rotation method of OpenCV.
In one embodiment, the step S20 includes:
step S201: and identifying the liquid level instrument in each corrected liquid level instrument image, marking the position of the liquid level surface and the liquid level range of the liquid level instrument and labeling to obtain a plurality of marked liquid level instrument images.
In one embodiment, said step S201 is followed by:
step S202: the process of establishing the target detection model comprises the following steps:
step S202 a: dividing the marked liquid level instrument images to obtain a training set and a test set;
step S202 b: acquiring an initial target detection algorithm, and training the initial target detection algorithm by adopting the training set to obtain a target detection model;
step S202 c: and evaluating the precision of the target detection model according to the test set, and determining the precision of the target detection model.
In one embodiment, the step S202c includes:
step S202c 1: and inputting the test set into the target detection model, and if the test label of the target detection model is consistent with a preset label and the test threshold reaches a preset threshold, determining that the target detection model is predicted correctly, thereby obtaining the precision of the target detection model.
In one embodiment, the step S40 includes:
step S401: acquiring a preset algorithm and an actual measuring range of the liquid level meter;
step S402: and inputting the coordinates of the liquid level surface and the liquid level range of each liquid level meter in the corresponding liquid level meter image and the actual range of the liquid level meter into the preset algorithm to obtain the reading of each liquid level meter.
In one embodiment, the preset algorithm is:
Figure DEST_PATH_IMAGE004
in the formula, reading is the reading of the level meter, H is the height of the liquid level (i.e. the coordinate of the liquid level of the level meter in the corresponding level meter image), H is the height of the liquid level range (i.e. the coordinate of the liquid level range in the corresponding level meter image), and maxValue is the actual range of the level meter.
In one embodiment, the detailed implementation of step S10 of the present application is described in detail below.
The high-definition image is the basis of automatic reading identification of the non-contact liquid level meter. The invention fully utilizes the existing video monitoring system in the industrial production environment to obtain high-definition images. Firstly, an operator sends an instruction by utilizing the control function of a video monitoring system to control the camera pan-tilt to be up, down, left and right, focus and zoom of a lens and the like, so that the camera can monitor clear liquid level instrument images. Then, the high-definition liquid level instrument image is recorded and played back by using a special video recording processing mode of the video monitoring system, so that a large amount of liquid level instrument image data of different weather, different time and different illumination conditions can be acquired.
Due to the limited angle of the camera, the partial liquid level instrument images have a tilt phenomenon, so that the images need to be rotated. Firstly, preprocessing such as edge removal, noise removal, filtering, binarization and the like is carried out on an initial liquid level instrument image, a central point, a width, a height and a rotation angle of the liquid level instrument can be obtained by using an OpenCV minimum external rectangle method, and then a corrected liquid level instrument image is obtained based on an OpenCV image rotation method, as shown in FIG. 2.
In one embodiment, the training set and test set acquisition implementation of the present application is described in detail below.
A large number of sample sets are the basis of deep learning, and an independent training set and a test set which are distributed in the same way are the basis for training and fitting to obtain a high-precision deep learning model. The sample set is divided into the following modules:
and (4) marking a sample, namely marking the positions of a liquid level surface and a measuring range in the image and marking a label.
And (4) sample set making, namely dividing the marked image data into a training set and a testing set.
The detailed protocol for this procedure is as follows:
and cleaning the data after image correction, for example, eliminating false targets or ambiguous targets, ensuring that the image set contains data of different weather, different time periods and different illumination conditions, and labeling the liquid level and the liquid level range based on an image labeling LabelImg tool, as shown in FIG. 3. Because liquid level and liquid level range need be accurate to mm, consequently will carry out meticulous mark, the principle of mark is: the method comprises the steps that a red column in the middle of a liquid level instrument is marked as a liquid level surface (liquid _ level), the range from the minimum scale to the maximum scale of the liquid level instrument is marked as a liquid level range, background samples similar to the liquid level surface and the liquid level range are marked as negative samples (neg) to improve model accuracy, and labels and coordinate positions after image marking are stored as XML files, namely a JPG image corresponds to an XML file.
And (3) the JPG images and XML files of all the categories are processed according to the following steps of 7: and 3, randomly dividing the training samples and the test samples into a training set and a test set according to a ratio, ensuring the independent and same distribution of the training samples and the test samples, saving the file names of JPG and XML as txt, generating ImageSets folders, naming the folders for storing JPG files as JPEFImaps and the folders for storing XML files as antibiotics, and manufacturing the standard sample data set for target detection. 11217 training samples and 4813 test samples were obtained.
In one embodiment, the specific implementation of the level meter identification of the present application is described in detail below.
In recent years, deep learning has achieved a series of breakthrough results in many fields such as natural language processing pattern recognition image classification, image segmentation, target detection and the like. The CNN is suitable for processing computer vision problems such as image classification, image segmentation, target detection and the like by simulating a processing method of human visual nerve cells on an image and adopting methods such as convolution operation, local receptive field, weight sharing and the like. An efficient convolutional neural network YoloV3 (You Only Look one) is adopted as a model frame for detecting the target of the liquid level meter, and the model is improved on the basis of a YoloV3 model proposed by Joseph Redmon so as to be suitable for detecting the target of the liquid level meter.
The method adopts a YoloV3-keras frame to carry out model training, the size of input data is 416 multiplied by 416, 11217 training samples are used as input data and input into the YoloV3-keras frame to carry out model training, during training, 10% of the training samples are randomly distributed as verification samples, the initial learning rate is set to be 0.003, the maximum iteration number of the model is 400, when 200 epochs are trained, the learning rate is reduced to be 0.0003, the model weight is saved once when the verification loss is reduced, and the configuration of a model training machine is GTX1080TI x 2. The model trains the loss plot, as shown in FIG. 4.
The model Precision evaluation index is a Mean Average Precision (mAP) of the model, namely the Average of the Average Precision of all categories, and the calculation formula is as follows:
Figure DEST_PATH_IMAGE006
formula (II)
Figure DEST_PATH_IMAGE008
Figure DEST_PATH_IMAGE010
Formula (II)
Figure 136975DEST_PATH_IMAGE008
Figure DEST_PATH_IMAGE012
Formula (II)
Figure 929481DEST_PATH_IMAGE008
Figure DEST_PATH_IMAGE014
Formula (II)
Figure 817540DEST_PATH_IMAGE008
Figure DEST_PATH_IMAGE016
Formula (II)
Figure 822537DEST_PATH_IMAGE008
Figure DEST_PATH_IMAGE018
Formula (II)
Figure 10810DEST_PATH_IMAGE008
Figure DEST_PATH_IMAGE020
Formula (II)
Figure 708639DEST_PATH_IMAGE008
Wherein P is the precision rate and R is the recall rate. Wherein, TP is a positive sample predicted by the model and actually is also the positive sample; TN is predicted as a negative sample for the model, and actually is also the negative sample; FP is a positive sample predicted by the model, but actually is a negative sample; FN is a negative sample predicted by the model, but actually a positive sample. The mAP of the detection model of the yoloV3 level gauge calculated based on 4813 test samples is 99.8%, i.e. the level surface and the level range are identified accurately and the coordinate position in the image is determined, as shown in FIG. 5.
In one embodiment, the level meter reading determination implementation of the present application is described in detail below.
The last embodiment has accurately extracted the coordinate positions of the liquid level surface and the liquid level range in the liquid level meter in the image, and the scale reading of the liquid level meter in the actual image can be obtained by performing coordinate conversion on the coordinate ratio of the liquid level surface and the liquid level range in the image and the range of the liquid level meter in the actual image, and the calculation formula is as follows:
Figure DEST_PATH_IMAGE022
formula (II)
Figure 834727DEST_PATH_IMAGE008
In the formula, reading is the scale reading of the liquid level meter, H is the height of the liquid level surface in the image, H is the height of the liquid level range in the image, and maxValue is the actual range of the liquid level meter. As shown in fig. 6, the reading of the liquid level meter can be obtained by the above coordinate conversion.
The beneficial technical effect of this application:
1) the method has strong robustness and generalization capability, can be migrated and applied to different industrial scenes, and is suitable for reading identification of different types of liquid level meters.
2) The method efficiently utilizes the existing video monitoring resources, realizes the real-time automatic identification of the non-contact liquid level meter, and greatly saves financial resources and material resources.
3) The end-to-end non-contact liquid level meter can be automatically identified, so that the industrial production environment can be effectively helped to realize automatic management, powerful technical support is provided for unattended operation, and safe driving and protection of the industrial production environment are realized.
It should be understood that, although the steps in the flowchart of fig. 1 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 1 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data required by the computer program. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an information decoupling method.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In an embodiment, a computer device is provided, comprising a memory in which a computer program is stored and a processor which, when executing the computer program, carries out the steps as described in the above method.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method as described above.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for identifying reading of a liquid level meter based on deep learning is characterized by comprising the following steps:
acquiring a plurality of corrected liquid level instrument images;
extracting the liquid level instrument in each corrected liquid level instrument image and labeling the liquid level instrument to obtain a plurality of labeled liquid level instrument images;
inputting the marked liquid level instrument images into a target detection model to obtain the coordinates of the liquid level surface and the liquid level measuring range of each liquid level instrument in the corresponding liquid level instrument image;
and according to the corresponding coordinates of the liquid level surface and the liquid level range of each liquid level instrument in the liquid level instrument image, performing coordinate conversion with the real liquid level range to determine the reading of each liquid level instrument.
2. The method of claim 1, wherein the obtaining a plurality of corrected level gauge images comprises:
acquiring an initial liquid level instrument image through a video monitoring system;
recording and replaying the initial liquid level instrument image by utilizing a video processing mode of the video monitoring system to obtain a plurality of target liquid level instrument images with different weather, different time and different illumination conditions;
and preprocessing the plurality of target liquid level instrument images to obtain a plurality of corrected liquid level instrument images.
3. The method for identifying reading of a level gauge based on deep learning of claim 2, wherein the preprocessing the plurality of target level gauge images to obtain a plurality of corrected level gauge images comprises:
removing edges, removing noise, filtering and binarizing each target liquid level instrument image in the target liquid level instrument images to obtain a plurality of preprocessed liquid level instrument images;
determining the central point, the width, the height and the rotation angle of the liquid level meter in each preprocessed liquid level meter image according to the minimum external rectangle method of OpenCV;
and obtaining a plurality of corrected liquid level instrument images according to the central point, the width, the height and the rotation angle of the liquid level instrument in each preprocessed liquid level instrument image and an image rotation method of OpenCV.
4. The method for recognizing the reading of the liquid level meter based on the deep learning as claimed in claim 3, wherein the step of extracting the liquid level meter in each corrected liquid level meter image and labeling the liquid level meter to obtain a plurality of labeled liquid level meter images comprises the steps of:
and identifying the liquid level instrument in each corrected liquid level instrument image, marking the position of the liquid level surface and the liquid level range of the liquid level instrument and labeling to obtain a plurality of marked liquid level instrument images.
5. The method for identifying reading of a liquid level meter based on deep learning according to claim 3, wherein the step of extracting the liquid level meter in each corrected liquid level meter image and labeling the liquid level meter to obtain a plurality of labeled liquid level meter images comprises the following steps:
the process of establishing the target detection model comprises the following steps:
dividing the marked liquid level instrument images to obtain a training set and a test set;
acquiring an initial target detection algorithm, and training the initial target detection algorithm by adopting the training set to obtain a target detection model;
and evaluating the precision of the target detection model according to the test set, and determining the precision of the target detection model.
6. The method of claim 5, wherein determining the accuracy of the target detection model based on the target detection model and the test set comprises:
and inputting the test set into the target detection model, and if the test label of the target detection model is consistent with a preset label and the test threshold reaches a preset threshold, determining that the target detection model is predicted correctly, thereby obtaining the precision of the target detection model.
7. The method for identifying reading of liquid level meter based on deep learning as claimed in claim 1, wherein the determining the corresponding coordinates of the liquid level and the liquid level measuring range of each liquid level meter in the liquid level meter image according to the liquid level meter target detection model comprises:
acquiring a preset algorithm and an actual measuring range of the liquid level meter;
and inputting the coordinates of the liquid level surface and the liquid level range of each liquid level meter in the corresponding liquid level meter image and the actual range of the liquid level meter into the preset algorithm to obtain the reading of each liquid level meter.
8. The deep learning-based level gauge reading identification method according to claim 7, wherein the preset algorithm is as follows:
Figure DEST_PATH_IMAGE002
in the formula, reading is the reading of the level meter, H is the height of the liquid level (i.e. the coordinate of the liquid level of the level meter in the corresponding level meter image), H is the height of the liquid level range (i.e. the coordinate of the liquid level range in the corresponding level meter image), and maxValue is the actual range of the level meter.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 8 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 8.
CN202010219945.8A 2020-03-25 2020-03-25 Deep learning-based liquid level meter reading identification method Pending CN112989901A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010219945.8A CN112989901A (en) 2020-03-25 2020-03-25 Deep learning-based liquid level meter reading identification method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010219945.8A CN112989901A (en) 2020-03-25 2020-03-25 Deep learning-based liquid level meter reading identification method

Publications (1)

Publication Number Publication Date
CN112989901A true CN112989901A (en) 2021-06-18

Family

ID=76344199

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010219945.8A Pending CN112989901A (en) 2020-03-25 2020-03-25 Deep learning-based liquid level meter reading identification method

Country Status (1)

Country Link
CN (1) CN112989901A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113566931A (en) * 2021-07-22 2021-10-29 水利部南京水利水文自动化研究所 Intelligent calibration method and system for front-gate reflection type water level meter based on edge calculation
CN114565848A (en) * 2022-02-25 2022-05-31 佛山读图科技有限公司 Liquid medicine level detection method and system in complex scene
CN115330702A (en) * 2022-08-01 2022-11-11 无锡雪浪数制科技有限公司 Beverage bottle filling defect identification method based on deep vision

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108764234A (en) * 2018-05-10 2018-11-06 浙江理工大学 A kind of liquid level instrument Recognition of Reading method based on crusing robot
CN109447061A (en) * 2018-09-29 2019-03-08 南京理工大学 Reactor oil level indicator recognition methods based on crusing robot
CN110287926A (en) * 2019-06-27 2019-09-27 武汉轻工大学 Infusion monitoring alarm method, user equipment, storage medium and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108764234A (en) * 2018-05-10 2018-11-06 浙江理工大学 A kind of liquid level instrument Recognition of Reading method based on crusing robot
CN109447061A (en) * 2018-09-29 2019-03-08 南京理工大学 Reactor oil level indicator recognition methods based on crusing robot
CN110287926A (en) * 2019-06-27 2019-09-27 武汉轻工大学 Infusion monitoring alarm method, user equipment, storage medium and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HUASHENG ZHU: "《New Algorithm of Liquid Level of Infusion Bottle Based on Image Processing》", 《2009 INTERNATIONAL CONFERENCE ON INFORMATION ENGINEERING AND COMPUTER SCIENCE》 *
乔人杰: "《基于视觉的液位自动识别跟踪设计》", 《万方学位论文数据库》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113566931A (en) * 2021-07-22 2021-10-29 水利部南京水利水文自动化研究所 Intelligent calibration method and system for front-gate reflection type water level meter based on edge calculation
CN113566931B (en) * 2021-07-22 2023-06-09 水利部南京水利水文自动化研究所 Intelligent calibration method and system for pre-gate reflection type water level gauge based on edge calculation
CN114565848A (en) * 2022-02-25 2022-05-31 佛山读图科技有限公司 Liquid medicine level detection method and system in complex scene
CN114565848B (en) * 2022-02-25 2022-12-02 佛山读图科技有限公司 Liquid medicine level detection method and system in complex scene
CN115330702A (en) * 2022-08-01 2022-11-11 无锡雪浪数制科技有限公司 Beverage bottle filling defect identification method based on deep vision

Similar Documents

Publication Publication Date Title
Zhou et al. Automatic detection method of tunnel lining multi‐defects via an enhanced You Only Look Once network
CN112989901A (en) Deep learning-based liquid level meter reading identification method
CN110674712A (en) Interactive behavior recognition method and device, computer equipment and storage medium
CN107123131B (en) Moving target detection method based on deep learning
CN111325069B (en) Production line data processing method and device, computer equipment and storage medium
CN112966665A (en) Pavement disease detection model training method and device and computer equipment
CN108009547A (en) A kind of nameplate recognition methods of substation equipment and device
CN112668462B (en) Vehicle damage detection model training, vehicle damage detection method, device, equipment and medium
CN112419261B (en) Visual acquisition method and device with abnormal point removing function
CN114758249A (en) Target object monitoring method, device, equipment and medium based on field night environment
CN113705564B (en) Pointer type instrument identification reading method
CN108847031A (en) Traffic behavior monitoring method, device, computer equipment and storage medium
CN115995056A (en) Automatic bridge disease identification method based on deep learning
CN111563896A (en) Image processing method for catenary anomaly detection
CN115171045A (en) YOLO-based power grid operation field violation identification method and terminal
CN113657339A (en) Instrument pointer counting and reading method and medium based on machine vision
CN112927194A (en) Automatic checking method and system for design drawing and real object
CN111626104B (en) Cable hidden trouble point detection method and device based on unmanned aerial vehicle infrared thermal image
CN111723656A (en) Smoke detection method and device based on YOLO v3 and self-optimization
CN111223125A (en) Python environment-based target motion video tracking method
CN115311539A (en) Overhead transmission line defect identification method, device, equipment and storage medium
CN114757941A (en) Transformer substation equipment defect identification method and device, electronic equipment and storage medium
CN104820818A (en) Fast recognition method for moving object
CN114283126A (en) Method for detecting deviation of monitoring equipment of power transmission line
CN112967224A (en) Electronic circuit board detection system, method and medium based on artificial intelligence

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210618