Swimming drowning identification method and device and electronic equipment

By using object detection and tracking models in the swimming pool to identify the swimmer's posture and trajectory, we automatically judge the risk of drowning and initiate an alarm, solving the high-intensity work and environmental complexity problems of artificial lifeguards in the swimming pool drowning protection, and improving drowning warning accuracy and monitoring coverage.

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

Patent Information

Application Number
CN202411219123.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

The existing swimming pool drowning protection mainly relies on artificial lifeguards, which have high-intensity work requirements, environmental complexity affects judgment and reaction speed, and the inability to take into account all swimmers' safety risks at the same time during peak hours, resulting in an increase in drowning accidents.

Method used

A swimming drowning recognition method is adopted to obtain and frame the swimming pool surveillance video, use the target detection and tracking model to identify the swimmer's posture and trajectory, establish a preset time trajectory data set, and judge the drowning risk by combining the average movement speed and underwater proportion. , automatically initiate drowning alarm reminder.

Benefits of technology

It improves the intelligence level of swimming pool monitoring and the accuracy of drowning warnings, reduces detection interruptions caused by target occlusion and movement, ensures that monitoring has no dead corners, automatically prompts lifeguards, and enhances the safety management of swimming places.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119274104A_ABST
    Figure CN119274104A_ABST
Patent Text Reader

Abstract

The invention provides a swimming drowning identification method and device and electronic equipment, and relates to the technical field of computers, and the method comprises the steps: obtaining swimming pool monitoring videos of a plurality of subareas; framing the swimming pool monitoring video according to the partitions to obtain a single-frame swimming pool monitoring picture; identifying the single-frame swimming pool monitoring picture through a target detection model to obtain a target bounding box and a type thereof; continuously tracking the image in the target bounding box through a target tracking model to obtain a tracking result; and establishing a preset time trajectory data set based on the tracking result, and performing swimming drowning identification on the preset time trajectory data set through an anti-drowning model to obtain a swimming drowning identification result. The intelligent level of swimming pool monitoring and the accuracy of drowning early warning are improved, powerful technical support is provided for safety management of swimming places, and life safety of swimmers is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device and electronic equipment for identifying swimming drowning. Background Art

[0002] Globally, drowning has become a serious public safety issue, seriously threatening people's lives, especially those of teenagers and children. According to the World Health Organization's Global Drowning Report, drowning accidents occur frequently, with more than 40 people dying every hour and 372,000 people losing their lives every year. More than half of the drowning deaths are under the age of 25, which is a shocking statistic.

[0003] As one of the high-incidence areas of drowning accidents, the safety protection measures of swimming pools are particularly important. However, the current drowning protection of swimming pools mainly relies on the artificial lifeguard system. Although lifeguards play an indispensable role in preventing drowning accidents, this model has many limitations. First, lifeguards need to maintain a high degree of mental concentration for a long time in harsh working environments (such as high temperature, high humidity, and high noise), which places extremely high demands on the physical strength and willpower of lifeguards. Secondly, the swimming pool environment is complex and changeable, with many interference factors such as reflections, obstructions by markers, swimmers fighting, diving, swimming gear, and equipment. These factors may affect the judgment and reaction speed of lifeguards, thereby increasing the risk of drowning accidents.

[0004] More importantly, with the increasing number of swimmers and the growing popularity of swimming activities, it is difficult to meet the actual needs of drowning prevention by relying solely on artificial lifeguards. During peak hours, lifeguards may not be able to take into account the safety of all swimmers at the same time, resulting in an increased risk of drowning. In addition, there is the possibility of misjudgment and missed judgment in artificial lifesaving, which further increases the risk of drowning accidents.

[0005] Therefore, a swimming drowning identification method, device and electronic equipment are proposed. Summary of the invention

[0006] This manual provides a method, device and electronic equipment for identifying swimming drowning, which improves the intelligence level of swimming pool monitoring and the accuracy of drowning warning, provides strong technical support for the safety management of swimming places, and ensures the life safety of swimmers.

[0007] This specification provides a method for identifying swimming drowning, including: Get the pool surveillance video of several partitions; Divide the swimming pool monitoring video into frames according to the partitions to obtain single-frame swimming pool monitoring pictures; The single-frame swimming pool monitoring picture is identified by a target detection model to obtain a target bounding box and its type; Continuously tracking the image within the target boundary box through a target tracking model to obtain a tracking result; A preset time trajectory data set is established based on the tracking result, and swimming drowning recognition is performed on the preset time trajectory data set through an anti-drowning model to obtain a swimming drowning recognition result.

