Distributed swimming pool anti-drowning monitoring method and device and electronic equipment thereof

Through the scientific layout surveillance camera and intelligent analysis monitoring images, build a square monitoring area, solve the problem of comprehensive and real -time monitoring of large or complex swimming pool environments, and realize the real -time monitoring and drowning risk of all areas in the swimming pool. Early warning.

CN119383479APending Publication Date: 2025-01-28SHANGHAI RUOYIMAN DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411563739.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The existing swimming pool safety monitoring system is difficult to achieve comprehensive and real-time monitoring in large or complex swimming pool environments, resulting in an increase in the risk of drowning accidents.

Method used

Through accurate computing and flexible construction of a square monitoring area, scientifically deploy the surveillance camera, and combine the method of intelligent analysis monitoring images to achieve comprehensive and real -time monitoring of all areas in the swimming pool.

Benefits of technology

The comprehensive and real -time monitoring of all areas in the swimming pool, timely discovery and warning of drowning risk, significantly reduced the risk of drowning accidents, and provided a strong guarantee for the safety of the swimming pool.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119383479A_ABST
    Figure CN119383479A_ABST
Patent Text Reader

Abstract

The invention provides a distributed swimming pool anti-drowning monitoring method and device and electronic equipment thereof, and relates to the technical field of computer vision, and the method comprises the steps: obtaining a first target point of a swimming pool, and monitoring an installation area; based on the first target point of the swimming pool, determining perpendicular feet of the first target point of the swimming pool on two sides of the monitoring installation area, namely a first perpendicular foot point and a second perpendicular foot point; respectively determining a first linear distance between the first target point and the first perpendicular foot point of the swimming pool and a second linear distance between the first target point and the second perpendicular foot point of the swimming pool based on the first target point, the first perpendicular foot point and the second perpendicular foot point of the swimming pool; when the first linear distance meets the preset distance and the second linear distance does not meet the preset distance, constructing a first square based on the first target point, the second foot point and the second linear distance of the swimming pool; and determining distributed monitoring installation points based on the first target point of the swimming pool and the first square. According to the invention, through accurate calculation and flexible construction of the square monitoring area, effective monitoring of the target point in the swimming pool is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology, and in particular to a distributed swimming pool drowning prevention monitoring method, device and electronic equipment thereof. Background Art

[0002] In the existing swimming pool safety monitoring system, the traditional monitoring method often relies on manual observation or fixed camera layout, which has problems such as large monitoring blind spots, slow response speed, and insufficient detection of small targets. Especially in large swimming pools or complex swimming pool environments, due to the large area of ​​the swimming pool, frequent and uneven distribution of personnel activities, it is difficult for traditional monitoring methods to achieve comprehensive and real-time monitoring of all areas in the swimming pool, thereby increasing the risk of drowning accidents.

[0003] In order to overcome the shortcomings of traditional swimming pool monitoring systems, in recent years, with the rapid development of computer vision and artificial intelligence technology, intelligent monitoring systems based on video analysis have gradually become a new trend in swimming pool safety monitoring. However, the existing intelligent monitoring systems still have some technical bottlenecks in swimming pool drowning prevention monitoring. For example, although some systems can realize automatic detection of targets in swimming pools, due to the limitations of algorithm performance, the detection effect of small targets is often poor, and it is easy to miss or misdetect; at the same time, the layout and installation location of monitoring cameras are also lacking in scientificity and rationality, resulting in the existence of monitoring blind spots.

[0004] Therefore, a distributed swimming pool drowning prevention monitoring method, device and electronic equipment thereof are proposed. Summary of the invention

[0005] This specification provides a distributed swimming pool drowning prevention monitoring method, device and electronic equipment thereof, which realizes effective monitoring of target points in the swimming pool through precise calculation and flexible construction of square monitoring areas.

[0006] This specification provides a distributed swimming pool drowning prevention monitoring method, including:

[0007] Get the first target point of the swimming pool and the monitoring installation area;

[0008] Based on the first target point of the swimming pool, determine the feet of the first target point of the swimming pool on both sides of the monitoring installation area, which are the first foot point of the vertical position and the second foot point of the vertical position;

[0009] Based on the first target point of the swimming pool, the first perpendicular foot point, and the second perpendicular foot point, respectively determine a first straight-line distance between the first target point of the swimming pool and the first perpendicular foot point, and a second straight-line distance between the first target point of the swimming pool and the second perpendicular foot point;

[0010] Determine whether the first straight-line distance and the second straight-line distance meet a preset distance;

[0011] When the first straight-line distance satisfies the preset distance and the second straight-line distance does not satisfy the preset distance, constructing a first square based on the first target point of the swimming pool, the second perpendicular foot point, and the second straight-line distance;

[0012] A distributed monitoring installation point is determined based on the first target point of the swimming pool and the first square.

[0013] Optionally, also include:

[0014] When the first straight-line distance satisfies the preset distance and the second straight-line distance satisfies the preset distance, setting the first straight-line distance and the second straight-line distance to fixed distance values;

[0015] Construct a second square based on the first target point of the swimming pool, the first perpendicular point, the second perpendicular point, and the fixed distance value;

[0016] A distributed monitoring installation point is determined based on the first target point of the swimming pool and the second square.

[0017] Optionally, also include:

