Risk water body abnormal condition early warning method, system, equipment and medium

By segmenting and differentiating video data from high-risk water monitoring areas, and combining this with a target detection model to determine the distance between the water body and people, the problem of migratory flood warnings for rivers in different areas has been solved, enabling accurate early warnings of abnormal situations in high-risk water bodies.

CN119296004AActive Publication Date: 2025-01-10CHENGDU UNIV OF INFORMATION TECH
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411416920.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-01-10
Estimated Expiration
2044-10-11

AI Technical Summary

Technical Problem

Existing deep learning-based video surveillance disaster early warning systems have poor mobility in river flood warnings across different regions, making it difficult to accurately warn of abnormal situations in risky water bodies in different areas.

Method used

By acquiring video data of the monitored area of ​​the risky water body, the baseline water body mask image under no-risk conditions and the water body mask image at the current moment are segmented and extracted. The degree and speed of change are calculated by differential calculation, and the distance relationship between the water body and the population is determined by combining the target detection model to determine the number of people at risk and finally issue an early warning.

Benefits of technology

It enables accurate early warning of abnormal water conditions in different regions, has universality and strong mobility, does not require a large amount of historical disaster data for training, and the basic video data is easy to obtain, and can identify abnormal water risk situations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119296004A_ABST
    Figure CN119296004A_ABST
Patent Text Reader

Abstract

The invention provides a risky water body abnormal condition early warning method, system, equipment and medium, and belongs to the field of image processing, and the method comprises the following steps: obtaining risky water body video data, and inputting the risky water body video data into an object segmentation model to obtain a reference water body mask image, a water body mask image at the current moment and a water body mask image at the previous moment; carrying out difference on the reference water body mask image and the mask image at the current moment to obtain a first change pixel percentage, and judging the change degree of the water body; carrying out difference on the water body mask image at the current moment and the water body mask image at the previous moment to obtain a second pixel change percentage, and judging the change speed of the water body; inputting the video data into a target detection model, and detecting risk crowds and the number of the risk crowds; and performing early warning on the risky water body according to the change degree and the change speed of the water body, the risky crowds in the water body and the number thereof. The method can be applied to river flood early warning in different regions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of image processing, and in particular relates to a method, system, equipment and medium for early warning of abnormal conditions in risky water bodies. Background Art

[0002] At present, the handling of natural disasters is divided into three stages: disaster warning, disaster rescue, and post-disaster reconstruction. The warning stage mainly uses statistical models based on historical data and monitoring models based on on-site monitoring equipment. For the monitoring model of on-site monitoring equipment, although video surveillance has developed rapidly in recent years, the processing method is relatively primitive and requires a lot of manpower.

[0003] The video surveillance disaster warning system based on deep learning breaks through the shortcomings of traditional video surveillance, reduces dependence on manual operation, and can accurately detect potential dangers in real time. The video surveillance disaster warning system based on deep learning uses deep learning algorithms to analyze surveillance videos, monitor risk water bodies, identify the occurrence of flash floods and issue warning notices in a timely manner. Relevant departments and personnel can take countermeasures earlier to reduce the losses caused by flash floods.

[0004] In the current research on the application of deep learning in disaster areas, Xia Hong coupled the deep learning model (LSTM) based on the hydrodynamic model, and established a river flood prediction model that coupled deep learning and hydrodynamics, realizing the prediction of the downstream river flooding range by the rainfall in the upstream basin. Wu Junnan proposed a double-layer LSTM landslide prediction model based on the attention mechanism based on single-sequence landslide data, which solved the problem that the backward time information in the historical data cannot be well utilized in the single-layer LSTM.

[0005] However, LSTM model training requires a large amount of long-term raw data series and has poor mobility, making it difficult to apply to river flood warnings in different regions, resulting in the inability to accurately warn of abnormal risk water conditions in different regions. Summary of the invention

[0006] In order to overcome the deficiency of the above-mentioned prior art that it is not possible to accurately warn of abnormal risk water conditions in different areas, the present invention provides a method for warning of abnormal risk water conditions, comprising the following steps:

[0007] Obtain video data of risk water monitoring areas;

[0008] Segmenting the video data, and dynamically extracting a reference water body mask image in a risk-free state, a water body mask image at a current moment, and a water body mask image at a previous moment adjacent to the current moment;

[0009] The reference water body mask image and the mask image at the current moment are differentiated to obtain a first percentage of changed pixels, and the degree of change of the water body is judged by the first percentage of changed pixels; the water body mask image at the current moment and the water body mask image at the previous moment adjacent to the current moment are differentiated to obtain a second percentage of changed pixels, and the change speed of the water body is judged by the second percentage of changed pixels;

[0010] Input the video data into the target detection model, detect the crowd in the risk water body monitoring area, judge the distance relationship between the water body and the crowd, and determine the risk crowd and the number of risk crowd according to the distance relationship. The risk crowd refers to the crowd active in the monitoring area or the residents living in the monitoring area;

[0011] Early warnings will be issued for risky water bodies based on the degree of change in the water body, the speed of change in the water body, the risk population and the number of risk population.

[0012] Preferably, the step of performing a difference between the reference water body mask image and the mask image at the current moment to obtain a first percentage of changed pixels comprises the following steps:

[0013] Difference is performed between the reference water body mask image and the mask image at the current moment to obtain a water body mask difference image;

[0014] De-noising the water mask difference image by specifying a threshold;

[0015] The number of changed pixels in the water body mask difference image after the denoising process is counted, and a first changed pixel percentage is obtained according to the number of changed pixels.

[0016] Preferably, the step of performing a difference between the water body mask image at the current moment and the water body mask image at a previous moment adjacent to the current moment to obtain the second pixel change percentage comprises the following steps:

[0017] The water body mask image at the current moment is differentiated from the water body mask image at the previous moment adjacent to the current moment, so as to obtain the differential images of the two adjacent water bodies;

[0018] De-noising the difference images of two adjacent water bodies by specifying a threshold;

[0019] The number of changed pixels in two adjacent differential images of the water body after the denoising process is counted, and a second changed pixel percentage is obtained according to the number of changed pixels.

[0020] Preferably, before inputting the video data into the target detection model, the target detection model is trained, including the following steps:

[0021] Obtain a video image dataset containing risk groups;

[0022] Label the risk groups in the video image dataset;

[0023] The data in the labeled dataset is input into the target detection model to obtain a trained target detection model.

[0024] Preferably, determining the risk group and the number of risk groups according to the distance relationship comprises the following steps:

[0025] Use the depth estimation model ZoeDepth to generate depth estimation maps of different entity types such as water bodies, ground objects, and people;

[0026] The spatial distance relationship between the population and water bodies and land objects is judged based on the depth estimation maps of different entity types, and the risk population and its number are determined according to the risk threshold of the spatial distance relationship.

[0027] Preferably, before inputting the video data into the target detection model, the process also includes preprocessing the video data, specifically, resampling and image transforming the video data.

[0028] Preferably, before performing the differentiation between the baseline water body mask image and the mask image at the current moment and the differentiation between the water body mask image at the current moment and the water body mask image at the previous moment adjacent to the current moment, it also includes converting the baseline water body mask image, the mask image at the current moment and the water body mask image at the previous moment adjacent to the current moment into grayscale images.

[0029] The present invention also provides an abnormal risk water body early warning system, comprising:

[0030] A data acquisition module is used to acquire video data of the risk water body monitoring area;

[0031] An image acquisition module, used to segment the video data, and dynamically extract a reference water mask image in a risk-free state, a water mask image at a current moment, and a water mask image at a previous moment adjacent to the current moment;

[0032] The data processing module is used to perform a difference between the reference water body mask image and the mask image at the current moment to obtain a first percentage of changed pixels, and judge the degree of change of the water body by the first percentage of changed pixels; perform a difference between the water body mask image at the current moment and the water body mask image at a previous moment adjacent to the current moment to obtain a second percentage of changed pixels, and judge the change speed of the water body by the second percentage of changed pixels;