[0008] Optionally, obtaining the swimming pool monitoring videos of several partitions includes: The swimming pool is divided into preset area divisions, and at least one camera is set in each division. The camera in each division is connected to the network through a POE switch, and the RTST protocol in the camera in each division is turned on. The FPS of the camera in each division is set to a preset integer to obtain swimming pool monitoring videos of several divisions.

[0009] Optionally, the preset integer has a value range of 8-12.

[0010] Optionally, before establishing a preset time trajectory dataset based on the tracking result, the method includes: Determining whether there is an unrecognizable image in the tracking result; When there are unrecognizable images in the tracking result, the tracking result is supplemented with frames.

[0011] Optionally, the performing swimming drowning recognition on the preset time trajectory data set by using the drowning prevention model to obtain a swimming drowning recognition result includes: The target types of the preset time trajectory data set include standing posture, floating board posture, water swimming posture, and underwater swimming posture; When the target posture is an above-water swimming posture or an underwater swimming posture, determining the most recent first time target average moving speed based on the preset time trajectory data set; Determine whether the average moving speed of the target at the most recent first time is greater than a speed threshold; When the average moving speed of the most recent first time target is greater than the speed threshold, determining whether the underwater proportion of the most recent second time target is greater than the first proportion threshold; When the underwater proportion of the most recent second time target is greater than the first proportion threshold, a drowning alarm reminder is initiated.

[0012] Optionally, the performing swimming drowning recognition on the preset time trajectory data set by using a drowning prevention model to obtain a swimming drowning recognition result further includes: When the most recent first time target average moving speed is less than the first speed threshold, a third time is rewinded starting from each second to obtain a plurality of third time target moving speeds; Determine whether the moving speed of the third time target is less than the speed threshold, and record the number; Determine the normal speed value ratio based on the number of the third time target moving speeds that are less than the speed threshold; Determine whether the normal speed value ratio is less than a second ratio threshold; When the normal speed value ratio is less than the second ratio threshold, obtaining the duration of being in the underwater swimming posture continuously from the current moment; Determining whether the duration exceeds a safe time; When the duration exceeds the safety time, a drowning alarm reminder is initiated.

[0013] Optionally, the performing swimming drowning recognition on the preset time trajectory data set by using a drowning prevention model to obtain a swimming drowning recognition result further includes: When the duration does not exceed the safety time, obtaining the latest fourth time trajectory data, and determining whether the latest fourth time trajectory data is an irregular curve; When the most recent fourth time trajectory data is an irregular curve, a drowning alarm reminder is initiated.

[0014] This specification provides a swimming drowning identification device, including: An acquisition module is used to acquire the monitoring videos of the swimming pool in several partitions; A framing module, used to frame the swimming pool monitoring video according to the partitions to obtain a single-frame swimming pool monitoring picture; A recognition module, used to recognize the single-frame swimming pool monitoring picture through a target detection model to obtain a target bounding box and its type; A tracking module, used for continuously tracking the image within the target boundary box through a target tracking model to obtain a tracking result; An establishment module is used to establish a preset time trajectory data set based on the tracking result, and to perform swimming drowning recognition on the preset time trajectory data set through an anti-drowning model to obtain a swimming drowning recognition result.

[0015] Optionally, the acquisition module includes: The swimming pool is divided into preset area divisions, and at least one camera is set in each division. The camera in each division is connected to the network through a POE switch, and the RTST protocol in the camera in each division is turned on. The FPS of the camera in each division is set to a preset integer to obtain swimming pool monitoring videos of several divisions.

[0016] Optionally, the preset integer has a value range of 8-12.

[0017] Optionally, before establishing the module, the steps include: Determining whether there is an unrecognizable image in the tracking result; When there are unrecognizable images in the tracking result, the tracking result is supplemented with frames.

[0018] Optionally, the establishing module includes: The target types of the preset time trajectory data set include standing posture, floating board posture, water swimming posture, and underwater swimming posture; When the target posture is an above-water swimming posture or an underwater swimming posture, determining the most recent first time target average moving speed based on the preset time trajectory data set; Determine whether the average moving speed of the target at the most recent first time is greater than a speed threshold; When the average moving speed of the most recent first time target is greater than the speed threshold, determining whether the underwater proportion of the most recent second time target is greater than the first proportion threshold; When the underwater proportion of the most recent second time target is greater than the first proportion threshold, a drowning alarm reminder is initiated.

