CN111028225B - Method and device for monitoring opening degree of valve handle - Google Patents

Method and device for monitoring opening degree of valve handle Download PDF

Info

Publication number
CN111028225B
CN111028225B CN201911288919.4A CN201911288919A CN111028225B CN 111028225 B CN111028225 B CN 111028225B CN 201911288919 A CN201911288919 A CN 201911288919A CN 111028225 B CN111028225 B CN 111028225B
Authority
CN
China
Prior art keywords
valve
valve handle
current
position frame
image
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.)
Active
Application number
CN201911288919.4A
Other languages
Chinese (zh)
Other versions
CN111028225A (en
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 Jizhi Digital Technology Co Ltd
Original Assignee
Shenzhen Jizhi Digital Technology 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 Jizhi Digital Technology Co Ltd filed Critical Shenzhen Jizhi Digital Technology Co Ltd
Priority to CN201911288919.4A priority Critical patent/CN111028225B/en
Publication of CN111028225A publication Critical patent/CN111028225A/en
Application granted granted Critical
Publication of CN111028225B publication Critical patent/CN111028225B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • 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]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30164Workpiece; Machine component

Landscapes

  • Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The application discloses a method and a device for monitoring the opening degree of a gas valve handle, a storage medium and electronic equipment, and relates to the technical field of intelligent safety detection. Wherein, the method comprises the following steps: acquiring a current position frame including a valve in a current shot image; determining an image mask of a current valve handle in the current position frame; acquiring the angle difference between the characteristic axes of the image mask of the current valve handle and a standard image mask, wherein the standard image mask is the image mask determined according to the shot image at the same position when the valve handle is in a closed state; and determining that the valve is not closed when the angle difference is larger than a preset angle. By the method, whether the valve handle is closed or not can be determined in time, and the method is suitable for open occasions.

Description

