A method for pool drowning recognition and localization

By combining the YOLOv8 model and homography matrix with illumination compensation equipment, swimming pool drowning identification and positioning were achieved, solving the problem of high false alarm rate in existing drowning identification technologies and improving rescue efficiency and intelligence level.

CN119693880BActive Publication Date: 2025-11-07TIANQING SHUAN (TIANJIN) TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510152561.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-11-07
Estimated Expiration
2045-02-12

AI Technical Summary

Technical Problem

Existing methods for identifying drowning in swimming pools cannot accurately distinguish between diving and drowning, resulting in a high false alarm rate, inaccurate rescue information, and delays in rescue efforts.

Method used

The system employs a YOLOv8 model combined with homography matrix and illumination compensation equipment. It captures video through a camera, performs image preprocessing and data annotation, identifies and transforms the swimmer's position in world coordinates, sets underwater duration and displacement conditions to trigger alarms, and integrates with an intelligent rescue path planning system.

Benefits of technology

It improves the accuracy of drowning identification, reduces the false alarm rate, ensures timely alarms in the event of a real drowning incident, shortens rescue response time, and improves rescue efficiency and intelligence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693880B_ABST
    Figure CN119693880B_ABST
Patent Text Reader

Abstract

The application discloses a kind of swimming pool drowning identification and positioning method, the application relates to drowning identification technical field, drowning identification and positioning method include attribute definition, collection video, image preprocessing, data labeling, model training, drowning positioning and drowning identification steps, and according to the latest detection result updates swimmer in world coordinate position and state information, the advantages of the application are that: by using depth learning model YOLOv8 combined with motion trajectory analysis, the accuracy of drowning identification can be improved, the normal diving behavior of swimmer and drowning state can be effectively distinguished, the false positive rate of the system is reduced, and the alarm can be triggered only when a real drowning event occurs, according to multi-angle video data, it is convenient for model to identify the scene that is not easy to identify.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the technical field of drowning identification, in particular to a swimming pool drowning identification and positioning method. BACKGROUND

[0002] Swimming is a common health exercise method, which can exercise the body and relax the pressure, and there are many swimming enthusiasts in China, which leads to a large number of swimming pools in China. However, in recent years, swimming pool drowning events occur frequently, and even lifeguards have drowned in swimming pools, which highlights the necessity and urgency of swimming pool drowning alarm.

[0003] At present, the swimming pool drowning identification method based on computer vision has the problems of single identification method, inability to accurately distinguish between diving and drowning, and inability to accurately position, which leads to many false alarms of the system, inaccurate rescue information and delayed rescue time.

[0004] Therefore, the application provides a swimming pool drowning identification and positioning method. SUMMARY

[0005] The application aims to provide a swimming pool drowning identification and positioning method.

[0006] To solve the problems in the background art, the application provides the following technical scheme: a swimming pool drowning identification and positioning method, comprising the following steps:

[0007] Step 1: attribute definition, defining swimmer ID, swimming state, motion trajectory, underwater duration, up and down frequency detection times, time information, and updating the swimmer's position and state information in the world coordinate according to the latest detection result;

[0008] Step 2: video acquisition, installing a camera in the swimming pool area, and continuously shooting the personnel in the swimming pool through the camera to form an acquisition video, the camera is provided with a light compensation device, and the light compensation device is used for dynamically adjusting the light intensity in the swimming pool according to the light change inside and outside the swimming pool and the number of swimmers in the swimming pool;

[0009] Step 3: image preprocessing, using the functions in the OpenCV library to read the swimming pool monitoring video file, decoding the read video, converting it into a series of image frames, segmenting the image frames of the long video, and storing the segmented image frames in the disk;

[0010] Step 4: data labeling, after the image preprocessing is completed, the swimmers in the image are labeled and classified into 5 categories, respectively, as swimmers on the water, swimmers under the water, swimmers on the reflective place on the water, swimmers under the reflective place on the water and no one on the reflective place, and the labeled and classified data is transmitted to the YOLOv8 model.

[0011] Step five: model training, input the labeled image data into the YOLOv8 model for training, when the YOLOv8 model identifies that the current swimmer enters the empty reflective place area in the current image, the YOLOv8 model calls other collected videos to supplement the empty reflective place area in the current image, through training the swimmer state data in the reflective place and adding multi-angle cameras, the model can identify normal water drowning and identify the drowning in the water surface reflective place;