[0018] When the first straight-line distance does not satisfy the preset distance, and the second straight-line distance satisfies the preset distance, constructing a third square based on the first target point of the swimming pool, the first perpendicular point, and the first straight-line distance;

[0019] A distributed monitoring installation point is determined based on the first target point of the swimming pool and the third square.

[0020] Optionally, determining a distributed monitoring installation point based on the first target point of the swimming pool and the first square includes:

[0021] Determine a diagonal line starting from the first target point of the swimming pool based on the first target point of the swimming pool and the first square;

[0022] A monitoring installation projection point is selected on a diagonal line starting from the first target point of the swimming pool, and the distributed monitoring installation point is determined based on the monitoring installation projection point.

[0023] Optionally, determination of the second target point of the swimming pool includes:

[0024] Obtain the distance D between the second target point of the swimming pool and the distributed monitoring installation point, and the distance E between the second target point of the swimming pool and the monitoring installation projection point;

[0025] The maximum visible radius R of the distributed monitoring installation point is determined based on the distance D between the second target point of the swimming pool and the distributed monitoring installation point and the distance E between the second target point of the swimming pool and the monitoring installation projection point. Specifically:

[0026]

[0027] Optionally, obtaining the distance D between the second target point of the swimming pool and the distributed monitoring installation point includes:

[0028]

[0029] Among them, W includes the actual width of the second target point of the swimming pool, H includes the actual height of the second target point of the swimming pool, w includes the imaging length of the second target point of the swimming pool in monitoring, h includes the imaging width of the second target point of the swimming pool in monitoring, ImageH includes the number of pixels of the monitoring picture height, ImageW includes the number of pixels of the monitoring picture width, and HFOV includes the horizontal field of view of monitoring.

[0030] Optional, including:

[0031] Get surveillance pictures;

[0032] Marking the target on the monitoring picture to obtain a monitoring picture with a marking frame;

[0033] Determine whether the total pixel count of the area of ​​the marked frame is less than the preset pixel count;

[0034] When the total pixel of the area of ​​the marked box is less than the preset pixel, the monitoring picture with the marked box is processed as a small target through the YOLOV5 model to obtain an inverted monitoring sub-picture;

[0035] Enlarging the size of the monitoring sub-image to obtain a monitoring sub-image of a preset size;

[0036] The monitoring sub-image of the preset size is analyzed through the CBAM attention mechanism, the weight parameters are updated by optimizing GIoULoss, and the anti-drowning monitoring results are output.

[0037] This specification provides a distributed swimming pool drowning prevention monitoring device, including:

[0038] Acquisition module, used to acquire the first target point of the swimming pool and monitor the installation area;

[0039] A first determination module is used to determine the feet of the first target point of the swimming pool on both sides of the monitoring installation area based on the first target point of the swimming pool, which are respectively a first foot point of the perpendicular and a second foot point of the perpendicular;

[0040] A second determination module is used to determine a first straight-line distance between the first target point of the swimming pool and the first perpendicular foot point, and a second straight-line distance between the first target point of the swimming pool and the second perpendicular foot point, respectively, based on the first target point of the swimming pool, the first perpendicular foot point, and the second perpendicular foot point;

[0041] A judging module, used to judge whether the first straight-line distance and the second straight-line distance meet a preset distance;

[0042] A construction module, configured to construct a first square based on the first target point of the swimming pool, the second perpendicular point, and the second straight-line distance when the first straight-line distance satisfies the preset distance and the second straight-line distance does not satisfy the preset distance;

[0043] The third determination module is used to determine a distributed monitoring installation point based on the first target point of the swimming pool and the first square.

[0044] Optionally, also include:

[0045] When the first straight-line distance satisfies the preset distance and the second straight-line distance satisfies the preset distance, setting the first straight-line distance and the second straight-line distance to fixed distance values;

[0046] Construct a second square based on the first target point of the swimming pool, the first perpendicular point, the second perpendicular point, and the fixed distance value;

[0047] A distributed monitoring installation point is determined based on the first target point of the swimming pool and the second square.

[0048] Optionally, also include:

[0049] When the first straight-line distance does not satisfy the preset distance, and the second straight-line distance satisfies the preset distance, constructing a third square based on the first target point of the swimming pool, the first perpendicular point, and the first straight-line distance;

[0050] A distributed monitoring installation point is determined based on the first target point of the swimming pool and the third square.

[0051] Optionally, the third determining module includes:

[0052] Determine a diagonal line starting from the first target point of the swimming pool based on the first target point of the swimming pool and the first square;

[0053] A monitoring installation projection point is selected on a diagonal line starting from the first target point of the swimming pool, and the distributed monitoring installation point is determined based on the monitoring installation projection point.

[0054] Optionally, determination of the second target point of the swimming pool includes:

[0055] Obtain the distance D between the second target point of the swimming pool and the distributed monitoring installation point, and the distance E between the second target point of the swimming pool and the monitoring installation projection point;

[0056] The maximum visible radius R of the distributed monitoring installation point is determined based on the distance D between the second target point of the swimming pool and the distributed monitoring installation point and the distance E between the second target point of the swimming pool and the monitoring installation projection point. Specifically:

[0057]

[0058] Optionally, obtaining the distance D between the second target point of the swimming pool and the distributed monitoring installation point includes:

[0059]