Method and device for monitoring opening degree of valve handle
Technical Field
The application relates to the technical field of intelligent safety detection, in particular to a method and a device for monitoring the opening degree of a valve handle.
Background
The valve refers to a device for controlling the direction, pressure and flow of fluid in a fluid system, and is a device which can make the medium (including at least one of liquid, gas and powder) in the piping and equipment flow or stop and control the flow of the medium, and whether a valve handle is closed or not is important for ensuring the safety of the medium.
In recent years, medium leakage is caused by the fact that a valve is not closed in time, poisoning, explosion and other accidents are caused occasionally, and great threat is brought to lives and properties of people. Some leak alarm devices are also marketed, which can occur when a medium leaks.
However, since such alarm devices generally use sensor devices, such as gas concentration sensors, gas pressure sensors, etc., the alarm has a posterior nature, and often a medium leakage continues for a while. In addition, the existing alarm device is often only suitable for a small-range closed environment, and in some open occasions such as shopping malls, street cities and the like, because of the open occasions, a gas concentration sensor, a gas pressure sensor and the like used by the alarm device have a certain degree of reaction delay, and potential safety hazards exist.
Disclosure of Invention
In order to solve the technical problems in the prior art, the application provides a method and a device for monitoring the opening degree of a valve handle, a storage medium and electronic equipment, which can determine whether the valve handle is closed or not in time and can be suitable for open occasions.
The application provides a monitoring method of valve handle aperture, includes:
acquiring a current position frame including a valve in a current shot image;
determining an image mask of a current valve handle in the current position frame;
acquiring the angle difference between the characteristic axes of the image mask of the current valve handle and a standard image mask, wherein the standard image mask is the image mask determined according to the shot image at the same position when the valve handle is in a closed state;
and determining that the valve is not closed when the angle difference is larger than a preset angle.
Optionally, acquiring a current position frame including the valve in the current shot image specifically includes:
determining the current position frame of the valve in the currently captured image according to a first neural network model.
Optionally, the proportional size of the anchor prior box of the first neural network model corresponds to the proportional size of the valve.
Optionally, the determining an image mask of the current valve handle in the current position frame specifically includes:
setting the proportional size of an anchor prior frame of a second neural network model to accord with the proportional size of the valve handle, wherein the second neural network model is obtained through pre-acquired image mask training of the valve handle;
determining a position frame of a current valve handle from the current position frame;
determining an image mask of the current valve handle in a position box of the current valve handle using a second neural network model.
Optionally, the method further includes:
acquiring a shot image of the same position including a first position frame of the valve when the valve handle is in a closed state;
acquiring a second position frame including the valve in a shot image of the same position when the valve handle is in a fully opened state;
determining the opening probability of the valve handle according to the current position frame, the first position frame and the second position frame;
and when the angle difference is larger than a preset angle and the opening probability is larger than a preset threshold value, determining that the valve is not closed.
The embodiment of the application provides a monitoring devices of valve handle aperture, the device includes: the device comprises a first acquisition unit, a first determination unit, a second acquisition unit and a second determination unit;
the first acquisition unit is used for acquiring a current position frame including a valve in a current shooting image;
the first determining unit is used for determining an image mask of the current valve handle in the current position frame;
the second acquisition unit is used for acquiring the angle difference between the characteristic axes of the image mask of the current valve handle and a standard image mask, wherein the standard image mask is the image mask determined according to the shot image at the same position when the valve handle is in a closed state;
the second determination unit is used for determining that the valve is not closed when the angle difference is larger than a preset angle.
Optionally, the apparatus further comprises: a third acquiring unit and a third determining unit;
the third acquiring unit is used for acquiring a shot image of the same position including the first position frame of the valve when the valve handle is in a closed state;
the third acquiring unit is further configured to acquire a second position frame including the valve in the captured image of the same position when the valve handle is in a fully opened state;
the third determining unit is used for determining the opening probability of the valve handle according to the current position frame, the first position frame and the second position frame;
the third determining unit is further configured to determine that the valve is not closed when the angle difference is greater than a preset angle and the opening probability is greater than a preset threshold.
The embodiment of the application also provides a readable storage medium, on which a program is stored, and the program is executed by a processor to implement the method for monitoring the opening degree of the valve handle.
The embodiment of the application further provides electronic equipment, wherein the electronic equipment is used for running a program, and the method for monitoring the opening degree of the valve handle is executed when the program runs.
Optionally, the electronic device further includes a camera device, and the camera device is configured to acquire the currently-captured image.
The method described in the present application has at least the following advantages:
according to the monitoring method, a current position frame including the valve in a current shot image is obtained; determining an image mask of a current valve handle in the current position frame; and acquiring the angle difference of the characteristic axes of the image mask of the current valve handle and a standard image mask, wherein the standard image mask is the image mask when the valve handle is in a closed state, and the standard image mask is determined according to the shot image at the same position. And determining that the valve is not closed when the angle difference of the characteristic axes is greater than a preset angle. Therefore, whether the valve handle is closed or not can be determined in time, the leakage time is always kept for a period of time when the alarm is given in the prior art, and potential safety hazards can be eliminated in time. In addition, because the information acquisition is carried out without using a sensor and the image information is acquired by using the camera device, the method is not limited by application scenes and can be applied to open occasions such as markets, streets and the like.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be 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 described in the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a method for monitoring a valve handle opening according to an embodiment of the present disclosure;
FIG. 2 is a schematic view of a valve according to an embodiment of the present disclosure;
FIG. 3 is a schematic view of another valve provided in accordance with an embodiment of the present disclosure;
FIG. 4 is a first schematic diagram of the angular difference of the characteristic axes provided by the embodiments of the present application;
FIG. 5 is a second schematic diagram of the angular difference of the characteristic axes provided by the embodiment of the present application;
fig. 6 is a schematic view of a device for monitoring the opening degree of a valve handle according to an embodiment of the present disclosure;
fig. 7 is a schematic view of an electronic device according to an embodiment of the present application.
Detailed Description
The leakage alarm device used at present often uses a sensor to monitor and alarm, but when the sensor alarms, leakage often lasts for a period of time, so that timely alarm cannot be given. In addition, for open places such as markets, streets and the like, the reaction of the sensor can be delayed to a certain extent due to the fact that the medium can be diffused, so that medium leakage cannot be found in time, and potential safety hazards exist.
In order to solve the above technical problem, an embodiment of the present invention provides a method for monitoring an opening of a valve handle, which does not use a sensor to detect, but uses a captured image of the valve, where the captured image may be obtained from a camera used for monitoring in practical applications, obtains a current position frame including the valve from the current captured image, determines an image mask of the current valve handle in the current position frame, obtains an angle difference between a characteristic axis of the image mask of the current valve handle and a characteristic axis of a standard image mask, and determines that the valve is not closed when the angle difference between the characteristic axes is greater than a preset angle, so that it can be determined whether the valve is closed in time, and the method can be applied to an opening situation, for example, can be used to monitor whether a gas valve in a market or a street is closed.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be understood that the terms "first", "second", and the like in the embodiments of the present application are used for convenience of description only and do not limit the embodiments of the present application.
The first embodiment is as follows:
the embodiment of the application provides a method for monitoring the opening degree of a valve handle, which can be used for monitoring whether the valve is not closed or not, can be applied to closed occasions such as families or companies and is also suitable for open occasions such as superstores, streets and the like, and is specifically described in combination with the attached drawings.
Referring to fig. 1, the figure is a flowchart of a method for monitoring an opening degree of a valve handle according to an embodiment of the present application.
The method comprises the following steps:
s101: and acquiring a current position frame including the valve in the current shot image.
The valve is included in the shot image, and the shot image can be acquired from the camera device. In one possible implementation, a surveillance camera of a scene such as a home, a company, a factory, a mall, or a city street may be utilized. In another possible implementation, a monitoring camera may be provided for the valve to capture images of the gas valve.
The specific type of valve used is not limited in the examples of the present application, and two common types of valves will be specifically described below.
Referring to fig. 2 and 3, two different valves are shown, including a valve body and a valve handle, which are shown as portions of frame 202 and frame 302, respectively. It will be appreciated that in practice, the currently captured image may also include pipes or other obstructions connected to the above valves, not all of which are shown in this figure.
In addition, it is understood that fig. 2 and 3 are side images of the valve, and the captured images obtained in practical applications may also be images of other angles of the valve, such as top and bottom views.
The current position frame is a rectangular frame including the whole valve in the current captured image, such as the frame 201 in fig. 2 and the frame 301 in fig. 3.
The following describes an implementation of acquiring the current position frame from the current captured image.
The present application processes a currently captured image through a neural network model, which is described in detail below.
The method and the device have the advantages that the valve in the current shot image is detected through the first neural network model so as to obtain the current position frame containing the valve, the position frame of the valve handle is determined through the second neural network model according to the current position frame, and the image mask of the current valve handle is obtained.
The first neural network model is first explained below.
The training method of the neural network model is known to those skilled in the art, and the training method of the first neural network model is described below for the convenience of better understanding of the implementation of the present solution by those skilled in the art. It is to be understood that the method described below is only one possible implementation and that a person skilled in the art may also be trained by other suitable methods.
The first neural network model may take ResNet (residual network) as a skeleton layer, design a feature pyramid, and set the proportional size of the anchor (prior box) of the first neural network model to conform to the proportional size of the valve, for example, the proportional sizes of the anchor may be designed to be 3:4, 4:3, 1:2, 2:1, and so on.
Inputting a pre-acquired training image into a backbone network to train a first neural network model, extracting a corresponding feature image from the images by the first neural network model according to an anchor as an output result, wherein the feature image comprises a prior frame of the feature image, and in the training stage of the first neural network model, the feature image can be a valve and can be mixed with other objects which are misjudged as the valve.
Whether the boundary regression of the feature maps is accurate and whether the feature maps are valves is further judged, and in the training process, IoU (Intersection over Union) samples which are larger than or equal to a preset threshold value are set as positive samples, and other samples are set as negative samples. The positive sample characterization prior frame comprises a valve, and the negative sample characterization prior frame comprises an object which is misjudged as a gas valve.
Given an image, IoU shows the similarity between the image area of the valve existing in the image and the actual valve image, the larger IoU indicates the higher similarity, and the embodiment of the present application does not specifically limit the preset threshold, for example, the preset threshold may be set to 0.5, that is, when IoU ≧ 0.5, the sample is a positive sample, and otherwise, the sample is a negative sample. Training is performed based on pre-acquired captured images including the valve to obtain a detector capable of detecting the valve.
S102: an image mask of the current valve handle is determined in the current position box.
Based on the current position frame including the valve acquired in S101, an image mask (image mask) of the valve handle in the current captured image is determined in the current position frame.
The image mask refers to extracting a region of interest of an image by performing local processing, such as masking or blocking operation, on the image to be processed, where the region of interest of the image is a region where a valve handle is located in the application, and the image mask of the valve handle is an image outline of the valve handle in the image.
In a possible implementation manner, the region of interest can be extracted by multiplying a pre-made region of interest mask and the image to be processed to obtain a region of interest image, wherein the image value in the region of interest is kept unchanged, and the image value outside the region is 0.
In another possible implementation, the mask may be extracted based on structural features, i.e., structural features in the image that are similar to the target mask are detected and extracted using similarity variables or image matching methods.
The following description takes the first implementation as an example. It should be noted that this step may utilize a second neural network to acquire an image mask of the current valve handle.
The following describes a training method of the second neural network model. It is to be understood that the method described below is only one possible implementation and that a person skilled in the art may also be trained by other suitable methods.
The second neural network model can adopt a VGG (visual geometry group) model as a bone stem layer, and the proportional size of the anchor of the second neural network model is set to be in accordance with the proportional size of the valve handle, for example, the proportional sizes of the anchor can be designed to be 2:5, 5:2, 1:3, 3:1 and the like.
The second neural network model can directly realize regression of the class probability and the offset of the boundary frame by each pixel point, so that the position frame of the current valve handle can be determined from the current position frame more finely.
And training the second neural network model by using the pre-acquired image mask of the valve handle, and determining the image mask of the current valve handle in the position frame of the current valve handle by using the trained second neural network model, so as to obtain the detector for detecting the valve handle.
S103: and acquiring the angle difference of the characteristic axes of the image mask of the current valve handle and a standard image mask, wherein the standard image mask is the image mask when the valve handle is in a closed state, which is determined according to the shot image at the same position.
When the valve handle is in the closed state, an image mask of the valve handle in an image photographed at the same position (the specific photographing distance and photographing angle are the same) is previously acquired as a standard image mask.
The angular difference of the characteristic axis of the image mask of the current valve handle and the standard image mask in S102 is acquired. The characteristic axis can reflect the opening degree of the valve handle, and in a possible implementation mode, the direction of the characteristic axis can be the extending direction of the valve handle. In another possible implementation, for a valve of the type shown in fig. 3, the characteristic axis may be oriented perpendicular to the direction of extension of the valve handle. The following description is made with reference to the accompanying drawings.
Referring to fig. 4 and 5, two schematic diagrams of the central axis angle difference are provided in the embodiments of the present application.
In fig. 4, the direction of the characteristic axis, i.e. the two dashed lines shown in the figure, is taken as an example of the extension direction of the valve handle. Where the image mask corresponding to reference numeral 401 is the image mask of the current valve handle and the image mask corresponding to reference numeral 402 is the standard image mask, the angular difference of the characteristic axis in this implementation is shown as θ 1.
In fig. 5, the direction of the characteristic axis, i.e. the two dashed lines shown in the figure, is taken as an example perpendicular to the direction in which the valve handle extends. Where the image mask corresponding to reference numeral 501 is the image mask of the current valve handle and the image mask corresponding to reference numeral 502 is the standard image mask, the angular difference of the characteristic axis in this implementation is shown as θ 2.
S104: and when the angle difference is larger than the preset angle, determining that the valve is not closed.
The preset angle can be determined according to actual conditions, which is not specifically limited in the embodiment of the present application, but the preset angle can be set to a smaller angle, for example, set to 2 °, so as to detect the condition that the opening of the valve is smaller, in order to improve safety and eliminate potential safety hazards.
The above method takes as an example that the first neural network and the second neural network used may be two independent neural network models. It is understood that a cascaded neural network model may also be used, wherein the first neural network model is a first stage of the cascaded neural network model, the second neural network model is a second stage of the cascaded neural network model, and the second neural network model may directly utilize the current location box output by the first neural network model.
In summary, the method for monitoring the opening degree of the valve handle provided by the embodiment of the application can be used for determining whether the valve handle is closed or not in time, so that potential safety hazards are eliminated in time.
In addition, in order to reduce misjudgment in the actual early warning and improve monitoring accuracy, the monitoring method provided in the embodiment of the present application further designs a redundancy judgment part, which is implemented based on the current position frame including the valve in the current shot image acquired in S101, and is specifically described below.
The shot image of the same position when the valve handle is in the closed state is obtained in advance and comprises a first position frame of the valve.
A second position frame including the valve is obtained in advance in a captured image of the same position when the valve handle is in a fully open state.
And determining the opening probability of the valve handle according to the current position frame, the first position frame and the second position frame.
In a first possible implementation, the redundancy determination section may be implemented based on a third neural network model. In another possible implementation manner, when the first neural network model is the first stage of the cascaded neural network model, a third neural network model may be added after the first neural network model based on the cascaded neural network, where the third neural network is used to obtain the probability that the current valve handle is in the closed state or the open state.
The following describes a training method of the third neural network model. It is to be understood that the method described below is only one possible implementation and that a person skilled in the art may also be trained by other suitable methods.
The third neural network model can take ResNet as a bone stem layer, input the shot image at the same position when the valve handle is in a closed state and the shot image at the same position when the valve handle is in a fully open state for training, and output the opening probability of the current valve handle.
And when the angle difference of the characteristic axis is greater than a preset angle and the opening probability is greater than a preset threshold value, determining that the valve is not closed. The preset probability may be determined according to actual conditions, and the embodiment of the present application is not specifically limited herein.
Due to the combination of the judgment result of the S104 and the opening probability, the judgment results of the two can be compared and verified. The method improves the accuracy of early warning and reduces the probability of misjudgment, so the method has higher practicability and reliability.
Example two:
based on the method for monitoring the opening degree of the valve handle provided by the embodiment, the second embodiment of the application further provides a device for monitoring the opening degree of the valve handle, which is specifically described below with reference to the accompanying drawings.
Referring to fig. 6, the drawing is a schematic view of a device for monitoring the opening degree of a valve handle according to an embodiment of the present disclosure.
The device includes: a first acquisition unit 601, a first determination unit 602, a second acquisition unit 603, and a second determination unit 604.
The first obtaining unit 601 is configured to obtain a current position frame including a valve in a current captured image.
Optionally, the first obtaining unit 601 is configured to determine the current position frame of the valve in the currently captured image according to the first neural network model.
Optionally, the proportional size of the anchor prior box of the first-stage neural network model conforms to the proportional size of the valve.
The first determination unit 602 is configured to determine an image mask of a current valve handle in the current position frame.
Optionally, the first determining unit 602 is specifically configured to:
setting the proportional size of an anchor prior frame of a second neural network model to accord with the proportional size of the valve handle, wherein the second neural network model is obtained through pre-acquired image mask training of the valve handle;
determining a position frame of a current valve handle from the current position frame;
determining an image mask of the current valve handle in a position box of the current valve handle using a second neural network model. .
The second obtaining unit 603 is configured to obtain an angle difference between a characteristic axis of the image mask of the current valve handle and a standard image mask, where the standard image mask is the image mask of the valve handle in the closed state determined from the captured image of the same position.
The second determining unit 604 is configured to determine that the valve is not closed when the angle difference of the characteristic axis is greater than a preset angle.
Utilize the monitoring devices of valve handle aperture that this application embodiment provided, can in time confirm whether the valve handle closes, and then in time eliminate the potential safety hazard, in addition, owing to need not use the sensor to carry out information acquisition, and utilized camera device to gather image information, consequently not receive the restriction of application scene, can use openness occasions such as market, street.
Further, the device also comprises a third acquisition unit and a third determination unit.
The third acquiring unit is used for acquiring the shot images of the same position including the first position frame of the valve when the valve handle is in the closed state, and is also used for acquiring the shot images of the same position including the second position frame of the valve when the valve handle is in the fully open state.
The third determining unit is used for determining the opening probability of the valve handle according to the current position frame, the first position frame and the second position frame, and is also used for determining that the valve is not closed when the angle difference of the characteristic axis is larger than a preset angle and the opening probability is larger than a preset threshold value.
In summary, the determination result of the second determining unit and the turn-on probability obtained by the third determining unit of the device can be verified by comparing with each other. The early warning accuracy is improved, and the misjudgment probability is reduced, so that the device has higher practicability and reliability.
Further, the monitoring device for the opening degree of the valve handle comprises a processor and a memory, the first acquiring unit, the first determining unit, the second acquiring unit, the second determining unit, the third acquiring unit, the third determining unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more, and the opening degree of the valve is monitored by adjusting the kernel parameters.
Example three:
the embodiment of the application also provides a readable storage medium, wherein a program is stored on the readable storage medium, and when the program is executed by a processor, the program realizes the monitoring method for the opening degree of the valve handle in the first embodiment.
The embodiment of the application further provides a processor, wherein the processor is used for running a program, and the monitoring method for the opening degree of the valve handle in the first embodiment is executed when the program runs.
The embodiment of the application also provides electronic equipment, which is specifically described below with reference to the accompanying drawings.
Referring to fig. 7, the figure is a schematic view of an electronic device provided in an embodiment of the present application.
The electronic device 70 includes at least one processor 701, and at least one memory 702, a bus 703 connected to the processor 701.
The processor 701 and the memory 702 complete mutual communication through the bus 703, and the processor 701 is configured to call a program instruction in the memory 702 to execute the method for monitoring the opening degree of the valve handle according to the first embodiment.
Further, the electronic device further comprises a camera device, and the camera device is used for acquiring the current shot image. It is to be understood that, in another possible implementation manner, the electronic device may not include the camera, but use the existing monitoring camera to obtain the currently-captured image, so as to reduce the cost.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device:
acquiring a current position frame including a valve in a current shot image;
determining an image mask of a current valve handle in the current position frame;
acquiring the angle difference between the characteristic axes of the image mask of the current valve handle and a standard image mask, wherein the standard image mask is the image mask determined according to the shot image at the same position when the valve handle is in a closed state;
and determining that the valve is not closed when the angle difference of the characteristic axes is larger than a preset angle.
Optionally, acquiring a current position frame including the valve in the current shot image specifically includes:
determining the current position frame of the valve in the currently captured image according to a first neural network model.
Optionally, the proportional size of the anchor prior box of the first neural network model corresponds to the proportional size of the valve.
Optionally, the determining an image mask of the current valve handle in the current position frame specifically includes:
setting the proportional size of an anchor prior frame of a second neural network model to accord with the proportional size of the valve handle, wherein the second neural network model is obtained through pre-acquired image mask training of the valve handle;
determining a position frame of a current valve handle from the current position frame;
determining an image mask of the current valve handle in a position box of the current valve handle using a second neural network model.
Optionally, the method further includes:
acquiring a shot image of the same position including a first position frame of the valve when the valve handle is in a closed state;
acquiring a second position frame including the valve in a shot image of the same position when the valve handle is in a fully opened state;
determining the opening probability of the valve handle according to the current position frame, the first position frame and the second position frame;
and when the angle difference of the characteristic axis is larger than a preset angle and the opening probability is larger than a preset threshold value, determining that the valve is not closed.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a device includes one or more processors (CPUs), memory, and a bus. The device may also include input/output interfaces, network interfaces, and the like.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method for monitoring the opening degree of a valve handle is characterized by comprising the following steps:
acquiring a current position frame including a valve in a current shot image;
determining an image mask of a current valve handle in the current position frame;
acquiring the angle difference between the characteristic axes of the image mask of the current valve handle and a standard image mask, wherein the standard image mask is the image mask determined according to the shot image at the same position when the valve handle is in a closed state;
acquiring a first position frame including the valve in a shot image of the same position when the valve handle is in a closed state;
acquiring a second position frame including the valve in a shot image of the same position when the valve handle is in a fully opened state;
determining the opening probability of the valve handle according to the current position frame, the first position frame and the second position frame;
and when the angle difference is larger than a preset angle and the opening probability is larger than a preset threshold value, determining that the valve is not closed.
2. The monitoring method according to claim 1, wherein the acquiring a current position frame including a valve in the current captured image specifically includes:
determining the current position frame of the valve in the currently captured image according to a first neural network model.
3. The method of monitoring of claim 2, wherein a proportional size of an anchor prior box of the first neural network model conforms to a proportional size of the valve.
4. The method of claim 3, wherein determining the image mask of the current valve handle in the current position frame comprises:
setting the proportional size of an anchor prior frame of a second neural network model to accord with the proportional size of the valve handle, wherein the second neural network model is obtained through pre-acquired image mask training of the valve handle;
determining a position frame of a current valve handle from the current position frame;
determining an image mask of the current valve handle in a position box of the current valve handle using a second neural network model.
5. A device for monitoring the opening of a valve handle, said device comprising: the device comprises a first acquisition unit, a first determination unit, a second acquisition unit, a third acquisition unit and a third determination unit;
the first acquisition unit is used for acquiring a current position frame including a valve in a current shooting image;
the first determining unit is used for determining an image mask of the current valve handle in the current position frame;
the second acquisition unit is used for acquiring the angle difference between the characteristic axes of the image mask of the current valve handle and a standard image mask, wherein the standard image mask is the image mask determined according to the shot image at the same position when the valve handle is in a closed state;
the third acquisition unit is used for acquiring a first position frame including the valve in the shot image of the same position when the valve handle is in a closed state;
the third acquiring unit is further configured to acquire a second position frame including the valve in the captured image of the same position when the valve handle is in a fully opened state;
the third determining unit is used for determining the opening probability of the valve handle according to the current position frame, the first position frame and the second position frame;
the third determining unit is further configured to determine that the valve is not closed when the angle difference is greater than a preset angle and the opening probability is greater than a preset threshold.
6. The monitoring device of claim 5, wherein the first obtaining unit is specifically configured to:
determining the current position frame of the valve in the currently captured image according to a first neural network model.
7. The monitoring device of claim 6, wherein a proportional size of an anchor prior box of the first neural network model conforms to a proportional size of the valve.
8. A readable storage medium, characterized in that a program is stored thereon, which when executed by a processor implements the method of monitoring the opening degree of a valve handle according to any one of claims 1 to 4.
9. An electronic device, characterized in that the electronic device is configured to run a program, wherein the program is configured to execute the method for monitoring the opening degree of a valve handle according to any one of claims 1 to 4 when running.
10. The electronic device according to claim 9, further comprising a camera for acquiring the currently captured image.
CN201911288919.4A 2019-12-12 2019-12-12 Method and device for monitoring opening degree of valve handle Active CN111028225B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911288919.4A CN111028225B (en) 2019-12-12 2019-12-12 Method and device for monitoring opening degree of valve handle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911288919.4A CN111028225B (en) 2019-12-12 2019-12-12 Method and device for monitoring opening degree of valve handle