[0019] Optionally, the establishment module further includes: When the most recent first time target average moving speed is less than the first speed threshold, a third time is rewinded starting from each second to obtain a plurality of third time target moving speeds; Determine whether the moving speed of the third time target is less than the speed threshold, and record the number; Determine the normal speed value ratio based on the number of the third time target moving speeds that are less than the speed threshold; Determine whether the normal speed value ratio is less than a second ratio threshold; When the normal speed value ratio is less than the second ratio threshold, obtaining the duration of being in the underwater swimming posture continuously from the current moment; Determining whether the duration exceeds a safe time; When the duration exceeds the safety time, a drowning alarm reminder is initiated.

[0020] Optionally, the establishment module further includes: When the duration does not exceed the safety time, obtaining the latest fourth time trajectory data, and determining whether the latest fourth time trajectory data is an irregular curve; When the most recent fourth time trajectory data is an irregular curve, a drowning alarm reminder is initiated.

[0021] This specification also provides an electronic device, wherein the electronic device includes: processor; and, A memory storing computer executable instructions, which when executed cause the processor to perform any of the above methods.

[0022] 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.

[0023] In the present invention, tourists do not need to wear any equipment, and there is no difference from normal swimming. When encountering the danger of drowning, the system will automatically prompt the lifeguard; by processing the monitoring video by partitioning, not only the processing efficiency is improved, but also more refined monitoring and analysis can be carried out for specific areas to ensure that there are no blind spots in monitoring; the target tracking model is used to continuously track the identified target, which effectively avoids detection interruptions caused by target occlusion, movement, etc., and ensures the continuity and accuracy of tracking, thereby improving the intelligence level of swimming pool monitoring and the accuracy of drowning warning, providing strong technical support for the safety management of swimming places, and ensuring the life safety of swimmers. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] 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.

[0025] Figure 1 A schematic diagram of the principle of a method for identifying drowning in swimming provided in an embodiment of this specification; Figure 2 A schematic diagram of partition monitoring provided in an embodiment of this specification; Figure 3 A schematic diagram of the structure of a swimming drowning identification device provided in an embodiment of this specification; Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of this specification; Figure 5 A schematic diagram of a computer-readable medium provided for an embodiment of this specification. DETAILED DESCRIPTION

[0026] 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.

[0027] The following is combined with Figure 1-5 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.

[0028] 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.

[0029] 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.

[0030] 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.

[0031] 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.

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

[0033] Figure 1 A schematic diagram of the principle of a method for identifying drowning in swimming provided in an embodiment of this specification, the method may include: S110: Obtaining swimming pool surveillance videos of several partitions; Optionally, the S110 includes: The swimming pool is divided into preset area divisions, and at least one camera is set in each division. The camera in each division is connected to the network through a POE switch, and the RTST protocol in the camera in each division is turned on. The FPS of the camera in each division is set to a preset integer to obtain swimming pool monitoring videos of several divisions.

[0034] Optionally, the preset integer has a value range of 8-12.

[0035] In the specific implementation of this specification, Figure 2 As shown, according to the actual size and layout of the swimming pool, the preset sub-area areas are scientifically and reasonably divided. These areas can be set based on factors such as the activity density of swimmers, potential dangerous areas (such as the junction of deep water areas and shallow water areas) to ensure that each area can be fully monitored. Preferably, the preset sub-area area can be 8m*8m. In each divided area, at least one high-definition camera is set. When selecting the camera, factors such as its viewing angle range, night vision capability, and waterproof level are considered to ensure that the images in the swimming pool can be clearly captured in various environments. The camera is installed in a suitable position, such as the edge, corner or high place of the swimming pool to maximize the monitoring coverage and reduce blind spots. The camera in each partition is connected to the network through a POE (Power over Ethernet) switch. The POE switch not only provides a data transmission channel for the camera, but also powers it through the same network cable, which simplifies the wiring work and reduces maintenance costs. This network architecture enables the monitoring video to be transmitted in real time to the central control room or cloud server for storage and analysis. The RTSP (Real Time Streaming Protocol) protocol in the camera of each partition is turned on. RTSP is a network control protocol for controlling multimedia streams on streaming media servers. It allows the establishment and control of media sessions between clients and servers. By opening the RTSP protocol, it can be ensured that the surveillance video can be transmitted in real time in the form of streaming media, and supports access and playback by a variety of client devices. According to the monitoring requirements and system performance, the FPS (Frames Per Second) of the camera in each partition is set to a preset integer. FPS is an important indicator for measuring video fluency. A higher FPS can provide a smoother video picture, but it will also increase the pressure on data transmission and storage. Therefore, when setting the FPS, it is necessary to make a trade-off based on the actual situation to achieve the best monitoring effect. Preferably, the value range of the preset integer is 8-12.