[0012] Step six: drowning positioning, through the homography matrix H, the image position coordinates of the swimmer in the swimming pool are converted into world coordinates, and the converted coordinates are divided by the third dimension w coordinate for normalization processing to obtain the actual position coordinates of the swimmer in the world coordinate system;

[0013] Step seven: drowning identification, for the same swimmer ID, set the underwater duration as the condition for judging drowning, and give an alarm prompt when the drowning judgment condition is met;

[0014] The drowning identification method is to set the underwater duration as the condition for judging drowning for the same swimmer ID, and the default condition for the underwater duration is more than 30s and the displacement is less than 1m, the underwater duration can be adjusted according to the demand sensitivity parameter, and different time is set to trigger the alarm, when the drowning judgment condition is met, the bracelet worn by the lifesaver will give a vibration reminder.

[0015] As a further scheme of the application: in step one, the swimmer ID is a unique identification number assigned to each swimmer entering the swimming pool, the swimming state includes normal swimming, potential drowning risk and drowning, the motion trajectory is the moving path of the swimmer in the swimming pool, represented by trajectory coordinate points, the trajectory coordinate points are the actual position coordinates in step six, the underwater duration is the time of the swimmer underwater, starting from entering the water, and resetting when getting out of the water, the up and down frequency detection times recording method is to detect the number of times the swimmer's head exposes to the water surface and dives underwater within a set time, the set time is 30s by default, and the time can be adjusted by parameters, the time information is the time when the swimmer enters the swimming pool and the time when the state is updated each time.

[0016] As a further scheme of the application: in step two, the collected video is collected by installing cameras at the four corners above the swimming pool, adjusting the angle and focal length of the camera to make the people in the swimming pool be clearly photographed, the camera continuously photographs the people in the swimming pool at a frame rate of 60FPS to form a collected video, and the collected video is transmitted to the image processing system.

[0017] As a further scheme of the present application: in step three, the image preprocessing method is to read the swimming pool monitoring video file using the function in the OpenCV library, decode the read video, and adjust the resolution of the image using the bilinear interpolation method, convert it into a series of image frames, and segment the long video by taking one frame every 10 frames, and store the segmented image frames in the disk.

[0018] As a further scheme of the present application: in step four, the data labeling method is to select Label Img data labeling tool to label the state of the image frame, and the state type is water and underwater five, for the blurred and difficult to judge frame, call the situation of the frame before and after to infer.

[0019] As a further scheme of the present application: in step five, the model training method is to extract images from actual swimming pool monitoring videos, clean the collected image data, use the training interface provided by YOLOv8, input the labeled training set image data into the model, and through training, the model can recognize normal water area drowning and recognize drowning at the water surface reflection.

[0020] As a further scheme of the present application: in step six, the drowning positioning method is to detect the position (u, v) of the swimmer in the image through the model trained in step five, convert the image coordinates (u, v) to homogeneous coordinates (u, v, 1), and convert the homogeneous coordinates (u, v, 1) to world coordinates through the homography matrix H.

[0021]

[0022] After conversion, divide the homogeneous coordinates (X, Y, Z, 1) in the world coordinates by the third dimension Z for normalization to get the actual position coordinates (X / Z, Y / Z) of the swimmer in the world coordinates.

[0023] As a further scheme of the present application: when the camera recognizes that there is a swimmer drowning in the pool, the intelligent rescue path planning system set in the camera will automatically plan the optimal rescue path according to the position of the lifeguard in the pool, the position of the swimmer drowning, and the layout of the pool, and send emergency rescue instructions and path guidance to the lifeguard through the vibrating bracelet.

[0024] As a further scheme of the present application: the intelligent rescue path planning system further includes an obstacle recognition module, which is used to acquire the obstacle information in the pool in real time, and adjust the rescue task strategy according to the obstacle information, and the obstacle information is buoy and lifesaving equipment.

[0025] Compared with the prior art, the present application has the beneficial effects that:

[0026] 1. The present application defines swimmer ID, swimming state, motion trajectory, underwater duration, frequency detection times and time information, and can update the swimmer's position and state information in the world coordinate in real time according to the latest detection results, providing accurate and dynamic data basis for subsequent drowning identification and positioning, which can fully and accurately grasp the activity of the swimmer, and through the use of deep learning model YOLOv8 combined with motion trajectory analysis, the accuracy of drowning identification can be improved, the normal diving behavior of the swimmer can be effectively distinguished from the drowning state, the false positive rate of the system can be reduced, and the alarm can be triggered only when a real drowning event occurs, combined with homography matrix and image coordinate conversion technology, the image position of the swimmer in the pool can be accurately converted into world coordinates and normalized, so as to obtain the actual position coordinates of the swimmer, so that the rescuer can quickly and accurately find the drowning person, shorten the rescue response time and improve the rescue efficiency;

[0027] 2. The present application installs cameras above the four corners of the pool to continuously shoot at a frame rate of 60FPS, which can clearly capture the activities of the people in the pool, and the cameras are equipped with light compensation equipment, which can dynamically adjust the light intensity according to the change of light and the number of swimmers, ensuring that high-quality video images can be obtained in different environments, providing reliable raw data for subsequent processing, and through the use of flexible and adjustable judgment logic, a double condition based on underwater duration and displacement change is set for each swimmer ID, and under the default condition, if the swimmer stays underwater for more than 30 seconds and the displacement is less than 1 meter, it is considered as a drowning risk, at the same time, the system allows to adjust the sensitivity parameters according to the actual needs, and sets different underwater durations to trigger the alarm, so as to realize the accurate identification and timely intervention of different swimming ability groups, when the drowning condition is met, the smart bracelet worn by the lifeguard will immediately send a vibration reminder, ensuring that the lifeguard can receive the alarm and take action in the first time, thereby shortening the rescue response time and improving the rescue success rate;

[0028] 3. The present application introduces an intelligent rescue path planning system and an instant notification mechanism, which can automatically plan the optimal rescue path when a drowning event occurs, and send emergency rescue instructions and path guidance to the lifeguard through the vibration bracelet, which not only improves the intelligent level of rescue, but also relieves the working pressure of the lifeguard, making the rescue action more rapid and orderly. BRIEF DESCRIPTION OF DRAWINGS

[0029] Figure 1 The present application is a method step schematic diagram. DETAILED DESCRIPTION

[0030] The specific embodiments of the present application will be further described below with reference to the drawings, and it should be noted that the description of these embodiments is used to help understand the present application, but does not constitute a limitation on the present application.

[0031] In addition, the technical features involved in each embodiment of the application described below can be combined with each other as long as there is no conflict between them.

[0032] Please refer to the accompanying Figure 1 The present application is a pool drowning recognition and positioning method, comprising the following steps:

[0033] Step one: attribute definition, define swimmer ID, swimming state, motion trajectory, underwater duration, up and down frequency detection times, time information, and update the swimmer's position and state information in the world coordinate according to the latest detection results;

[0034] Step two: collect video, install a camera in the pool area, and continuously shoot the personnel in the pool through the camera to form a collection video, and the camera is equipped with a light compensation device, which is used to dynamically adjust the light intensity in the pool according to the light changes inside and outside the pool and the number of swimmers in the pool;

[0035] Step three: image preprocessing, using the functions in the OpenCV library to read the swimming pool monitoring video file, decoding the read video, converting it into a series of image frames, segmenting the image frames of the long video, and storing the segmented image frames in the disk;

[0036] Step four: data labeling, after image preprocessing, the swimmers in the image are labeled and classified respectively, and are classified into five labeled states of swimmer on water, swimmer underwater, swimmer on water at reflective place, swimmer underwater at reflective place and no one at reflective place, and the reflective place area without people in the image is divided, and the labeled state data after division and classification is transmitted to the YOLOv8 model;

[0037] Step five: model training, input the labeled image data into the YOLOv8 model for training, when the YOLOv8 model identifies that the current swimmer enters the no one at reflective place area in the current image, the YOLOv8 model calls other collection videos to supplement the no one at reflective place area in the current image, through training the swimmer state data at reflective place and adding multi-angle cameras, the model can identify normal water area drowning and reflective place drowning;