Publications (2)

Publication Number Publication Date
CN111028225A CN111028225A (en) 2020-04-17
CN111028225B true CN111028225B (en) 2020-09-01

Family

ID=70211004

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911288919.4A Active CN111028225B (en) 2019-12-12 2019-12-12 Method and device for monitoring opening degree of valve handle

Country Status (1)

Country Link
CN (1) CN111028225B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112037207A (en) * 2020-09-01 2020-12-04 哈尔滨市科佳通用机电股份有限公司 Method for detecting closing fault of automatic brake valve plug handle during railway wagon derailment
CN112784715A (en) * 2021-01-11 2021-05-11 精英数智科技股份有限公司 Method and device for monitoring opening and closing states of fire valve based on image recognition
CN112733940B (en) * 2021-01-12 2021-08-27 哈尔滨市科佳通用机电股份有限公司 Cut-off cock handle closing fault image identification method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7602313B2 (en) * 1995-06-07 2009-10-13 Intelligent Technologies International, Inc. License plate including transponder
CN102859104A (en) * 2010-03-26 2013-01-02 西门子公司 Safety apparatus for closing and opening a door
CN105869164A (en) * 2016-03-28 2016-08-17 国网浙江省电力公司宁波供电公司 Method and system for detecting on/off state of switch
CN109033993A (en) * 2018-06-29 2018-12-18 南京行者易智能交通科技有限公司 A kind of method and device of image recognition detection switch door
CN109063764A (en) * 2018-07-26 2018-12-21 福建和盛高科技产业有限公司 A kind of judgment method of disconnecting switch closing operation in place based on machine vision

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2957417B1 (en) * 2010-03-15 2013-01-04 Michelin Soc Tech HOLDING DEVICE FOR VISUAL INSPECTION OF A TIRE
CN102509100B (en) * 2011-10-26 2013-06-19 山东电力研究院 Knife switch connecting-disconnecting reliability recognition method based on image pattern recognition

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7602313B2 (en) * 1995-06-07 2009-10-13 Intelligent Technologies International, Inc. License plate including transponder
CN102859104A (en) * 2010-03-26 2013-01-02 西门子公司 Safety apparatus for closing and opening a door
CN105869164A (en) * 2016-03-28 2016-08-17 国网浙江省电力公司宁波供电公司 Method and system for detecting on/off state of switch
CN109033993A (en) * 2018-06-29 2018-12-18 南京行者易智能交通科技有限公司 A kind of method and device of image recognition detection switch door
CN109063764A (en) * 2018-07-26 2018-12-21 福建和盛高科技产业有限公司 A kind of judgment method of disconnecting switch closing operation in place based on machine vision

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Study on the method of switch state detection based on image recognition in substation sequence control;Bin, Yan,et.al;《2014 International Conference on Power System Technology》;20141231;全文 *
基于卷积神经网络的电力开关柜柜门开合状态图像识别研究;彭熹;等;《科技通报》;20191130;全文 *
基于瞬变反问题分析的阀门工作状态模拟及实验研究;赵楠;《中国优秀硕士学位论文全文数据库》;20161231;全文 *