[0036] S120: Divide the swimming pool monitoring video into frames according to the partitions to obtain single-frame swimming pool monitoring pictures; In the specific implementation of the present specification, the decoded video is framed according to the number of frames per second FPS, so that the continuous frames in the video stream are extracted one by one to form a series of independent single-frame swimming pool monitoring pictures. In order to facilitate subsequent processing, each frame of the picture can be assigned a unique identifier (such as a timestamp, frame number, etc.) and stored in an appropriate storage medium, such as a hard disk, SSD or cloud storage.

[0037] S130: Identify the single-frame swimming pool monitoring picture through a target detection model to obtain a target bounding box and its type; In the specific implementation of this specification, the target detection model includes YOLO (You Only Look Once), SSD (Single Shot MultiBox Detector), Faster R-CNN, etc. A single-frame swimming pool monitoring picture is passed as input to the target detection model. After receiving the picture, the model will forward propagate it and extract the feature information in the picture through structures such as convolutional layers, pooling layers, and activation layers. Then, use this feature information to predict whether there are target objects in the picture, as well as the location and type of these objects. For each target object detected, the model will annotate it with a bounding box (Bounding Box), which will tightly surround the target object to indicate its location in the picture. In addition to annotating the bounding box, the model will also classify the target object and identify which type it belongs to. In the swimming pool monitoring scenario, these types can include standing posture, floating board posture, water swimming posture, underwater swimming posture, etc.

[0038] S140: Continuously track the image within the target boundary box using a target tracking model to obtain a tracking result; In a specific implementation of the present specification, in consecutive frames of a video sequence, the tracking model will use the extracted features to associate and match the same target. Once the target is successfully associated and matched, the tracking model will update the tracking state of the target, which includes updating the position, size, speed and other parameters of the target, and may adjust the internal parameters of the tracker to adapt to changes in the target. Specifically, during the tracking process, the DeepSort algorithm uses the Kalman filter algorithm to estimate and filter the target state. The Kalman filter algorithm is a commonly used state estimation and filtering algorithm, which can predict and correct the target state based on the target's position and speed information, thereby improving the accuracy and robustness of target tracking. By continuously tracking the image within the target bounding box through the target tracking model, the dynamic behavior trajectory of the swimmer in the swimming pool can be obtained.

[0039] Optionally, before S150, the steps include: Determining whether there is an unrecognizable image in the tracking result; When there are unrecognizable images in the tracking result, the tracking result is supplemented with frames.

[0040] In the specific implementation of the present specification, during the image recognition process, there are situations where individual images in individual images are currently unrecognizable, which causes the DeepSort algorithm to be unable to establish a complete tracking state for the target.

[0041] S150: establishing a preset time trajectory data set based on the tracking result, and performing swimming drowning recognition on the preset time trajectory data set through an anti-drowning model to obtain a swimming drowning recognition result.

[0042] Optionally, the S150 includes: The target types of the preset time trajectory data set include standing posture, floating board posture, water swimming posture, and underwater swimming posture; When the target posture is an above-water swimming posture or an underwater swimming posture, determining the most recent first time target average moving speed based on the preset time trajectory data set; Determine whether the average moving speed of the target at the most recent first time is greater than a speed threshold; When the average moving speed of the most recent first time target is greater than the speed threshold, determining whether the underwater proportion of the most recent second time target is greater than the first proportion threshold; When the underwater proportion of the most recent second time target is greater than the first proportion threshold, a drowning alarm reminder is initiated.