[0038] Step six: drowning positioning, through the homography matrix H, the image position coordinates of the swimmer in the swimming pool are converted into world coordinates, and the converted coordinates are divided by the third dimension w coordinate for normalization processing to obtain the actual position coordinates of the swimmer in the world coordinate system;

[0039] Step seven: drowning identification, for the same swimmer ID, set the underwater duration as the condition for judging drowning, and give an alarm prompt when the drowning judgment condition is met;

[0040] The drowning identification mode is that, for the same swimmer ID, the underwater duration is set as the condition for judging drowning, and the underwater duration is set as the condition for judging drowning. The default condition for the underwater duration is more than 30s and the displacement is less than 1m. The underwater duration can be adjusted according to the sensitivity parameters, and different time lengths are set to trigger the alarm. When the drowning judgment condition is met, the bracelet worn by the lifesaver will give a vibration reminder.

[0041] In an embodiment of the present application: in step one, the swimmer ID is a unique identification number assigned to each swimmer entering the pool, the swimming state includes normal swimming, potential drowning risk and drowning, the motion trajectory is the moving path of the swimmer in the pool, which is represented by trajectory coordinate points, the trajectory coordinate points are the actual position coordinates in step six, the underwater duration is the time of the swimmer under water, which is counted from the time of entering the water, and the time is reset when the swimmer gets out of the water. The up-down frequency detection times recording mode is to detect the number of times the swimmer's head is exposed to the water surface and submerged under water within a set time, the set time is 30s by default, and can be adjusted by parameters. The time information is the time when the swimmer enters the pool and the time when the state is updated each time.

[0042] In an embodiment of the present application: in step two, the video acquisition mode is to install cameras at four corner positions above the pool, adjust the angle and focal length of the cameras so that the personnel in the pool can be clearly photographed, and the cameras continuously photograph the personnel in the pool at a frame rate of 60FPS to form the acquired video, and transmit the acquired video to the image processing system.

[0043] In an embodiment of the present application: in step three, the image preprocessing mode is to read the swimming pool monitoring video file using the function in the OpenCV library, decode the read video, and adjust the resolution of the image using the bilinear interpolation method, convert it into a series of image frames, and segment the long video according to the method of taking one frame every 10 frames, and store the segmented image frames in the disk.

[0044] In an embodiment of the present application: in step four, the data labeling method is to use the Label Img data labeling tool to label the state of the image frame, and the state types are five states of the swimmer on the water, the swimmer under the water, the swimmer on the water at the reflective place, the swimmer under the water at the reflective place, and the reflective place without people, and for the ambiguous and difficult to judge frames, the situation of the frames before and after the frame is inferred.

[0045] In an embodiment of the present application: in step five, the model training method is to cut the images from the actual swimming pool monitoring video, clean the collected image data, and use the training interface provided by YOLOv8 to input the labeled training set image data into the model, for the swimmer on the water, the model learns the features of the appearance and color distribution, and for the swimmer under the water, the model learns the visual features of the blur and light refraction.

[0046] In an embodiment of the present application: in step six, the drowning positioning method is to detect the position (u, v) of the swimmer in the image by the model trained in step five, convert the image coordinates (u, v) into homogeneous coordinates (u, v, 1), convert the homogeneous coordinates (u, v, 1) into homogeneous coordinates (X, Y, Z, 1) in the world coordinates through the homography matrix H, and the specific conversion formula is as follows:

[0047]

[0048] After the conversion, divide the homogeneous coordinates (X, Y, Z, 1) in the world coordinates by the third dimension Z for normalization to obtain the actual position coordinates (X / Z, Y / Z) of the swimmer in the world coordinates.

[0049] In an embodiment of the present application: when the camera recognizes that there is a swimmer drowning in the pool, the intelligent rescue path planning system arranged in the camera automatically plans the optimal rescue path according to the position of the lifeguard in the pool, the position of the swimmer drowning, and the layout of the pool, and sends emergency rescue instructions and path guidance to the lifeguard through the vibrating bracelet.

[0050] In an embodiment of the present application: the intelligent rescue path planning system further includes an obstacle recognition module, which is used to acquire the obstacle information in the pool in real time, and adjust the rescue task strategy according to the obstacle information, and the obstacle information is the buoy and the lifesaving equipment.