[0060] Among them, W includes the actual width of the second target point of the swimming pool, H includes the actual height of the second target point of the swimming pool, w includes the imaging length of the second target point of the swimming pool in monitoring, h includes the imaging width of the second target point of the swimming pool in monitoring, ImageH includes the number of pixels of the monitoring picture height, ImageW includes the number of pixels of the monitoring picture width, and HFOV includes the horizontal field of view of monitoring.

[0061] Optional, including:

[0062] Get surveillance pictures;

[0063] Marking the target on the monitoring picture to obtain a monitoring picture with a marking frame;

[0064] Determine whether the total pixel count of the area of ​​the marked frame is less than the preset pixel count;

[0065] When the total pixel of the area of ​​the marked box is less than the preset pixel, the monitoring picture with the marked box is processed as a small target through the YOLOV5 model to obtain an inverted monitoring sub-picture;

[0066] Enlarging the size of the monitoring sub-image to obtain a monitoring sub-image of a preset size;

[0067] The monitoring sub-image of the preset size is analyzed through the CBAM attention mechanism, the weight parameters are updated by optimizing GIoULoss, and the anti-drowning monitoring results are output.

[0068] This specification also provides an electronic device, wherein the electronic device includes:

[0069] processor; and,

[0070] A memory storing computer executable instructions, which when executed cause the processor to perform any of the above methods.

[0071] The present specification also provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, any of the above methods is implemented.

[0072] In the present invention, through the scientific layout of monitoring cameras and intelligent analysis of monitoring images, comprehensive and real-time monitoring of all areas in the swimming pool is achieved, and drowning risks are discovered and warned in time, providing strong protection for swimming pool safety. BRIEF DESCRIPTION OF THE DRAWINGS

[0073] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0074] Figure 1 A schematic diagram of the principle of a distributed swimming pool drowning prevention monitoring method provided in an embodiment of this specification;

[0075] Figure 2 A schematic diagram of the camera installation angle and camera imaging area;

[0076] Figure 3 Display schematic diagram for pool identification frame;

[0077] Figure 4 A schematic diagram of auxiliary lines for calculating the camera installation position;

[0078] Figure 5 A diagram of the physical coordinates for the nine-point positioning of the Tianzi grid method;

[0079] Figure 6 Build a schematic for the FastReID model;

[0080] Figure 7 It is a schematic diagram of the overall structure;

[0081] Figure 8 It is a schematic diagram of the structure of the monitoring screen;

[0082] Fig. 9 This is a schematic diagram of multi-camera cross-border tracking;

[0083] Fig.10 A schematic diagram of the structure of a distributed swimming pool drowning prevention monitoring device provided in an embodiment of this specification;

[0084] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of this specification;

[0085] Fig.12 A schematic diagram of a computer-readable medium provided for an embodiment of this specification. DETAILED DESCRIPTION

[0086] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art can think of other obvious variations. The basic principles of the present invention defined in the following description can be applied to other embodiments, variations, improvements, equivalents, and other technical solutions that do not deviate from the spirit and scope of the present invention.

[0087] The following is combined with Figure 1-12 The exemplary embodiments of the present invention are described more fully. However, the exemplary embodiments can be implemented in various forms, and it should not be understood that the present invention is limited to the embodiments set forth herein. On the contrary, providing these exemplary embodiments can make the present invention more comprehensive and complete, and it is more convenient to fully convey the inventive concept to those skilled in the art. The same reference numerals in the figures represent the same or similar elements, components or parts, and thus their repeated description will be omitted.

[0088] Under the premise of being consistent with the technical concept of the present invention, the features, structures, characteristics or other details described in a specific embodiment do not exclude that they can be combined in one or more other embodiments in a suitable manner.

[0089] In the description of specific embodiments, the features, structures, characteristics or other details described in the present invention are intended to enable those skilled in the art to fully understand the embodiments. However, it does not exclude that those skilled in the art can practice the technical solutions of the present invention without one or more of the specific features, structures, characteristics or other details.

[0090] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0091] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0092] The term "and / or" or "and / or" includes all combinations of any one or more of the associated listed items.

[0093] like Figure 1 As shown, a distributed swimming pool drowning prevention monitoring method provided by an embodiment of this specification includes:

[0094] S110: Acquire the first target point of the swimming pool and monitor the installation area;

[0095] In the specific implementation of this specification, Figure 2 As shown, the design of installing the camera above the swimming pool has significant and multifaceted advantages, including:

[0096] 1) This installation method allows cables to be laid in the top area of ​​the pool, greatly simplifying the installation process and reducing the complexity of construction. In addition, this layout makes minimal changes to the existing structure of the pool, effectively protecting the original design and structural safety of the pool, while ensuring that the appearance of the pool is not affected, maintaining its original decorative style and ornamental value.

[0097] 2) The camera monitors the swimming pool from a bird's-eye view, which can fully capture the dynamics of the swimming pool plane without considering the complex changes in the vertical direction, thereby simplifying the acquisition and analysis process of the monitoring image. Under this configuration, when planning the monitoring range of the camera, you only need to pay attention to and adjust its horizontal field of view angle parameters, which not only makes the relevant calculation work more intuitive and convenient, but also significantly improves the accuracy of the monitoring coverage area calculation, ensuring that the monitoring is efficient and has no blind spots.

