Swimming pool drowning identification and positioning method
By defining swimmer attributes and using the deep learning model YOLOv8 combined with the homography matrix H, the accurate identification and positioning of drowning in the swimming pool is achieved, solving the problems of inaccurate drowning recognition and high false alarm rates in the prior art, and improving rescue efficiency.
Patent Information
- Application Number
- CN202510152561.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2045-02-12
AI Technical Summary
The existing technology has problems such as single identification methods, inability to accurately distinguish between diving and drowning, and inability to accurately locate in swimming pool drowning, resulting in a large number of false alarms in the system and inaccurate rescue information delaying rescue time.
By defining attributes such as swimmer ID, swimming state, motion trajectory, underwater duration, up and down frequency detection times and time information, combined with the deep learning model YOLOv8 and the homography matrix H, the precise conversion of the swimmer's image position in the swimming pool into world coordinates, and the drowning state judgment and alarm are carried out.
It improves the accuracy of drowning recognition, reduces the system false alarm rate, ensures that the alarm can only be triggered when a drowning incident occurs, shortens the rescue response time, and improves the rescue efficiency.
Smart Images

Figure CN119693880A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of drowning identification, and in particular to a method for identifying and locating drowning in a swimming pool. Background Art
[0002] Swimming is a common healthy exercise that can help you exercise and relieve stress. There are many swimming enthusiasts in my country, which leads to a large number of swimming pools. However, in recent years, drowning incidents in swimming pools have occurred frequently, and even lifeguards have drowned in swimming pools, which highlights the necessity and urgency of drowning alarms in swimming pools.
[0003] Currently, the swimming pool drowning recognition method based on computer vision has problems such as single recognition method, inability to accurately distinguish between diving and drowning, and inability to accurately locate. This leads to many false alarms in the system, inaccurate rescue information, and delayed rescue time.
[0004] To this end, our invention provides a method for identifying and locating drowning in a swimming pool. Summary of the invention
[0005] The purpose of the present invention is to provide a method for identifying and locating drowning in a swimming pool.
[0006] In order to solve the problems raised in the above background technology, the present invention provides the following technical solutions: a method for identifying and locating drowning in a swimming pool, comprising the following steps:
[0007] Step 1: Attribute definition, define the swimmer's ID, swimming status, motion trajectory, underwater duration, up and down frequency detection times, time information, and update the swimmer's position and status information in the world coordinates according to the latest detection results;
[0008] Step 2: Collecting videos, installing a camera in the swimming pool area, and continuously shooting people in the swimming pool through the camera to form a collected video. A light compensation device is equipped next to the camera. The light compensation device is used to dynamically adjust the light intensity in the swimming pool according to the light changes inside and outside the swimming pool and the number of swimmers in the swimming pool;
[0009] Step 3: Image preprocessing: use the functions in the OpenCV library to read the swimming pool monitoring video file, decode the read video, convert it into a series of image frames, segment the image frames of the long video, and store the segmented image frames on the disk;
[0010] Step 4: Data labeling. After the image preprocessing is completed, the swimmers in the image are labeled and classified into five categories, namely, swimmers above water, swimmers under water, swimmers above reflective water, swimmers under reflective water, and no one in the reflective water. The divided and classified labeling state data is then transmitted to the YOLOv8 model.
[0011] Step 5: Model training. Input the labeled image data into the YOLOv8 model for training. When the YOLOv8 model recognizes that the current swimmer has entered the unmanned reflective area in the current image, the YOLOv8 model will retrieve other collected videos to supplement the unmanned reflective area in the current image. By training the swimmer status data in the reflective area and adding multi-angle cameras, the model can identify drowning situations in normal waters and drowning situations in the reflective area on the water surface.
[0012] Step 6: Drowning location: The image position coordinates of the swimmer in the pool are converted into world coordinates through the homography matrix H, and the converted coordinates are divided by the third dimension w coordinates for normalization to obtain the actual position coordinates of the swimmer in the world coordinate system;
[0013] Step 7: Drowning identification: for the same swimmer ID, set the duration of underwater exposure as a condition for drowning judgment. When the drowning judgment condition is met, an alarm prompt will be given;
[0014] The method of drowning identification is to set the underwater duration as the condition for judging drowning for the same swimmer ID. The default condition for underwater duration is more than 30 seconds and the displacement is less than 1 meter. The set underwater duration can adjust the sensitivity parameters according to needs, and set different durations to trigger the alarm. When the drowning judgment conditions are met, the bracelet worn by the lifeguard will vibrate to remind you.
[0015] As a further solution of the present invention: in the step one, the swimmer ID is assigned a unique identification number to each swimmer entering the swimming pool, the swimming status includes three states: normal swimming, potential drowning risk and drowning, the motion trajectory is the movement 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 the swimmer is underwater, the timing starts from entering the water and is reset when leaving the water, the upper and lower frequency detection times are recorded in a manner of detecting the number of times the swimmer's head emerges from the water and dives into the water within a set time, the set time defaults to 30s, and the time can be adjusted by parameters, and the time information is the time the swimmer enters the swimming pool and the time of each status update.
[0016] As a further solution of the present invention: in the step 2, the method of collecting video is to install cameras at the four corners above the swimming pool, adjust the angle and focal length of the camera so that the people in the swimming pool can be clearly photographed, and the camera continuously shoots the people in the swimming pool at a frame rate of 60FPS to form a collected video, and transmit the collected video to the image processing system.
[0017] As a further solution of the present invention: in the step three, the image preprocessing method is to use the function in the OpenCV library to read the swimming pool monitoring video file, decode the read video, and adjust the resolution of the image using bilinear interpolation, convert it into a series of image frames, and divide the long video into one frame every 10 frames, and store the divided image frames on the disk.
[0018] As a further solution of the present invention: in the step four, the data annotation method is to select the Label Img data annotation tool to annotate the status of the image frame. The status types are five types: above water and underwater. For blurred and difficult to judge frames, the situations of the frames before and after the frame are retrieved for inference.
[0019] As a further solution of the present invention: in the step five, the model is trained by capturing images from the actual swimming pool surveillance video, cleaning the collected image data, and using the training interface provided by YOLOv8 to input the labeled training set image data into the model. By training the swimmer status data in the reflective area and adding multi-angle cameras, the model can recognize drowning situations in normal waters and drowning situations in the reflective area of the water surface.
[0020] As a further solution of the present invention: in the step 6, the drowning location is to detect the position (u, v) of the swimmer in the image through the model trained in step 5, convert the image coordinates (u, v) into homogeneous coordinates (u, v, 1), and convert the homogeneous coordinates (u, v, 1) into homogeneous coordinates (X, Y, Z, 1) in the world coordinates through the homography matrix H. The specific conversion formula is as follows:
[0021]
[0022] After the conversion is completed, the homogeneous coordinates (X, Y, Z, 1) in the world coordinates are divided by the third dimension Z and normalized to obtain the actual position coordinates of the swimmer in the world coordinates (X / Z, Y / Z).
[0023] As a further solution of the present invention: when the camera recognizes that there is a drowning person in the swimming 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 swimming pool, the position of the drowning person and the layout of the swimming pool, and send emergency rescue instructions and path guidance to the lifeguard through the vibrating bracelet.
[0024] As a further solution of the present invention: the intelligent rescue path planning system also includes an obstacle recognition module, which is used to obtain obstacle information in the swimming pool in real time and adjust the rescue mission strategy according to the obstacle information, wherein the obstacle information is buoys and life-saving equipment.
[0025] By adopting the above technical solution, compared with the prior art, the beneficial effects of the present invention are:
[0026] 1. The present invention defines the attributes of swimmer ID, swimming status, motion trajectory, underwater duration, up and down frequency detection times and time information, and can update the position and status information of the swimmer in the world coordinates in real time according to the latest detection results, which provides an accurate and dynamic data basis for subsequent drowning identification and positioning, and can comprehensively and accurately grasp the activities of the swimmer. By adopting the deep learning model YOLOv8 combined with motion trajectory analysis, the accuracy of drowning identification can be improved, and the normal diving behavior and drowning status of the swimmer can be effectively distinguished, and the false alarm rate of the system can be reduced, ensuring that the alarm can be triggered only when a drowning incident actually occurs. Combined with the homography matrix and image coordinate conversion technology, the image position of the swimmer in the swimming pool can be accurately converted into world coordinates and normalized, so as to obtain the actual position coordinates of the swimmer, so that rescuers can quickly and accurately find the drowning person, shorten the rescue response time, and improve the rescue efficiency;
[0027] 2. The present invention installs cameras at the four corners above the swimming pool to continuously shoot at a frame rate of 60FPS, which can clearly capture the activities of people in the swimming pool. In addition, a light compensation device is installed next to the camera, which can dynamically adjust the light intensity according to light changes and the number of swimmers, ensuring that high-quality video images can be obtained in different environments, providing reliable raw data for subsequent processing. By adopting flexible and adjustable judgment logic, dual conditions based on underwater duration and displacement changes are set for each swimmer ID. Under default conditions, if the swimmer stays underwater for more than 30 seconds and the displacement is less than 1 meter, it is considered a drowning risk. At the same time, the system allows the sensitivity parameters to be adjusted according to actual needs, and the alarm is triggered by setting different underwater durations, thereby realizing accurate identification and timely intervention of people with different swimming abilities. When the drowning conditions are met, the smart bracelet worn by the lifeguard will immediately send a vibration reminder to ensure 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 invention introduces an intelligent rescue path planning system and an instant notification mechanism. The system can automatically plan the optimal rescue path when a drowning incident occurs, and send emergency rescue instructions and path guidance to lifeguards through a vibrating bracelet. This not only improves the intelligence level of rescue, but also reduces the work pressure of lifeguards, making rescue operations more rapid and orderly. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 Schematic diagram of the method steps in an embodiment of the present invention. DETAILED DESCRIPTION
[0030] The specific embodiments of the present invention will be further described below in conjunction with the accompanying drawings. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention.
[0031] In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0032] Please see attached Figure 1 The present invention provides a method for identifying and locating drowning in a swimming pool, comprising the following steps:
[0033] Step 1: Attribute definition, define the swimmer's ID, swimming status, motion trajectory, underwater duration, up and down frequency detection times, time information, and update the swimmer's position and status information in the world coordinates according to the latest detection results;
[0034] Step 2: Collecting videos, installing a camera in the swimming pool area, and continuously shooting people in the swimming pool through the camera to form a collected video. A light compensation device is equipped next to the camera. The light compensation device is used to dynamically adjust the light intensity in the swimming pool according to the light changes inside and outside the swimming pool and the number of swimmers in the swimming pool;
[0035] Step 3: Image preprocessing: use the functions in the OpenCV library to read the swimming pool monitoring video file, decode the read video, convert it into a series of image frames, segment the image frames of the long video, and store the segmented image frames on the disk;
[0036] Step 4: Data labeling. After the image preprocessing is completed, the swimmers in the image are labeled and classified into five marking states: swimmers above water, swimmers under water, swimmers above reflective water, swimmers under reflective water, and no one in the reflective area. At the same time, the no-one reflective area in the image is divided, and the divided and classified marking state data is transmitted to the YOLOv8 model.
[0037] Step 5: Model training. Input the labeled image data into the YOLOv8 model for training. When the YOLOv8 model recognizes that the current swimmer has entered the unmanned reflective area in the current image, the YOLOv8 model will retrieve other collected videos to supplement the unmanned reflective area in the current image. By training the swimmer status data in the reflective area and adding multi-angle cameras, the model can identify drowning situations in normal waters and drowning situations in reflective areas on the water surface.
[0038] Step 6: Drowning location: The image position coordinates of the swimmer in the pool are converted into world coordinates through the homography matrix H, and the converted coordinates are divided by the third dimension w coordinates for normalization to obtain the actual position coordinates of the swimmer in the world coordinate system;
[0039] Step 7: Drowning identification: for the same swimmer ID, set the duration of underwater exposure as a condition for drowning judgment. When the drowning judgment condition is met, an alarm prompt will be given;
[0040] The method of drowning identification is to set the underwater duration as the condition for judging drowning for the same swimmer ID. The default condition for underwater duration is more than 30 seconds and the displacement is less than 1 meter. The set underwater duration can adjust the sensitivity parameters according to needs, and set different durations to trigger the alarm. When the drowning judgment conditions are met, the bracelet worn by the lifeguard will vibrate to remind you.
[0041] In one embodiment of the present invention: in step one, the swimmer ID is assigned a unique identification number to each swimmer entering the swimming pool, the swimming status includes three states: normal swimming, potential drowning risk and drowning, the motion trajectory is the movement 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 the swimmer is underwater, the timing starts from entering the water and is reset when leaving the water, the upper and lower frequency detection times are recorded in a way that detects the number of times the swimmer's head emerges from the water and dives into the water within a set time, the set time defaults to 30s, and can be adjusted by parameters, and the time information is the time the swimmer enters the swimming pool and the time of each status update.
[0042] In one embodiment of the present invention: In step 2, the method of collecting video is to install cameras at four corners above the swimming pool, adjust the angle and focal length of the camera so that the people in the swimming pool can be clearly photographed, and the camera continuously shoots the people in the swimming pool at a frame rate of 60FPS to form a collected video, and transmit the collected video to the image processing system.
[0043] In one embodiment of the present invention: In step three, the image preprocessing method is to use the function in the OpenCV library to read the swimming pool monitoring video file, decode the read video, and adjust the resolution of the image using bilinear interpolation, convert it into a series of image frames, and divide the long video into one frame every 10 frames, and store the divided image frames on the disk.
[0044] In one embodiment of the present invention: in step four, the data annotation method is to select the Label Img data annotation tool to annotate the status of the image frame. The status types are five states: swimmer above water, swimmer underwater, swimmer above reflective water, swimmer underwater in reflective water and no one in reflective water. For blurred and difficult to judge frames, the situations of the frames before and after the frame are retrieved for inference.
[0045] In one embodiment of the present invention: In step five, the model is trained by capturing images from actual swimming pool surveillance videos, cleaning the collected image data, and inputting the labeled training set image data into the model using the training interface provided by YOLOv8. For swimmers above water, the model will learn the characteristics of their appearance and color distribution, and for swimmers underwater, the model will learn the visual characteristics of blur and light refraction.
[0046] In one embodiment of the present invention: In step 6, the drowning location is detected by the model trained in step 5, and the image coordinates (u, v) are converted into homogeneous coordinates (u, v, 1). The homography matrix H is used to convert the homogeneous coordinates (u, v, 1) into homogeneous coordinates (X, Y, Z, 1) in the world coordinates. The specific conversion formula is as follows:
[0047]
[0048] After the conversion is completed, the homogeneous coordinates (X, Y, Z, 1) in the world coordinates are divided by the third dimension Z and normalized to obtain the actual position coordinates of the swimmer in the world coordinates (X / Z, Y / Z).
[0049] In one embodiment of the present invention: when the camera recognizes that there is a drowning person in the swimming 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 swimming pool, the position of the drowning person and the layout of the swimming pool, and send emergency rescue instructions and path guidance to the lifeguard through the vibrating bracelet.
[0050] In one embodiment of the present invention: the intelligent rescue path planning system also includes an obstacle recognition module, which is used to obtain obstacle information in the swimming pool in real time and adjust the rescue mission strategy according to the obstacle information, and the obstacle information is buoys and life-saving equipment.
[0051] Example 1, please refer to the attached Figure 1The method for identifying and locating drowning in a swimming pool of the present invention is implemented in a public swimming pool. A unique swimmer ID is assigned to each swimmer. Video is collected at a frame rate of 60FPS by cameras installed at the four corners above the swimming pool. The illumination compensation device installed next to the camera dynamically adjusts the illumination intensity in the swimming pool according to the light changes inside and outside the swimming pool and the number of swimmers in the swimming pool, ensuring the stability of the quality of the collected video images and avoiding the subsequent processing affected by light problems. The OpenCV library is used to pre-process the video, and the long video is split into frames every 10 frames and the resolution is adjusted using bilinear interpolation. Label is used to calculate the image quality of the captured video. The Img tool annotates the segmented image frames. The annotation types are divided into five marking states: swimmers above water, swimmers underwater, swimmers above reflective water, swimmers underwater in reflective water, and no one in reflective water. For blurred and difficult-to-judge frames, the frames before and after the frame are retrieved for inference to improve the accuracy of the annotation. The annotated image data is input into the YOLOv8 model for training. During the training process, images are captured from the actual swimming pool surveillance video, and the collected image data is cleaned and processed. Using the training interface provided by YOLOv8, the model will learn the characteristics of the appearance and color distribution of swimmers above water, and the visual characteristics of blur and light refraction for underwater swimmers. In actual operation, by analyzing the swimmer's motion trajectory, underwater duration, up and down frequency detection times and other attributes, normal diving behavior and drowning state can be accurately distinguished. The sensitivity parameter of underwater duration is based on the wearer's swimming water For example, when it is detected that the underwater duration of a certain swimmer ID is close to the preset underwater duration, the system will pay closer attention to the status of the swimmer. The upper and lower frequency detection times are recorded by detecting the number of times the swimmer's head emerges from the water and dives into the water within the set time (the default is 30s, and the time can be adjusted by parameters). Once the drowning judgment conditions are met, that is, the underwater duration exceeds 30s and the displacement is less than 1 meter (the underwater duration can adjust the sensitivity parameters according to needs, and different durations can be set to trigger the alarm), the bracelet worn by the lifeguard will vibrate to remind and broadcast the position of the drowning person. At the same time, the image position coordinates of the swimmer in the swimming pool are converted into world coordinates through the homography matrix H, and the converted coordinates are divided by the third dimension w coordinates for normalization to obtain the actual position coordinates of the swimmer in the world coordinate system. Rescuers can quickly find the drowning person based on the precise position coordinates, which greatly shortens the rescue response time and improves the rescue efficiency.
[0052] Example 2, please refer to the attached Figure 1The method of the present invention is implemented in a large indoor swimming pool. After the video captured by the camera is transmitted to the image processing system, after a series of processing steps, when the system determines that drowning may occur, the image position coordinates of the swimmer in the swimming 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 conditions are met, the bracelet worn by the lifeguard will vibrate to remind and broadcast the position of the drowning person. The rescuers can quickly find the drowning person based on the precise position coordinates, which greatly shortens the rescue response time and improves the rescue efficiency.
[0053] Example 3, please refer to the attached Figure 1 The method of the present invention is implemented in a professional swimming training center. When the warning light flashes, the intelligent rescue path planning system set in the camera immediately automatically plans the optimal rescue path according to the position of the lifeguard in the swimming pool, the position of the drowning person and the layout of the swimming pool. The system sends emergency rescue instructions and path guidance to the lifeguard through the vibrating bracelet, and 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 to be drowning by the system. After the warning light flashes, the intelligent rescue path planning system quickly plans a path and sends instructions to nearby lifeguards. 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 intelligence level of rescue, reduces the work pressure of lifeguards, and makes rescue operations more rapid and orderly.
[0054] Specifically, by adopting the 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 alarm rate of the system can be reduced, and the alarm can be triggered only when a drowning incident actually occurs. Combined with the homography matrix and image coordinate conversion technology, the image position of the swimmer in the swimming pool can be accurately converted into world coordinates and normalized to obtain the actual position coordinates of the swimmer, so that rescuers can quickly and accurately find the drowning person, shortening the rescue response time and improving the rescue efficiency.
[0055] Specifically, through the two warning modes of the initial flashing warning light and the buzzing alarm of the high-decibel alarm speaker, the flashing warning light can attract the attention of people around at the first time, while avoiding the initial activation of the high-decibel buzzing alarm to affect the user experience and cause panic among people. In addition, the camera also continuously monitors the rescue situation in the swimming pool. Once it is found that the rescue action is slow or not started, it will automatically trigger a higher level alarm. 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 the optimal rescue path when a drowning incident occurs, and send emergency rescue instructions and path guidance to lifeguards through a vibrating bracelet. This not only improves the intelligence level of rescue, but also reduces the work pressure of lifeguards, making rescue operations faster and more orderly.
[0057] The above-mentioned front, back, left, right, top and bottom are all based on the figures in the specification. Figure 1 As a benchmark, according to the person's observation perspective, 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 invention, it should be understood that the terms "center", "longitudinal", "lateral", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the scope of protection of the present invention.
[0059] It should be noted that the device structure and the drawings of the present invention mainly describe the principle of the present invention. In terms of the technology of the design principle, the settings of the power mechanism, power supply system and control system of the device are not fully described. On the premise that the technical personnel in this field understand the principle of the above invention, the details of the power mechanism, power supply system and control system can be clearly known. The control method of the application document is automatic control through a controller, and the control circuit of the controller can be realized by simple programming by the technical personnel in this field.
[0060] The standard parts used therein can all be purchased from the market and can be customized according to the instructions and drawings. The specific connection methods of each part adopt conventional means such as mature bolts, rivets, welding, etc. in the prior art. The machinery, parts and equipment all adopt conventional models in the prior art, and the structures and principles of the components known to technical personnel in this field can be known by these technical personnel through technical manuals or through conventional experimental methods.
[0061] The embodiments of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, various changes, modifications, substitutions and variations are made to these embodiments without departing from the principle and spirit of the present invention, and they still fall within the protection scope of the present invention.
Claims
1. A method for identifying and locating drowning in a swimming pool, characterized in that: The following steps are involved: Step 1: Attribute definition, define the swimmer's ID, swimming status, motion trajectory, underwater duration, up and down frequency detection times, time information, and update the swimmer's position and status information in the world coordinates according to the latest detection results; Step 2: Collecting videos, installing a camera in the swimming pool area, and continuously shooting people in the swimming pool through the camera to form a collected video. A light compensation device is equipped next to the camera. The light compensation device is used to dynamically adjust the light intensity in the swimming pool according to the light changes inside and outside the swimming pool and the number of swimmers in the swimming pool; Step 3: Image preprocessing: use the functions in the OpenCV library to read the swimming pool monitoring video file, decode the read video, convert it into a series of image frames, segment the image frames of the long video, and store the segmented image frames on the disk; Step 4: Data labeling. After the image preprocessing is completed, the swimmers in the image are labeled and classified into five categories, namely, swimmers above water, swimmers under water, swimmers above reflective water, swimmers under reflective water, and no one in the reflective water. The divided and classified labeling state data is then transmitted to the YOLOv8 model. Step 5: Model training. Input the labeled image data into the YOLOv8 model for training. When the YOLOv8 model recognizes that the current swimmer has entered the unmanned reflective area in the current image, the YOLOv8 model will retrieve other collected videos to supplement the unmanned reflective area in the current image. By training the swimmer status data in the reflective area and adding multi-angle cameras, the model can identify drowning situations in normal waters and drowning situations in the reflective area on the water surface. Step 6: Drowning location: The image position coordinates of the swimmer in the pool are converted into world coordinates through the homography matrix H, and the converted coordinates are divided by the third dimension w coordinates for normalization to obtain the actual position coordinates of the swimmer in the world coordinate system; Step 7: Drowning identification: for the same swimmer ID, set the duration of underwater exposure as a condition for drowning judgment. When the drowning judgment condition is met, an alarm prompt will be given; The method of drowning identification is to set the underwater duration as the condition for judging drowning for the same swimmer ID. The default condition for underwater duration is more than 30 seconds and the displacement is less than 1 meter. The set underwater duration can adjust the sensitivity parameters according to needs, and set different durations to trigger the alarm. When the drowning judgment conditions are met, the bracelet worn by the lifeguard will vibrate to remind you.
2. A method for identifying and locating drowning in a swimming pool according to claim 1, characterized in that: In the step one, the swimmer ID assigns a unique identification number to each swimmer entering the swimming pool. The swimming status includes three states: normal swimming, potential drowning risk, and drowning. The motion trajectory is the movement path of the swimmer in the swimming 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 the swimmer is underwater. The timing starts from entering the water and is reset when leaving the water. The upper and lower frequency detection times are recorded in a manner to detect the number of times the swimmer's head emerges from the water and dives into the water within a set time. The set time defaults to 30s, and the time can be adjusted by parameters. The time information is the time the swimmer enters the swimming pool and the time of each status update.
3. A method for identifying and locating drowning in a swimming pool according to claim 1, characterized in that: In step 2, the method of collecting video is to install cameras at the four corners above the swimming pool, adjust the angle and focal length of the camera so that the people in the swimming pool can be clearly photographed, and the camera continuously shoots 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.
4. A method for identifying and locating drowning in a swimming pool according to claim 1, characterized in that: In the step three, the image preprocessing method is to use the function in the OpenCV library to read the swimming pool monitoring video file, decode the read video, and adjust the resolution of the image using bilinear interpolation, convert it into a series of image frames, and divide the long video into one frame every 10 frames, and store the divided image frames on the disk.
5. A method for identifying and locating drowning in a swimming pool according to claim 1, characterized in that: In the step 4, the data annotation method is to select the LabelImg data annotation tool to annotate the state of the image frame. The state types are five types: above water and underwater. For blurred and difficult to judge frames, the situations of the frames before and after the frame are retrieved for inference.
6. A method for identifying and locating drowning in a swimming pool according to claim 1, characterized in that: In the step 5, the model is trained by capturing images from actual swimming pool surveillance videos, cleaning the collected image data, and inputting the labeled training set image data into the model using the training interface provided by YOLOv8. By training the swimmer status data in the reflective area and adding multi-angle cameras, the model can recognize drowning situations in normal waters and drowning situations in the reflective area of the water surface.
7. A method for identifying and locating drowning in a swimming pool according to claim 1, characterized in that: In step 6, the drowning location is detected by the model trained in step 5, and the image coordinates (u, v) are converted into homogeneous coordinates (u, v, 1). The homogeneous coordinates (u, v, 1) are converted into homogeneous coordinates (X, Y, Z, 1) in the world coordinates through the homography matrix H. 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 and normalized to obtain the actual position coordinates of the swimmer in the world coordinates (X / Z, Y / Z).
8. A method for identifying and locating drowning in a swimming pool according to claim 1, characterized in that: When the camera recognizes that there is a drowning person in the swimming 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 swimming pool, the position of the drowning person and the layout of the swimming pool, and send emergency rescue instructions and path guidance to the lifeguard through the vibrating bracelet.
9. A method for identifying and locating drowning in a swimming pool according to claim 8, characterized in that: The intelligent rescue path planning system also includes an obstacle recognition module, which is used to obtain obstacle information in the swimming pool in real time and adjust the rescue mission strategy according to the obstacle information, wherein the obstacle information is buoys and life-saving equipment.
Citation Information
Patent Citations
Swimming pool drowning monitoring method based on combination of infrared rays and visible light
CN109584509A
Scenic spot drowning prevention automatic rescue processing method and device, medium and terminal
CN114906295A
Swimming pool safety management device and method based on multi-camera vision
CN115690913A
Die-casting alloy workpiece defect detection method and system based on visual identification
CN118130477A
Anti-drowning detection method and anti-drowning detection system
CN118430185A
Cited By
Swimming pool drowning video monitoring system based on laser radar
CN120260222A
Swimming pool drowning video monitoring system based on lidar
CN120260222B
Swimming pool environment drowning risk identification management and control system based on VTN model
CN120913158A
Swimming pool environment drowning risk identification and control system based on vtn model
CN120913158B