[0051] Example one, please refer to the attached Figure 1In a certain public swimming pool, the pool drowning recognition and positioning method of the application is implemented, a unique swimmer ID is assigned to each swimmer, a camera installed at four corners above the pool is used to collect video at a frame rate of 60 FPS, a light compensation device equipped beside the camera dynamically adjusts the light intensity in the pool according to the light changes inside and outside the pool and the number of swimmers in the pool, ensuring stable video image quality and avoiding the influence of light problems on subsequent processing, using OpenCV library to preprocess the video, dividing the long video by taking one frame every 10 frames and adjusting the resolution using bilinear interpolation method, using Label Img tool to label the segmented image frames, the types of labeling are divided into five marking states of swimmer on water, swimmer under water, swimmer on water at reflective place, swimmer under water at reflective place and no one at reflective place, for blurred and difficult to judge frames, the situation of the frames before and after the frame is inferred to improve the accuracy of labeling, the labeled image data is input into the YOLOv8 model for training, during the training process, images are intercepted from the actual pool monitoring video, the collected image data is cleaned, the training interface provided by YOLOv8 is used, the model learns the appearance and color distribution characteristics of the swimmer on water, and learns the visual features of blur and light refraction of the swimmer under water, in actual operation, by analyzing the motion trajectory of the swimmer, the underwater duration, the detection frequency of up and down frequency and other attributes, the normal diving behavior and the drowning state are accurately distinguished, the sensitivity parameter of underwater duration is based on the swimming level of the wearer, for example, when the underwater duration of a certain swimmer ID is close to the preset underwater duration, the system will pay more attention to the state of the swimmer, the up and down frequency detection frequency recording mode is to detect the number of times the swimmer's head emerges from the water and dives into the water within a set time (default is 30s, and the time can be adjusted by parameters), once the drowning judgment condition is met, that is, the underwater duration is more than 30s and the displacement is less than 1m (the underwater duration can adjust the sensitivity parameter according to the demand, and set different time to trigger the alarm), the bracelet worn by the lifeguard will vibrate and remind, and the position of the swimmer will be broadcast, at the same time, the image position coordinates of the swimmer in the pool are converted into world coordinates through homography matrix H, and the converted coordinates are divided by the third dimension w coordinate for normalization processing, to obtain the actual position coordinates of the swimmer in the world coordinate system, the rescue personnel can quickly find the swimmer according to the accurate position coordinates, greatly shortening the rescue response time and improving the rescue efficiency.

[0052] Embodiment two, please refer to the attached Figure 1In a large indoor swimming pool, after the video collected by the camera is transmitted to the image processing system and a series of processing steps, when the system judges that there may be a drowning situation, the image position coordinates of the swimmer in the pool are first converted into homogeneous coordinates in the world coordinates through the homography matrix H, and then normalized to obtain the actual position coordinates of the swimmer. If the drowning judgment condition is met, the bracelet worn by the lifeguard will vibrate to remind and broadcast the position of the drowning person. The rescue personnel can quickly find the drowning person according to the accurate position coordinates, greatly shortening the rescue response time and improving the rescue efficiency.

[0053] Embodiment three, please refer to the attached Figure 1 In a professional swimming training center, when the warning light flashes, the intelligent rescue path planning system set in the camera automatically plans the optimal rescue path according to the positions of the lifeguard and the drowning person in the pool and the pool layout. The system sends emergency rescue instructions and path guidance to the lifeguard through the vibrating bracelet, so that the lifeguard can quickly and accurately reach the position of the drowning person for rescue. For example, during a training process, a student is judged by the system to be drowning. After the warning light flashes, the intelligent rescue path planning system quickly plans the path and sends instructions to the nearby lifeguard. The lifeguard reaches the position of the drowning person in the shortest time according to the guidance on the vibrating bracelet, and successfully implements the rescue. This intelligent rescue path planning system improves the intelligent level of rescue, reduces the work pressure of the lifeguard, and makes the rescue action more rapid and orderly.