[0098] To sum up, the solution of installing cameras above the swimming pool not only achieves the goal of convenient and efficient construction and installation with little impact on the original structure, but also achieves the advantages of comprehensive coverage and accurate calculation in monitoring effect. It is an ideal choice for swimming pool safety monitoring and management.

[0099] S120: Determine, based on the first target point of the swimming pool, the feet of the perpendiculars of the first target point of the swimming pool on both sides of the monitoring installation area, which are respectively a first perpendicular foot point and a second perpendicular foot point;

[0100] In the specific implementation of this specification, Figure 3 As shown in the figure, a certain point of the swimming pool is selected as the starting point, taking the first target point I of the swimming pool as an example. Point O is the foot of the perpendicular of point I on the straight line EF, that is, the first perpendicular point; point P is the foot of the perpendicular of point I on the straight line HE, that is, the second perpendicular point

[0101] S130: Determine, based on the first target point of the swimming pool, the first perpendicular foot point, and the second perpendicular foot point, respectively, a first straight-line distance between the first target point of the swimming pool and the first perpendicular foot point, and a second straight-line distance between the first target point of the swimming pool and the second perpendicular foot point;

[0102] S140: Determine whether the first straight-line distance and the second straight-line distance meet a preset distance;

[0103] S150: When the first straight-line distance satisfies the preset distance and the second straight-line distance does not satisfy the preset distance, constructing a first square based on the first target point of the swimming pool, the second perpendicular foot point, and the second straight-line distance;

[0104] In the specific implementation of this specification, the first straight-line distance meets the preset distance, that is, IO>3 meters, then IO=3 meters. The second straight-line distance does not meet the preset distance, that is, IP<3 meters, and the actual value is taken. A square IPEO is constructed with the minimum value of IO and IP as the side length and I as the vertex.

[0105] Optionally, also include:

[0106] When the first straight-line distance satisfies the preset distance and the second straight-line distance satisfies the preset distance, setting the first straight-line distance and the second straight-line distance to fixed distance values;

[0107] Construct a second square based on the first target point of the swimming pool, the first perpendicular point, the second perpendicular point, and the fixed distance value;

[0108] A distributed monitoring installation point is determined based on the first target point of the swimming pool and the second square.

[0109] In a specific implementation of this specification, the first straight-line distance satisfies the preset distance, that is, IO>3 meters, and IO=3 meters. The second straight-line distance satisfies the preset distance, that is, IP>3 meters, and IP=3 meters.

[0110] Optionally, also include:

[0111] When the first straight-line distance does not satisfy the preset distance, and the second straight-line distance satisfies the preset distance, constructing a third square based on the first target point of the swimming pool, the first perpendicular point, and the first straight-line distance;

[0112] A distributed monitoring installation point is determined based on the first target point of the swimming pool and the third square.

[0113] In the specific implementation of this specification, if the first straight-line distance meets the preset distance, i.e., IO<3 meters, the actual value is taken. If the second straight-line distance does not meet the preset distance, i.e., IP>3 meters, IP=3 meters is taken. A square is constructed with the minimum value of IO and IP as the side length and I as the vertex.

[0114] S160: Determine a distributed monitoring installation point based on the first target point of the swimming pool and the first square.

[0115] Optionally, the S160 includes:

[0116] Determine a diagonal line starting from the first target point of the swimming pool based on the first target point of the swimming pool and the first square;

[0117] A monitoring installation projection point is selected on a diagonal line starting from the first target point of the swimming pool, and the distributed monitoring installation point is determined based on the monitoring installation projection point.

[0118] Optionally, determination of the second target point of the swimming pool includes:

[0119] Obtain the distance D between the second target point of the swimming pool and the distributed monitoring installation point, and the distance E between the second target point of the swimming pool and the monitoring installation projection point;

[0120] The maximum visible radius R of the distributed monitoring installation point is determined based on the distance D between the second target point of the swimming pool and the distributed monitoring installation point and the distance E between the second target point of the swimming pool and the monitoring installation projection point. Specifically:

[0121]

[0122] Optionally, obtaining the distance D between the second target point of the swimming pool and the distributed monitoring installation point includes:

[0123]

[0124] Among them, W includes the actual width of the second target point of the swimming pool, H includes the actual height of the second target point of the swimming pool, w includes the imaging length of the second target point of the swimming pool in monitoring, h includes the imaging width of the second target point of the swimming pool in monitoring, ImageH includes the number of pixels of the monitoring picture height, ImageW includes the number of pixels of the monitoring picture width, and HFOV includes the horizontal field of view of monitoring.

[0125] In the specific implementation of this specification, it is assumed that the length of the second target point of the swimming pool in the 1920*1080 pixel image is w and the width is h. The pixel size of the target in the image is calculated based on the principle of similar triangles. Considering the geometric relationship between the camera and the target A, the following proportional formula can be obtained:

[0126]

[0127]

[0128] According to the above ratio, the following calculation formula can be obtained

[0129]

[0130]

[0131] The recognition of images by human eyes is indeed a complex and subjective process, which often needs to be verified and optimized through field measurements and a lot of practice. In the present invention, based on extensive actual scene tests, the size of the camera imaging picture is carefully set to 1920 pixels × 1080 pixels (i.e., full HD resolution).