[0043] In a specific implementation of the present specification, when the target posture is a swimming posture above water or an underwater swimming posture, the system will first calculate the average moving speed of the target in the most recent period (first time period). This time period can be set according to actual conditions, such as the last 5 seconds, 10 seconds, etc. Next, the system will compare the calculated average moving speed with a preset speed threshold. The speed threshold is set according to the normal swimming speed and is used to distinguish normal swimming from a possible struggling state. If the average moving speed is greater than the speed threshold, it may indicate that the swimmer is in an abnormal state. If the average moving speed is greater than the speed threshold, the system will further analyze the swimmer's underwater proportion in another time period (second time period). The underwater proportion refers to the proportion of the time the swimmer stays underwater to the total time of the time period. This time period can also be set according to actual conditions. The system will compare the calculated underwater proportion with a preset first proportion threshold. The first proportion threshold is set according to the proportion of underwater stay time during normal swimming, and is used to distinguish normal diving or rest from a possible drowning state. If the underwater proportion is greater than the first proportion threshold, it may indicate that the swimmer is at risk of drowning. When the above two conditions (average moving speed is greater than the speed threshold and underwater proportion is greater than the first proportion threshold) are met at the same time, the system will immediately initiate a drowning alarm reminder. This reminder can be issued in a variety of ways, such as sound and light alarm, sending alarm information to the monitoring center, sending mobile phone notifications to lifeguards, life-saving watches, etc., so that rescue measures can be taken in time.

[0044] Optionally, the S150 further includes: When the most recent first time target average moving speed is less than the first speed threshold, a third time is rewinded starting from each second to obtain a plurality of third time target moving speeds; Determine whether the moving speed of the third time target is less than the speed threshold, and record the number; Determine the normal speed value ratio based on the number of the third time target moving speeds that are less than the speed threshold; Determine whether the normal speed value ratio is less than a second ratio threshold; When the normal speed value ratio is less than the second ratio threshold, obtaining the duration of being in the underwater swimming posture continuously from the current moment; Determining whether the duration exceeds a safe time; When the duration exceeds the safety time, a drowning alarm reminder is initiated.

[0045] In a specific embodiment of the present specification, when the average moving speed of the most recent first time target is less than the first speed threshold, it indicates that the current speed of the swimmer may be within the normal range, but further analysis is required. Taking the current moment as the starting point, go back a third time (e.g., the past 10 seconds, 20 seconds, etc.), obtain a number of third time target moving speeds during this period, and these speed data are used to evaluate whether the swimmer is in a low-speed state for a long time. For each third time target moving speed, determine whether it is less than the speed threshold, and record the number of speeds less than the speed threshold. Based on the number of third time target moving speeds less than the speed threshold, calculate the speed normal value ratio, which represents the proportion of the swimmer in a low-speed state in the third time period. Compare the calculated speed normal value ratio with the second ratio threshold. If the ratio is less than the second ratio threshold, it indicates that the swimmer may be in an abnormal low-speed state for a long time, and further attention is required. If the speed normal value ratio is less than the second ratio threshold, obtain the duration of the swimmer's continuous underwater swimming posture from the current moment. Compare the obtained duration with the safety time. The safety time is a threshold set according to swimming pool safety regulations or expert advice to determine whether the swimmer stays underwater for too long. If the duration exceeds the safe time, a drowning alarm will be triggered, indicating that the swimmer may be at risk of drowning and immediate rescue measures are required.

[0046] Optionally, the S150 further includes: When the duration does not exceed the safety time, obtaining the latest fourth time trajectory data, and determining whether the latest fourth time trajectory data is an irregular curve; When the most recent fourth time trajectory data is an irregular curve, a drowning alarm reminder is initiated.

[0047] In the specific implementation of this specification, under normal circumstances, when a swimmer moves in water, his trajectory should be a relatively smooth straight line or arc, unless he is performing a specific swimming skill or game. However, in the case of drowning, the swimmer may present an irregular, irregular curved trajectory due to struggle.

[0048] If the swimmer's duration underwater does not exceed the safe time, a drowning alarm is not immediately initiated, but their movement trajectory is further analyzed. Taking the current moment as the reference, the trajectory data for a period of time (the fourth time trajectory data) is obtained. The length of this period can be set according to the actual situation, such as the last 5 seconds, 10 seconds, etc. By calculating the angle change or distance change between the points on the trajectory, if the change exceeds a certain threshold, the trajectory can be considered to be an irregular curve. If the trajectory is judged to be an irregular curve, and combined with other factors (such as abnormal speed, abnormal posture, etc.), it is considered that the swimmer may be in a drowning state, and a drowning alarm reminder is initiated.