[0033] The target detection module is used to input the video data into the target detection model, detect the people in the risk water body monitoring area, judge the distance relationship between the water body and the people, and determine the risk population and the number of risk population according to the distance relationship. The risk population is the people active in the monitoring area or the residents living in the monitoring area;

[0034] The risk warning module is used to issue warnings for risky water bodies based on the degree of change in the water body, the speed of change in the water body, the risk population and the number of risk populations.

[0035] The present invention also provides a computer device, including a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the risk water body abnormal situation warning method.

[0036] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the risk water body abnormal situation warning method.

[0037] The risk water body abnormal situation early warning method, system, equipment and medium provided by the present invention have the following beneficial effects:

[0038] The present invention can obtain water body mask images at different times and in different states by segmenting and extracting the acquired video data of the risk water body monitoring area. By differentiating the water body mask images at different times and in different states, the degree of change of the water body and the speed of change of the water body can be obtained; the target detection model can detect the risk population and the number of risk population; the risk water body can be warned by the obtained degree of change of the water body, the speed of change of the water body, the risk population and the number of risk population. The whole process does not require a large amount of historical disaster data for model training; basic video data is easy to obtain; the method can identify abnormal risk situations of water bodies in different regions, has universality and strong portability, and can accurately warn of abnormal situations of risk water bodies in different regions. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiment of the present invention and its design scheme, the following briefly introduces the drawings required for this embodiment. 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 creative work.

[0040] Figure 1 This is a flow chart of the early warning method for abnormal conditions in risky water bodies;

[0041] Figure 2 Extraction flow chart for benchmark state mask of risk water bodies;

[0042] Figure 3 Design a flow chart for the risk water body abnormal warning system interface. DETAILED DESCRIPTION

[0043] In order to enable those skilled in the art to better understand the technical solution of the present invention and implement it, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the scope of protection of the present invention.

[0044] Example

[0045] The present invention provides a method for early warning of abnormal conditions in risky water bodies, specifically Figure 1 As shown, the following steps are included:

[0046] Step 1: Obtain video data of the risk water monitoring area.

[0047] A risky water body refers to a water body whose surface is relatively calm, but which may experience a large-scale rise in water due to a large influx of water.

[0048] Real-time monitoring of video data and recorded playback of video data, use OpenCV to read video data, and capture single-frame images for preprocessing.

[0049] Step 2: Input the video data into the Grounded SAM image segmentation model, dynamically extract the baseline water mask image in the risk-free state, the water mask image at the current moment, and the water mask image at the previous moment adjacent to the current moment; differentiate the baseline water mask image and the mask image at the current moment to obtain the first changed pixel percentage, and judge the degree of change of the water body by the first changed pixel percentage; differentiate the water mask image at the current moment and the water mask image at the previous moment adjacent to the current moment to obtain the second pixel change percentage, and judge the change speed of the water body by the second pixel change percentage.

[0050] Grounded SAM is a powerful zero-shot vision application developed and designed by a professional team led by IDEA. Grounded SAM mainly consists of two models: Grounding DINO and SAM.

[0051] Among them, the SAM model is a zero-sample segmentation model, the full name of which is SegmentAnything Model. It is a groundbreaking image segmentation model that aims to solve the difficult problems in the field of image segmentation and achieve accurate image segmentation without the need for specific annotations or training data.

[0052] Grounding DINO is an advanced zero-shot object detection model that can detect specified targets based on text descriptions. In terms of model architecture, Grounding DINO uses a transformer structure, which makes it close to a natural language processing model and easier to process images and text at the same time.

