Water area change early warning method and device and electronic equipment
By performing similarity detection and preset model segmentation on the image captured when the image acquisition device is at the preset point and the preset image, the real-time and accuracy problems of water area monitoring in the existing technology are solved, and efficient water area change warning is achieved.
Patent Information
- Application Number
- CN202510811234.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-09-26
AI Technical Summary
Existing water area monitoring technology has contradictions in monitoring accuracy and real-time performance, cannot meet the real-time warning needs in emergency situations, and lacks an effective mechanism to respond to environmental changes, resulting in discontinuity in monitoring data and false alarms or omissions in warning information.
By performing similarity detection between the image captured when the image acquisition device is at the preset point and the preset image, a target signal is generated to update the preset point information, and the pre-trained preset model is used to segment the target water area information from the input image, and the early warning information is generated by combining the target area and relative change rate.
It achieves real-time early warning in the event of equipment posture deviation or parameter misalignment, improves the accuracy and reliability of water area change monitoring, and ensures the accuracy and reliability of early warning information.
Smart Images

Figure CN120707893A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of hydrological monitoring technology, and more specifically, to a method, device, and electronic equipment for early warning of water area changes. Background Art
[0002] In recent years, with the intensification of global climate change, the management and protection of water resources has become particularly important. Changes in the area and shape of water bodies are directly related to the probability of natural disasters such as floods and droughts. Therefore, accurately monitoring water changes and generating effective early warning information has become an urgent need to prevent and respond to natural risks. Currently, monitoring water changes mainly relies on various technical means such as satellite remote sensing and ground-based fixed cameras. However, existing monitoring technologies face the following difficulties in practical application:
[0003] The contradiction between monitoring accuracy and real-time performance: Although satellite remote sensing can provide coverage of a wide area, due to the limitations of satellite return cycle, data processing time and weather conditions, the monitoring results are delayed and cannot meet the real-time warning needs in emergency situations; at the same time, although ground-based fixed camera equipment can monitor in real time, the recognition accuracy of water characteristics is low under complex lighting and weather conditions.
[0004] Lack of effective mechanisms to respond to environmental changes: Existing technologies lack effective calibration and response measures when environmental changes (such as equipment movement and sudden weather changes) cause monitoring images to become unstable, thus affecting the continuity of monitored data and the accuracy of early warnings.
[0005] In a volatile natural environment, existing monitoring technologies struggle to eliminate various interference factors and ensure accurate extraction of water area information. This, in turn, impacts the assessment of changing trends in the water area, leading to false or missed warnings. Furthermore, due to a lack of continuous verification of the stability of the monitoring equipment's preset positions, the system struggles to automatically identify and adjust when the equipment shifts, resulting in discontinuous and ineffective data collection, further reducing the reliability and accuracy of warning information.
[0006] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention
[0007] The present application provides a water area change warning method, device and electronic equipment to at least solve the technical problem of low accuracy of warning information generated during water area monitoring in the prior art.
[0008] According to one aspect of the present application, a water area change warning method is provided, comprising: generating a target signal when the similarity between a first image and a preset image is less than a preset similarity, wherein the first image is an image captured when an image acquisition device is at a preset point, and the target signal is used to prompt an operation and maintenance personnel to update the preset point information of the image acquisition device, and the image acquisition device is used to monitor a target water area; when the similarity between the first image and the preset image is greater than or equal to the preset similarity, inputting the first image into a preset model to obtain segmentation information, wherein the preset model is used to segment the input image to obtain information of the target water area, and the segmentation information includes at least the position and shape of the target water area; determining the target area of the target water area at the moment of the first image acquisition based on the segmentation information; and generating warning information based on the target area and the relative change rate of the target area.
[0009] Optionally, before generating the target signal, the water area change warning method also includes: obtaining N preset points corresponding to the image acquisition device, wherein N is an integer greater than or equal to 1, and each preset point corresponds to an identifier, a parameter set, and a preset image, and the parameter set at least includes the pan / tilt parameters and shooting parameters corresponding to the image acquisition device; when the image acquisition device is at the i-th preset point among the N preset points, updating the parameters of the image acquisition device according to the parameter set of the i-th preset point, wherein the i-th preset point is any preset point among the N preset points; after updating the parameters of the image acquisition device according to the parameter set of the i-th preset point, controlling the image acquisition device to shoot the preset area to obtain a first image corresponding to the i-th preset point, wherein the preset area includes the target water area; obtaining the similarity between the first image corresponding to the i-th preset point and the preset image corresponding to the i-th preset point.
[0010] Optionally, the step of obtaining the similarity between the first image corresponding to the i-th preset point and the preset image corresponding to the i-th preset point includes: performing key point detection on the first image corresponding to the i-th preset point and the preset image corresponding to the i-th preset point to obtain a first key point and a second key point, wherein the first key point is a key point in the first image and the second key point is a key point in the preset image; matching the first key point and the second key point to obtain L pairs of matching results, wherein L is a positive integer, and the difference between the first key point and the second key point included in each pair of matching results in the L pairs of matching results is less than or equal to the preset difference; determining the error of each pair of matching results based on the transfer matrix corresponding to the L pairs of matching results, wherein the error of each pair of matching results is used to characterize the Euclidean distance between the first key point and the second key point included in the pair of matching results; and determining the similarity between the first image and the corresponding preset image based on the errors corresponding to the L pairs of matching results.
[0011] Optionally, after controlling the image acquisition device to shoot the preset area, the water area change warning method also includes: obtaining N first images corresponding to N preset points; performing an alignment operation on the N first images to obtain N second images, wherein the alignment operation is used to align the first image corresponding to each preset point with the preset image corresponding to the preset point through perspective transformation; when any two or more of the N second images have overlapping areas, the M second images with overlapping areas are fused to obtain a target image, wherein M is a positive integer less than or equal to N; and the target image is input into the preset model.
[0012] Optionally, before generating warning information based on the target area and the relative change rate of the target area, the water area change warning method also includes: obtaining a third image corresponding to the target preset point, wherein the target preset point is the preset point at which the image acquisition device is located when the first image is taken, and the third image is an image taken at a historical moment when the image acquisition device is at the target preset point; obtaining a historical area corresponding to the third image, wherein the historical area is the area of the target water area at the moment of acquisition of the third image; and determining the relative change rate of the target area based on the target area and the historical area.
[0013] Optionally, the step of generating early warning information based on the target area and the relative change rate of the target area includes: when the target area is less than a first preset threshold, generating a first early warning information, wherein the first preset threshold is a preset relative water area drought risk value, and the first early warning information is used to characterize the existence of a drought risk in the target water area; when the target area is greater than a second preset threshold, generating a second early warning information, wherein the second preset threshold is a preset relative water area flood risk value, and the second early warning information is used to characterize the existence of a flood risk in the target water area; when the absolute value of the relative change rate is greater than a third preset threshold, generating a third early warning information, wherein the third preset threshold is a preset relative negative water area increase risk value, and the third early warning information is used to characterize that the target water area is shrinking at a speed exceeding a preset speed; when the absolute value of the relative change rate is greater than a fourth preset threshold, generating a fourth early warning information, wherein the fourth preset threshold is a preset relative positive water area increase risk value, and the fourth early warning information is used to characterize that the target water area is increasing at a speed exceeding a preset speed.
[0014] Optionally, the preset model is trained by the following steps: obtaining an initial sample set collected by an image acquisition device installed on an iron tower, wherein the initial sample set includes at least images of different types of waters in different seasons, different time periods, different weather conditions, and different shooting angles; performing style transfer and enhancement processing on the initial sample set to obtain a target sample set, wherein the style transfer is used to replace the style of any image in the initial sample set with a style of a different season from the image, and the enhancement processing is used to update the brightness and contrast of any image in the initial sample set; and obtaining the preset model through training based on the target sample set.
[0015] Optionally, the step of obtaining a preset model based on training of a target sample set includes: dividing the target sample set into a training set, a validation set, and a test set; iteratively training a neural network model that introduces a multi-scale linear attention mechanism based on the images in the training set in combination with a real-time data enhancement method to obtain a first model; updating the hyperparameters of the first model based on the images in the validation set in combination with a dynamic learning rate adjustment strategy to obtain a second model; determining the performance parameters of the second model based on the images in the test set, wherein the performance parameters include at least accuracy, precision, and recall; and when the performance parameters of the second model are greater than or equal to the preset parameters, the second model is used as the preset model.
[0016] According to another aspect of the present application, a water area change warning device is also provided, including: a first generation unit, used to generate a target signal when the similarity between the first image and the preset image is less than a preset similarity, wherein the first image is an image captured when the image acquisition device is at a preset point, and the target signal is used to prompt the operation and maintenance personnel to update the preset point information of the image acquisition device, and the image acquisition device is used to monitor the target water area; a first input unit, used to input the first image into a preset model to obtain segmentation information when the similarity between the first image and the preset image is greater than or equal to the preset similarity, wherein the preset model is used to segment the input image to obtain information of the target water area, and the segmentation information includes at least the position and shape of the target water area; a first determination unit, used to determine the target area of the target water area at the first image acquisition moment based on the segmentation information; and a second generation unit, used to generate warning information based on the target area and the relative change rate of the target area.
[0017] According to another aspect of the present application, an electronic device is also provided, wherein the electronic device includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement any one of the above-mentioned water area change warning methods.
[0018] In the present application, when the similarity between the first image and the preset image is less than the preset similarity, a target signal is generated, wherein the first image is an image captured when the image acquisition device is at a preset point, and the target signal is used to prompt the operation and maintenance personnel to update the preset point information of the image acquisition device, and the image acquisition device is used to monitor the target water area; when the similarity between the first image and the preset image is greater than or equal to the preset similarity, the present application inputs the first image into the preset model to obtain segmentation information, wherein the preset model is used to segment the input image to obtain information of the target water area, and the segmentation information includes at least the position and shape of the target water area. Afterwards, the present application determines the target area of the target water area at the time of the first image acquisition based on the segmentation information, and then, the present application generates early warning information based on the target area and the relative change rate of the target area.
[0019] From the above content, it can be seen that the present application adopts a method of performing similarity detection on the image captured when the image acquisition device is at the preset point and the preset image, so as to realize the timely generation of target signals in the case of posture deviation of the image acquisition device or misplaced parameter settings (that is, the similarity between the above-mentioned first image and the preset image is less than the preset similarity) to prompt the operation and maintenance personnel to update the preset point information, thereby effectively avoiding the problem of distortion of water area monitoring information caused by the deviation of the image acquisition device.
[0020] At the same time, for the first image that meets the similarity standard, the present application uses the preset model obtained by pre-training to accurately segment and identify the position and shape of the target water area from the input first image, providing a data basis for the subsequent calculation of the target area of the target water area. Afterwards, when generating early warning information, the present application not only refers to the target area of the target water area, but also refers to the relative change rate of the target area, thereby improving the accuracy and reliability of the water area change warning, and thus solving the technical problem of low accuracy of the early warning information generated in the process of monitoring the water area in the existing technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0022] Figure 1 It is an optional rendering that uses machine vision to identify the water area in the image;
[0023] Figure 2 It is a flow chart of an optional method for identifying and monitoring water levels using visual monitoring equipment;
[0024] Figure 3 is a flow chart of an optional water area change warning method according to an embodiment of the present application;
[0025] Figure 4 This is an optional effect diagram of image fusion according to an embodiment of the present application;
[0026] Figure 5 is a schematic diagram of a set of optional preset model parameters according to an embodiment of the present application;
[0027] Figure 6 is a schematic diagram of another set of optional preset model parameters according to an embodiment of the present application;
[0028] Figure 7 This is a flowchart of an optional method for early warning of water changes based on visual recognition according to an embodiment of the present application;
[0029] Figure 8 This is a schematic diagram of an optional installation of an image acquisition device on top of an iron tower according to an embodiment of the present application;
[0030] Figure 9 is a schematic diagram of an optional water area change warning device according to an embodiment of the present application;
[0031] Figure 10 is a schematic diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings 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 in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0034] It should also be noted that the relevant information involved in this application (including but not limited to the preset point information corresponding to the image acquisition device) and data (including but not limited to the data used for display and analysis) are all information and data authorized by the user or fully authorized by all parties. For example, an interface is set up between this system and the relevant user or organization. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain the relevant information after receiving the consent information fed back by the aforementioned user or organization.
[0035] In addition, the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant information and data involved in this application comply with the relevant laws, regulations and standards of the relevant regions, and necessary confidentiality measures have been taken, and do not violate public order and good morals. In addition, this application provides corresponding operation entrances for users to choose to agree to authorization or refuse authorization. If the user chooses to refuse authorization, he / she will enter the corresponding expert decision-making process.
[0036] In an optional embodiment, a machine vision recognition method is provided. The method extracts image data through a visual monitoring device, uses OPENCV (Open Source Computer Vision Library, an open source computer vision and machine learning software library) to extract image water area data, extracts the relative area data of the image camera or combines DEM (Digital Elevation Model, geographic digital elevation information) to perform earth relative coordinate area increase statistics, and compares and judges with the flooding risk value or drought risk value. This method does not require additional large-scale hardware facilities, and only requires the deployment of a small amount of computing power equipment, monitoring equipment, and signal transmission system to complete. In terms of software data algorithms, the method performs binarization processing (for example, cv2.inRange function (a function in the OPENCV library for image threshold processing)) and contour extraction (for example, cv2.findContours function (a function in the OPENCV library for finding contours in images)) on the extracted image BGR (Blue-Green-Red) values.
[0037] For example, Figure 1 It is an optional effect diagram for identifying water areas in an image through machine vision, such as Figure 1 As shown, the machine vision recognition method performs binarization processing on the BGR value of the image to obtain a grayscale image. The grayscale image is as follows Figure 1 As shown in the right part, the result of contour extraction of water area is as follows Figure 1 As shown in the red outline in the left section.
[0038] However, the above-mentioned recognition method has a single adaptability and cannot adapt to the environmental variability of the vast monitoring area. The noise generated by the 24-hour changes in the monitoring area, the seasonal landform changes, the weather changes, and the changes in natural landforms will reduce the accuracy of data processing through machine learning.
[0039] In an optional embodiment, Figure 2 This is a flow chart of an optional method for identifying and monitoring water levels using visual monitoring equipment, such as Figure 2 As shown, visual monitoring equipment is installed at the banks of reservoirs, rivers, and lakes. Image data corresponding to these reservoirs, rivers, and lakes is extracted through the visual monitoring equipment. The captured video stream is then transmitted to an AI (Artificial Intelligence) algorithm platform, which processes the image to extract the image features of the water level. This provides an early warning of excessive water levels, and finally, relevant staff resolve the alarm accordingly. At the software level, this solution uses a trained AI algorithm platform to accurately provide feedback on water levels and subsequent early warning feedback.
[0040] From the above content, it can be seen that the technology in the above embodiments requires that the monitoring equipment and the scale scale for water depth detection be installed in conjunction with each other at the hardware facility level, so that the flooding risk value can be judged by the characteristics of the submerged scale lines on the scale. Therefore, the above technology is only suitable for application in waters that are artificially controlled and managed. Application scenarios include but are not limited to flood control monitoring, reservoir management, river management and hydrological monitoring in human activity areas.
[0041] In addition, when the monitored object faces a natural wild area, it is impossible to install a scale for water depth detection at each point, and the image acquisition equipment installed at high altitude in the monitored area cannot meet the relatively close distance and frontal angle required for reading the scale in this technology.
[0042] In an optional embodiment, a method for extracting water body boundaries and areas based on satellite remote sensing data is also provided. The data sources commonly extracted by this method include at least long-distance remote sensing data provided by satellites and short-distance remote sensing data extracted by drone photography. Specifically, the quantitative information extraction of water areas is mainly divided into the traditional water index method NDWI (Normalized Difference Water Index) and remote sensing image water body recognition based on machine learning and deep learning. Among them, NDWI is a water body recognition method based on the reflectance of the green light band and the near-infrared band. The method is shown in the following formula (1):
[0043]
[0044] In the above formula (1), Green represents the reflectivity of the green light band, and NIR represents the reflectivity of the near-infrared band).
[0045] In addition, remote sensing data is labeled and processed and models are trained through machine learning (such as SVM (Support Vector Machine)), deep learning (such as HRNet (High-Resolution Network), ResNet (Residual Network), VGG (Visual Geometry Group, a deep convolutional neural network architecture) and DenseNet (Densely Connected Convolutional Network)) technologies, so as to obtain spectral ground object target results with stronger generalization and higher recognition accuracy.
[0046] However, using remote sensing data processing methods to extract long-term water area information in the target area will face certain difficulties. The solutions and methods in the above embodiments need to match long-range satellite remote sensing systems or short-range drone remote sensing, which has high configuration costs; remote sensing data depends on the sensor configuration for spectral data acquisition, and the error correction of system hardware information extraction is complex; whether it is traditional spectral information processing methods or processing methods based on artificial intelligence models, the final calculation results are affected by the sensor receiver, the earth's atmospheric environment, the surface operation cycle and the natural environment, and the errors of the calculated results are large; in addition to considering the limitations of hardware equipment such as the spatial resolution, band range and number of bands of the extracted data, the extraction of satellite remote sensing data also needs to consider the impact of factors such as the satellite's regression period and the ground's seasonal cycle on the real-time performance of data processing.
[0047] It can be seen from the above content that the methods in the above three embodiments cannot achieve the monitoring requirements of the target area with high field of view and wide angle in terms of hardware configuration and cost, and cannot achieve the accuracy of water feature extraction and real-time data processing feedback at the software level. In order to solve the above problems, the present application provides a water area change warning method. Based on the hardware configuration of a pre-created supervision system, the method can complete the extraction and judgment of high-precision water area information features and a real-time warning feedback mechanism under low-cost update configuration. That is, the present application can complete the high-precision water area identification and real-time warning requirements of flooding risk / drought risk while achieving low-cost update configuration requirements.
[0048] According to an embodiment of the present application, an embodiment of a water area change warning method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0049] This application provides a water area change warning system (hereinafter referred to as the warning system) for implementing the water area change warning method in this application. Figure 3 This is a flow chart of an optional water area change warning method according to an embodiment of the present application, such as Figure 3 As shown, the method includes the following steps:
[0050] Step S301: When the similarity between the first image and the preset image is less than the preset similarity, a target signal is generated, wherein the first image is an image captured when the image acquisition device is at a preset point, and the target signal is used to prompt the operation and maintenance personnel to update the preset point information of the image acquisition device, and the image acquisition device is used to monitor the target water area.
[0051] In step S301, the early warning system can promptly detect whether the preset point of the image acquisition device is offset due to external factors by comparing the first image captured in real time with the preset image corresponding to the preset point. When the preset point of the device is offset, the generated target signal will prompt the operation and maintenance personnel to adjust the hardware posture of the image acquisition device and / or update the preset point information of the image acquisition device to avoid data deviation caused by abnormalities of the image acquisition device and ensure the accuracy of subsequent image processing and analysis.
[0052] Optionally, the steps of the above embodiment enhance the adaptability of the early warning system. Even when environmental conditions change or the equipment status is unstable, the image acquisition device can send a signal through self-inspection to prompt the operation and maintenance personnel to make necessary adjustments, thereby maintaining the monitoring accuracy of the early warning system.
[0053] In step S302, when the similarity between the first image and the preset image is greater than or equal to the preset similarity, the first image is input into a preset model to obtain segmentation information, wherein the preset model is used to segment the input image to obtain information of the target water area, and the segmentation information includes at least the position and shape of the target water area.
[0054] Optionally, the preset model is a neural network model obtained by combining YOLOv8-seg (Yet Another Object Detection, a target detection model) and EfficientViT (a neural network structure that integrates multi-scale linear attention layers) to improve the extraction accuracy of water features and the model processing speed.
[0055] In step S302, when the early warning system determines that the similarity between the first image and the preset image is greater than or equal to the preset similarity, it means that there is no deviation between the posture of the current image acquisition device and the preset point information, and the first image taken by the image acquisition device will not cause a false positive problem. Therefore, the early warning system inputs the first image into the preset model, performs feature segmentation of the target water area, and obtains the position and shape information of the target water area, thereby providing a data basis for subsequent area calculation and change rate analysis.
[0056] Step S303: determining the target area of the target water area at the first image acquisition moment according to the segmentation information.
[0057] In step S303, the target area calculated from the warning information serves as the basis for subsequent warning analysis, assessing the changing trend of the water area and providing data support for the generation of warning information. Specifically, by accurately calculating the target water area, the warning system can more precisely monitor the water status, promptly detect abnormal changes in area, and provide accurate data for further warning analysis.
[0058] Step S304: generating warning information based on the target area and the relative change rate of the target area.
[0059] In step S304, generating warning information based on the target area and the relative change rate of the target area has the following effects:
[0060] (1) Accurately reflect changes in water state: Step S304 is based on a quantitative analysis of the actual area and area change rate of the target water area, which can accurately capture small changes in the water area. Whether it is a decrease in water area caused by drought or an increase in water area caused by rainfall, it can be discovered and measured in a timely manner, thereby providing accurate data support for early warning decisions.
[0061] (2) Combination of real-time and accuracy: By continuously collecting images and calculating the relative change rate of the target area, the early warning system can monitor the changing trend of the water area in real time and generate early warning information in a timely manner. This analysis method based on real-time data stream improves the timeliness of early warning compared with traditional periodic monitoring or periodic evaluation methods.
[0062] (3) Improved reliability of early warning information: The calculation of the target area change rate can filter out false alarms caused by factors other than actual changes in the water area, such as weather changes, lighting conditions, or slight displacement of equipment. The system will only generate early warning information when the change rate exceeds the preset threshold (i.e., drought risk value and flooding risk value), thereby enhancing the reliability and pertinence of the early warning information.
[0063] (4) Implementation of intelligent early warning mechanism: Different from simple warning based on threshold, the early warning system introduces the analysis of time dimension by calculating the relative change rate of target area, and establishes a dynamic early warning mechanism. This mechanism can intelligently identify abnormal fluctuations in water area in the short term. Even when the change rate is small, it can detect long-term trends through continuous monitoring, thereby giving early warning of potential drought or flooding risks.
[0064] From the above content, it can be seen that the present application adopts a method of performing similarity detection on the image captured when the image acquisition device is at the preset point and the preset image, so as to realize the timely generation of target signals in the case of posture deviation of the image acquisition device or misplaced parameter settings (that is, the similarity between the above-mentioned first image and the preset image is less than the preset similarity) to prompt the operation and maintenance personnel to update the preset point information, thereby effectively avoiding the problem of distortion of water area monitoring information caused by the deviation of the image acquisition device.
[0065] At the same time, for the first image that meets the similarity standard, the present application uses the preset model obtained by pre-training to accurately segment and identify the position and shape of the target water area from the input first image, providing a data basis for the subsequent calculation of the target area of the target water area. Afterwards, when generating early warning information, the present application not only refers to the target area of the target water area, but also refers to the relative change rate of the target area, thereby improving the accuracy and reliability of the water area change warning, and thus solving the technical problem of low accuracy of the early warning information generated in the process of monitoring the water area in the existing technology.
[0066] In an optional embodiment, before generating a target signal, the early warning system first obtains N preset points corresponding to the image acquisition device, wherein N is an integer greater than or equal to 1, and each preset point corresponds to an identifier, a parameter set, and a preset image, and the parameter set at least includes the gimbal parameters and shooting parameters corresponding to the image acquisition device. Thereafter, when the image acquisition device is at the i-th preset point among the N preset points, the early warning system updates the parameters of the image acquisition device according to the parameter set of the i-th preset point, wherein the i-th preset point is any preset point among the N preset points. After updating the parameters of the image acquisition device according to the parameter set of the i-th preset point, the early warning system controls the image acquisition device to shoot a preset area to obtain a first image corresponding to the i-th preset point, wherein the preset area includes the target water area. Then, the early warning system obtains the similarity between the first image corresponding to the i-th preset point and the preset image corresponding to the i-th preset point.
[0067] Optionally, the image acquisition device is a camera or a pan-tilt device installed on a tower, which is used to monitor changes in the target water area in the target area.
[0068] Optionally, the camera or PTZ device includes a preset point function. These preset points can record parameters such as the PTZ's pitch and yaw angles, lens focal length, camera aperture, exposure, and white balance. These parameters are stored on an internal SD card (Secure Digital Card) and assigned a number (i.e., an identifier) for easy indexing by the early warning system. When actual monitoring of the target area begins, the early warning system controls the image acquisition device to restore its own camera parameters to the values recorded at the preset point based on the information from the designated preset point number.
[0069] Optionally, the gimbal parameters corresponding to the image acquisition device include at least the pitch angle and yaw angle of the gimbal, and the shooting parameters of the image acquisition device include at least the focal length, aperture, exposure and white balance parameters of the camera. The early warning system sets a set of parameter sets for each preset point to ensure that the image acquisition device can shoot the target water area at a suitable viewing angle, thereby improving the clarity of the captured image of the target water area (i.e., the first image).
[0070] Optionally, the N preset points refer to multiple fixed-viewpoint shooting points pre-set in the image acquisition device. The early warning system can achieve monitoring of a wider target area and multiple target waters by setting multiple preset points.
[0071] Optionally, each preset point corresponds to an identifier, so that the early warning system can identify and manage different preset points.
[0072] Optionally, the early warning system can also extract image information of the same target water area through N preset points by setting preset points 1, 2, 3, ..., N, thereby solving the problem that it is difficult to capture image information of the same target area at non-fixed angles.
[0073] Optionally, when setting the preset point information, the warning system also needs to enter the first comparison image Sample_image (i.e., the preset image) corresponding to the preset point and the threshold value T used for judgment (i.e., the preset similarity, T is determined by testing the image database corresponding to the water environment) into the system, so as to be able to judge in real time the impact of changes in the hardware facilities of the warning system on the image feature processing.
[0074] In the above embodiment, the early warning system ensures that the image acquisition device can accurately align with the target water area at the preset point position for monitoring. By setting multiple preset points, the early warning system can obtain images of the target water area at different angles and configurations, thereby providing a more diverse data source for subsequent image analysis to improve the comprehensiveness and reliability of monitoring.
[0075] In an optional embodiment, the early warning system first performs key point detection on the first image corresponding to the i-th preset point and the preset image corresponding to the i-th preset point to obtain a first key point and a second key point, wherein the first key point is a key point in the first image and the second key point is a key point in the preset image. Afterwards, the early warning system matches the first key point and the second key point to obtain L pairs of matching results, wherein L is a positive integer, and the difference between the first key point and the second key point included in each pair of matching results in the L pairs of matching results is less than or equal to the preset difference. Then, the early warning system determines the error of each pair of matching results based on the transfer matrix corresponding to the L pairs of matching results, wherein the error of each pair of matching results is used to characterize the Euclidean distance between the first key point and the second key point included in the pair of matching results. Finally, the early warning system determines the similarity between the first image and the corresponding preset image based on the errors corresponding to the L pairs of matching results.
[0076] Optionally, after the early warning system collects the first image, the early warning system creates a SIFT feature extractor and performs feature point detection on Live_image (i.e., the first image) and Sample_image. After that, the early warning system creates a KNN matcher to match the extracted feature points (i.e., key points); during the matching process, the early warning system filters out matching point pairs whose differences between the nearest matching points are too large; then, the early warning system calculates the transfer matrix through the cv2.findHomography function in the Opencv library (a function used to calculate the homography transformation matrix between two images) and calculates the error between each pair of matching points; finally, the early warning system determines the matching accuracy P (i.e., the similarity between the first image and the corresponding preset image) based on the error between each pair of matching points. If the P value is lower than the T value, the "preset point position to be corrected signal" (i.e., target information) is returned; if the P value is higher than the T value, the prompt message "preset point position matching is correct" is returned.
[0077] Optionally, the early warning system can also use SURF (Speeded-Up Robust Features) or ORB (Oriented FAST and Rotated BRIEF) image processing algorithms to find significant feature points (i.e., the above-mentioned key points) in the first image and the preset image. The significant feature points usually have good scale and rotation invariance. The above steps automatically extract the significant feature points in the first image and the preset image through significant feature point detection technology, which provides a basis for subsequent image matching and status verification of the image acquisition device. Moreover, by identifying stable features (i.e., feature information corresponding to key points), it can effectively determine whether the image acquisition device at different times is successfully aligned with the same monitoring area, and determine the stability of the image acquisition device.
[0078] Optionally, the preset difference degree is preferably set to 90%.
[0079] Optionally, the transfer matrix is a matrix calculated by a KNN (K-Nearest Neighbors, a basic classification and regression algorithm) algorithm or a RANSAC (RANdom SAmple Consensus, a random sampling consensus algorithm) algorithm. The transfer matrix is used to describe the relationship between the first image and the preset image, and can reflect the image coordinate transformation caused by device movement or rotation.
[0080] In the above embodiment, the early warning system uses statistical methods to determine the overall similarity between the first image and the preset image based on the errors of all matching point pairs. This similarity comprehensively reflects the geometric and feature consistency between the images. By comparing it with the preset similarity, it can determine whether the image acquisition device remains in the preset position or whether device status correction and adjustment are required. Accurate calculation of similarity ensures the stability and reliability of the early warning system, avoids false positives or negative negatives caused by device offset, and provides a solid image alignment foundation for subsequent water area change analysis.
[0081] In an optional embodiment, after controlling the image acquisition device to shoot a preset area, the early warning system first obtains N first images corresponding to N preset points, and then the early warning system performs an alignment operation on the N first images to obtain N second images, wherein the alignment operation is used to align the first image corresponding to each preset point with the preset image corresponding to the preset point through perspective transformation, and then, when any two or more of the N second images have overlapping areas, the early warning system fuses the M second images with overlapping areas to obtain a target image, wherein M is a positive integer less than or equal to N, and M is greater than or equal to 2, and finally, the early warning system inputs the target image into the preset model.
[0082] Optionally, after the early warning system determines that the "preset point position matching of the image acquisition device is correct", the early warning system performs alignment processing and multi-image fusion processing on the preset point images. The specific steps are as follows:
[0083] (1) Apply perspective transformation to align Live_image to Sample_image, and generate the aligned image Live_image' (i.e., the second image) through the cv2.warpPerspective function (a function for implementing perspective transformation) in the Opencv library.
[0084] (2) If, within the same time period, the image acquisition device corresponding to multiple preset points extracts two or more images with partially overlapping content, then the early warning system needs to use multi-image fusion technology to obtain a high-resolution, wide-angle fused image (i.e., the target image). The fusion process is as follows:
[0085] Figure 4 This is an optional effect diagram of image fusion according to an embodiment of the present application. The early warning system uses the cv2.Stitcher_create (a function for creating an instance of the Stitcher class) function in the Opencv library to create the stitcher (a class used to process overlapping areas between images) class. After that, the early warning system uses the stitcher.stitch (a function for implementing image stitching) function to Figure 4 Two adjacent images A_Live_image' (one of the two second images with overlapping areas) and image B_Live_image' (the other second image of the two second images with overlapping areas) with overlapping areas are stitched together using a panoramic stitching mode to obtain a stitched image AB_Live_image' (i.e., the target image).
[0086] In the above embodiment, the early warning system fuses M second images with overlapping areas to construct a more comprehensive, clearer, and high-resolution target image, which contains water area information from multiple preset point perspectives. By using image fusion technology, the early warning system can overcome the limitations of a single perspective, such as field of view angle limitations, local occlusions, or differences in lighting conditions, in a multi-perspective observation scenario, thereby generating a more information-rich synthetic image. Image fusion technology not only improves the visibility and detail resolution of the target water area, but also eliminates or reduces non-target areas in the target image, such as trees, roads, and other obstructions, making the characteristics of the target water area more prominent, which is beneficial to the subsequent processing and analysis of the preset model.
[0087] From the above content, we can see that the early warning system improves the quality of subsequent preset model input images through image alignment and fusion, increases image resolution and detail clarity, eliminates perspective deviation and occlusion, enhances lighting consistency, and ultimately improves the accuracy of preset model predictions and the reliability of the early warning system.
[0088] In an optional embodiment, before generating early warning information based on the target area and the relative change rate of the target area, the early warning system first obtains a third image corresponding to the target preset point, wherein the target preset point is the preset point at which the image acquisition device is located when the first image is taken, and the third image is an image taken at a historical moment when the image acquisition device is at the target preset point. Afterwards, the early warning system obtains a historical area corresponding to the third image, wherein the historical area is the area of the target water area at the moment of acquisition of the third image. Then, the early warning system determines the relative change rate of the target area based on the target area and the historical area.
[0089] For example, let's assume that the tower surveillance video screenshot captured at time T1 is I1. I1 is input into the established AI algorithm platform (i.e., the preset model), which outputs the detection information boxes (i.e., segmentation information) containing the water category (i.e., the target water area), the corresponding bounding box L1 (i.e., the location information of the target water area), confidence information, and the segmentation information Mask1 (i.e., the segmentation mask) required for the area statistics algorithm. Mask1 is then input into cv2.contourArea (a function in the OpenCV library used to calculate the area corresponding to a contour). This function calculates the contour area and obtains the area value S1 (i.e., the historical area corresponding to the third image). At this point, the early warning system obtains the location information L1 and the corresponding area value S1 of the target water area in the target area.
[0090] Similarly, the area value of the same target water area in the same target area at time T2 is S2 (i.e., target area). The calculation method of the relative increase rate F1 of the water area in the image (i.e., the relative change rate of the target area) is shown in the following formula (2).
[0091]
[0092] In the above formula (2), S0 is the area of the entire image captured by the image acquisition device.
[0093] Specifically, from the time axis, it can be seen that when F1 is a negative value, it means that the relative change of the target area has a decreasing trend in the time period from T1 to T2; when F1 is a positive value, it means that the relative change of the target area has an increasing trend in the time period from T1 to T2.
[0094] In the above embodiment, through quantitative analysis, the early warning system determines the relative change rate of the target area of the target water area, that is, the percentage increase or decrease of the target area relative to the historical area. The calculation of the relative change rate not only provides an intuitive numerical value of the change in the water area, but also takes into account the time factor, providing the early warning system with the ability to dynamically monitor changes in the water area. By comparing the relative change rate with the preset drought risk value or flood risk value, the early warning system can intelligently identify potential drought or flood risks, generate early warning information in a timely manner, and provide decision-making support for relevant departments to take preventive measures.
[0095] In an optional embodiment, the specific steps of generating warning information based on the target area and the relative change rate of the target area are as follows:
[0096] When the target area is smaller than the first preset threshold, the early warning system generates a first early warning message, wherein the first preset threshold is a preset drought risk value of the relative area of the water area, and the first early warning message is used to characterize the existence of drought risk in the target water area.
[0097] Optionally, the above steps utilize the comparison between the target area and the first preset threshold to automatically identify the drought risk of the target water area and generate the first warning information. The monitoring mechanism can detect signs of drought in a timely manner and provide early warning for water resource management, ecological environment protection and disaster prevention, which is beneficial for relevant departments to make preparations in advance and reduce the negative impact of drought on the ecosystem and human activities.
[0098] When the target area is larger than the second preset threshold, the early warning system generates a second early warning message, wherein the second preset threshold is a preset flooding risk value of the relative area of the water area, and the second early warning message is used to characterize the existence of flooding risk in the target water area.
[0099] Optionally, by comparing the target area with a second preset threshold, the early warning system can quickly identify floods or potential flooding risks and generate a second early warning information in a timely manner. This monitoring mechanism can prevent flood disasters, prompt relevant departments and institutions to respond quickly, and organize emergency measures such as drainage and embankment reinforcement, thereby avoiding or reducing losses caused by floods.
[0100] When the absolute value of the relative rate of change is greater than the third preset threshold, the early warning system generates a third early warning message, wherein the third preset threshold is a preset risk value of a relative negative increase in the water area, and the third early warning message is used to indicate that the target water area shrinks at a speed exceeding a preset speed.
[0101] Optionally, the early warning system generates a third early warning message by monitoring the absolute value change of the relative change rate and detecting a rapid decrease in the target water area, which helps to detect the escalation of drought risk in advance, so that avoidance measures can be taken in time to avoid the occurrence of extreme drought disasters.
[0102] When the absolute value of the relative rate of change is greater than the fourth preset threshold, the early warning system generates a fourth early warning message, wherein the fourth preset threshold is a preset risk value of the relative positive increase in the water area, and the fourth early warning message is used to characterize that the target water area increases at a speed exceeding the preset speed.
[0103] Optionally, by monitoring the rapid growth of the target water area, the early warning system can generate a fourth warning information in the early stage of a flood event, providing a critical time window for flood control departments to deploy flood control materials, evacuate people, strengthen embankments in real time and other measures to reduce the extent of damage caused by the flood.
[0104] For example, the early warning mechanism can be triggered when the target area value of the target water area and the change in the relative rate of increase of the water area meet a single risk limit. The early warning system processes and extracts images taken from different target areas according to the differences of each target area, and sets the relative area drought risk value Dd, relative area flooding risk value Df, relative negative increase risk value Rr and relative positive increase risk value Ir in advance according to local conditions. For example, the early warning system uses 1 hour as the time unit, and the target area of the target water area increases from 1 / 5 to 1 / 4 of all pixels in the image as the limit. At this time, Df is 0.25 and Ir is 0.05; in extreme drought conditions, Dd is 0 and Rr is not set.
[0105] Specifically, the early warning system generates early warning information when any of the following conditions is met: if the target area S of any water area is less than or equal to Dd, an early warning prompt is issued; if the target area S of any water area is greater than or equal to Df, an early warning prompt is issued; if the absolute value of any relative negative increase F1 is greater than Rr, an early warning prompt is issued (if the risk value Rr is not set, it is planned to remove this early warning judgment); if the absolute value of any relative positive increase F1 is greater than Ir, an early warning prompt is issued.
[0106] Optionally, after generating the warning information, the warning system needs to send the warning information, the location information of the target water area detection, and the target area and relative change rate data to the information processing terminal, and then wait for the warning system to process and cancel the alarm. In addition, the warning information is updated according to the feedback and recorded valid information. The database corresponding to the AI algorithm platform requirements (i.e., the preset model) is updated, and it is judged whether the preset points of the image acquisition device need to be reset according to the actual situation (for example: when the water area disappears due to drought, the setting of the corresponding preset point is canceled; if a new water area is photographed during cruising in a non-preset point area, a preset point needs to be added, etc.).
[0107] In an optional embodiment, the preset model is trained through the following steps: first, the early warning system obtains an initial sample set collected by an image acquisition device installed on an iron tower, wherein the initial sample set includes at least images of different types of waters in different seasons, different time periods, different weather conditions, and different shooting angles; then, the early warning system performs style transfer and enhancement processing on the initial sample set to obtain a target sample set, wherein the style transfer is used to replace the style of any image in the initial sample set with a style of a different season from the image, and the enhancement processing is used to update the brightness and contrast of any image in the initial sample set; then, the early warning system obtains the preset model based on the target sample set training.
[0108] In the above embodiment, the step of collecting the initial sample set includes: collecting valid data in the supervision area of the tower above 10 meters according to the collection height of the monitoring system (i.e., image acquisition equipment) installed on the tower. Specifically, at least 20,000 pictures of forests, wetlands, and water areas where people are active are collected as the basic data set (i.e., initial sample set) of the deep learning model. The data collected from the forests, wetlands, and areas where people are active need to include various natural environmental factors to improve the accuracy of different time periods (only regular daytime) and The ability of the deep learning model to extract water features under different weather factors and other influencing factors, among which the time periods include sunrise time period, noon time period, and sunset time period; among which the weather includes sunny, cloudy, overcast, showers, thunderstorms, thunderstorms accompanied by hail, sleet, light rain, moderate rain, heavy rain, rainstorms, heavy rainstorms, torrential rain, snow showers, light snow, moderate snow, heavy snow, blizzards, fog, and freezing rain; among which, the shooting distance, height, and angle are generally based on a tower height of 15 to 20 meters as the shooting height, and a pitch angle of -45° to +45° as the shooting point of the monitoring equipment.
[0109] Optionally, after collecting the above-mentioned valid data, use FiftyOne (an open source computer vision dataset management, annotation and analysis platform) to manage the data, visualize the data in the basic dataset, and automatically annotate through a scripted workflow. In conjunction with CVAT (Computer Vision Annotation Tool, an open source image and video annotation tool), perform polygon line segmentation and minimum enclosing rectangle detection on the image water area. Through the integration of FiftyOne and CVAT, the early warning system selects a subset of unlabeled data and sends it to CVAT for annotation, evaluates the existing dataset to find incorrect annotations, and uses CVAT to improve the quality of the dataset. In addition, the early warning system can speed up data processing and improve the data quality of the dataset used in the model training process by inspecting images and videos, checking annotations, filtering data, and other means.
[0110] Optionally, the early warning system ensures the diversity and coverage of model training by widely collecting water images under different shooting conditions, so that the trained model can better understand and identify water characteristics in different situations, thereby enhancing the adaptability and generalization ability of the trained preset model in different environments.
[0111] Optionally, style transfer is a deep learning technology that is used to change the artistic style or seasonal characteristics of an image. During the training data preparation stage, the early warning system processes the data in the initial sample set through the background style transfer deep learning direction. According to the natural environment characteristics within the monitoring range of the tower, the early warning system replaces the style of the four seasons, that is, style transfer training is performed on pictures with four seasons styles. For example, winter snow scenes are added to summer landscapes in the image, lawns are added to open areas, and the appearance of spring forests is migrated to autumn withered scenes.
[0112] Specifically, in the process of deep learning for style transfer, the early warning system needs to prepare natural environment pictures of different styles and use the CycleGAN (Cycle-Consistent Adversarial Networks, a deep learning model for image-to-image conversion) model for training. The trained conversion dataset trainA (a dataset of 5,000 summer scenes) and the trained style dataset trainB (a dataset of 5,000 winter snow scenes) are put into the CycleGAN model for training to obtain the corresponding weight files. Then, the early warning system converts the summer picture testA to be converted into a picture testA' with a snow scene. After that, multiple pictures testA' generated by style transfer are added to the database.
[0113] Optionally, enhancement processing is an image processing technique that aims to improve the visual quality and features of an image, for example, by adjusting the brightness and contrast of the image to make the water features in the image more obvious and easier for subsequent model detection and distinction.
[0114] Specifically, the early warning system first performs data fusion enhancement based on the image data characteristics of the field environment. This involves using CVAT to cut out the water portion of the collected water feature dataset. Then, using cv2.resize (a function in the OpenCV library for adjusting image size) to scale the cutout result, thereby enhancing the detection accuracy of distant water targets. Poisson fusion (cv2.seamlessClone (a function in the OpenCV library for seamless image cloning) or cv2.addWeighted (a function in the OpenCV library for performing weighted image fusion) is then used to fuse the cutout portion with the selected background image. Multiple fused images are then added to the database.
[0115] Next, the early warning system performs random enhancement processing on all the images in the database, that is, using the albumenations (a Python library for implementing image enhancement operations) library to randomly adjust the brightness and contrast of the data in the training database at a ratio of 1 / 10 through the RandomBrightnessContrast (a Python function in the albumenations library for randomly adjusting the brightness and contrast of the image) function, and uses the GaussNoise (a Python function in the albumenations library for adding Gaussian noise to the image) and GaussianBlur (a Python function in the albumenations library for applying Gaussian blur to the image) functions to perform noise blur processing, and uses the CoarseDropout (a Python function in the albumenations library for randomly discarding large areas in the image) function to perform random occlusion processing.
[0116] In the above embodiment, by implementing style transfer and enhancement processing, the early warning system can expand and optimize the initial sample set, while increasing the diversity of images and strengthening the characteristics of water areas, so that the preset model can be exposed to more complex and changeable data inputs during the training process, thereby improving the robustness and recognition accuracy of the trained preset model.
[0117] In an optional embodiment, the step of obtaining a preset model based on training of a target sample set includes: first, the early warning system divides the target sample set into a training set, a validation set, and a test set; then, the early warning system iteratively trains a neural network model that introduces a multi-scale linear attention mechanism based on the images in the training set in combination with a real-time data enhancement method to obtain a first model; then, the early warning system updates the hyperparameters of the first model based on the images in the validation set in combination with a dynamic learning rate adjustment strategy to obtain a second model; and, the early warning system determines the performance parameters of the second model based on the images in the test set, wherein the performance parameters include at least accuracy, precision, and recall; finally, the early warning system uses the second model as the preset model when the performance parameters of the second model are greater than or equal to the preset parameters.
[0118] Optionally, the training set, validation set, and test set have different functions. The training set is used in the model training and learning phase, the validation set is used to adjust model parameters to avoid overfitting problems, and the test set is used to evaluate the final generalization performance of the model.
[0119] Optionally, the early warning system improves the YOLOv8 model. Based on the released YOLOv8 open source model, it imports the EfficientVit module to obtain a neural network model that introduces a multi-scale linear attention mechanism. The early warning system achieves global receptive field and multi-scale learning through lightweight and hardware-efficient operations.
[0120] In the above process, the early warning system needs to create a new backbone (the basic network structure in a deep learning model) network file efficientVit.py (a file used to define the architecture, forward propagation logic, parameter initialization and auxiliary functions of the EfficientViT model), modify the code in the associated file, create yolov8-efficientViT.yaml (a configuration file), and then load the configuration file to train the model.
[0121] Optionally, during model training, the pixel size of the images in the target sample set is set to 1280, and the training cycle is 300 rounds. The target sample set is divided into a training set, a validation set, and a test set in a ratio of 8:1:1. The training data is input into the YOLOv8 model and trained using a GPU (Graphics Processing Unit) terminal server.
[0122] After the database is fixedly enhanced, it is necessary to combine real-time data enhancement methods in the early stage of training, use Mosaic (four-image stitching) enhancement to improve small target detection capabilities and context understanding; perform random affine transformations: including rotation (-10° to 10°), translation (±20%), scaling (0.5 to 1.5 times), shearing (±10°), etc., to simulate changes in different perspectives; adjust brightness, contrast, saturation (±50%), apply Gaussian blur and noise injection to enhance model robustness; prevent a certain task from dominating training through task weight balancing (such as λ_mask = 0.5), and share the gradients of Backbone (basic network, the front end of the deep learning model) and Neck (transition network, used to integrate and optimize the features extracted by Backbone) with the detection and segmentation tasks, and the segmentation head is updated independently; SGD (Stochastic Gradient The momentum of stochastic gradient descent (SGD) is set to 0.937, and weight decay is used to prevent overfitting. The cosine annealing strategy is used to dynamically adjust the initial learning rate (such as 0.01) with the training round, and then fine-tune it to a relatively low value (such as 0.001) in the later stage. TAA (Task-Aligned Assigner, a positive and negative sample allocation strategy used in target detection models) is used to dynamically allocate positive samples based on the joint metric of classification score and regression IoU (Intersection over Union). FP16 (Half Precision Floating Point, a binary floating point format used to represent real numbers in computers) is used to accelerate training, combined with gradient scaling to avoid precision overflow. Finally, the early warning system exports the yolov8n-seg.engine model (i.e., the preset model) in the TensorRT (a deep learning inference engine optimization library) acceleration engine format for subsequent inference use.
[0123] Optionally, Figure 5 is a schematic diagram of a set of optional preset model parameters according to an embodiment of the present application, Figure 6 is a schematic diagram of another set of optional preset model parameters according to an embodiment of the present application, wherein the parameters in the preset model training process are as follows: Figure 5 and Figure 6 shown.
[0124] Optionally, time is a time control curve.
[0125] Optionally, train / box_loss is the positioning loss curve during training, representing the bounding box loss, which is used to measure the error between the predicted bounding box and the true bounding box, including the center position, width, and height of the bounding box. In the loss value curve over training rounds / steps shown in the chart, lower loss values indicate that the model predicts the bounding box more accurately.
[0126] Optionally, train / seg_loss is the segmentation loss curve during training, which is used to calculate the binary cross entropy loss pixel by pixel over the predicted segmented area and the ground truth (gt) segmented area.
[0127] Optionally, train / cls_loss is the classification loss curve during training, representing the category loss. It is used to measure the gap between the predicted category label and the true category label, reflecting the accuracy of the classifier. In the loss value curve over the training rounds / steps shown in the chart, a lower loss value indicates better classifier performance.
[0128] Optionally, train / dfl_loss is the target detection loss curve during training, representing the distributed focal loss (Distributed Focal Loss), which is used to address the class imbalance problem in localization tasks. In the loss value curve over training rounds / steps shown in the chart, lower loss values indicate better results for distributed localization tasks.
[0129] Optionally, metrics / precision(B) is a precision curve. Precision(Class B) indicates the proportion of positive samples predicted by the model that are true positive samples. Class B refers to the background class. In the precision curve over training rounds / steps shown in the graph, a higher precision indicates that the model is more accurate in detecting the background class.
[0130] Optionally, metrics / mAP50-95(B) stands for the average precision (category B) with an IoU threshold ranging from 0.5 to 0.95, which is used to evaluate the detection performance of the model at different IoU thresholds. In the mAP50-95 value curve over training rounds / steps shown in the chart, a higher mAP50-95 value indicates that the model has stronger overall performance in the background class.
[0131] Optionally, metrics / precision(M) is the precision curve, and class M refers to the target class.
[0132] Optionally, metrics / mAP50-95(M) represents the mean average precision (M classes) with IoU thresholds between 0.5 and 0.95.
[0133] Optionally, val / box_loss is the positioning loss curve during the verification process, which represents the bounding box loss. It is used to measure the error between the predicted bounding box and the true bounding box, including the center position, width, and height of the bounding box. In the loss value curve over the training rounds / steps shown in the chart, a lower loss value indicates that the model predicts the bounding box more accurately.
[0134] Optionally, val / seg_loss is the segmentation loss curve for the verification process. The segmentation loss is mainly used to calculate the binary cross entropy loss pixel by pixel between the predicted segmentation area and the GT segmentation area.
[0135] Optionally, metrics / recall(B) is a recall curve. Recall (Class B) indicates the proportion of actual positive samples detected by the model. Class B refers to the background class. In the recall curve over training rounds / steps shown in the graph, a higher recall indicates that the model has a stronger ability to detect the background class.
[0136] Optionally, metrics / recall(M) is the recall curve, and class M refers to the target class.
[0137] Optionally, metrics / mAP50(B) is the average precision when the IoU threshold is 0.5. The average precision (class B) when the IoU threshold is 0.5 reflects the accuracy of the model at this IoU threshold. In the mAP50 value curve over the training rounds or steps shown in the chart, a higher mAP50 value indicates that the model has higher detection accuracy in the background class.
[0138] Optionally, metrics / mAP50(M) is the mean average precision (M classes) at an IoU threshold of 0.5.
[0139] Optionally, val / cls_loss is the classification loss curve during the validation process, which represents the category loss. It is used to measure the gap between the predicted category label and the true category label, reflecting the accuracy of the classifier. In the loss value curve over the training rounds / steps shown in the chart, a lower loss value indicates better classifier performance.
[0140] To sum up, the early warning system has completed the construction of the core water feature extraction capability of the AI algorithm platform (i.e., the preset model) through the steps described in the above embodiments. After platform packaging, the early warning system transmits the input real-time monitoring screen to the input interface of the AI algorithm platform, and the AI algorithm platform program calls the deep learning network model for reasoning. Finally, it outputs the segmentation information corresponding to each input image.
[0141] During the experiment, after verification in the test set, this AI algorithm platform was used to test reasoning on the data in the test set. The accuracy rate of water area segmentation and detection was 0.95, the precision rate was 0.96, and the recall rate was 0.94. Compared with the image processing and recognition capabilities of other solutions, this AI algorithm platform achieved better recognition effects.
[0142] In an optional embodiment, Figure 7 This is a flow chart of an optional method for warning water changes based on visual recognition according to an embodiment of the present application, such as Figure 7 As shown, the method includes:
[0143] (1) Capture the image data of the preset point area (i.e., the image corresponding to the target water area) through a camera (i.e., an image acquisition device).
[0144] Optionally, Figure 8 is a schematic diagram of an optional installation of an image acquisition device on top of an iron tower according to an embodiment of the present application, such as Figure 8 As shown, the image acquisition equipment is installed on the top of the tower.
[0145] (2) Determine whether the degree of change in the image feature area (i.e., the similarity between the first image and the preset image) exceeds a threshold (i.e., the preset similarity). If it is lower than the threshold, directly send a preset point correction signal (i.e., target information) to the terminal, and wait for the early warning system or operation and maintenance personnel to perform equipment correction processing.
[0146] (3) If the degree of change in step (2) exceeds the threshold, the video stream is connected to the AI algorithm platform to extract water feature information through the AI algorithm platform.
[0147] (4) Determine the water area and increase (i.e., target area and rate of change of target area) through the AI algorithm platform based on deep learning algorithm.
[0148] (5) Drought risk and flooding risk are judged based on the water area, and the absolute value of negative and positive increase risk are judged based on the increase. When the risk is triggered, early warning information is generated and the early warning system or human intervention is required to eliminate the alarm.
[0149] (6) Record the image data, calculation parameters, and warning information used in the above steps.
[0150] From the above content, it can be seen that considering the planning and real-time requirements of comprehensive hardware facilities, the advantages of this application are as follows.
[0151] (1) Build an AI algorithm platform for the tower environment: Based on the hardware monitoring environment characteristics of the tower: high-point installation, wide visual range, and large changes in environmental factors, an AI algorithm platform built on a deep learning network is used to extract water features from image information of preset points, establish a training and testing database for tower monitoring water areas, apply algorithm programs suitable for tower data pre-processing enhancement, and optimize the specific backbone network structure in the deep learning model to improve the performance and acceleration of water feature extraction; ultimately, this platform has the ability to segment and detect water features with high precision suitable for the complex environment of the tower.
[0152] (2) Early warning mechanism based on image information processing: Through rapid and efficient logical analysis of the water area image information in the relative coordinates of the camera, the flooding and drought conditions of the water area can be accurately judged; the early warning can be triggered by a single condition or joint judgment of the area risk value corresponding to flooding and drought and the corresponding water area increase risk value; the area extraction algorithm and the water area increase rate can be applied to the calculation process of extracting effective information parameters.
[0153] (3) Multiple redundancy judgments for fixed area settings: Starting from the use of hardware functions, the camera preset point function is set to ensure that valid data of the same area is extracted within the detection time; starting from the software algorithm level, an image feature area change calculation algorithm is added, which not only avoids the possibility of hardware equipment being affected by external forces and issuing false warning signals, but also improves the ability to extract valid data; double redundancy judgment improves the quality of the data to be processed and reduces the consumption of computing power and the cost of engineering manpower.
[0154] (4) Closed-loop tower water area monitoring information processing technology: The whole process includes collecting and producing a database that conforms to the monitoring environment based on the tower camera / pan-tilt monitoring environment; using advanced artificial intelligence technology to solve the problem of extracting image information in complex environments; extracting and judging the parameter information required for early warning based on the relative camera coordinate system, and achieving early warning capabilities under multiple redundant guarantees with less computing power, and feeding back the early warning information and effective information to the operation and maintenance personnel for processing, and waiting for the alarm to be eliminated; based on the effective information and early warning information recorded in the feedback, returning to update the database required by the AI algorithm platform and updating the preset point settings of each camera point.
[0155] According to another aspect of the embodiment of the present application, a water area change warning device is also provided. Figure 9 is a schematic diagram of an optional water area change warning device according to an embodiment of the present application, such as Figure 9 As shown, the water area change warning device includes: a first generating unit 901, a first input unit 902, a first determining unit 903 and a second generating unit 904.
[0156] Optionally, the first generation unit is used to generate a target signal when the similarity between the first image and the preset image is less than a preset similarity, wherein the first image is an image captured when the image acquisition device is at a preset point, and the target signal is used to prompt the operation and maintenance personnel to update the preset point information of the image acquisition device, and the image acquisition device is used to monitor the target water area; the first input unit is used to input the first image into a preset model to obtain segmentation information when the similarity between the first image and the preset image is greater than or equal to the preset similarity, wherein the preset model is used to obtain information of the target water area from the input image, and the segmentation information includes at least the position and shape of the target water area; the first determination unit is used to determine the target area of the target water area at the moment of the first image acquisition based on the segmentation information; the second generation unit is used to generate early warning information based on the target area and the relative change rate of the target area.
[0157] In an optional embodiment, the water area change warning device further includes: a first acquisition unit, an updating unit, a shooting unit, and a second acquisition unit.
[0158] Optionally, a first acquisition unit is used to acquire N preset points corresponding to the image acquisition device, wherein N is an integer greater than or equal to 1, and each preset point corresponds to an identifier, a parameter set, and a preset image, and the parameter set at least includes the pan / tilt parameters and shooting parameters corresponding to the image acquisition device; an updating unit is used to update the parameters of the image acquisition device according to the parameter set of the i-th preset point when the image acquisition device is at the i-th preset point among the N preset points, wherein the i-th preset point is any preset point among the N preset points; a shooting unit is used to control the image acquisition device to shoot a preset area after updating the parameters of the image acquisition device according to the parameter set of the i-th preset point, to obtain a first image corresponding to the i-th preset point, wherein the preset area includes the target water area; a second acquisition unit is used to obtain the similarity between the first image corresponding to the i-th preset point and the preset image corresponding to the i-th preset point.
[0159] In an optional embodiment, the second acquisition unit further includes: a detection subunit, a matching subunit, a first determination subunit, and a second determination subunit.
[0160] Optionally, a detection subunit is used to perform key point detection on the first image corresponding to the i-th preset point and the preset image corresponding to the i-th preset point to obtain a first key point and a second key point, wherein the first key point is a key point in the first image and the second key point is a key point in the preset image; a matching subunit is used to match the first key point and the second key point to obtain L pairs of matching results, wherein L is a positive integer, and the difference between the first key point and the second key point included in each pair of matching results in the L pairs of matching results is less than or equal to the preset difference; a first determination subunit is used to determine the error of each pair of matching results based on the transfer matrix corresponding to the L pairs of matching results, wherein the error of each pair of matching results is used to characterize the Euclidean distance between the first key point and the second key point included in the pair of matching results; a second determination subunit is used to determine the similarity between the first image and the corresponding preset image based on the errors corresponding to the L pairs of matching results.
[0161] In an optional embodiment, the water area change warning device further includes: a third acquisition unit, an alignment operation unit, a fusion unit and a second input unit.
[0162] Optionally, a third acquisition unit is used to acquire N first images corresponding to N preset points; an alignment operation unit is used to perform an alignment operation on the N first images to obtain N second images, wherein the alignment operation is used to align the first image corresponding to each preset point with the preset image corresponding to the preset point through perspective transformation; a fusion unit is used to fuse M second images with overlapping areas when there are overlapping areas between any two or more of the N second images to obtain a target image, wherein M is a positive integer less than or equal to N; and a second input unit is used to input the target image into a preset model.
[0163] In an optional embodiment, the water area change warning device further includes: a fourth acquisition unit, a fifth acquisition unit and a second determination unit.
[0164] Optionally, the fourth acquisition unit is used to acquire a third image corresponding to the target preset point, wherein the target preset point is the preset point at which the image acquisition device is located when the first image is taken, and the third image is an image taken at a historical moment when the image acquisition device is at the target preset point; the fifth acquisition unit is used to acquire a historical area corresponding to the third image, wherein the historical area is the area of the target water area at the moment of acquisition of the third image; the second determination unit is used to determine the relative change rate of the target area based on the target area and the historical area.
[0165] In an optional embodiment, the second generation unit further includes: a first generation subunit, a second generation subunit, a third generation subunit and a fourth generation subunit.
[0166] Optionally, the first generating subunit is used to generate a first warning message when the target area is smaller than a first preset threshold value, wherein the first preset threshold value is a preset relative water area drought risk value, and the first warning message is used to characterize the existence of a drought risk in the target water area; the second generating subunit is used to generate a second warning message when the target area is larger than a second preset threshold value, wherein the second preset threshold value is a preset relative water area flooding risk value, and the second warning message is used to characterize the existence of a flooding risk in the target water area; the third generating subunit is used to generate a third warning message when the absolute value of the relative change rate is larger than a third preset threshold value, wherein the third preset threshold value is a preset relative negative water area increase risk value, and the third warning message is used to characterize that the target water area shrinks at a speed exceeding a preset speed; the fourth generating subunit is used to generate a fourth warning message when the absolute value of the relative change rate is larger than a fourth preset threshold value, wherein the fourth preset threshold value is a preset relative positive water area increase risk value, and the fourth warning message is used to characterize that the target water area increases at a speed exceeding a preset speed.
[0167] In an optional embodiment, the water area change warning device further includes: a fifth acquisition unit, an enhanced processing unit, and a training unit.
[0168] Optionally, a fifth acquisition unit is used to acquire an initial sample set collected by an image acquisition device installed on the tower, wherein the initial sample set includes at least images of different types of waters in different seasons, different time periods, different weather conditions, and different shooting angles; the enhancement processing unit is used to perform style migration and enhancement processing on the initial sample set to obtain a target sample set, wherein the style migration is used to replace the style of any image in the initial sample set with a style of a different season from the image, and the enhancement processing is used to update the brightness and contrast of any image in the initial sample set; the training unit is used to obtain a preset model based on the target sample set.
[0169] In an optional embodiment, the training unit further includes: a division subunit, an iterative training subunit, a policy adjustment subunit, a third determination subunit, and a fourth determination subunit.
[0170] Optionally, a division subunit is used to divide the target sample set into a training set, a validation set and a test set; an iterative training subunit is used to iteratively train the neural network model that introduces a multi-scale linear attention mechanism based on the images in the training set in combination with a real-time data enhancement method to obtain a first model; a policy adjustment subunit is used to update the hyperparameters of the first model based on the images in the validation set in combination with a dynamic learning rate adjustment strategy to obtain a second model; a third determination subunit is used to determine the performance parameters of the second model based on the images in the test set, wherein the performance parameters include at least accuracy, precision and recall rate; a fourth determination subunit is used to use the second model as the preset model when the performance parameters of the second model are greater than or equal to the preset parameters.
[0171] From the above content, it can be seen that the present application adopts a method of performing similarity detection on the image captured when the image acquisition device is at the preset point and the preset image, so as to realize the timely generation of target signals in the case of posture deviation of the image acquisition device or misplaced parameter settings (that is, the similarity between the above-mentioned first image and the preset image is less than the preset similarity) to prompt the operation and maintenance personnel to update the preset point information, thereby effectively avoiding the problem of distortion of water area monitoring information caused by the deviation of the image acquisition device.
[0172] At the same time, for the first image that meets the similarity standard, the present application uses the preset model obtained by pre-training to accurately segment and identify the position and shape of the target water area from the input first image, providing a data basis for the subsequent calculation of the target area of the target water area. Afterwards, when generating early warning information, the present application not only refers to the target area of the target water area, but also refers to the relative change rate of the target area, thereby improving the accuracy and reliability of the water area change warning, and thus solving the technical problem of low accuracy of the early warning information generated in the process of monitoring the water area in the existing technology.
[0173] According to another aspect of an embodiment of the present application, a computer program product is further provided, which includes a stored computer program, wherein when the computer program is running, the computer program product is controlled to execute any one of the above-mentioned water area change warning methods.
[0174] According to another aspect of an embodiment of the present application, an electronic device is also provided, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any of the above-mentioned water area change warning methods by executing the executable instructions.
[0175] Optionally, Figure 10 is a schematic diagram of an optional electronic device according to an embodiment of the present application, such as Figure 10As shown, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program stored in the memory and runnable on the processor. When the processor executes the program, any one of the above-mentioned water area change warning methods is implemented.
[0176] The above-mentioned embodiments or examples disclosed in this application are not exhaustive, but are only illustrations of some embodiments or examples, and are not intended to be specific limitations on the scope of protection disclosed in this application. In the absence of contradiction, each step in a certain embodiment or example in this application can be implemented as an independent example, and the steps can be arbitrarily combined. For example, the solution after removing some steps in a certain embodiment or example can also be implemented as an independent example, and the order of the steps in a certain embodiment or example can be arbitrarily exchanged. In addition, the optional methods or optional examples in a certain embodiment or example can be arbitrarily combined; in addition, the various embodiments or examples can be arbitrarily combined. For example, some or all of the steps in different embodiments or examples can be arbitrarily combined, and a certain embodiment or example can be arbitrarily combined with the optional methods or optional examples of other embodiments or examples.
[0177] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0178] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0179] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0180] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0181] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory. Memory may include non-permanent storage in a computer-readable medium, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0182] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.
[0183] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0184] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0185] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A water area change early warning method, characterized in that: include: generating a target signal when the similarity between the first image and the preset image is less than a preset similarity, wherein the first image is an image captured when the image acquisition device is at a preset point, and the target signal is used to prompt an operation and maintenance personnel to update the preset point information of the image acquisition device, and the image acquisition device is used to monitor the target water area; When the similarity between the first image and the preset image is greater than or equal to the preset similarity, inputting the first image into a preset model to obtain segmentation information, wherein the preset model is used to segment the input image to obtain information of the target water area, the segmentation information including at least the position and shape of the target water area; determining a target area of the target water area at the first image acquisition moment according to the segmentation information; Early warning information is generated based on the target area and the relative rate of change of the target area.
2. The water area change early warning method according to claim 1, characterized in that: Before generating the target signal, the water area change warning method further includes: Obtaining N preset points corresponding to the image acquisition device, where N is an integer greater than or equal to 1, and each preset point corresponds to an identifier, a parameter set, and a preset image, wherein the parameter set includes at least pan / tilt parameters and camera parameters corresponding to the image acquisition device; When the image acquisition device is at an i-th preset point among the N preset points, updating the parameters of the image acquisition device according to the parameter set of the i-th preset point, wherein the i-th preset point is any one of the N preset points; After updating the parameters of the image acquisition device according to the parameter set of the i-th preset point, controlling the image acquisition device to capture a preset area to obtain a first image corresponding to the i-th preset point, wherein the preset area includes the target water area; A similarity between the first image corresponding to the i-th preset point and the preset image corresponding to the i-th preset point is obtained.
3. The water area change early warning method according to claim 2, characterized in that: Obtaining a similarity between a first image corresponding to the i-th preset point and a preset image corresponding to the i-th preset point includes: Performing key point detection on the first image corresponding to the i-th preset point and the preset image corresponding to the i-th preset point to obtain a first key point and a second key point, wherein the first key point is a key point in the first image, and the second key point is a key point in the preset image; Matching the first key point and the second key point to obtain L pairs of matching results, where L is a positive integer, and the difference between the first key point and the second key point included in each pair of matching results in the L pairs of matching results is less than or equal to a preset difference; Determining an error of each pair of matching results based on the transfer matrices corresponding to the L pairs of matching results, wherein the error of each pair of matching results is used to represent the Euclidean distance between the first key point and the second key point included in the pair of matching results; The similarity between the first image and the corresponding preset image is determined based on the errors corresponding to the L pairs of matching results.
4. The water area change early warning method according to claim 2, characterized in that: After controlling the image acquisition device to photograph the preset area, the water area change warning method further includes: Acquire N first images corresponding to the N preset points; Performing an alignment operation on the N first images to obtain N second images, wherein the alignment operation is used to align the first image corresponding to each preset point with the preset image corresponding to the preset point by means of perspective transformation; When any two or more of the N second images have overlapping areas, fusing the M second images with overlapping areas to obtain a target image, where M is a positive integer less than or equal to N; The target image is input into the preset model.
5. The water area change early warning method according to claim 1, characterized in that: Before generating warning information based on the target area and the relative change rate of the target area, the water area change warning method further includes: Acquire a third image corresponding to a target preset point, wherein the target preset point is the preset point at which the image acquisition device was located when the first image was captured, and the third image is an image captured at a historical moment when the image acquisition device was at the target preset point; Acquire a historical area corresponding to the third image, wherein the historical area is the area of the target water area at the time when the third image was captured; A relative change rate of the target area is determined according to the target area and the historical area.
6. The water area change early warning method according to claim 1, characterized in that: Generating warning information based on the target area and the relative rate of change of the target area includes: When the target area is smaller than a first preset threshold, generating a first warning message, wherein the first preset threshold is a preset drought risk value of the relative area of the water area, and the first warning message is used to indicate that the target water area has a drought risk; If the target area is larger than a second preset threshold, a second warning message is generated, wherein the second preset threshold is a preset flooding risk value of the relative area of the water area, and the second warning message is used to indicate that the target water area has a flooding risk; When the absolute value of the relative rate of change is greater than a third preset threshold, a third warning message is generated, wherein the third preset threshold is a preset risk value of a relative negative increase in the water area, and the third warning message is used to indicate that the speed at which the target water area shrinks exceeds the preset speed; When the absolute value of the relative rate of change is greater than a fourth preset threshold, a fourth warning message is generated, wherein the fourth preset threshold is a preset risk value of a relative positive increase in the water area, and the fourth warning message is used to indicate that the target water area increases at a speed exceeding the preset speed.
7. The water area change early warning method according to claim 1, characterized in that: The preset model is trained by the following steps: Acquire an initial sample set collected by an image acquisition device installed on a tower, wherein the initial sample set includes at least images of different types of water bodies in different seasons, different time periods, different weather conditions, and different shooting angles; Performing style transfer and enhancement processing on the initial sample set to obtain a target sample set, wherein the style transfer is used to replace the style of any image in the initial sample set with a style of a different season from that of the image, and the enhancement processing is used to update the brightness and contrast of any image in the initial sample set; The preset model is obtained by training according to the target sample set.
8. The water area change early warning method according to claim 7, characterized in that: The preset model is obtained by training the target sample set, including: Dividing the target sample set into a training set, a validation set, and a test set; Iteratively training a neural network model that introduces a multi-scale linear attention mechanism based on the images in the training set in combination with a real-time data augmentation method to obtain a first model; Based on the images in the validation set and in combination with a dynamic learning rate adjustment strategy, the hyperparameters of the first model are updated to obtain a second model; Determining performance parameters of the second model based on the images in the test set, wherein the performance parameters include at least accuracy, precision, and recall; When the performance parameter of the second model is greater than or equal to the preset parameter, the second model is used as the preset model.
9. A water area change warning device, characterized in that: include: a first generating unit, configured to generate a target signal when a similarity between a first image and a preset image is less than a preset similarity, wherein the first image is an image captured when the image acquisition device is at a preset point, and the target signal is used to prompt an operation and maintenance personnel to update the preset point information of the image acquisition device, and the image acquisition device is used to monitor a target water area; a first input unit, configured to input the first image into a preset model to obtain segmentation information when the similarity between the first image and the preset image is greater than or equal to the preset similarity, wherein the preset model is configured to segment the input image to obtain information of the target water area, the segmentation information including at least a position and a shape of the target water area; a first determining unit, configured to determine a target area of the target water area at the first image acquisition moment according to the segmentation information; The second generating unit is configured to generate warning information according to the target area and the relative change rate of the target area.
10. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the water area change warning method described in any one of claims 1 to 8.