[0054] Specifically, by using the deep learning model YOLOv8 combined with motion trajectory analysis, the accuracy of drowning identification can be improved, the normal diving behavior of swimmers can be effectively distinguished from the drowning state, the false positive rate of the system can be reduced, and the alarm can only be triggered when a real drowning event occurs. Combined with the homography matrix and image coordinate conversion technology, the image position of the swimmer in the pool can be accurately converted into world coordinates and normalized to obtain the actual position coordinates of the swimmer, so that the rescue personnel can quickly and accurately find the drowning person, shorten the rescue response time, and improve the rescue efficiency.

[0055] Specifically, through the two warning modes of preliminary warning light flashing and high-decibel alarm buzzer, the warning light flashing can attract the attention of surrounding people at the first time, while avoiding the influence of the first-time start of the high-decibel buzzer alarm on user experience and causing panic among people. In addition, the camera also continuously monitors the rescue situation in the pool. Once it is found that the rescue action is slow or has not started, a higher level of alarm will be automatically triggered. This continuous monitoring and feedback mechanism enhances the reliability and practicality of the method.

[0056] Specifically, by introducing an intelligent rescue path planning system and an instant notification mechanism, the system can automatically plan an optimal rescue path when a drowning event occurs, and send emergency rescue instructions and path guidance to the lifesaver through the vibration bracelet, which not only improves the intelligent level of rescue, but also reduces the work pressure of the lifesaver, making the rescue action more rapid and orderly.

[0057] The above front, rear, left, right, up and down are based on the drawings of the specification Figure 1 as the standard, the side of the device facing the observer is defined as the front, the left side of the observer is defined as the left, and so on.

[0058] In the description of the present application, it should be understood that the terms "center", "longitudinal", "transverse", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, therefore it cannot be understood as a limitation on the scope of protection of the present application.

[0059] It should be noted that the device structure and the drawings of the present application mainly describe the principle of the present application, and the setting of the power mechanism, power supply system and control system of the device is not completely described in the design principle technology, and the specific power mechanism, power supply system and control system can be clearly understood by the skilled person in the art on the premise of understanding the principle of the above application, the control mode of the application file is automatically controlled by the controller, and the control circuit of the controller can be realized by simple programming of the skilled person in the art;

[0060] The standard parts used therein can be purchased from the market, and can be ordered according to the description and drawings, and the specific connection mode of each part adopts the conventional screw, rivet, welding and other conventional means in the prior art, the mechanical parts and equipment adopt the conventional type in the prior art, and the components known to the skilled person in the art, the structure and principle thereof are known to the skilled person in the art through technical manual or through conventional experimental method.

[0061] The embodiments of the present application are described in detail above in combination with the drawings, but the present application is not limited to the described embodiments, and for those skilled in the art, various changes, modifications, replacements and modifications of the embodiments can be made without departing from the principles and spirits of the present application, and still fall within the protection scope of the present application.

Claims

1. A method of pool drowning recognition and localization, the method comprising: Comprising the following steps: Step one: attribute definition, define swimmer ID, swimming state, motion trajectory, underwater duration, up and down frequency detection times, time information, and update the swimmer's position and state information in the world coordinate according to the latest detection results; Step two: collect video, install camera in the pool area, and continuously shoot the personnel in the pool through the camera to form the collected video. The camera is equipped with a light compensation device, which is used to dynamically adjust the light intensity in the pool according to the light changes inside and outside the pool and the number of swimmers in the pool; Step three: image preprocessing, read the swimming pool monitoring video file using the function in the OpenCV library, decode the read video, convert it to a series of image frames, segment the image frames of the long video, and store the segmented image frames in the disk; Step four: data labeling, after image preprocessing, the swimmers in the image are labeled and classified into five categories, respectively, as swimmer on water, swimmer under water, swimmer on reflective place on water, swimmer under reflective place on water and no one on reflective place, and the labeled and classified data is transmitted to the YOLOv8 model; Step five: model training, input the labeled image data into the YOLOv8 model for training. When the YOLOv8 model identifies that the current swimmer enters the no one on reflective place area in the current image, the YOLOv8 model calls other collected videos to supplement the no one on reflective place area in the current image. Through training of reflective place swimmer state data and adding multi-angle cameras, the model can identify normal water area drowning and reflective place drowning; Step six: drowning positioning, convert the image position coordinates of the swimmer in the pool to world coordinates through the homography matrix H, and normalize the converted coordinates by dividing by the third dimension w coordinate to obtain the actual position coordinates of the swimmer in the world coordinate system; Step seven: drowning identification, for the same swimmer ID, set the underwater duration as the condition for judging drowning. When the drowning judgment condition is met, an alarm prompt is given; The swimmer ID is a unique identification number assigned to each swimmer entering the pool. The swimming state includes normal swimming, potential drowning risk and drowning. The motion trajectory is the moving path of the swimmer in the pool, represented by trajectory coordinate points. The trajectory coordinate points are the actual position coordinates in step six. The underwater duration is the time the swimmer spends underwater, starting from entering the water and resetting when the swimmer exits the water. The up and down frequency detection times record the number of times the swimmer's head emerges from the water and dives underwater within a set time, which is set to 30 seconds by default and can be adjusted by parameters. The time information is the time the swimmer enters the pool and the time of each state update. The drowning positioning manner is that the model trained in step five detects the position (u, v) of the swimmer in the image, converts the image coordinates (u, v) into homogeneous coordinates (u, v, 1), converts the homogeneous coordinates (u, v, 1) into homogeneous coordinates (X, Y, Z, 1) in the world coordinates through the homography matrix H, and the specific conversion formula is as follows: After the conversion is completed, the homogeneous coordinates (X, Y, Z, 1) in the world coordinates are divided by the third dimension Z for normalization to obtain the actual position coordinates (X / Z, Y / Z) of the swimmer in the world coordinates.