[0053] In this embodiment, the mask image of the water body is obtained through the Grounded SAM model. When the page loads data, the initial stable state image is saved and placed in the page according to the selected model. The SAM model is used to distinguish different types of entities in the scene to form spatial BOX object blocks of different entities. The water body object blocks in the initial image are processed to obtain the initial water body mask image (i.e., the reference water body mask image). Figure 2 (As shown) Each time the model processes, it obtains the water body mask image of the current frame, and differentiates the mask image at this moment from the mask at the initial moment, counts the changed pixels and calculates the percentage, which can reflect the degree of change of the water body. At the same time, the mask of the water body at this moment is differentiated from the mask image obtained in the previous processing and the percentage is counted to judge the speed of change of the water body. For the processed image, the resolution is transformed using the method provided by Open CV and placed on the page for display.

[0054] Since the mask image directly extracted from the image may have flying blocks, holes and the like, the present invention also uses morphological processing to splice the extracted mask image water bodies together and remove invalid flying blocks.

[0055] Step 3: Video data is input into the target detection model to detect the people in the risk water monitoring area, determine the distance relationship between the water body and the people, and determine the risk population and the number of risk population based on the distance relationship. The risk population refers to the people active in the monitoring area or the residents living in the monitoring area.

[0056] YOLOv5 is a popular target monitoring algorithm, which is fast and efficient in performing target detection tasks. Therefore, the target detection model used in the present invention is the YOLOv5 target detection model to detect people in the picture.

[0057] YOLOv5 has made many improvements in model structure and performance. YOLOv5 introduces a lightweight model design that significantly improves the inference speed while maintaining high accuracy by using techniques such as small convolution kernels and depthwise separable convolution.

[0058] In the overall architecture of YOLOv5, the image is first processed through the input layer and then sent to the backbone network (Backbone). Backbone is usually a powerful feature extraction network, such as EfficientNet or ResNet. Next, the feature maps of different layers are fused through the feature fusion network (Neck) to improve the detection performance. Finally, the generated feature maps are sent to the Head module, and the bounding boxes and category confidence scores are generated based on these feature maps.

[0059] YOLOv5's lightweight model design, multi-scale training and reasoning mechanism, and powerful post-processing technology give it a significant advantage in the field of target detection. Therefore, the YOLOv5 model and the official pre-trained weights can be combined to complete the detection of people in images.

[0060] Before using the video data to input the YOLOv5 target detection model, the YOLOv5 target detection model is also trained, including the following steps:

[0061] Obtain a video image dataset containing risk groups;

[0062] Label the risk groups in the video image dataset;

[0063] The data in the labeled dataset is input into the YOLOv5 target detection model to obtain a trained YOLOv5 target detection model.

[0064] In the present invention, firstly, the video data is preprocessed, that is, the captured video frames (video data) are resampled and image transformed; secondly, the YOLOv5 target detection model is trained, and the specific process is: obtaining a video image data set containing risk groups; marking the risk groups in the video image data set; inputting the data in the marked data set into the YOLOv5 target detection model to obtain a trained YOLOv5 target detection model; then, inputting the video data of the risk water body monitoring area into YOLOv5 to detect the people in the risk water body monitoring area; finally, judging the distance relationship between the water body and the people, and determining the risk groups and the number of risk groups according to the distance relationship, specifically: using the depth estimation model ZoeDepth to generate depth estimation maps of different entity types of water bodies, land objects and people; judging the spatial distance relationship between the people and the water bodies and land objects based on the depth estimation maps of different entity types, and determining the risk groups and the number of risk groups according to the risk threshold of the spatial distance relationship.

[0065] Step 4: Issue early warning for risky water bodies based on the degree of change in the water body, the speed of change in the water body, the risk population and the number of risk population.

[0066] Risk warnings are issued based on judgment factors such as the water body change degree threshold, water body change speed threshold, and spatial distance relationship risk threshold.