Also Published As

Publication number Publication date
CN111028225A (en) 2020-04-17

Similar Documents

Publication Publication Date Title
CN111028225B (en) Method and device for monitoring opening degree of valve handle
CN112633231B (en) Fire disaster identification method and device
TWI723411B (en) Anomaly detection method, device and equipment in unmanned settlement scene
CN110807429A (en) Construction safety detection method and system based on tiny-YOLOv3
US9881212B2 (en) Infrared image based early detection of oil spills in water
CN109241896B (en) Channel safety detection method and device and electronic equipment
EP3877906A1 (en) Systems and methods for evaluating perception system quality
CN112396116A (en) Thunder and lightning detection method and device, computer equipment and readable medium
CN109102026B (en) Vehicle image detection method, device and system
CN113240880A (en) Fire detection method and device, electronic equipment and storage medium
CN114998856B (en) 3D target detection method, device, equipment and medium for multi-camera image
Borg et al. Test automation with grad-CAM Heatmaps-A future pipe segment in MLOps for Vision AI?
KR101954899B1 (en) Method for automatic water level detection based on the intelligent CCTV
CN116563776A (en) Method, system, medium and equipment for warning illegal behaviors based on artificial intelligence
CN109948436B (en) Method and device for monitoring vehicles on road
CN112699854B (en) Method and device for identifying stopped vehicle
CN106960027A (en) The UAV Video big data multidate association analysis method of spatial information auxiliary
CN113379999A (en) Fire detection method and device, electronic equipment and storage medium
CN116228756A (en) Method and system for detecting bad points of camera in automatic driving
KR20170127847A (en) Line recognition and position detection system for pipe inside testing device
CN116311144A (en) Method and device for predicting vehicle steering and computer readable storage medium
CN114359149A (en) Dam bank dangerous case video detection method and system based on real-time image edge enhancement
CN114119594A (en) Oil leakage detection method and device based on deep learning
CN111931920A (en) Target detection method, device and storage medium based on cascade neural network
CN113627346A (en) Channel gate detection method, device, equipment and readable storage medium

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
GR01 Patent grant
GR01 Patent grant