[0049] In the present invention, tourists do not need to wear any equipment, and there is no difference from normal swimming. When encountering the danger of drowning, the system will automatically prompt the lifeguard; by processing the monitoring video by partitioning, not only the processing efficiency is improved, but also more refined monitoring and analysis can be carried out for specific areas to ensure that there are no blind spots in monitoring; the target tracking model is used to continuously track the identified target, which effectively avoids detection interruptions caused by target occlusion, movement, etc., and ensures the continuity and accuracy of tracking, thereby improving the intelligence level of swimming pool monitoring and the accuracy of drowning warning, providing strong technical support for the safety management of swimming places, and ensuring the life safety of swimmers.

[0050] Figure 3 A schematic diagram of a swimming drowning identification device provided in an embodiment of this specification, the device may include: An acquisition module 10 is used to acquire the swimming pool monitoring videos of several partitions; A frame segmentation module 20, for segmenting the swimming pool monitoring video into frames according to the partitions to obtain a single-frame swimming pool monitoring picture; The recognition module 30 is used to recognize the single-frame swimming pool monitoring picture through a target detection model to obtain a target bounding box and its type; A tracking module 40, configured to continuously track the image within the target boundary box through a target tracking model to obtain a tracking result; The establishing module 50 is used to establish a preset time trajectory data set based on the tracking result, and perform swimming drowning recognition on the preset time trajectory data set through an anti-drowning model to obtain a swimming drowning recognition result.

[0051] Optionally, the acquisition module 10 includes: The swimming pool is divided into preset area divisions, and at least one camera is set in each division. The camera in each division is connected to the network through a POE switch, and the RTST protocol in the camera in each division is turned on. The FPS of the camera in each division is set to a preset integer to obtain swimming pool monitoring videos of several divisions.

[0052] Optionally, the preset integer has a value range of 8-12.

[0053] Optionally, before establishing module 50, the steps include: Determining whether there is an unrecognizable image in the tracking result; When there are unrecognizable images in the tracking result, the tracking result is supplemented with frames.

[0054] Optionally, the establishing module 50 includes: The target types of the preset time trajectory data set include standing posture, floating board posture, water swimming posture, and underwater swimming posture; When the target posture is an above-water swimming posture or an underwater swimming posture, determining the most recent first time target average moving speed based on the preset time trajectory data set; Determine whether the average moving speed of the target at the most recent first time is greater than a speed threshold; When the average moving speed of the most recent first time target is greater than the speed threshold, determining whether the underwater proportion of the most recent second time target is greater than the first proportion threshold; When the underwater proportion of the most recent second time target is greater than the first proportion threshold, a drowning alarm reminder is initiated.

[0055] Optionally, the establishing module 50 further includes: When the most recent first time target average moving speed is less than the first speed threshold, a third time is rewinded starting from each second to obtain a plurality of third time target moving speeds; Determine whether the moving speed of the third time target is less than the speed threshold, and record the number; Determine the normal speed value ratio based on the number of the third time target moving speeds that are less than the speed threshold; Determine whether the normal speed value ratio is less than a second ratio threshold; When the normal speed value ratio is less than the second ratio threshold, obtaining the duration of being in the underwater swimming posture continuously from the current moment; Determining whether the duration exceeds a safe time; When the duration exceeds the safety time, a drowning alarm reminder is initiated.

[0056] Optionally, the establishing module 50 further includes: When the duration does not exceed the safety time, obtaining the latest fourth time trajectory data, and determining whether the latest fourth time trajectory data is an irregular curve; When the most recent fourth time trajectory data is an irregular curve, a drowning alarm reminder is initiated.

[0057] 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.

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

[0059] 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.

[0060] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this specification. Figure 4 The electronic device 300 according to the embodiment of the present invention is described. Figure 4 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.

[0061] like Figure 4 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.

[0062] 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.

[0063] 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 .

[0064] 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.

[0065] 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.

[0066] 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 4 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.

[0067] 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.

[0068] Figure 5 A schematic diagram of a computer-readable medium provided for an embodiment of this specification.

[0069] accomplish Figure 1The 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 component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. 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 thereof.

[0070] 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.

[0071] 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 separate 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).