[0067] The present invention also provides a risk water body abnormal situation warning system, including a data acquisition module, an image acquisition module, a data processing module, a target detection module and a risk warning module. The data acquisition module is used to acquire video data of the risk water body monitoring area; the image acquisition module is used to segment the video data, dynamically extract the reference water body mask image in a risk-free state, the water body mask image at the current moment, and the water body mask image at the previous moment adjacent to the current moment; the data processing module is used to differentiate the reference water body mask image and the mask image at the current moment to obtain a first change pixel percentage, and judge the degree of change of the water body by the first change pixel percentage; the water body mask image at the current moment and the water body mask image at the previous moment adjacent to the current moment are differentiated to obtain a second pixel change percentage, and judge the change speed of the water body by the second pixel change percentage; the target detection module is used to input the video data into the target detection model, detect the crowd in the risk water body monitoring area, judge the distance relationship between the water body and the crowd, and determine the risk crowd and the number of the risk crowd according to the distance relationship. The risk crowd is the crowd active in the monitoring area or the residents living in the monitoring area.

[0068] The risk warning module is used to issue warnings for risky water bodies based on the degree of change in the water body, the speed of change in the water body, the risk population and the number of risk populations.

[0069] The present invention also provides a computer device, including a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the risk water body abnormal situation warning method.

[0070] The present invention also provides a computer-readable storage medium, which stores a computer program. The computer program is suitable for being loaded by a processor to execute a method for early warning of abnormal risk water conditions.

[0071] The present invention also includes configuring the development environment, which is specifically divided into three main sections: basic environment configuration, deep learning module configuration, and Qt interface design module configuration. The basic environment configuration includes the installation of python and the configuration of Anaconda. The configuration of the deep learning module is divided into two parts, namely the configuration of YOLOv5 dependencies and the configuration of GeoundedSAM model dependencies. The configuration of the Qt interface design module includes the installation of the PyQt5Python package and the configuration of the Qt interface development tool Qt Designer.

[0072] In order to perform the method of the present invention, the present invention sets the following configuration:

[0073] 1. Configuration of basic environment

[0074] The configuration of the basic environment is the configuration of the basic development tools, including Python, Anaconda, and PyCharm. PyCharm is an IDE (Integrated Development Environment) tool provided by JetBrains, which integrates a series of development functions, such as automatic code completion, automatic format update, error prompts, etc. Anaconda is a Python distribution for scientific computing, which supports Linux, Mac, and Windows. It contains many popular Python packages for scientific computing and data analysis. The Conda command provided by Anaconda can quickly and conveniently manage multiple Python environments, and each Python environment exists independently. The steps for basic environment configuration are as follows:

[0075] (1) Use the conda command in the command line window provided by Anaconda to create a Python virtual environment. Open Anaconda prompt and enter the following command to create a virtual environment:

[0076] conda create–n hdcpython=3.10.13

[0077] (2) Configure the virtual environment in PyCharm and select the existing Conda environment under the Pycharm "file\setting\projection\Pythoninterpreter" path. The interpreter path is configured as "F:\anaconda1\envs\hdc\python.exe" and the conda executable file is configured as "F:\anaconda1\Scripts\conda.exe".

[0078] 2. Configuration of Deep Learning Module

[0079] The configuration of the deep learning module is divided into two parts, YOLOv5 model dependency configuration and Grounded SAM model dependency configuration. The model configuration steps are as follows:

[0080] (1) Install Pytorch. Open Anaconda prompt and enter the following command to install Pytorch:

[0081] Conda installpytorch=2.0.0torchvision==0.15.0torchaudio==2.0.0

[0082] cpuonly–cpytorch

[0083] (2) Install dependencies. In the Anaconda prompt window, use the cd command to enter the main directory of YOLOv5 and run the following command:

[0084] Pip install –r requirements.txt

[0085] (3) Install Segment-Anything and Grounded DINO. In the Anaconda prompt window, use the cd command to enter the Grounded SAM project main directory and run the following two commands:

[0086] Python-mpip install–e segment-anything

[0087] Python-mpip install–egroundingDINO

[0088] (4) In the Anaconda prompt window, use the command line cd command to enter the grounded-sam-os x folder and execute bash install.sh. When all packages are successfully installed without any errors, the related dependencies are installed successfully.

[0089] (5) Install other dependencies using the following command:

[0090] pip install opencv-pythonpycootools matplotlib onnxryntime onnx

[0091] ipykernel

[0092] 3. Qt interface design module configuration

