A method, system, device and storage medium for judging the opening and closing state of a rising stem gate valve
Through the improved CenterNet network, the open and closed state of the open and closed state of the existing methods is solved, and efficient and accurate status monitoring is achieved, ensuring the safety and efficient operation of the rail transit system.
Patent Information
- Application Number
- CN202510112254.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2045-01-24
AI Technical Summary
The existing method of judging the opening and closing status of the open rod gate valve has the problems of time-consuming, inaccurate and untimely response, which is difficult to meet the needs of real-time monitoring of equipment status and high reliability of the rail transit system.
The improved CenterNet network is used to build a bright rod gate valve recognition model. By collecting real-time images and calculating detection frame and position information, the opening and closing status of the bright rod gate valve is determined, including building a training data set, using Adam optimization algorithm to train the network, and combining the ResNet50 backbone network and deconvolution network for identification.
The monitoring accuracy and response speed of the open rod gate valve are improved, ensuring the safe and efficient operation of the rail transit system.
Smart Images

Figure CN120032204B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of rail transportation technology, and in particular to a method, system, device and storage medium for judging the opening and closing state of a rising-stem gate valve. Background Art
[0002] In the field of rail transit, pump rooms are one of the key infrastructures, and their normal operation is related to the safety and efficiency of the entire rail transit system. Rising-stem gate valves are commonly used control components in pump rooms. Real-time and accurate judgment of their opening and closing status is an important guarantee for the smooth operation of the system. At present, the main methods for judging the opening and closing status of rising-stem gate valves include manual inspections, mechanical indicators, limit switches, and sensor-based monitoring systems. However, manual inspections are time-consuming and labor-intensive, and have poor safety; mechanical indicators may cause inaccurate readings due to wear or environmental factors; limit switches may not respond in time in extreme cases and are difficult to maintain. This is contrary to the current demand for real-time monitoring of the status of pump room equipment and high reliability. In modern rail transit systems, with the continuous advancement of technology, the requirements for the intelligence and automation of equipment are becoming increasingly higher. Therefore, a new method for judging the opening and closing status of rising-stem gate valves is urgently needed to solve the above problems. Summary of the Invention
[0003] The purpose of the present invention is to provide a method, system, device and storage medium for judging the opening and closing status of a rising-stem gate valve, which can improve monitoring accuracy and response speed and ensure the safe and efficient operation of the rail transit system.
[0004] To achieve the above object, the present invention provides the following solutions:
[0005] A method for determining the opening and closing state of a rising stem gate valve comprises:
[0006] A training data set for rising-stem gate valves is constructed, and the training data set is input into a pre-trained network for parameter optimization to obtain a trained rising-stem gate valve identification model; wherein the pre-trained network is constructed based on an improved CenterNet network; the improved CenterNet network includes: a ResNet50 backbone network, a deconvolution network, a rising-stem gate valve identification branch, and a key point identification branch; wherein the ResNet50 backbone network and the deconvolution network are sequentially connected, and the deconvolution network is also respectively connected to the rising-stem gate valve identification branch and the key point identification branch;
[0007] A real-time image of the rising-stem gate valve is collected and input into the rising-stem gate valve recognition model for calculation to obtain detection frame position information and rising-stem gate valve position information; the detection frame position information includes the horizontal coordinate of the center point, the vertical coordinate of the center point, the height, and the width; the rising-stem gate valve position information includes the horizontal coordinate and vertical coordinate of the handwheel center and the horizontal coordinate and vertical coordinate of the valve stem end;
[0008] The rising stem gate valve opening is calculated according to the detection frame position information and the rising stem gate valve position information, and the opening and closing state of the rising stem gate valve is determined according to the rising stem gate valve opening.
[0009] Optionally, constructing a training data set for rising stem gate valves and inputting the training data set into a pre-training network for parameter optimization to obtain a trained rising stem gate valve recognition model specifically includes:
[0010] A training dataset for rising-stem gate valves is constructed using rising-stem gate valve images as training input data and corresponding annotation information as training labels. The annotation information includes the center coordinates of the rising-stem gate valve, the actual frame height of the rising-stem gate valve, the actual frame width of the rising-stem gate valve, the center coordinates of the handwheel, and the coordinates of the valve stem end.
[0011] Build a pre-trained network;
[0012] Based on the Adam optimization algorithm, the training data set is input into the pre-trained network, and training is performed with the goal of minimizing the loss between the network output and the training label, and the trained network is determined as the rising stem gate valve recognition model.
[0013] Optionally, the loss is specifically:
[0014] L total =L det +λ kpt L kpt +λ geo L geo +λ joint L joint
[0015] Among them, L det Identify loss for rising stem gate valve; L kpt is the key point identification loss; L geo is the geometric loss; L joint is the coupling loss; λ kpt The loss weight coefficient for key point identification; λ geo is the geometric loss weight coefficient; λ joint is the coupling loss weight coefficient.
[0016] Optionally, the deconvolution network includes 3 convolution layers and 3 deconvolution layers; wherein, the first layer is a convolution layer, the convolution kernel is 3×3, the step size is 1, and the output channel is 256; the second layer is a deconvolution layer, the convolution kernel is 4×4, the step size is 2, and the output channel is 256; the third layer is a convolution layer, the convolution kernel is 3×3, the step size is 1, and the output channel is 128; the fourth layer is a deconvolution layer, the convolution kernel is 4×4, the step size is 2, and the output channel is 128; the fifth layer is a convolution layer, the convolution kernel is 3×3, the step size is 1, and the output channel is 128; the sixth layer is a deconvolution layer, the convolution kernel is 4×4, the step size is 2, and the output channel is 64; each layer is padded with 1, and a ReLU activation function is used.
[0017] Optionally, the rising stem gate valve identification branch includes three prediction heads, namely a rising stem gate valve heat map prediction head, a rising stem gate valve size prediction head and a rising stem gate valve offset prediction head;
[0018] Each prediction head includes two convolutional layers, specifically: the first layer output channel of the rising stem gate valve heat map prediction head is 64; the second layer output channel is 1; the first layer output channel of the rising stem gate valve size prediction head is 64; the second layer output channel is 2; the first layer output channel of the rising stem gate valve offset prediction head is 64; the second layer output channel is 2; the convolution kernel of each layer of the rising stem gate valve heat map prediction head, the rising stem gate valve size prediction head and the rising stem gate valve offset prediction head is 3×3, the step size is 1, the padding is 1, and the ReLU activation function is used.
[0019] The method for judging the opening and closing state of a rising stem gate valve is characterized in that the key point identification branch includes two prediction heads, namely a key point heat map prediction head and a key point offset prediction head; wherein the key points include the handwheel center and the valve stem end;
[0020] Each prediction head includes two convolutional layers, specifically: the first layer output channel of the key point heat map prediction head is 64; the second layer output channel is 2; the first layer output channel of the key point offset prediction head is 64; the second layer output channel is 4; the convolution kernel of each layer is 3×3, the stride is 1, the padding is 1, and the ReLU activation function is used.
[0021] Optionally, calculating the rising-stem gate valve opening according to the detection frame position information and the rising-stem gate valve position information, and judging the opening and closing state of the rising-stem gate valve according to the rising-stem gate valve opening specifically includes:
[0022] Set the parameters for all rising stem gate valves to be at their maximum opening: the horizontal coordinate x of the handwheel center a,i With the vertical coordinate x a,i , the horizontal coordinate x of the valve stem end b,i With the vertical coordinate x b,i ;
[0023] Calculate the valve stem extension ratio The opening and closing status of the rising stem gate valve is determined based on the preset opening and closing thresholds.
[0024] The present invention also provides a rising stem gate valve opening and closing state judgment system, comprising:
[0025] A model construction unit is used to construct a training data set for rising-stem gate valves, and input the training data set into a pre-training network for parameter optimization to obtain a trained rising-stem gate valve identification model; wherein the pre-training network is constructed based on an improved CenterNet network; the improved CenterNet network includes: a ResNet50 backbone network, a deconvolution network, a rising-stem gate valve identification branch, and a key point identification branch; wherein the ResNet50 backbone network and the deconvolution network are connected in sequence, and the deconvolution network is also connected to the rising-stem gate valve identification branch and the key point identification branch respectively;
[0026] an image recognition unit for collecting a real-time image of the rising-stem gate valve and inputting the real-time image into the rising-stem gate valve recognition model for calculation to obtain detection frame position information and rising-stem gate valve position information; the detection frame position information includes the horizontal coordinate of the center point, the vertical coordinate of the center point, the height, and the width; the rising-stem gate valve position information includes the horizontal coordinate and vertical coordinate of the handwheel center and the horizontal coordinate and vertical coordinate of the valve stem end;
[0027] The state judgment unit is used to calculate the opening of the rising stem gate valve according to the detection frame position information and the rising stem gate valve position information, and to judge the opening and closing state of the rising stem gate valve according to the opening of the rising stem gate valve.
[0028] The present invention also provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the above-mentioned method for determining the opening and closing status of a rising stem gate valve.
[0029] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-mentioned method for determining the opening and closing state of a rising-stem gate valve.
[0030] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0031] The present invention discloses a method, system, device, and storage medium for determining the opening and closing status of a rising-stem gate valve. The method comprises training a CenterNet network improved by using a training data set of rising-stem gate valves to construct a rising-stem gate valve recognition model; collecting a real-time image of the rising-stem gate valve, and inputting the real-time image into the rising-stem gate valve recognition model for calculation to obtain detection frame position information and rising-stem gate valve position information; calculating the rising-stem gate valve opening based on the detection frame position information and the rising-stem gate valve position information, and determining the opening and closing status of the rising-stem gate valve based on the rising-stem gate valve opening. Compared with traditional methods, the present invention is lower in cost and easier to maintain; at the same time, customized improvements are made to the identification of rising-stem gate valves and their key points, with excellent recognition effect, which can improve monitoring accuracy and response speed, and ensure the safe and efficient operation of rail transit systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0033] Figure 1 Schematic diagram of the flow of the method for judging the opening and closing state of a rising stem gate valve according to the present invention;
[0034] Figure 2 Schematic diagram of the rising stem gate valve identification model structure in this embodiment;
[0035] Figure 3 Schematic diagram of the detection and judgment results in this embodiment. DETAILED DESCRIPTION
[0036] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0037] The purpose of the present invention is to provide a method, system, device and storage medium for judging the opening and closing status of a rising-stem gate valve, which can improve monitoring accuracy and response speed and ensure the safe and efficient operation of the rail transit system.
[0038] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0039] like Figure 1-Figure 2As shown, the present invention provides a method for judging the opening and closing state of a rising stem gate valve, comprising:
[0040] Step 100: Construct a training data set for rising-stem gate valves, and input the training data set into a pre-training network for parameter optimization to obtain a trained rising-stem gate valve recognition model; wherein the pre-training network is constructed based on an improved CenterNet network; the improved CenterNet network includes: a ResNet50 backbone network, a deconvolution network, a rising-stem gate valve recognition branch, and a key point recognition branch; wherein the ResNet50 backbone network and the deconvolution network are connected in sequence, and the deconvolution network is also connected to the rising-stem gate valve recognition branch and the key point recognition branch, respectively.
[0041] Step 200: Acquire a real-time image of the rising-stem gate valve, and input the real-time image into the rising-stem gate valve recognition model for calculation to obtain detection frame position information and rising-stem gate valve position information; the detection frame position information includes the horizontal coordinate of the center point, the vertical coordinate of the center point, the height and the width; the rising-stem gate valve position information includes the horizontal coordinate and the vertical coordinate of the handwheel center, and the horizontal coordinate and the vertical coordinate of the valve stem end.
[0042] Step 300: Calculate the rising stem gate valve opening according to the detection frame position information and the rising stem gate valve position information, and determine the opening and closing state of the rising stem gate valve according to the rising stem gate valve opening.
[0043] As a specific implementation method, the construction of the rising stem gate valve identification model in step 100 includes:
[0044] The rising stem gate valve dataset in step (110) includes a rising stem gate valve image and annotation information, wherein the annotation information is composed of the rising stem gate valve center coordinates, the rising stem gate valve real frame height, the rising stem gate valve real frame width, the handwheel center coordinates, and the rising stem end coordinates;
[0045] Step (120) uses the rising stem gate valve dataset as input to train the improved CenterNet network until a high-precision rising stem gate valve recognition model is obtained.
[0046] Furthermore, the step (120) of improving the CenterNet network training includes:
[0047] Step (121): The improved CenterNet network uses ResNet50 as the main network, and after passing through the deconvolution network, it is divided into a rising stem gate valve recognition branch and a key point recognition branch.
[0048] The deconvolution network includes 3 convolutional layers and 3 deconvolutional layers, as follows:
[0049] The first layer is a convolution layer with a convolution kernel of 3×3, a stride of 1, and an output channel of 256; the second layer is a deconvolution layer with a convolution kernel of 4×4, a stride of 2, and an output channel of 256; the third layer is a convolution layer with a convolution kernel of 3×3, a stride of 1, and an output channel of 128; the fourth layer is a deconvolution layer with a convolution kernel of 4×4, a stride of 2, and an output channel of 128; the fifth layer is a convolution layer with a convolution kernel of 3×3, a stride of 1, and an output channel of 128; the sixth layer is a deconvolution layer with a convolution kernel of 4×4, a stride of 2, and an output channel of 64; the above layers are padded with 1 and use the ReLU activation function.
[0050] The rising-stem gate valve recognition branch includes three prediction heads: rising-stem gate valve heat map prediction head, rising-stem gate valve size prediction head, and rising-stem gate valve offset prediction head. Each prediction head includes two convolutional layers, as follows:
[0051] The first layer output channel of the rising stem gate valve heat map prediction head is 64; the second layer output channel is 1; the first layer output channel of the rising stem gate valve size prediction head is 64; the second layer output channel is 2; the first layer output channel of the rising stem gate valve offset prediction head is 64; the second layer output channel is 2; the above layer convolution kernel is 3×3, the stride is 1, the padding is 1, and the ReLU activation function is used.
[0052] The key point recognition branch includes two prediction heads: a key point heat map prediction head and a key point offset prediction head; each prediction head includes two convolutional layers, as follows:
[0053] The first layer output channel of the key point heat map prediction head is 64; the second layer output channel is 2; the first layer output channel of the key point offset prediction head is 64; the second layer output channel is 4; the above layer convolution kernel is 3×3, the step size is 1, the padding is 1, and the ReLU activation function is used; the key points include the center of the handwheel and the end of the valve stem.
[0054] Step (122): Loss function L total for:
[0055] L total =L det +λ kpt L kpt +λ geo L geo +λ joint L joint
[0056] Among them, L det Identify loss for rising stem gate valve; L kpt is the key point identification loss; L geo is the geometric loss; L joint is the coupling loss; λ kpt The loss weight coefficient for key point identification; λgeo is the geometric loss weight coefficient; λ joint is the coupling loss weight coefficient.
[0057] The rising stem gate valve identification loss L det for:
[0058] L det =L hm +λ wh L wh +λ off L off
[0059] Among them, L hm 、L wh 、L off They are the thermal map loss, dimensional loss, and offset loss of the rising stem gate valve; λ wh ,λ off are the weight coefficients of size loss and offset loss of rising stem gate valve respectively.
[0060] The rising stem gate valve thermal map loss L hm for:
[0061]
[0062] Wherein, N is the target number of rising stem gate valves; Y xyc are the heat map prediction value and true value of the rising stem gate valve respectively; α and β are the Focal Loss parameters.
[0063] The rising stem gate valve size loss L wh for:
[0064]
[0065] in, W i are the predicted size and actual size of the rising stem gate valve; ||·||1 represents the L1 loss.
[0066] The rising stem gate valve offset loss L off for:
[0067]
[0068] in, O i They are the predicted offset and actual offset of the center point of the rising stem gate valve respectively.
[0069] The key point recognition loss function L kpt for:
[0070] L kpt =Lkpt_hm +λ kpt_off L kpt_off
[0071] Among them, L kpt_hm 、L kpt_off are the heat map loss and offset loss of key points respectively; λ kpt_off is the weight coefficient of the key point offset loss.
[0072] The keypoint heatmap loss L kpt_hm for:
[0073]
[0074] Among them, N kpt is the number of key points; Y xyk They are the heat map prediction value and the true value of the key points respectively.
[0075] The keypoint offset loss L kpt_off for:
[0076]
[0077] in, O k,j are the predicted offset and true offset of the j-th key point respectively.
[0078] The geometric loss L geo for:
[0079]
[0080] in, d k are the predicted value and the actual value of the distance between the handwheel center and the valve stem end, respectively.
[0081] The coupling loss L joint for:
[0082]
[0083] Among them, P(kpt i |det i ) is the conditional probability that the i-th rising stem gate valve detection frame contains key points.
[0084] Step (123): Using the Adam optimization algorithm, adjust the network parameters until the loss value stabilizes or reaches a predetermined number of iterations, thereby realizing the construction of the rising stem gate valve identification model.
[0085] As a specific implementation, obtaining the test results in step 200 includes:
[0086] Step (210): collecting a real-time image of the rising-stem gate valve and inputting it into the rising-stem gate valve recognition model.
[0087] Step (220): Decode the output of the rising stem gate valve identification model to obtain a detection result; the detection result is a vector set R = {r i |i=1,2,...N};the i-th vector r i =(x d,i ,y d,i ,h i ,w i ,x s,i ,y s,i ,x e,i ,y e,i ), where x d,i ,y d,i ,h i ,w i They are the horizontal coordinate, vertical coordinate, height and width of the center point of the rising stem gate valve detection frame; x s,i ,y s,i are the horizontal and vertical coordinates of the handwheel center respectively; x e,i ,y e,i are the horizontal and vertical coordinates of the valve stem end respectively.
[0088] As a specific implementation, obtaining the opening and closing status of the rising stem gate valve in step 300 includes:
[0089] Step (310): Preset the parameters of all rising stem gate valves at the maximum opening, including: the horizontal coordinate x of the center of the handwheel a,i With the vertical coordinate y a,i , the horizontal coordinate x of the valve stem end b,i With the vertical coordinate y b,i .
[0090] Step (320) calculates the valve stem extension ratio The opening and closing status of the rising stem gate valve is determined based on the preset opening and closing thresholds.
[0091] Based on the above technical solution, the following Figure 3 The embodiment shown.
[0092] The steps of judging the opening and closing status of rising-stem gate valves based on the improved CenterNet mainly include: step (1) constructing a rising-stem gate valve data set, and obtaining a rising-stem gate valve recognition model by training the improved CenterNet network; step (2) collecting real-time images of rising-stem gate valves, inputting them into the rising-stem gate valve recognition model, and obtaining output results; step (3) calculating the opening of the rising-stem gate valve according to the output results, and judging the opening and closing status of the rising-stem gate valve.
[0093] Specifically, the step (1) includes:
[0094] Step (11): the rising stem gate valve dataset includes a rising stem gate valve image and annotation information, wherein the annotation information consists of the rising stem gate valve center coordinates, the rising stem gate valve real frame height, the rising stem gate valve real frame width, the handwheel center coordinates, and the rising stem end coordinates;
[0095] Step (12): Using the rising-stem gate valve dataset as input, the improved CenterNet network is trained until a high-precision rising-stem gate valve recognition model is obtained.
[0096] Specifically, the collection of rising-stem gate valve images in step (11) includes natural light and different angles under light illumination. The data set contains 8,500 images and labels, with the training set, validation set, and test set accounting for 80%, 10%, and 10%, respectively.
[0097] Specifically, the improved CenterNet network training in step (12) includes:
[0098] Step (122): Keypoint recognition loss weight coefficient λ kpt is 1, the geometric loss weight coefficient λ geo is 0.1, the coupling loss weight coefficient λ joint is 0.1, the size loss weight coefficient λ of the rising stem gate valve wh =0.1, the offset loss weight coefficient λ of the rising stem gate valve off is 1, the weight coefficient λ of the key point offset loss kpt_off is 1, FocalLoss parameter α is 2, β is 4, the standard deviation of the Gaussian kernel when generating the heat map is 1 / 3, and the positive sample radius is 2.
[0099] Step (123): Use the Adam optimizer with a learning rate of 1.25×10 -5 The predetermined number of iterations is 100 steps, the first-order moment decay rate is 0.9, the second-order moment decay rate is 0.99, and the small constant is 10 -8 .
[0100] Further, the detection results are obtained by using step (22). The image of the embodiment contains two rising stem gate valves, and the results include: the number of rising stem gate valves N is 2, and the result vector corresponding to the first rising stem gate valve is r1=(x d,1 ,y d,1 ,h1,w1,x s,1 ,y s,1 ,x e,1 ,y e,1 ), where x d,1 is 190, y d,1 is 192, h1 is 143, w1 is 170, x s,1 is 245, ys,1 is 198, x e,1 is 121, y e,1 is 193; the result vector corresponding to the second rising stem gate valve is r2=(x d,2 ,y d,2 ,h2,w2,x s,2 ,y s,2 ,x e,2 ,y e,2 ), where x d,2 is 800, y d,2 is 391, h2 is 313, w2 is 391, x s,2 747, y s,2 is 381, x e,2 is 966, y e,2 It is 433.
[0101] Specifically, the opening and closing status of the rising stem gate valve is obtained by using step (3), and the results of the embodiment include:
[0102] Step (31): Preset the parameters of all rising stem gate valves at the maximum opening, the center coordinate of the handwheel (x a,1 ,y a,1 )=(251,195),(x a,2 ,y a,2 )=(748,379), valve stem end coordinate (x b,1 ,y b,1 )=(21,190),(x b,2 ,y b,2 )=(988,441).
[0103] Step (32): The calculated valve stem extension ratio k1 is 0.539, k2 is 0.908, and the preset opening and closing threshold is 0.6. Therefore, the valve stem extension ratio k1 of the first rising stem gate valve is less than the opening and closing threshold, and the state is closed; the valve stem extension ratio k2 of the second rising stem gate valve is greater than the opening and closing threshold, and the state is open.
[0104] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0105] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The above examples are only intended to help understand the core concept of the present invention. At the same time, those skilled in the art will find that the specific implementation methods and application scopes may vary based on the concept of the present invention. In summary, the contents of this specification should not be construed as limiting the present invention.
Claims
1. A method for judging the opening and closing state of a rising stem gate valve, characterized in that: include: A training data set for rising-stem gate valves is constructed, and the training data set is input into a pre-trained network for parameter optimization to obtain a trained rising-stem gate valve identification model; wherein the pre-trained network is constructed based on an improved CenterNet network; the improved CenterNet network includes: a ResNet50 backbone network, a deconvolution network, a rising-stem gate valve identification branch, and a key point identification branch; wherein the ResNet50 backbone network and the deconvolution network are sequentially connected, and the deconvolution network is also respectively connected to the rising-stem gate valve identification branch and the key point identification branch; A real-time image of the rising-stem gate valve is collected and input into the rising-stem gate valve recognition model for calculation to obtain detection frame position information and rising-stem gate valve position information; the detection frame position information includes the horizontal coordinate of the center point, the vertical coordinate of the center point, the height, and the width; the rising-stem gate valve position information includes the horizontal coordinate and vertical coordinate of the handwheel center and the horizontal coordinate and vertical coordinate of the valve stem end; Calculating the rising stem gate valve opening according to the detection frame position information and the rising stem gate valve position information, and determining the opening and closing state of the rising stem gate valve according to the rising stem gate valve opening; The deconvolution network includes 3 convolutional layers and 3 deconvolutional layers; the first layer is a convolutional layer with a convolution kernel of 3×3, a stride of 1, and an output channel of 256; the second layer is a deconvolution layer with a convolution kernel of 4×4, a stride of 2, and an output channel of 256; the third layer is a convolutional layer with a convolution kernel of 3×3, a stride of 1, and an output channel of 128; the fourth layer is a deconvolution layer with a convolution kernel of 4×4, a stride of 2, and an output channel of 128; the fifth layer is a convolutional layer with a convolution kernel of 3×3, a stride of 1, and an output channel of 128; the sixth layer is a deconvolution layer with a convolution kernel of 4×4, a stride of 2, and an output channel of 64; each layer has a padding of 1 and uses a ReLU activation function; The rising stem gate valve identification branch includes three prediction heads, namely rising stem gate valve heat map prediction head, rising stem gate valve size prediction head and rising stem gate valve offset prediction head; Each prediction head includes two convolutional layers. Specifically, the first layer output channel of the rising stem gate valve heat map prediction head is 64, and the second layer output channel is 1; the first layer output channel of the rising stem gate valve size prediction head is 64, and the second layer output channel is 2; the first layer output channel of the rising stem gate valve offset prediction head is 64, and the second layer output channel is 2; the convolution kernel of each layer of the rising stem gate valve heat map prediction head, the rising stem gate valve size prediction head, and the rising stem gate valve offset prediction head is 3×3, with a stride of 1, a padding of 1, and a ReLU activation function. The key point recognition branch includes two prediction heads, namely a key point heat map prediction head and a key point offset prediction head; wherein the key points include the handwheel center and the valve stem end; Each prediction head includes two convolutional layers, specifically: the first layer output channel of the key point heat map prediction head is 64; the second layer output channel is 2; the first layer output channel of the key point offset prediction head is 64; the second layer output channel is 4; the convolution kernel of each layer is 3×3, the stride is 1, the padding is 1, and the ReLU activation function is used.
2. The method for judging the opening and closing state of a rising stem gate valve according to claim 1, characterized in that: The method of constructing a training data set for rising stem gate valves and inputting the training data set into a pre-training network for parameter optimization to obtain a trained rising stem gate valve recognition model specifically includes: A training dataset for rising-stem gate valves is constructed using rising-stem gate valve images as training input data and corresponding annotation information as training labels. The annotation information includes the center coordinates of the rising-stem gate valve, the actual frame height of the rising-stem gate valve, the actual frame width of the rising-stem gate valve, the center coordinates of the handwheel, and the coordinates of the valve stem end. Build a pre-trained network; Based on the Adam optimization algorithm, the training data set is input into the pre-trained network, and training is performed with the goal of minimizing the loss between the network output and the training label, and the trained network is determined as the rising stem gate valve recognition model.
3. The method for judging the opening and closing state of a rising stem gate valve according to claim 2, characterized in that: The losses are specifically: L total =L det +λ kpt L kpt +λ geo L geo +λ joint L joint Among them, L det Identify loss for rising stem gate valve; L kpt is the key point identification loss; L geo is the geometric loss; L joint is the coupling loss; λ kpt The loss weight coefficient for key point identification; λ geo is the geometric loss weight coefficient; λ joint is the coupling loss weight coefficient.
4. The method for judging the opening and closing state of a rising stem gate valve according to claim 1, characterized in that: Calculating the rising stem gate valve opening according to the detection frame position information and the rising stem gate valve position information, and judging the opening and closing state of the rising stem gate valve according to the rising stem gate valve opening, specifically includes: Set the parameters for all rising stem gate valves to be at their maximum opening: the horizontal coordinate x of the handwheel center a,i With the vertical coordinate y a,i , the horizontal coordinate x of the valve stem end b,i With the vertical coordinate y b,i ; Calculate the valve stem extension ratio According to the preset opening and closing threshold, the opening and closing status of the rising stem gate valve is judged; where x s,i ,y s,i are the horizontal and vertical coordinates of the handwheel center respectively; x e,i ,y e,i are the horizontal and vertical coordinates of the valve stem end respectively.
5. A rising stem gate valve opening and closing state judgment system, using the method according to any one of claims 1 to 4, characterized in that: include: A model construction unit is used to construct a training data set for rising-stem gate valves, and input the training data set into a pre-training network for parameter optimization to obtain a trained rising-stem gate valve identification model; wherein the pre-training network is constructed based on an improved CenterNet network; the improved CenterNet network includes: a ResNet50 backbone network, a deconvolution network, a rising-stem gate valve identification branch, and a key point identification branch; wherein the ResNet50 backbone network and the deconvolution network are connected in sequence, and the deconvolution network is also connected to the rising-stem gate valve identification branch and the key point identification branch respectively; an image recognition unit for collecting a real-time image of the rising-stem gate valve and inputting the real-time image into the rising-stem gate valve recognition model for calculation to obtain detection frame position information and rising-stem gate valve position information; the detection frame position information includes the horizontal coordinate of the center point, the vertical coordinate of the center point, the height, and the width; the rising-stem gate valve position information includes the horizontal coordinate and vertical coordinate of the handwheel center and the horizontal coordinate and vertical coordinate of the valve stem end; The state judgment unit is used to calculate the opening of the rising stem gate valve according to the detection frame position information and the rising stem gate valve position information, and to judge the opening and closing state of the rising stem gate valve according to the opening of the rising stem gate valve.
6. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the method for judging the opening and closing state of a rising stem gate valve according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that It stores a computer program, which, when executed by a processor, implements the method for judging the opening and closing state of a rising-stem gate valve according to any one of claims 1 to 4.
Citation Information
Patent Citations
Disconnecting link state identification method and device and storage medium
CN113221688A
Unmanned aerial vehicle detection method and system based on improved Center Net detection network
CN115661692A