[0132] The choice of this size is not random, but the result of careful consideration and technical trade-offs. It aims to achieve the best balance between image clarity and transmission bandwidth. Specifically: the resolution of 1920 pixels × 1080 pixels can provide enough details and clarity to ensure that the key information in the monitoring picture can be accurately captured and identified. This is especially important for application scenarios that require high-definition monitoring, such as security monitoring, motion analysis, medical diagnosis, etc. While maintaining image clarity, this resolution also takes into account the actual limitations of network transmission. Too high a resolution will increase the amount of data transmitted, put pressure on the network bandwidth, and may even cause problems such as transmission delays or frame loss. The resolution of 1920 pixels × 1080 pixels can effectively reduce the amount of data transmitted, improve transmission efficiency and stability while ensuring image quality.

[0133] Optional, including:

[0134] Get surveillance pictures;

[0135] Marking the target on the monitoring picture to obtain a monitoring picture with a marking frame;

[0136] Determine whether the total pixel count of the area of ​​the marked frame is less than the preset pixel count;

[0137] When the total pixel of the area of ​​the marked box is less than the preset pixel, the monitoring picture with the marked box is processed as a small target through the YOLOV5 model to obtain an inverted monitoring sub-picture;

[0138] Enlarging the size of the monitoring sub-image to obtain a monitoring sub-image of a preset size;

[0139] The monitoring sub-image of the preset size is analyzed through the CBAM attention mechanism, the weight parameters are updated by optimizing GIoULoss, and the anti-drowning monitoring results are output.

[0140] In the specific implementation of this specification, Figure 4As shown in the figure, when the target is far away from the camera, the pixels of the image are very small, and it is difficult for the human eye to recognize the state of the target. These image samples need to be labeled. After the labeling is completed, the samples need to be trained in the YOLOV5 format. If the target in the sample is relatively small, the model trained after labeling will also have low accuracy in recognizing small targets.

[0141] After each camera is installed, the nine-point method needs to be used to calibrate the relevant positions in the image to complete the direct conversion between image coordinates and physical coordinates. In order to obtain a more accurate coordinate conversion, the Tianzi grid method is used here to mark the physical coordinates of the nine-point positioning, such as Figure 5 As shown in the figure, 1-9 points are the points that need to be marked for the nine-point positioning. In actual operation, colored ropes are used to form a grid and placed in the swimming pool for the camera to image. The length of each rope needs to be measured and registered in advance.

[0142] Collect the images from each camera and annotate the status of the people in them. The annotated targets are set to three states: standing, above water, and underwater according to their actual status, and generate monitoring images with annotated boxes.

[0143] Calculate the total number of pixels in the area within the annotated box and compare it with the preset pixel threshold. The preset pixel threshold is usually set according to factors such as the monitoring scene and the size of the target to determine whether the target is a small target. When the total number of pixels in the annotated box area is less than the preset pixel, the target is considered to be a small target. Use the YOLOv5 model to detect and process small targets in the monitoring image with the annotated box, and extract the monitoring sub-image containing the small target. The extracted monitoring sub-image is enlarged to increase the number of pixels of the target and improve the accuracy of subsequent processing. The enlarged size is usually set according to the requirements of the subsequent processing steps. Use the CBAM (Convolutional Block Attention Module) attention mechanism to analyze the enlarged monitoring sub-image. The CBAM attention mechanism can enhance the model's attention to important features and improve the detection accuracy of small targets. During the training process, the optimized GIoU (Generalized Intersection over Union) Loss function is used to update the weight parameters of the model. GIoU Loss is an improved IoU Loss that can better handle non-overlapping situations between target boxes and improve the positioning accuracy of the model. Based on the processed monitoring images and model output, determine whether there is a drowning risk and output the corresponding monitoring results. The monitoring results may include the level of drowning risk, location information, warning signals, etc.

[0144] In the post-processing stage of the target detection model, the DIoU-NMS (Distance-IoU Non-Maximum Suppression) algorithm is used to replace the traditional NMS algorithm. The DIoU-NMS algorithm takes into account the center distance and IoU (Intersection over Union) value between the predicted boxes, and can more accurately retain the best predicted box and suppress redundant boxes.

[0145] The present invention also uses the FastReID model to implement cross-border tracking functions, such as Figure 6 As shown in the figure, cameras 1, 2, and 3 work together as a group. When collecting samples, the swimming direction of the swimmer is particularly considered to ensure that continuous back-and-forth samples of the same swimmer from camera 1 to camera 3 can be collected. In order to improve the model performance, the present invention integrates multiple backbone networks such as ResNet, ResNeXt, and ResNeSt into the FastReID model. Figure 7 As shown in the figure. In order to reduce the complexity of the model and the computational cost, the system adopts an integrated learning strategy to extract different network learning features for comprehensive utilization to achieve the best effect. The video of each camera is set to 24 frames per second. After each frame is preprocessed, the pre-trained YOLOV5 model is used for target recognition. The recognized data is tracked by the trained cross-border tracking model, and the returned data set is stored in the memory. In order to intuitively display the target state, the system marks it with boxes of different colors according to the recognition results: standing state with yellow box, underwater swimming state with orange box, and above-water swimming state with purple box. The tracking number of the current target is also displayed in each recognition box to ensure that the tracking number of the same target in the same group of cameras remains consistent regardless of its state. For targets that may show signs of drowning, the system will use a bold red box for special prompts and send a reminder to the monitoring personnel in the form of voice. The reminder information includes the monitoring camera number, monitoring area, monitoring lane and target status. The system provides the following drowning sign determination methods: in all frame segments in the past 10 seconds, the same target is underwater for 90% of the total states; standing in the same position for more than 10 minutes continuously (pay special attention to the elderly, who may stand by the pool for a long time before developing underlying diseases while swimming); holding breath in the same position for more than 15 seconds continuously.