[0093] The configuration of Qt interface design mainly includes two aspects: first, installing Qt's python library PyQt5 and PyQt5-tools, and second, configuring the interface design tool.

[0094] (1) Installation of Qt library in Python: Enter the pip command in the Anaconda prompt window to install the Qt Python package. The command is as follows:

[0095] pip install PyQt5

[0096] pip install pyqt5-tools

[0097] (2) To configure the interface design tool, configure the tool parameters under "file\setting\tools\external tools" in PyCharm. Create a new tool, Qt Designer, with the program path as "F:\anaconda1\Librar y\bin\designer.exe" and the working directory as "$FileDir$". Use the same method to configure the UIC tool, which can convert QtDesigner's UI files into Python code.

[0098] 4. Design of system interface

[0099] The main interface of the system is designed mainly with Qt Designer. When designing the interface with Qt Designer, you can drag and drop controls to load them onto the interface. The entire interface layout uses the vertical layout of QVerticalLayout to be divided into two parts, upper and lower. The first block is divided into two parts with the horizontal layout of QHorizontal Layout. The first area is used to place the Tab Widget control to display the monitoring screen. The second block is laid out with QVerticalLayout, and 3 QGroupBoxes are placed in the vertical layout to place buttons. The second part of the entire page is a QHoritontal Layout layout, with 3 QLayout controls placed horizontally to place processed image information. The design idea is as follows Figure 3 shown.

[0100] 5. Historical information viewing window

[0101] The design of the historical information viewing window is also designed using Qt Designer. The layout of the entire interface is a QVertical Layout vertical layout, on which three controls are added. The first part is the QSlider module, which is a sliding module that can be dragged with the mouse to control historical data. The second part is the Qhorizontal Layout layout, in which a QGroup Layout is arranged to encapsulate four QLabel controls to display text information. Two QLabel controls are arranged at the back to display the baseline image and the original image being processed. The third part is a Qhorizontal Layout layout, in which three QLabel controls are placed to display the detection image, the foreground image processed by the Gaussian mixture model, and the image after the difference with the baseline image (such as Figure 3 shown).

[0102] 6. Model Management Implementation

[0103] The video data is played using the Qtimer control, which calls the specified function after the set time interval. Therefore, the video playback effect can be achieved by calling the Qtimer at the specified time to obtain the video frame and display the video frame.

[0104] The call and control of the model are also implemented by Qtimer control. Considering the consumption of the system, different models are called at different times, and multiple Qtimer controls can be used to control the call of different models.

[0105] The embodiments described above are only preferred specific implementation modes of the present invention, and the protection scope of the present invention is not limited thereto. Any simple changes or equivalent replacements of the technical solutions that can be obviously obtained by any technician familiar with the field within the technical scope disclosed in the present invention belong to the protection scope of the present invention.

Claims

1. A method for early warning of abnormal conditions in risky water bodies, characterized in that: The steps include: Obtain video data of risk water monitoring areas; Segmenting the video data, and dynamically extracting a reference water body mask image in a risk-free state, a water body mask image at a current moment, and a water body mask image at a previous moment adjacent to the current moment; The reference water body mask image and the mask image at the current moment are differentiated to obtain a first percentage of changed pixels, and the degree of change of the water body is judged by the first percentage of changed pixels; the water body mask image at the current moment and the water body mask image at the previous moment adjacent to the current moment are differentiated to obtain a second percentage of changed pixels, and the change speed of the water body is judged by the second percentage of changed pixels; Input the video data into the target detection model, detect the crowd in the risk water body monitoring area, judge the distance relationship between the water body and the crowd, and determine the risk crowd and the number of risk crowd according to the distance relationship. The risk crowd refers to the crowd active in the monitoring area or the residents living in the monitoring area; Early warnings will be issued for risky water bodies based on the degree of change in the water body, the speed of change in the water body, the risk population and the number of risk population.

