A smart water conservancy urban and rural waterlogging water level monitoring and early warning method and device
By identifying and correcting the water ruler image, generating virtual water ruler information, and calculating the water depth with water area segmentation, the problems of low timeliness monitoring and impact of water ruler damage in the existing technology are solved, and high precision, automation and intelligence are achieved In-depth monitoring of waterlogging.
Patent Information
- Application Number
- CN202210037514.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-13
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2042-01-13
AI Technical Summary
The existing technology has low timeliness for monitoring the depth of waterlogging, and cannot make timely warnings, and the depth of waterlogging cannot be accurately monitored when blocked, corroded or damaged, affecting the detection accuracy.
By obtaining the image of the physical water ruler, identifying and correcting the water ruler, generating virtual water ruler information, and calculating the water depth based on water area segmentation, and sending out an early warning signal when the water depth is greater than the preset value.
The identification accuracy of the depth of waterlogging is improved, and the automation and intelligence of depth of waterlogging is realized, which greatly improves the efficiency of depth of waterlogging is obtained and reduces maintenance costs.
Smart Images

Figure CN114494695B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of urban waterlogging detection, and in particular to a smart water conservancy urban and rural waterlogging water level monitoring and early warning method and device. Background Art
[0002] For some highly urbanized cities, there are often problems with unreasonable drainage system design or low urban terrain. When faced with sudden heavy rainfall and continuous rainfall, these cities will experience serious waterlogging, causing great inconvenience and losses to people's lives. Therefore, timely judging the harm of waterlogging and arranging waterlogging prevention work in advance is the most effective measure besides improving the drainage system. For the judgment of waterlogging, it is necessary to collect waterlogging data from various parts of the city to grasp the waterlogging situation in the city. The traditional waterlogging detection method uses water level meters and professional instruments to measure and read manually, which has the disadvantages of high equipment cost, high maintenance cost, low accuracy and low timeliness, and cannot meet the collection of waterlogging data in large cities. In order to build a waterlogging early warning system and make the detection of waterlogging information more artificially intelligent, it is necessary to find a more effective method.
[0003] For waterlogging depth detection technology, existing technologies include: "A water gauge recognition method based on image semantic segmentation" (CN201911128971.3) proposed by Dan Senhua, Zhuang Zicheng and others. This technology collects samples of water gauge images and preprocesses them, constructs a water gauge semantic segmentation model for training, and thus obtains the optimal water gauge semantic segmentation model. Then, the water gauge image is preprocessed, the candidate water gauge area is screened, and the four edges are detected and fitted. Finally, the identified water gauge area and the water gauge reading are projected onto the original image to calculate the actual water gauge scale.
[0004] The inventors found in the process of implementing the present invention that the existing technology has low timeliness in monitoring the depth of waterlogging, and often cannot issue early warnings in time when flood conditions are monitored, thus causing great economic losses. When the water gauge is blocked, corroded or damaged, it is often impossible to accurately monitor the depth of waterlogging, thus affecting the accuracy of waterlogging depth detection. Summary of the invention
[0005] The embodiments of the present invention provide a smart water conservancy urban and rural waterlogging water level monitoring and early warning method and device to solve the technical problem of how to improve the accuracy of waterlogging early warning by accurately extracting the waterlogging depth.
[0006] In order to solve the above problems, an embodiment of the present invention provides a smart water conservancy urban and rural waterlogging water level monitoring and early warning method, including:
[0007] Acquire a first image of a physical water gauge, perform water gauge recognition on the first image, and acquire physical water gauge scale data;
[0008] Calculating the discrete degree and adjacent spacing of the physical water gauge scale data to obtain difference data, and correcting the physical water gauge scale data according to the difference data, thereby generating virtual water gauge information;
[0009] Performing water segmentation on the first image to obtain water level position information;
[0010] Calculate the waterlogging depth according to the virtual water gauge information and the water level line position information;
[0011] When the waterlogging depth is greater than the preset value, an early warning signal is issued.
[0012] Preferably, water gauge recognition is performed on the first image to obtain physical water gauge scale data, specifically:
[0013] Performing water ruler recognition on the first image, obtaining position bounding box data of the water ruler in the first image, and graduation bounding box data of the water ruler scale;
[0014] Calculate and obtain the intersection-and-union ratio data between each of the graduation bounding box data and the position bounding box data of the water ruler;
[0015] The graduation bounding box data whose intersection-over-union ratio data is greater than a first preset value is retained to generate the physical water ruler scale data.
[0016] Preferably, the performing water level recognition on the first image is specifically:
[0017] Feature extraction is performed on the first image, the acquired features are input into a neural network for recognition, and multi-scale features are used to perform object detection and classification.
[0018] Preferably, the discrete degree and adjacent spacing of the physical water gauge scale data are calculated to obtain difference data, and the physical water gauge scale data is corrected according to the difference data to generate virtual water gauge information, specifically:
[0019] Performing difference processing on the discrete degree data and adjacent spacing data of each of the physical water gauge scale data to obtain difference data;
[0020] For the physical water gauge scale data whose difference data is greater than the second preset value, the difference data is replaced by the second preset value, thereby correcting the physical water gauge scale data whose difference data is greater than the second preset value;
[0021] All the difference data are corrected to be less than or equal to a second preset value, and the corrected physical water gauge scale data are differentially processed to obtain the virtual water gauge information.
[0022] Preferably, after calculating and obtaining the waterlogging depth according to the virtual water gauge information data and the water level line position data, the method further includes:
[0023] Acquire a second image of the water gauge, perform water segmentation on the second image, and obtain water level position data; wherein the water gauge position of the second image is the same as the water gauge position of the first image;
[0024] The waterlogging depth of the second image is calculated based on the generated virtual water gauge information and the water level position data of the second image.
[0025] Preferably, the performing water segmentation on the first image to obtain water level position information is specifically as follows:
[0026] Inputting the first image into a neural network for recognition, capturing context information, and repairing edge semantic information, thereby segmenting the water area;
[0027] The water level position information is obtained according to the segmented water area and the position of the physical water gauge in the first image.
[0028] Preferably, the obtaining of the first image of the physical water gauge is specifically:
[0029] A captured image containing a physical water gauge is collected, and operations of filtering, denoising, and removing mosaic images are performed on the captured image, so as to obtain a first image of the physical water gauge.
[0030] Correspondingly, the present invention also provides a smart water conservancy urban and rural waterlogging water level monitoring and early warning device, including: a water gauge acquisition module, a water gauge correction module, a water area segmentation module, a depth calculation module and an early warning module;
[0031] The water ruler acquisition module is used to acquire a first image of a physical water ruler, perform water ruler recognition on the first image, and acquire physical water ruler scale data;
[0032] The water gauge correction module is used to calculate the discrete degree and adjacent spacing of the physical water gauge scale data, obtain difference data, and correct the physical water gauge scale data according to the difference data, thereby generating virtual water gauge information;
[0033] The water area segmentation module is used to perform water area segmentation on the first image to obtain water level position information;
[0034] The depth calculation module is used to calculate the waterlogging depth according to the virtual water gauge information data and the water level line position information;
[0035] The early warning module is used to send out an early warning signal when the waterlogging depth is greater than a preset value.
[0036] Preferably, the water gauge acquisition module comprises: an acquisition unit, a calculation unit and a screening unit;
[0037] The acquisition unit is used to perform water ruler recognition on the first image, and acquire the position bounding box data of the water ruler and the graduation bounding box data of the water ruler scale in the first image;
[0038] The calculation unit is used to calculate and obtain the intersection-and-joint ratio data between each of the graduation bounding box data and the position bounding box data of the water ruler;
[0039] The screening unit is used to retain the graduation bounding box data whose intersection-over-union ratio data is greater than a first preset value, and generate the physical water ruler scale data.
[0040] Preferably, the water gauge correction module comprises: a difference making unit, a correction unit and a difference processing unit;
[0041] Wherein, the difference unit is used to perform difference processing on the discrete degree data and adjacent spacing data of each physical water gauge scale data to obtain difference data;
[0042] The correction unit is used for replacing the difference data of the physical water gauge scale data whose difference data is greater than the second preset value with the second preset value, thereby correcting the physical water gauge scale data whose difference data is greater than the second preset value;
[0043] The differential processing unit is used to correct all the difference data to be less than or equal to a second preset value, and perform differential processing on the corrected physical water gauge scale data, so as to obtain the virtual water gauge information.
[0044] As can be seen from the above, the present invention has the following beneficial effects:
[0045] The present invention provides a smart water conservancy urban and rural waterlogging water level monitoring and early warning method and device, which recognizes and calculates images containing water gauges, generates virtual water gauges, and uses deep learning to segment the water area in the image, and calculates the waterlogging depth by combining the generated virtual water gauge and the segmented water area. Compared with the prior art, the present application automatically generates a virtual water gauge and segments the water area to calculate the waterlogging depth, thereby improving the recognition accuracy of the waterlogging depth, realizing the automation and intelligence of the waterlogging depth acquisition, and greatly improving the efficiency of the waterlogging depth acquisition.
[0046] Furthermore, an embodiment of the present invention provides a method for generating a virtual water gauge, which performs missed recognition and misrecognition of the scale of the physical water gauge in the image, and automatically corrects the error information, thereby generating a virtual water gauge. It can handle the situation where the physical water gauge is obscured or damaged, resulting in blurring of the physical water gauge, thereby improving the accuracy of obtaining the depth of waterlogging. At the same time, the present invention can calculate the depth of waterlogging based on the generated virtual water gauge, without the need to maintain the physical water gauge corresponding to the image, thereby reducing the maintenance cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is a flow chart of a method for monitoring and early warning of water level of urban and rural waterlogging provided by a smart water conservancy project according to an embodiment of the present invention;
[0048] Figure 2 It is a structural schematic diagram of a smart water conservancy urban and rural waterlogging water level monitoring and early warning device provided by an embodiment of the present invention;
[0049] Figure 3 is a flow chart of a method for calculating waterlogging depth provided by another embodiment of the present invention;
[0050] Figure 4 It is a schematic diagram of a flow chart of a water gauge correction algorithm provided by an embodiment of the present invention;
[0051] Figure 5 It is a schematic diagram of the training process of the water gauge recognition model and the water area segmentation model provided by one embodiment of the present invention;
[0052] Figure 6 It is a schematic diagram of the result of generating a virtual water gauge provided by an embodiment of the present invention;
[0053] Figure 7 is a result schematic diagram of waterlogging depth provided by an embodiment of the present invention;
[0054] Figure 8 It is a schematic diagram of the structure of a terminal device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 creative work are within the scope of protection of the present invention.
[0056] See also Figure 1 , is a flow chart of a method for monitoring and early warning of water level in urban and rural waterlogging provided by an embodiment of the present invention. Figure 1As shown, the method includes steps 101 to 105, each of which is specifically as follows:
[0057] Step 101: Acquire a first image of a physical water gauge, perform water gauge recognition on the first image, and acquire physical water gauge scale data.
[0058] In this embodiment, step 101 is specifically as follows:
[0059] A captured image containing a physical water gauge is collected, and operations of filtering, denoising, and removing mosaic images are performed on the captured image, thereby obtaining a first image of the physical water gauge.
[0060] The water ruler is identified on the first image, and the position bounding box data of the water ruler and the graduation bounding box data of the water ruler scale in the first image are obtained.
[0061] The intersection and union ratio data between each graduation bounding box data and the water gauge position bounding box data is calculated and obtained.
[0062] The graduation bounding box data whose intersection-and-union ratio data is greater than the first preset value is retained to generate physical water gauge scale data; wherein, the graduation bounding box data whose intersection-and-union ratio data is less than the first preset value is regarded as misidentified data and is excluded.
[0063] Preferably, feature extraction is performed on the first image, the acquired features are input into a neural network for recognition, and multi-scale features are used to perform object detection and classification.
[0064] Preferably, the captured image needs to include picture data of a bar-shaped water level scale with E and numbers alternating therebetween.
[0065] Preferably, a water gauge recognition model is used to perform water gauge recognition on the first image.
[0066] Step 102: Calculate the discrete degree and adjacent spacing of the physical water gauge scale data to obtain difference data, and correct the physical water gauge scale data according to the difference data, thereby generating virtual water gauge information.
[0067] In this embodiment, step 102 is specifically as follows:
[0068] The discrete degree data and adjacent spacing data of each physical water gauge scale data are subtracted to obtain difference data.
[0069] For physical water level scale data whose difference data is greater than the second preset value, the second preset value is used to replace the difference data, thereby correcting the physical water level scale data whose difference data is greater than the second preset value; wherein, the physical water level scale data whose corrected difference data is greater than the second preset value is regarded as missed physical water level scale data and is corrected.
[0070] All difference data are corrected to be less than or equal to a second preset value, and the corrected physical water gauge scale data are differentially processed to obtain virtual water gauge information.
[0071] Step 103: Segment the first image into water areas to obtain water level position information.
[0072] In this embodiment, step 103 is specifically as follows:
[0073] The first image is input into a neural network for recognition, context information is captured, and edge semantic information is repaired, thereby segmenting the water area.
[0074] The water level position information is obtained according to the segmented water area and the position of the physical water gauge in the first image.
[0075] Preferably, a water area segmentation model is used to perform water area segmentation.
[0076] Step 104: Calculate the waterlogging depth based on the virtual water gauge information and the water level line position information.
[0077] In this embodiment, step 104 is specifically as follows:
[0078] Preferably, according to any one of steps 101 to 104, the smart water conservancy urban and rural waterlogging water level monitoring and early warning method, after calculating the waterlogging depth, also includes: obtaining a second image of the water gauge, segmenting the water area of the second image, and obtaining water level line position data; wherein the water gauge position of the second image is the same as the water gauge position of the first image; and calculating the waterlogging depth of the second image based on the generated virtual water gauge information and the water level line position data of the second image.
[0079] Step 105: When the waterlogging depth is greater than a preset value, a warning signal is issued.
[0080] See also Figure 2 , Figure 2 It is a structural schematic diagram of a smart water conservancy urban and rural waterlogging water level monitoring and early warning device provided by an embodiment of the present invention, including: a water gauge acquisition module 201, a water gauge correction module 202, a water area segmentation module 203, a depth calculation module 204 and an early warning module 205.
[0081] The water gauge acquisition module 201 is used to acquire a first image of a physical water gauge, perform water gauge recognition on the first image, and acquire physical water gauge scale data.
[0082] The water gauge correction module 202 is used to calculate the discrete degree and adjacent spacing of the physical water gauge scale data, obtain difference data, and correct the physical water gauge scale data according to the difference data, thereby generating virtual water gauge information.
[0083] The water area segmentation module 203 is used to perform water area segmentation on the first image to obtain water level position information.
[0084] The depth calculation module 204 is used to calculate the waterlogging depth according to the virtual water gauge information data and the water level line position information.
[0085] The warning module 205 is used to send out a warning signal when the waterlogging depth is greater than a preset value.
[0086] Preferably, the water gauge acquisition module 201 includes: an acquisition unit, a calculation unit and a screening unit.
[0087] The acquisition unit is used to perform water ruler recognition on the first image, and acquire the position bounding box data of the water ruler in the first image, and the graduation bounding box data of the water ruler scale.
[0088] The calculation unit is used to calculate and obtain the intersection-and-union ratio data between each graduation bounding box data and the position bounding box data of the water ruler.
[0089] The screening unit is used to retain the graduation bounding box data whose intersection-over-union ratio data is greater than a first preset value, and generate physical water ruler scale data.
[0090] Preferably, the water gauge correction module 202 includes: a difference making unit, a correction unit and a difference processing unit;
[0091] The difference unit is used to perform difference processing on the discrete degree data and adjacent spacing data of each physical water gauge scale data to obtain difference data;
[0092] The correction unit is used for replacing the difference data of the physical water gauge scale data whose difference data is greater than the second preset value with the second preset value, thereby correcting the physical water gauge scale data whose difference data is greater than the second preset value;
[0093] The differential processing unit is used to correct all the difference data to be less than or equal to a second preset value, and perform differential processing on the corrected physical water gauge scale data, so as to obtain the virtual water gauge information.
[0094] See also Figure 3 , Figure 3 FIG. 1 is a flow chart of a smart water conservancy urban and rural waterlogging water level monitoring and early warning method provided by another embodiment of the present invention, such as Figure 3 As shown, the method includes steps 301 to 304, and each step is specifically as follows:
[0095] Step 301: collect the water level gauge image taken by the city camera, input the image data containing the water level gauge, and pre-process the image to judge the mosaic phenomenon. If it is judged to be a mosaic image, it will be screened out; if it is judged to be a non-mosaic image, proceed to the next step.
[0096] Step 302: Perform initialization judgment of the virtual water ruler on the camera device of the site that acquires the image. If the initialization is not performed, input the non-mosaic image into the water ruler recognition model to obtain the physical water ruler scale; calculate whether there is any missing or misidentification of the physical water ruler scale through the water ruler verification algorithm, and use the water ruler correction algorithm to automatically correct the missed physical water ruler scale and adaptively generate the virtual water ruler. Finally, save the generated virtual water ruler information to complete the device initialization, and then proceed to the next step;
[0097] If the camera device of the site that acquires the image has completed initialization, proceed directly to the next step.
[0098] Step 303: Input the non-mosaic image obtained in step 301 into the water segmentation model to obtain the segmented water area, and combine it with the virtual water ruler obtained by initializing the device in step 302.
[0099] Step 304: Calculate the waterlogging depth using the segmented water area obtained in step 303 and the virtual water gauge obtained by initializing the site camera device in step 302.
[0100] See also Figure 4 , Figure 4 FIG. 1 is a flow chart of a water gauge calibration algorithm provided by an embodiment of the present invention. Figure 4 As shown, the method includes steps 401 to 404, each of which is as follows:
[0101] Step 401: Perform target detection on the image containing the water ruler to determine whether it contains the water ruler scale and the water ruler area. If one or more of the water ruler scale and the water ruler area are missing, the recognition fails; if both the water ruler scale and the water ruler area are included, proceed to the next step.
[0102] Step 402: Calculate the area bounding box data of the water ruler and the scale bounding box data of each water ruler respectively, and obtain the intersection-and-union ratio between the area bounding box data of the water ruler and the scale bounding box data of each water ruler.
[0103] By comparing the intersection-and-union ratio with the set threshold, it is determined whether the water gauge scale belongs to the water gauge area, the scale bounding box data smaller than the threshold is screened out, and the scale bounding box data larger than the set threshold is grouped into a set to obtain a preliminary virtual water gauge.
[0104] Step 403: Calculate the discrete degree and adjacent spacing of each scale bounding box data in the preliminary virtual water ruler, and make a difference between the discrete degree and the adjacent spacing.
[0105] At the same time, the obtained difference is compared with the adaptive threshold to determine whether there is any water gauge scale missed recognition; the difference greater than the adaptive threshold is replaced by the adaptive threshold to correct the scale bounding box data, and the difference is compared with the adaptive threshold again.
[0106] When the discreteness and adjacent spacing difference of all scale bounding box data in the preliminary virtual water gauge are less than the threshold, a complete virtual water gauge is obtained.
[0107] Preferably, for the difference value greater than the adaptive threshold, the mean value may be used to replace it, so as to correct the scale bounding box data.
[0108] Step 404: Perform differential processing on the complete virtual water ruler to obtain a complete cm-level virtual water ruler.
[0109] See also Figure 5 , Figure 5 FIG. 1 is a schematic diagram of a training process of a water gauge recognition model and a water area segmentation model provided by an embodiment of the present invention. Figure 5 As shown, specifically:
[0110] The image data containing the water gauge is obtained, and the preprocessing of filtering, denoising and removing mosaic images is performed.
[0111] According to the data required by the water gauge recognition model and the water area segmentation model, the preprocessed images are divided into the data set of the water gauge recognition model and the data set of the water area segmentation model; and the data sets of the two models are split into training set, validation set and test set according to a certain proportion.
[0112] Preferably, the data sets of the two models can be split in a ratio of 7:2:1.
[0113] Preferably, for the water gauge recognition model: use CNN for feature extraction, and use darknet neural network, and divide the output categories of the model into water gauge and scale, use multi-scale features for object detection, and use Logistic for object classification.
[0114] Preferably, the neural network of the water gauge recognition model can use RCNN and SSD.
[0115] Preferably, for the water segmentation model, the deeplab series of neural networks are used to increase the receptive field, capture rich contextual information through pooling operations at different resolutions, and use an encoding and decoding structure to repair edge semantic information.
[0116] Preferably, the neural network of the water segmentation model can use Mask-RCNN and U-net, and the encoding and decoding structure can use Encoder-Decoder.
[0117] Preferably, the network of the water gauge recognition model and the network of the water area segmentation model are trained using unfrozen convolutional layers, and finally the final water gauge recognition model and water area segmentation model are obtained.
[0118] See also Figure 6 , Figure 6 FIG. 1 is a schematic diagram of the result of generating a virtual water gauge according to an embodiment of the present invention. Figure 6 As shown: A virtual water gauge with obvious digital and position marks is generated at the location of the physical water gauge in the image.
[0119] See also Figure 7 , Figure 7 is a schematic diagram of the result of waterlogging depth provided by an embodiment of the present invention, such as Figure 7 As shown: the water area in the image is separated from other scene elements, and combined with the information of the virtual water gauge, the data waterlevel: 97.0cm is obtained, which is the depth of the waterlogging.
[0120] See also Figure 8 , Figure 8 It is a schematic diagram of the structure of a terminal device provided in one embodiment of the present invention.
[0121] A terminal device of this embodiment includes: a processor 801, a memory 802, and a computer program stored in the memory 802 and executable on the processor 801. When the processor 801 executes the computer program, the steps of the above-mentioned smart water conservancy urban and rural waterlogging water level monitoring and early warning method in the embodiment are implemented, for example Figure 1 Alternatively, when the processor executes the computer program, the functions of each module in the above-mentioned device embodiments are realized, for example: Figure 2 All modules of the smart water conservancy urban and rural waterlogging water level monitoring and early warning device shown.
[0122] In addition, an embodiment of the present invention also provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the smart water conservancy urban and rural waterlogging water level monitoring and early warning method as described in any of the above embodiments.
[0123] Those skilled in the art will understand that the schematic diagram is merely an example of a terminal device and does not constitute a limitation on the terminal device. The terminal device may include more or fewer components than shown in the diagram, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.
[0124] The processor 801 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor 801 is the control center of the terminal device, and uses various interfaces and lines to connect various parts of the entire terminal device.
[0125] The memory 802 can be used to store the computer program and / or module, and the processor 801 implements various functions of the terminal device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory 802. The memory 802 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0126] Wherein, if the module / unit integrated in the terminal device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0127] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.
[0128] As can be seen from the above, the present invention provides a smart water conservancy urban and rural waterlogging water level monitoring and early warning method and device. The present invention uses a semantic segmentation method to segment the water area, and combines it with a virtual water gauge for calculation, so that the recognition accuracy is accurate to the cm level, which greatly improves the accuracy of obtaining the depth of waterlogging. Based on the waterlogging depth detection method provided by the present invention, real-time monitoring of water safety can be carried out in combination with video monitoring, achieving the purpose of obtaining the depth of waterlogging at a long distance, improving the efficiency and timeliness of obtaining the depth of waterlogging, and being conducive to the construction of an urban waterlogging early warning system. It can minimize the harm caused by urban waterlogging, thereby protecting the city's economic construction and people's property safety.
[0129] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A smart water conservancy urban and rural waterlogging water level monitoring and early warning method, characterized in that: include: Acquire a first image of a physical water gauge, perform water gauge recognition on the first image, and acquire physical water gauge scale data; Calculating the discrete degree and adjacent spacing of the physical water gauge scale data to obtain difference data, and correcting the physical water gauge scale data according to the difference data, thereby generating virtual water gauge information; Performing water segmentation on the first image to obtain water level position information; Calculate the waterlogging depth according to the virtual water gauge information and the water level line position information; When the waterlogging depth exceeds the preset value, an early warning signal is issued; The step of calculating the discrete degree and adjacent spacing of the physical water gauge scale data to obtain difference data, and correcting the physical water gauge scale data according to the difference data to generate virtual water gauge information is as follows: Performing difference processing on the discrete degree data and adjacent spacing data of each of the physical water gauge scale data to obtain difference data; For the physical water gauge scale data whose difference data is greater than the second preset value, the difference data is replaced by the second preset value, thereby correcting the physical water gauge scale data whose difference data is greater than the second preset value; Correcting all the difference data to be less than or equal to a second preset value, and performing differential processing on the corrected physical water gauge scale data, thereby obtaining the virtual water gauge information; The water gauge recognition is performed on the first image to obtain the physical water gauge scale data, specifically: Performing water ruler recognition on the first image, obtaining position bounding box data of the water ruler in the first image, and graduation bounding box data of the water ruler scale; Calculate and obtain the intersection-and-union ratio data between each of the graduation bounding box data and the position bounding box data of the water ruler; The graduation bounding box data whose intersection-over-union ratio data is greater than a first preset value is retained to generate the physical water ruler scale data.
2. The smart water conservancy urban and rural waterlogging water level monitoring and early warning method according to claim 1 is characterized in that: The performing water level recognition on the first image is specifically: Feature extraction is performed on the first image, the acquired features are input into a neural network for recognition, and multi-scale features are used to perform object detection and classification.
3. The smart water conservancy urban and rural waterlogging water level monitoring and early warning method according to any one of claims 1 to 2 is characterized in that: After calculating and obtaining the waterlogging depth according to the virtual water gauge information and the water level line position information, the method further includes: Acquire a second image of the water gauge, perform water segmentation on the second image, and obtain water level position data; wherein the water gauge position of the second image is the same as the water gauge position of the first image; The waterlogging depth of the second image is calculated based on the generated virtual water gauge information and the water level position data of the second image.
4. The smart water conservancy urban and rural waterlogging water level monitoring and early warning method according to claim 1 is characterized in that: The performing water segmentation on the first image to obtain water level position information is specifically as follows: Inputting the first image into a neural network for recognition, capturing context information, and repairing edge semantic information, thereby segmenting the water area; The water level position information is obtained according to the segmented water area and the position of the physical water gauge in the first image.
5. The smart water conservancy urban and rural waterlogging water level monitoring and early warning method according to claim 1 is characterized in that: The obtaining of the first image of the physical water gauge is specifically as follows: A captured image containing a physical water gauge is collected, and operations of filtering, denoising, and removing mosaic images are performed on the captured image, so as to obtain a first image of the physical water gauge.
6. A smart water conservancy urban and rural waterlogging water level monitoring and early warning device, characterized in that: include: Water gauge acquisition module, water gauge correction module, water area segmentation module, depth calculation module and early warning module; The water ruler acquisition module is used to acquire a first image of a physical water ruler, perform water ruler recognition on the first image, and acquire physical water ruler scale data; The water gauge correction module is used to calculate the discrete degree and adjacent spacing of the physical water gauge scale data, obtain difference data, and correct the physical water gauge scale data according to the difference data, thereby generating virtual water gauge information; The water area segmentation module is used to perform water area segmentation on the first image to obtain water level position information; The depth calculation module is used to calculate the waterlogging depth according to the virtual water gauge information and the water level line position information; The warning module is used to send out a warning signal when the waterlogging depth is greater than a preset value; Wherein, the water gauge correction module includes: a difference making unit, a correction unit and a difference processing unit; Wherein, the difference unit is used to perform difference processing on the discrete degree data and adjacent spacing data of each physical water gauge scale data to obtain difference data; The correction unit is used for replacing the difference data of the physical water gauge scale data whose difference data is greater than the second preset value with the second preset value, thereby correcting the physical water gauge scale data whose difference data is greater than the second preset value; The differential processing unit is used to correct all the difference data to be less than or equal to a second preset value, and perform differential processing on the corrected physical water gauge scale data, so as to obtain the virtual water gauge information; Wherein, the water gauge acquisition module includes: an acquisition unit, a calculation unit and a screening unit; The acquisition unit is used to perform water ruler recognition on the first image, and acquire the position bounding box data of the water ruler and the graduation bounding box data of the water ruler scale in the first image; The calculation unit is used to calculate and obtain the intersection-and-joint ratio data between each of the graduation bounding box data and the position bounding box data of the water ruler; The screening unit is used to retain the graduation bounding box data whose intersection-over-union ratio data is greater than a first preset value, and generate the physical water ruler scale data.
Citation Information
Patent Citations
A Water Level Recognition Method Based on Image Semantic Segmentation
CN110956172B
Method for automatically identifying meter pointer
CN107490398A
Ship water gauge reading automatic identification method based on multi-model fusion
CN112598001A
Water gauge-free water level measuring device and water level calibration method
CN113074797A