[0146] It should be noted that the system only prompts the monitoring personnel to make observations in advance. When the monitoring personnel confirm that there is a danger of drowning, they can issue a prompt to the lifeguard through the system operation button. The lifeguard receives the prompt information through the Bluetooth headset he wears. The information includes the monitoring area, monitoring lane and target status, so that rescue measures can be taken in time.

[0147] The overall structure of the system is as follows Figure 8As shown in the figure, the intelligent anti-drowning monitoring system is highly integrated and flexible, and can monitor the swimming pool area in all directions to ensure the safety of swimmers. The monitoring screen can be displayed on a variety of devices, including mobile phones, tablets, PCs, laptops, and large-screen devices. Users only need to install the specified APP on the corresponding device to easily access the monitoring interface. The monitoring interface is carefully designed and divided into three main parts:

[0148] 1) Pool global interface: This interface integrates the surveillance images of all cameras and arranges them in the order of the cameras. The unified arrangement ensures that the same target can pass through different cameras in order, which is convenient for the cross-camera tracking model to match the target. Cameras in the same row correspond to the same camera group when the cross-camera tracking model is trained, which is convenient for monitoring personnel to quickly identify and understand. In the pool global interface, monitoring personnel can clearly observe the movement status and trajectory of everyone in the pool, ensuring that the entire pool area is monitored without omission.

[0149] 2) Single camera monitoring interface: This interface focuses on displaying the monitoring screen of a single camera, providing a more detailed observation perspective. The middle of the interface displays the monitoring video information, the left side lists all the normal targets being monitored, and the right side displays abnormal targets. This interface only displays the target screen within the current camera range. When the target moves to the monitoring range of other cameras, it will stop displaying on this interface and rely on the cross-camera tracking model to uniformly fit and track the target. This design not only ensures the continuity of monitoring, but also improves the processing efficiency of the system.

[0150] 3) Single target information interface: In a single camera monitoring screen, click on any target to enter the single target information interface. This interface displays the target's unified number, type, status and other key information in detail. If the monitoring personnel believe that the target is in an abnormal state, they can immediately send an alarm message to the on-site lifeguard through the alarm button provided in the interface. The alarm information contains detailed information of the target and screenshots or video clips of the monitoring screen, which is convenient for the lifeguard to make a quick judgment and response.

[0151] The structure of the monitoring screen is as follows: Fig. 9 As shown, the connection and interaction between various parts are demonstrated through intuitive graphics and layout. This design not only improves the ease of use of the system, but also ensures that the monitoring personnel can quickly grasp the overall situation of the swimming pool area and make correct judgments and decisions in a timely manner.

[0152] In the present invention, through the scientific layout of monitoring cameras and intelligent analysis of monitoring images, comprehensive and real-time monitoring of all areas in the swimming pool is achieved, and drowning risks are discovered and warned in time, providing strong protection for swimming pool safety.

[0153] Fig.10A schematic diagram of the principle of a distributed swimming pool drowning prevention monitoring device provided in an embodiment of this specification, the device may include:

[0154] An acquisition module 10 is used to acquire the first target point of the swimming pool and the monitoring installation area;

[0155] A first determination module 20 is used to determine the feet of the first target point of the swimming pool on both sides of the monitoring installation area based on the first target point of the swimming pool, which are the first foot point of the vertical and the second foot point of the vertical;

[0156] A second determination module 30 is used to determine a first straight-line distance between the first target point of the swimming pool and the first perpendicular foot point, and a second straight-line distance between the first target point of the swimming pool and the second perpendicular foot point, respectively, based on the first target point of the swimming pool, the first perpendicular foot point, and the second perpendicular foot point;

[0157] A judging module 40, configured to judge whether the first straight-line distance and the second straight-line distance meet a preset distance;

[0158] A construction module 50, configured to construct a first square based on the first target point of the swimming pool, the second perpendicular point, and the second straight-line distance when the first straight-line distance satisfies the preset distance and the second straight-line distance does not satisfy the preset distance;

[0159] The third determination module 60 is used to determine a distributed monitoring installation point based on the first target point of the swimming pool and the first square.

[0160] Optionally, also include:

[0161] When the first straight-line distance satisfies the preset distance and the second straight-line distance satisfies the preset distance, setting the first straight-line distance and the second straight-line distance to fixed distance values;

[0162] Construct a second square based on the first target point of the swimming pool, the first perpendicular point, the second perpendicular point, and the fixed distance value;

[0163] A distributed monitoring installation point is determined based on the first target point of the swimming pool and the second square.

[0164] Optionally, also include:

[0165] When the first straight-line distance does not satisfy the preset distance, and the second straight-line distance satisfies the preset distance, constructing a third square based on the first target point of the swimming pool, the first perpendicular point, and the first straight-line distance;