2. The method for early warning of abnormal risk water conditions according to claim 1, characterized in that: The step of performing a difference between the reference water body mask image and the mask image at the current moment to obtain a first percentage of changed pixels comprises the following steps: Difference is performed between the reference water body mask image and the mask image at the current moment to obtain a water body mask difference image; De-noising the water mask difference image by specifying a threshold; The number of changed pixels in the water body mask difference image after the denoising process is counted, and a first changed pixel percentage is obtained according to the number of changed pixels.

3. The method for early warning of abnormal risk water conditions according to claim 1, characterized in that: The step of performing a difference between the water body mask image at the current moment and the water body mask image at the previous moment adjacent to the current moment to obtain a second pixel change percentage includes the following steps: The water body mask image at the current moment is differentiated from the water body mask image at the previous moment adjacent to the current moment, so as to obtain the differential images of the two adjacent water bodies; De-noising the difference images of two adjacent water bodies by specifying a threshold; The number of changed pixels in two adjacent differential images of the water body after the denoising process is counted, and a second changed pixel percentage is obtained according to the number of changed pixels.

4. The method for early warning of abnormal risk water conditions according to claim 1 is characterized in that: Before inputting the video data into the target detection model, the target detection model is trained, including the following steps: Obtain a video image dataset containing risk groups; Label the risk groups in the video image dataset; The data in the labeled dataset is input into the target detection model to obtain a trained target detection model.

5. The method for early warning of abnormal risk water conditions according to claim 1, characterized in that: Determining the risk group and the number of risk groups according to the distance relationship includes the following steps: Use the depth estimation model ZoeDepth to generate depth estimation maps of different entity types such as water bodies, ground objects, and people; The spatial distance relationship between the population and water bodies and land objects is judged based on the depth estimation maps of different entity types, and the risk population and its number are determined according to the risk threshold of the spatial distance relationship.

6. The method for early warning of abnormal risk water conditions according to claim 1, characterized in that: Before inputting the video data into the target detection model, the video data is also preprocessed, specifically, resampling and image transformation of the video data.

7. The method for early warning of abnormal risk water conditions according to claim 1, characterized in that: Before performing the differential between the reference water body mask image and the mask image at the current moment and the differential between the water body mask image at the current moment and the water body mask image at the previous moment adjacent to the current moment, the reference water body mask image, the mask image at the current moment and the water body mask image at the previous moment adjacent to the current moment are converted into grayscale images.

8. A warning system for abnormal conditions in risky water bodies, characterized in that: include: A data acquisition module is used to acquire video data of the risk water body monitoring area; An image acquisition module, used to segment the video data, and dynamically extract a reference water mask image in a risk-free state, a water mask image at a current moment, and a water mask image at a previous moment adjacent to the current moment; The data processing module is used to perform a difference between the reference water body mask image and the mask image at the current moment to obtain a first percentage of changed pixels, and judge the degree of change of the water body by the first percentage of changed pixels; perform a difference between the water body mask image at the current moment and the water body mask image at a previous moment adjacent to the current moment to obtain a second percentage of changed pixels, and judge the change speed of the water body by the second percentage of changed pixels; The target detection module is used to input the video data into the target detection model, detect the people in the risk water body monitoring area, judge the distance relationship between the water body and the people, and determine the risk population and the number of risk population according to the distance relationship. The risk population is the people active in the monitoring area or the residents living in the monitoring area; The risk warning module is used to issue warnings for risky water bodies based on the degree of change in the water body, the speed of change in the water body, the risk population and the number of risk populations.

9. A computer device, characterized in that: It comprises a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the risk water body abnormal situation warning method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the risk water body abnormal situation warning method described in any one of claims 1-7.

Citation Information

Patent Citations

  • Water level early warning monitoring method and device, storage medium and electronic equipment

    CN110705759A

  • Image recognition method, garbage dumping behavior detection method, equipment and medium

    CN112686931A

  • Video object segmentation method and device and computer equipment

    CN113066092A

  • Monocular dense map construction method based on luminosity calibration and ZoeDepth depth estimation

    CN117078871A

  • Crane operation abnormity monitoring method and system, electronic equipment and medium

    CN118607934A