[0072] In summary, the present invention can be implemented in hardware, or in software modules 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 functions of some or all 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 for implementing the present invention can be stored on a computer-readable medium, or can be in 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.

[0073] 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.

[0074] 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.

[0075] 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 method for identifying drowning in swimming, characterized in that: include: Get the pool surveillance video of several partitions; Divide the swimming pool monitoring video into frames according to the partitions to obtain single-frame swimming pool monitoring pictures; The single-frame swimming pool monitoring picture is identified by a target detection model to obtain a target bounding box and its type; Continuously tracking the image within the target boundary box through a target tracking model to obtain a tracking result; A preset time trajectory data set is established based on the tracking result, and swimming drowning recognition is performed on the preset time trajectory data set through an anti-drowning model to obtain a swimming drowning recognition result.

2. The method for identifying drowning in swimming as claimed in claim 1, characterized in that: The step of obtaining the swimming pool monitoring videos of several partitions includes: The swimming pool is divided into preset area divisions, and at least one camera is set in each division. The camera in each division is connected to the network through a POE switch, and the RTST protocol in the camera in each division is turned on. The FPS of the camera in each division is set to a preset integer to obtain swimming pool monitoring videos of several divisions.

3. The method for identifying drowning in swimming as claimed in claim 2, characterized in that: The value range of the preset integer is 8-12.

4. The method for identifying drowning in swimming as claimed in claim 3, characterized in that: Before establishing a preset time trajectory data set based on the tracking result, the method includes: Determining whether there is an unrecognizable image in the tracking result; When there are unrecognizable images in the tracking result, the tracking result is supplemented with frames.

5. The method for identifying swimming drowning as claimed in claim 4, characterized in that: The anti-drowning model is used to perform swimming drowning recognition on the preset time trajectory data set to obtain a swimming drowning recognition result, including: The target types of the preset time trajectory data set include standing posture, floating board posture, water swimming posture, and underwater swimming posture; When the target posture is an above-water swimming posture or an underwater swimming posture, determining the most recent first time target average moving speed based on the preset time trajectory data set; Determine whether the average moving speed of the target at the most recent first time is greater than a speed threshold; When the average moving speed of the most recent first time target is greater than the speed threshold, determining whether the underwater proportion of the most recent second time target is greater than the first proportion threshold; When the underwater proportion of the most recent second time target is greater than the first proportion threshold, a drowning alarm reminder is initiated.

6. The method for identifying swimming drowning as claimed in claim 5, characterized in that: The method of performing swimming drowning recognition on the preset time trajectory data set by using the drowning prevention model to obtain a swimming drowning recognition result further includes: When the most recent first time target average moving speed is less than the first speed threshold, a third time is rewinded starting from each second to obtain a plurality of third time target moving speeds; Determine whether the moving speed of the third time target is less than the speed threshold, and record the number; Determine the normal speed value ratio based on the number of the third time target moving speeds that are less than the speed threshold; Determine whether the normal speed value ratio is less than a second ratio threshold; When the normal speed value ratio is less than the second ratio threshold, obtaining the duration of being in the underwater swimming posture continuously from the current moment; Determining whether the duration exceeds a safe time; When the duration exceeds the safety time, a drowning alarm reminder is initiated.

7. The method for identifying swimming drowning as claimed in claim 6, characterized in that: The method of performing swimming drowning recognition on the preset time trajectory data set by using the drowning prevention model to obtain a swimming drowning recognition result further includes: When the duration does not exceed the safety time, obtaining the latest fourth time trajectory data, and determining whether the latest fourth time trajectory data is an irregular curve; When the most recent fourth time trajectory data is an irregular curve, a drowning alarm reminder is initiated.

8. A swimming drowning identification device, characterized in that: include: An acquisition module is used to acquire the monitoring videos of the swimming pool in several partitions; A framing module, used to frame the swimming pool monitoring video according to the partitions to obtain a single-frame swimming pool monitoring picture; A recognition module, used to recognize the single-frame swimming pool monitoring picture through a target detection model to obtain a target bounding box and its type; A tracking module, used for continuously tracking the image within the target boundary box through a target tracking model to obtain a tracking result; An establishment module is used to establish a preset time trajectory data set based on the tracking result, and to perform swimming drowning recognition on the preset time trajectory data set through an anti-drowning model to obtain a swimming drowning recognition result.

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.