[0166] A distributed monitoring installation point is determined based on the first target point of the swimming pool and the third square.

[0167] Optionally, the third determining module 60 includes:

[0168] Determine a diagonal line starting from the first target point of the swimming pool based on the first target point of the swimming pool and the first square;

[0169] A monitoring installation projection point is selected on a diagonal line starting from the first target point of the swimming pool, and the distributed monitoring installation point is determined based on the monitoring installation projection point.

[0170] Optionally, determination of the second target point of the swimming pool includes:

[0171] Obtain the distance D between the second target point of the swimming pool and the distributed monitoring installation point, and the distance E between the second target point of the swimming pool and the monitoring installation projection point;

[0172] The maximum visible radius R of the distributed monitoring installation point is determined based on the distance D between the second target point of the swimming pool and the distributed monitoring installation point and the distance E between the second target point of the swimming pool and the monitoring installation projection point. Specifically:

[0173]

[0174] Optionally, obtaining the distance D between the second target point of the swimming pool and the distributed monitoring installation point includes:

[0175]

[0176] Among them, W includes the actual width of the second target point of the swimming pool, H includes the actual height of the second target point of the swimming pool, w includes the imaging length of the second target point of the swimming pool in monitoring, h includes the imaging width of the second target point of the swimming pool in monitoring, ImageH includes the number of pixels of the monitoring picture height, ImageW includes the number of pixels of the monitoring picture width, and HFOV includes the horizontal field of view of monitoring.

[0177] Optional, including:

[0178] Get surveillance pictures;

[0179] Marking the target on the monitoring picture to obtain a monitoring picture with a marking frame;

[0180] Determine whether the total pixel count of the area of ​​the marked frame is less than the preset pixel count;

[0181] When the total pixel of the area of ​​the marked box is less than the preset pixel, the monitoring picture with the marked box is processed as a small target through the YOLOV5 model to obtain an inverted monitoring sub-picture;

[0182] Enlarging the size of the monitoring sub-image to obtain a monitoring sub-image of a preset size;

[0183] The monitoring sub-image of the preset size is analyzed through the CBAM attention mechanism, the weight parameters are updated by optimizing GIoULoss, and the anti-drowning monitoring results are output.

[0184] The functions of the device in the embodiment of the present invention have been described in the above method embodiment, so for details not provided in the description of this embodiment, please refer to the relevant description in the above embodiment, and no further description will be given here.

[0185] Based on the same inventive concept, an embodiment of this specification also provides an electronic device.

[0186] The following describes an electronic device embodiment of the present invention, which can be regarded as a specific physical implementation of the method and device embodiments of the present invention. The details described in the electronic device embodiment of the present invention should be regarded as a supplement to the above method or device embodiments; details not disclosed in the electronic device embodiment of the present invention can be implemented with reference to the above method or device embodiments.

[0187] Fig.11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this specification. Fig.11 The electronic device 300 according to this embodiment of the present invention is described. Fig.11 The electronic device 300 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0188] like Fig.11 As shown, the electronic device 300 is in the form of a general computing device. The components of the electronic device 300 may include, but are not limited to: at least one processing unit 310, at least one storage unit 320, a bus 330 connecting different system components (including the storage unit 320 and the processing unit 310), a display unit 340, etc.

[0189] The storage unit stores program codes, which can be executed by the processing unit 310, so that the processing unit 310 performs the steps according to various exemplary embodiments of the present invention described in the above processing method section of this specification. For example, the processing unit 310 can perform the following steps: Figure 1 Steps shown.

[0190] The storage unit 320 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 3201 and / or a cache memory unit 3202 , and may further include a read-only memory unit (ROM) 3203 .

[0191] The storage unit 320 may also include a program / utility 3204 having a set (at least one) of program modules 3205, such program modules 3205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.

[0192] Bus 330 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0193] The electronic device 300 may also communicate with one or more external devices 400 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable viewers to interact with the electronic device 300, and / or any device that enables the electronic device 300 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed through an input / output (I / O) interface 350. Furthermore, the electronic device 300 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 360. The network adapter 360 may communicate with other modules of the electronic device 300 through the bus 330. It should be understood that although Figure 1 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 300, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0194] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the exemplary embodiments described in the present invention can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation method of the present invention can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.) or on a network, including a number of instructions to enable a computing device (which can be a personal computer, server, or network device, etc.) to execute the above method according to the present invention. When the computer program is executed by a data processing device, the computer-readable medium can implement the above method of the present invention, that is: Figure 1 The method shown.

[0195] Fig.12 A schematic diagram of a computer-readable medium provided for an embodiment of this specification.

[0196] accomplish Figure 1 The computer program of the method shown can be stored on one or more computer readable media. The computer readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0197] The computer readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by an instruction execution system, an apparatus, or a device or used in combination with it. The program code contained on the readable storage medium may be transmitted with any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.

[0198] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the viewer computing device, partially on the viewer device, as a stand-alone software package, partially on the viewer computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the viewer computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0199] In summary, the present invention can be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that general data processing devices such as microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components in the embodiments of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0200] The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the present invention is not inherently related to any specific computer, virtual device or electronic device, and various general devices can also implement the present invention. The above description is only a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