2. A method of pool drowning recognition and localization as claimed in claim 1, wherein: In step two, the video is collected by installing cameras at four corners above the pool, adjusting the angle and focal length of the camera, so that the personnel in the pool can be clearly captured, and the camera continuously captures the personnel in the pool at a frame rate of 60FPS to form a collected video, and the collected video is transmitted to an image processing system.

3. A method of pool drowning recognition and localization as claimed in claim 1, wherein: In step three, the image preprocessing manner is to read the swimming pool monitoring video file using the function in the OpenCV library, decode the read video, and adjust the resolution of the image by using a bilinear interpolation method to convert it into a series of image frames, and the long video is segmented by taking one frame every 10 frames, and the segmented image frames are stored in the disk.

4. The method of claim 1, wherein: In step four, the data labeling manner is to select LabelImg data labeling tool to label the state of the image frame, and the state type is five types of water and underwater. For ambiguous and difficult to judge frames, the previous and subsequent frames are called to infer.

5. A method of pool drowning recognition and localization as claimed in claim 1, wherein: In step five, the model training manner is to extract images from the actual swimming pool monitoring video, clean the collected image data, use the training interface provided by YOLOv8 to input the labeled training set image data into the model, and through training, the swimmer state data at the reflection point and the addition of multi-angle cameras, the model can identify normal water area drowning and identify drowning at the water surface reflection point.

6. A method of pool drowning recognition and localization as defined in claim 1, wherein: When the camera recognizes that there is a swimmer drowning in the pool, the intelligent rescue path planning system set in the camera will automatically plan the optimal rescue path according to the position of the lifeguard in the pool, the position of the swimmer drowning and the layout of the pool, and send emergency rescue instructions and path guidance to the lifeguard through the vibrating bracelet.

7. A method of pool drowning recognition and localization as defined in claim 1, wherein: The drowning recognition manner is to set the underwater duration as the condition for judging drowning for the same swimmer ID, and the default condition for the underwater duration is more than 30s and displacement less than 1m. The set underwater duration can adjust the sensitivity parameter according to the demand, and set different time to trigger the alarm. When the drowning judgment condition is met, the bracelet worn by the lifeguard will vibrate to remind.

8. A method of pool drowning recognition and location according to claim 7, characterized in that: The intelligent rescue path planning system also includes an obstacle recognition module, which is used to obtain the obstacle information in the pool in real time, and adjust the rescue task strategy according to the obstacle information. The obstacle information is a buoy and a lifesaving device.

Citation Information

Patent Citations

  • Swimming pool drowning monitoring method based on combination of infrared rays and visible light

    CN109584509A

  • Anti-drowning detection method and anti-drowning detection system

    CN118430185A

  • Computer vision anti-drowning early warning method based on splicing of multiple cameras

    CN119181202A