A risk water body abnormal situation early warning method, system, device and medium
Patent Information
- Application Number
- CN202411416920.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2044-10-11
AI Technical Summary
[0006]为了克服上述现有技术不能对不同区域的风险水体异常情况进行准确预警的不足,本发明提供了一种风险水体异常情况预警方法,包括如下步骤:
[0038] This invention segments and extracts video data from monitored high-risk water bodies to obtain water mask images at different times and in different states. By differentiating these images, the degree and rate of water body change can be determined. A target detection model can then identify at-risk individuals and their numbers. Based on the obtained data on water body change, rate of change, and the number of at-risk individuals, early warnings can be issued for high-risk water bodies. The entire process does not require extensive historical disaster data for model training; basic video data is readily available; and this method can identify abnormal risk situations in different areas of water bodies, exhibiting universality and strong transferability, enabling accurate early warnings for abnormal situations in high-risk water bodies across various regions.
Smart Images

Figure CN119296004B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image processing, and specifically relates to a method, system, device and medium for early warning of abnormal situations in risky water bodies. Background Technology
[0002] Currently, natural disaster response is divided into three stages: disaster early warning, disaster relief, and post-disaster reconstruction. The early warning stage primarily employs statistical models based on historical data and monitoring models based on on-site monitoring equipment. While video surveillance has developed rapidly in recent years, the processing methods for on-site monitoring equipment are relatively primitive and require significant manpower.
[0003] Deep learning-based video surveillance disaster early warning systems overcome the shortcomings of traditional video surveillance, reducing reliance on manual operation while accurately detecting potential hazards in real time. These systems utilize deep learning algorithms to analyze surveillance video, monitor risky water bodies, identify flash floods, and issue timely warnings. This allows relevant departments and personnel to take earlier countermeasures, reducing losses caused by flash floods.
[0004] Currently, in the study of disaster areas, Xia Hong has established a river flood prediction model that couples deep learning model (LSTM) with hydrodynamic model, realizing the prediction of the inundation range of downstream rivers based on upstream rainfall. Wu Junnan proposed a two-layer LSTM landslide prediction model based on attention mechanism based on single-sequence landslide data, which solves the problem that single-layer LSTM cannot make good use of backward time information in historical data.
[0005] However, LSTM model training requires a large amount of raw data from long time series and has poor transferability, making it difficult to apply to river flood warnings in different regions, resulting in the inability to accurately warn of abnormal water conditions in different areas. Summary of the Invention
[0006] To overcome the shortcomings of existing technologies in accurately predicting abnormal water conditions in different regions, this invention provides a method for predicting abnormal water conditions, comprising the following steps:
[0007] Acquire video data of the monitoring area of the risky water body;
[0008] The video data is segmented, and the baseline water mask image under no-risk conditions, the water mask image at the current moment, and the water mask image at the previous moment adjacent to the current moment are dynamically extracted.
[0009] The difference between the baseline water mask image and the mask image at the current moment is calculated to obtain the first percentage of changed pixels, and the degree of change of the water body is determined by the first percentage of changed pixels. The difference between the water mask image at the current moment and the water mask image at the previous moment adjacent to the current moment is calculated to obtain the second percentage of changed pixels, and the rate of change of the water body is determined by the second percentage of changed pixels.
[0010] The video data is input into the target detection model to detect people in the risky water body monitoring area, determine the distance relationship between the water body and the people, and determine the risky people and the number of risky people based on the distance relationship. The risky people are people who are active in the monitoring area or residents living in the monitoring area.
[0011] Early warnings for risky water bodies are issued based on the degree of change in the water body, the rate of change in the water body, the at-risk population, and the number of at-risk populations.
[0012] Preferably, the step of differentiating the reference water mask image and the mask image at the current moment to obtain the first percentage of changed pixels includes the following steps:
[0013] Difference is performed between the baseline water mask image and the mask image at the current moment; the water mask difference image is obtained.
[0014] The water body mask difference image is denoised by specifying a threshold.
[0015] The number of changed pixels in the water mask difference image after noise reduction is counted, and the percentage of the first changed pixels is obtained based on the number of changed pixels.
[0016] Preferably, the step of differentiating 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 includes the following steps:
[0017] The difference between the water mask image at the current moment and the water mask image at the previous moment adjacent to the current moment is obtained to obtain the difference image of the water body between the two adjacent moments.
[0018] Noise removal is performed on the difference images of two adjacent water bodies by specifying a threshold;
[0019] The number of changed pixels in two adjacent difference images of the water body after noise reduction is counted, and the percentage of the second changed pixels is obtained based on the number of changed pixels.
[0020] Preferably, before inputting the video data into the target detection model, the method further includes training the target detection model, including the following steps:
[0021] Obtain a video image dataset containing at-risk individuals;
[0022] Label at-risk groups in video image datasets;
[0023] The data from the labeled dataset is input into the object detection model to obtain the trained object detection model.
[0024] Preferably, determining the at-risk population and its number based on distance relationships includes the following steps:
[0025] The depth estimation model ZoeDepth is used to generate depth estimation maps for different entity types, including water bodies, land features, and people.
[0026] Based on depth estimation maps of different entity types, the spatial distance relationship between populations and water bodies and land features is determined, and the risk population and its number are determined based on the risk threshold of the spatial distance relationship.
[0027] Preferably, before inputting the video data into the target detection model, the method further includes preprocessing the video data, specifically resampling and image transformation of the video data.
[0028] Preferably, before performing the difference between the reference water mask image and the mask image at the current moment, and before performing the difference between the water mask image at the current moment and the water mask image at the previous moment adjacent to the current moment, the method further includes converting the reference water mask image, the mask image at the current moment, and the water mask image at the previous moment adjacent to the current moment into grayscale images.
[0029] This invention also provides an early warning system for abnormal water conditions, comprising:
[0030] The data acquisition module is used to acquire video data of the monitored areas of risky water bodies;
[0031] The image acquisition module is used to segment the video data and dynamically extract the baseline water mask image under no-risk conditions, the water mask image at the current moment, and the water mask image at the previous moment adjacent to the current moment.
[0032] The data processing module is used to perform difference between the reference water mask image and the mask image at the current time to obtain a first percentage of changed pixels, and to determine the degree of change of the water body by using the first percentage of changed pixels; and to perform difference between the water mask image at the current time and the water mask image at the previous time adjacent to the current time to obtain a second percentage of changed pixels, and to determine the rate of change of the water body by using the second percentage of changed pixels.
[0033] The target detection module is used to input video data into the target detection model, detect people in the risk water body monitoring area, determine the distance relationship between the water body and the people, and determine the risky people and the number of risky people based on the distance relationship. The risky people are people who are active in the monitoring area or residents living in the monitoring area.
[0034] The risk warning module is used to issue warnings about water bodies at risk based on the degree of change in the water body, the rate of change in the water body, the at-risk population, and the number of at-risk population.
[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 method for early warning of abnormal situations in dangerous water bodies.
[0036] The present invention also provides a computer-readable storage medium storing a computer program adapted for loading by a processor to execute the method for early warning of abnormal water conditions.
[0037] The method, system, equipment, and medium for early warning of abnormal water conditions provided by this invention have the following beneficial effects:
[0038] This invention segments and extracts video data from monitored high-risk water bodies to obtain water mask images at different times and in different states. By differentiating these images, the degree and rate of water body change can be determined. A target detection model can then identify at-risk individuals and their numbers. Based on the obtained data on water body change, rate of change, and the number of at-risk individuals, early warnings can be issued for high-risk water bodies. The entire process does not require extensive historical disaster data for model training; basic video data is readily available; and this method can identify abnormal risk situations in different areas of water bodies, exhibiting universality and strong transferability, enabling accurate early warnings for abnormal situations in high-risk water bodies across various regions. Attached Figure Description
[0039] To more clearly illustrate the embodiments and design schemes of the present invention, the accompanying drawings required for this embodiment will be briefly described below. The drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 Flowchart of the early warning method for abnormal situations in risky water bodies;
[0041] Figure 2 Flowchart for mask extraction of baseline state of risky water bodies;
[0042] Figure 3 A flowchart for the interface design of a high-risk water body anomaly early warning system. Detailed Implementation
[0043] To enable those skilled in the art to better understand and implement the technical solutions of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and should not be construed as limiting the scope of protection of the present invention.
[0044] Example
[0045] This invention provides an early warning method for abnormal situations in risky water bodies, specifically as follows: Figure 1 As shown, it includes the following steps:
[0046] Step 1: Obtain video data of the monitoring area of the risky water body.
[0047] Risky water bodies refer to a type of water body whose surface is relatively calm, but whose surface level may rise significantly due to a large influx of water.
[0048] Real-time monitoring of video data and video playback data; using OpenCV to read video data and capture single-frame images for preprocessing.
[0049] Step 2: Input the video data into the Grounded SAM object segmentation model, dynamically extract the baseline water mask image under no-risk conditions, the water mask image at the current moment, and the water mask image at the previous moment adjacent to the current moment; perform difference between the baseline water mask image and the mask image at the current moment to obtain the first percentage of changed pixels, and use the first percentage of changed pixels to determine the degree of change of the water body; perform difference between 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 percentage of changed pixels, and use the second percentage of changed pixels to determine the rate of change of the water body.
[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] The SAM model, short for SegmentAnything Model, is a groundbreaking image segmentation model. It aims to solve challenging problems in image segmentation, achieving accurate image segmentation without requiring specific annotations or training data.
[0052] Grounding DINO is an advanced zero-shot object detection model characterized by its ability to detect specified targets based on text descriptions. In terms of model architecture, Grounding DINO employs a transformer structure, making it similar to a natural language processing model and more capable of processing both images and text simultaneously.
[0053] In this embodiment, a water body mask image is obtained using a Grounded SAM model. The initial stable state image is saved during page loading and placed onto the page according to the selected model. The SAM model is used to distinguish different types of entities in the scene, forming spatial BOX object blocks for different entities. The water body object blocks in the initial image are processed to obtain the initial water body mask image (i.e., the baseline water body mask image). Figure 2 (As shown) Each time the model processes, it obtains the water mask image of the current frame, and performs a difference operation between the mask image at this moment and the mask at the initial moment, counts the changed pixels and calculates the percentage. This percentage can reflect the degree of change of the water body. At the same time, it performs a difference operation between the water mask at this moment and the mask image obtained in the previous processing and calculates the percentage, thereby judging the speed of water body change. The resolution of the processed image is transformed using the methods provided by OpenCV and placed on the page for display.
[0054] Since the mask image extracted directly from the image may contain flying blocks, voids, etc., this invention also uses morphological processing to stitch the extracted mask image water body together and remove invalid flying blocks.
[0055] Step 3: Input video data into the target detection model to detect people in the risky water body monitoring area, determine the distance relationship between the water body and the people, and determine the risky people and their number based on the distance relationship. The risky people are people who are active in the monitoring area or residents living in the monitoring area.
[0056] YOLOv5 is a popular target detection algorithm that is fast and efficient in target detection tasks. Therefore, the target detection model used in this invention is the YOLOv5 target detection model to detect crowds in the image.
[0057] YOLOv5 has made several improvements in model structure and performance. YOLOv5 introduces a lightweight model design, which uses techniques such as small convolutional kernels and depthwise separable convolution to significantly improve inference speed while maintaining high accuracy.
[0058] In the overall architecture of YOLOv5, images are first processed through the input layer and then sent to the backbone network. The backbone is typically a powerful feature extraction network, such as EfficientNet or ResNet. Next, feature maps from different layers are fused through a feature fusion network (Neck) to improve detection performance. Finally, the generated feature maps are sent to the head module, which generates bounding boxes and class confidence scores based on these feature maps.
[0059] YOLOv5's lightweight model design, multi-scale training and inference mechanisms, and powerful post-processing techniques give it a significant advantage in the field of object detection. Therefore, it can be combined with the YOLOv5 model and the pre-trained weights provided by the official website to detect crowds in images.
[0060] Before using video data to input into the YOLOv5 object detection model, the process also includes training the YOLOv5 object detection model, which includes the following steps:
[0061] Obtain a video image dataset containing at-risk individuals;
[0062] Label at-risk groups in video image datasets;
[0063] The data from the labeled dataset is input into the YOLOv5 object detection model to obtain the trained YOLOv5 object detection model.
[0064] In this invention, firstly, the video data is preprocessed, i.e., the captured video frames (video data) are resampled and image transformed. Secondly, the YOLOv5 target detection model is trained, specifically as follows: acquiring a video image dataset containing at-risk populations; labeling the at-risk populations in the video image dataset; inputting the labeled dataset into the YOLOv5 target detection model to obtain the trained YOLOv5 target detection model; then, inputting the video data of the at-risk water body monitoring area into YOLOv5 to detect the populations in the at-risk water body monitoring area; finally, determining the distance relationship between the water body and the population, and determining the at-risk population and its number based on the distance relationship, specifically: using the depth estimation model ZoeDepth to generate depth estimation maps of different entity types for water bodies, land features, and populations; determining the spatial distance relationship between the population and water bodies and land features based on the depth estimation maps of different entity types, and determining the at-risk population and its number based on the risk threshold of the spatial distance relationship.
[0065] Step 4: Issue early warnings for risky water bodies based on the degree of change in the water body, the rate of change in the water body, the at-risk population, and the number of at-risk population.
[0066] Risk warnings are based on judgment factors such as the threshold for the degree of change in water bodies, the threshold for the rate of change in water bodies, and the risk threshold for spatial distance relationships.
[0067] This invention also provides a risk water body anomaly early warning system, including a data acquisition module, an image acquisition module, a data processing module, a target detection module, and a risk early warning module. The data acquisition module acquires video data of the risk water body monitoring area; the image acquisition module segments the video data and dynamically extracts a baseline water body mask image under no-risk conditions, a water body mask image at the current moment, and a water body mask image from the previous moment adjacent to the current moment; the data processing module performs difference analysis on the baseline water body mask image and the mask image at the current moment to obtain a first percentage change in pixels, using this percentage to determine the degree of water body change; it also performs difference analysis on the water body mask image at the current moment and the water body mask image from the previous moment adjacent to the current moment to obtain a second percentage change in pixels, using this percentage to determine the rate of water body change; the target detection module inputs the video data into a target detection model to detect people in the risk water body monitoring area, determines the distance relationship between the water body and the people, and determines the risky population and its number based on the distance relationship. The risky population refers to people active within the monitoring area or residents living within the monitoring area.
[0068] The risk warning module is used to issue warnings about water bodies at risk based on the degree of change in the water body, the rate of change in the water body, the at-risk population, and the number of at-risk population.
[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 perform an early warning method for abnormal situations in dangerous water bodies.
[0070] The present invention also provides a computer-readable storage medium storing a computer program adapted for loading by a processor to execute a method for early warning of abnormal situations in dangerous water bodies.
[0071] This invention also includes configuring the development environment, specifically divided into three main sections: basic environment configuration, deep learning module configuration, and Qt interface design module configuration. Basic environment configuration includes the installation of Python and the configuration of Anaconda. The deep learning module configuration is divided into two parts: the configuration of YOLOv5 dependencies and the configuration of the GroundedSAM model dependencies. The Qt interface design module configuration includes the installation of the PyQt5Python package and the configuration of the Qt Designer interface development tool.
[0072] In order to implement the method of the present invention, the present invention provides the following configuration:
[0073] I. Configuration of Basic Environment
[0074] The basic environment configuration involves configuring the basic development tools, including Python, Anaconda, and PyCharm. PyCharm, provided by JetBrains, is an IDE (Integrated Development Environment) that integrates a range of development features, such as code auto-completion, automatic formatting updates, and error reporting. Anaconda is a Python distribution for scientific computing, supporting Linux, Mac, and Windows. It includes many popular Python packages for scientific computing and data analysis. Using Anaconda's Conda command, multiple Python environments can be quickly and easily managed, with each environment existing independently. The basic environment configuration steps are as follows:
[0075] (1) Use the conda command in the command line window provided by Anaconda to create a Python virtual environment. Open Anacondaprompt 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. In PyCharm, under the path "file\setting\projection\Pythoninterpreter", select the existing Conda environment. Configure the interpreter path as "F:\anaconda1\envs\hdc\python.exe" and the conda executable file as "F:\anaconda1\Scripts\conda.exe".
[0078] II. Configuration of Deep Learning Module
[0079] The configuration of the deep learning module consists of two parts: YOLOv5 model dependency configuration and Grounded SAM model dependency configuration. The model configuration steps are as follows:
[0080] (1) Install PyTorch. Open Anacondaprompt 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 YOLOv5 main directory 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 main directory of the Grounded SAM project 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 relevant dependencies are successfully installed.
[0089] (5) Install other dependencies using the following command:
[0090] pip install opencv-pythonpycootools matplotlib onnxryntime onnx
[0091] ipykernel
[0092] III. Qt Interface Design Module Configuration
[0093] The configuration for Qt interface design mainly involves two aspects. First, installing the Qt Python library PyQt5 and PyQt5-tools; second, configuring the interface design tools.
[0094] (1) Installing the Qt library in Python: In the Anacondaprompt window, enter the pip command to install the Qt Python package. The command is as follows:
[0095] pip installPyQt5
[0096] pip install pyqt5-tools
[0097] (2) Configure the interface design tool. In PyCharm, configure the tool parameters under "file\setting\tools\external tools". Create a new tool, Qt Designer, with the program path "F:\anaconda1\Library\bin\designer.exe" and the working directory set to "$FileDir$". Configure the UIC tool in the same way, which can convert QtDesigner's ui files into Python code.
[0098] IV. System Interface Design
[0099] The system's main interface was designed primarily using Qt Designer. Qt Designer allows for drag-and-drop control loading. The overall layout uses a QVerticalLayout, dividing the interface into two vertical sections. The first section is further divided into two horizontal sections using QHorizontal Layout. The first area contains Tab Widgets to display the monitoring screen, while the second section uses a QVerticalLayout, vertically placing three QGroupBoxes to hold buttons. The second part of the page uses a QHorizontal Layout, horizontally placing three QLayout controls to display processed image information. The design concept is as follows: Figure 3 As shown.
[0100] V. Historical Information Viewing Window
[0101] The historical information viewing window is also designed using Qt Designer. The entire interface is laid out using a QVertical Layout, with three additional controls. The first part is a QSlider module, a sliding module that can be dragged with the mouse to control historical data. The second part is a QHorizontal Layout, containing a QGroup Layout to encapsulate four QLabel controls for displaying text information. Two more QLabel controls are placed behind it to display the baseline image and the original image being processed. The third part is a QHorizontal Layout with three QLabel controls, displaying the detection image, the foreground image processed by the Gaussian mixture model, and the image after differencing the baseline image (e.g., ...). Figure 3 (As shown).
[0102] VI. Model Management Implementation
[0103] Video playback uses the QTimer control, which calls a specified function after a set time interval. Therefore, video playback can be achieved by using QTimer to retrieve and display video frames at specified intervals.
[0104] The model invocation and control are also implemented using the QTimer control. Considering system resource consumption, different models are invoked at different times, and multiple QTimer controls can be used to control the invocation of different models.
[0105] The above-described embodiments are merely preferred embodiments of the present invention, and the scope of protection of the present invention is not limited thereto. Any simple changes or equivalent substitutions of the technical solutions that can be obviously obtained by those skilled in the art within the scope of the technology disclosed in the present invention shall fall within the scope of protection of the present invention.
Claims
1. A method for early warning of abnormal conditions in a risk water body, characterized in that, Includes the following steps: Acquire video data of the monitoring area of the risky water body; The video data is segmented using the Grounded SAM object segmentation model, and the baseline water mask image under no-risk conditions, the water mask image at the current moment, and the water mask image at the previous moment adjacent to the current moment are dynamically extracted. The difference between the baseline water mask image and the mask image at the current moment is calculated to obtain the first percentage of changed pixels, and the degree of change of the water body is determined by the first percentage of changed pixels. The difference between the water mask image at the current moment and the water mask image at the previous moment adjacent to the current moment is calculated to obtain the second percentage of changed pixels, and the rate of change of the water body is determined by the second percentage of changed pixels. The video data is input into the target detection model to detect people in the risky water body monitoring area, determine the distance relationship between the water body and the people, and determine the risky people and the number of risky people based on the distance relationship. The risky people are people who are active in the monitoring area or residents living in the monitoring area. The method of determining the at-risk population and its number based on distance relationships specifically includes: using the depth estimation model ZoeDepth to generate depth estimation maps of different entity types, including water bodies, land features, and populations. Based on depth estimation maps of different entity types, determine the spatial distance relationship between populations and water bodies and land features, and determine the at-risk population and the number of at-risk populations based on the risk threshold of spatial distance relationship; Early warnings for risky water bodies are issued based on the degree of change in the water body, the rate of change in the water body, the at-risk population, and the number of at-risk populations. The step of differentiating the reference water mask image and the mask image at the current moment to obtain the first percentage of changed pixels includes the following steps: Difference is performed between the baseline water mask image and the mask image at the current moment; the water mask difference image is obtained. The water body mask difference image is denoised by specifying a threshold. The number of changed pixels in the water mask difference image after noise reduction is counted, and the percentage of the first changed pixels is obtained based on the number of changed pixels. The step of subtracting the water mask image at the current moment from the water mask image at the previous moment (adjacent to the current moment) to obtain the percentage change of the second pixel includes the following steps: The difference between the water mask image at the current moment and the water mask image at the previous moment adjacent to the current moment is obtained to obtain the difference image of the water body between the two adjacent moments. Noise removal is performed on the difference images of two adjacent water bodies by specifying a threshold; The number of changed pixels in two adjacent difference images of the water body after noise reduction is counted, and the percentage of the second changed pixels is obtained based on the number of changed pixels.
2. The risk water body anomaly situation early warning method according to claim 1, characterized in that, Before inputting the video data into the object detection model, the process also includes training the object detection model, which includes the following steps: Obtain a video image dataset containing at-risk individuals; Label at-risk groups in video image datasets; The data from the labeled dataset is input into the object detection model to obtain the trained object detection model.
3. The risk water body anomaly situation early warning method according to claim 1, characterized in that, Before inputting the video data into the target detection model, the process also includes preprocessing the video data, specifically resampling and image transformation of the video data.
4. The risk water body anomaly situation early warning method according to claim 1, characterized in that, Before performing the difference between the reference water mask image and the mask image at the current moment, and before performing the difference between the water mask image at the current moment and the water mask image at the previous moment adjacent to the current moment, the method further includes converting the reference water mask image, the mask image at the current moment, and the water mask image at the previous moment adjacent to the current moment into grayscale images.
5. A risk water body anomaly situation early warning system, characterized in that, The method for implementing the early warning method for abnormal water conditions as described in any one of claims 1-4 includes: The data acquisition module is used to acquire video data of the monitored areas of risky water bodies; The image acquisition module is used to segment the video data and dynamically extract the baseline water mask image under no-risk conditions, the water mask image at the current moment, and the water mask image at the previous moment adjacent to the current moment. The data processing module is used to perform difference between the reference water mask image and the mask image at the current time to obtain a first percentage of changed pixels, and to determine the degree of change of the water body by using the first percentage of changed pixels; and to perform difference between the water mask image at the current time and the water mask image at the previous time adjacent to the current time to obtain a second percentage of changed pixels, and to determine the rate of change of the water body by using the second percentage of changed pixels. The target detection module is used to input video data into the target detection model, detect people in the risk water body monitoring area, determine the distance relationship between the water body and the people, and determine the risky people and the number of risky people based on the distance relationship. The risky people are people who are active in the monitoring area or residents living in the monitoring area. The risk warning module is used to issue warnings about water bodies at risk based on the degree of change in the water body, the rate of change in the water body, the at-risk population, and the number of at-risk population.
6. A computer device, characterized in that, It includes 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 perform the risk water body anomaly early warning method according to any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted for loading by a processor to execute the risk water body anomaly early warning method according to any one of claims 1-4.
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
Crane operation abnormity monitoring method and system, electronic equipment and medium
CN118607934A
Camera automatic focusing method based on depth estimation
CN118612547A