[0201] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0202] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A distributed swimming pool drowning prevention monitoring method, characterized in that: include: Get the first target point of the swimming pool and the monitoring installation area; Based on the first target point of the swimming pool, determine the feet of the first target point of the swimming pool on both sides of the monitoring installation area, which are the first foot point of the vertical position and the second foot point of the vertical position; Based on the first target point of the swimming pool, the first perpendicular foot point, and the second perpendicular foot point, respectively determine a first straight-line distance between the first target point of the swimming pool and the first perpendicular foot point, and a second straight-line distance between the first target point of the swimming pool and the second perpendicular foot point; Determine whether the first straight-line distance and the second straight-line distance meet a preset distance; When the first straight-line distance satisfies the preset distance and the second straight-line distance does not satisfy the preset distance, constructing a first square based on the first target point of the swimming pool, the second perpendicular foot point, and the second straight-line distance; A distributed monitoring installation point is determined based on the first target point of the swimming pool and the first square.

2. The distributed swimming pool drowning prevention monitoring method according to claim 1, characterized in that: Also includes: When the first straight-line distance satisfies the preset distance and the second straight-line distance satisfies the preset distance, setting the first straight-line distance and the second straight-line distance to fixed distance values; Construct a second square based on the first target point of the swimming pool, the first perpendicular point, the second perpendicular point, and the fixed distance value; A distributed monitoring installation point is determined based on the first target point of the swimming pool and the second square.

3. The distributed swimming pool drowning prevention monitoring method according to claim 1, characterized in that: Also includes: When the first straight-line distance does not satisfy the preset distance, and the second straight-line distance satisfies the preset distance, constructing a third square based on the first target point of the swimming pool, the first perpendicular foot point, and the first straight-line distance; A distributed monitoring installation point is determined based on the first target point of the swimming pool and the third square.

4. The distributed swimming pool drowning prevention monitoring method according to claim 1, characterized in that: The step of determining a distributed monitoring installation point based on the first target point of the swimming pool and the first square includes: Determine a diagonal line starting from the first target point of the swimming pool based on the first target point of the swimming pool and the first square; A monitoring installation projection point is selected on a diagonal line starting from the first target point of the swimming pool, and the distributed monitoring installation point is determined based on the monitoring installation projection point.

5. The distributed swimming pool drowning prevention monitoring method according to claim 4, characterized in that: Determination of the second target point of the swimming pool, including Obtain the distance D between the second target point of the swimming pool and the distributed monitoring installation point, and the distance E between the second target point of the swimming pool and the monitoring installation projection point; The maximum visible radius R of the distributed monitoring installation point is determined based on the distance D between the second target point of the swimming pool and the distributed monitoring installation point and the distance E between the second target point of the swimming pool and the monitoring installation projection point. Specifically: 。 6. The distributed swimming pool drowning prevention monitoring method according to claim 5, characterized in that: The obtaining of the distance D between the second target point of the swimming pool and the distributed monitoring installation point includes: Among them, W includes the actual width of the second target point of the swimming pool, H includes the actual height of the second target point of the swimming pool, w includes the imaging length of the second target point of the swimming pool in monitoring, h includes the imaging width of the second target point of the swimming pool in monitoring, ImageH includes the number of pixels of the monitoring picture height, ImageW includes the number of pixels of the monitoring picture width, and HFOV includes the horizontal field of view of monitoring.

7. The distributed swimming pool drowning prevention monitoring method according to claim 6, characterized in that: include: Get surveillance pictures; Marking the target on the monitoring picture to obtain a monitoring picture with a marking frame; Determine whether the total pixel count of the area of ​​the marked frame is less than the preset pixel count; When the total pixel of the area of ​​the marked box is less than the preset pixel, the monitoring picture with the marked box is processed as a small target through the YOLOV5 model to obtain an inverted monitoring sub-picture; Enlarging the size of the monitoring sub-image to obtain a monitoring sub-image of a preset size; The monitoring sub-image of the preset size is analyzed through the CBAM attention mechanism, the weight parameters are updated by optimizing the GIoU Loss, and the anti-drowning monitoring results are output.

8. A distributed swimming pool drowning prevention monitoring device, characterized in that: include: Acquisition module, used to acquire the first target point of the swimming pool and monitor the installation area; A first determination module is used to determine the feet of the first target point of the swimming pool on both sides of the monitoring installation area based on the first target point of the swimming pool, which are respectively a first foot point of the perpendicular and a second foot point of the perpendicular; A second determination module is used to determine a first straight-line distance between the first target point of the swimming pool and the first perpendicular foot point, and a second straight-line distance between the first target point of the swimming pool and the second perpendicular foot point, respectively, based on the first target point of the swimming pool, the first perpendicular foot point, and the second perpendicular foot point; A judging module, used to judge whether the first straight-line distance and the second straight-line distance meet a preset distance; A construction module, configured to construct a first square based on the first target point of the swimming pool, the second perpendicular point, and the second straight-line distance when the first straight-line distance satisfies the preset distance and the second straight-line distance does not satisfy the preset distance; The third determination module is used to determine a distributed monitoring installation point based on the first target point of the swimming pool and the first square.

9. An electronic device, wherein: The electronic device includes: processor; and, A memory storing computer executable instructions which, when executed, cause the processor to perform a method according to any one of claims 1-7.

10. A computer-readable storage medium, wherein: The computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, the method of any one of claims 1 to 7 is implemented.