Mask-based swimmer position identification method under anti-drowning monitoring platform

By using mask map and dictionary technology in the anti-drowning monitoring system and combining deep learning models, the problem of transforming swimmer position recognition results into lane position is solved, and fast and accurate positioning of drowning position is achieved, and rescue efficiency is improved.

CN119251749APending Publication Date: 2025-01-03SHANGHAI TIANJIAN SPORTS TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411112012.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

The existing anti-drowning monitoring system is difficult to quickly convert the swimmer identification results into a lane position that is easy to understand by lifeguards, resulting in unclear positioning of the drowning person and untimely rescue.

Method used

The mask-based swimmer position recognition method is used to label swimming pool video frames through the open source annotation tool Labelme, a mask diagram and query dictionary are established, and combined with the object detection model, the pixel value of the center position of the detection frame is calculated to determine the lane position.

Benefits of technology

It realizes the rapid and accurate judgment of the swimmer's position in the swimming lane, reduces the position position error of the drowning person and improves the rescue efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251749A_ABST
    Figure CN119251749A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computer vision, in particular to a mask-based swimmer position identification method under an anti-drowning monitoring platform, which fills the blank of the technology of quickly positioning the position of a swimming lane by a swimmer in a swimming pool, and can effectively prevent delayed rescue caused by unclear positioning of the position of a drowning person. According to the method, monitoring and identification of the swimmer are realized in a mode of combining various technical means, including establishment of a mask pattern, establishment of a query dictionary and the like, so that the position of the swimmer can be accurately judged; in addition, the technical means of the method relates to high and new technologies such as computer graphics and computer vision, and can play a positive role in promoting the research and development of related fields.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer vision, and in particular to a method for identifying the position of a swimmer based on a mask under an anti-drowning monitoring platform. Background Art

[0002] Swimming is a popular sport that attracts many people to participate. However, drowning accidents often occur during swimming, posing a potential threat to people's lives. Therefore, some anti-drowning monitoring systems have appeared on the market, but traditional monitoring systems mainly rely on manual observation and alarm devices. Although this method can detect drowning, it has high labor costs and false alarm rates. In addition, due to the large number of people in the pool and their diverse behaviors, it is not easy to accurately identify the location of swimmers.

[0003] To solve the above problems, the prior art uses a target detection method based on deep learning technology to accurately identify the position of the swimmer, thereby reducing the false alarm rate of the anti-drowning monitoring system.

[0004] However, although the existing anti-drowning monitoring system can accurately identify swimmers in the swimming pool through the target detection method based on deep learning technology, it is difficult to quickly convert the recognition results into the swimming lane location that is easy for lifeguards to understand. Summary of the invention

[0005] The purpose of the present invention is to provide a mask-based swimmer position identification method under an anti-drowning monitoring platform, so as to solve the problem that the anti-drowning monitoring system in the prior art can accurately identify swimmers in the swimming pool through a target detection method based on deep learning technology, but it is difficult to quickly convert the identification results into a swimming lane position that is easy for lifeguards to understand.

[0006] To achieve the above object, the present invention provides a method for identifying a swimmer's position based on a mask under an anti-drowning monitoring platform. The method for identifying a swimmer's position based on a mask under an anti-drowning monitoring platform comprises the following steps:

[0007] S01. Collect the video frames of the swimming pool monitoring, use the open source annotation tool Labelme to draw several polygonal areas, and mark the positions of each lane respectively, and assign different index numbers to each lane position to obtain the annotation file;

[0008] S02, creating a picture with the same size as the video frame and all pixel values ​​being 0, and assigning different pixel values ​​corresponding to each position of each lane on the picture according to the annotation file to obtain a mask image;

[0009] S03, establishing a dictionary that corresponds one pixel value to a lane position;

[0010] S04. For any target detection model, any swimming pool monitoring frame is input, the swimmer detection frame is output, the center position of the detection frame is calculated, the pixel value corresponding to the center position is read out on the mask image, and the dictionary is queried to obtain the lane position corresponding to the pixel value.

[0011] Among them, in step S01, the lane refers to each water area divided by the lane line in the picture of the swimming pool monitoring video frame, and the lane position refers to, for any of the lanes, according to the color segmentation of the lane line, the water area corresponding to each lane line of continuous color is a position in the lane.

[0012] Among them, in step S02, the specific steps of assigning different pixel values ​​to each position corresponding to each lane on the image are: sorting according to the index number in step S01, assigning pixel values ​​to each position in each lane from small to large, until all positions in all lanes are assigned unique pixel values.

[0013] In step S03, the dictionary establishes a correspondence between lane positions and pixel values ​​in the form of key-value pairs.

[0014] In step S04, the arbitrary object detection model refers to a machine learning or deep learning model that can input a swimming pool image and output a swimmer detection frame. For any swimmer detection frame [x1, y1, x2, y2] output by the model, the coordinates of the center point of the detection frame (x c ,y c )for:

[0015]

[0016] Among them, x1, y1 are the horizontal and vertical coordinates of the upper left corner of the detection box, and x2, y2 are the horizontal and vertical coordinates of the lower right corner of the detection box.

[0017] The present invention discloses a method for identifying the position of a swimmer based on a mask under an anti-drowning monitoring platform, which fills the gap in the technology of quickly locating the swimming lane position of a swimmer in a swimming pool, and can effectively prevent the untimely rescue caused by unclear positioning of the drowning person; the method realizes the monitoring and identification of the swimmer by combining multiple technical means, including establishing a mask map, establishing a query dictionary, etc., so as to accurately determine the position of the swimmer; in addition, the technical means of the method involve high-tech technologies such as computer graphics and computer vision, which can have a positive role in promoting the research and development of related fields. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0019] Figure 1 It is a schematic diagram of the implementation process of the mask-based swimmer position identification method under the anti-drowning monitoring platform provided by the present invention.

[0020] Figure 2 This is a schematic diagram of a swimming pool annotated using the open source annotation tool labelme in a specific embodiment of the present invention.

[0021] Figure 3 In the specific implementation mode of the present invention, Figure 2 Schematic diagram of the mask map obtained from the labeled swimming pool schematic. DETAILED DESCRIPTION

[0022] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.

[0023] See also Figures 1 to 3 The present invention provides a method for identifying a position of a swimmer based on a mask under an anti-drowning monitoring platform. The method for identifying a position of a swimmer based on a mask under an anti-drowning monitoring platform comprises the following steps:

[0024] S01. Collect the video frames of the swimming pool monitoring, use the open source annotation tool Labelme to draw several polygonal areas, and mark the positions of each lane respectively, and assign different index numbers to each lane position to obtain the annotation file;

[0025] Specifically, when collecting pool surveillance video frames, it is not limited to a certain pool surveillance video. Multiple pool surveillance videos can be collected, such as videos from different sources, different scenes, and different times. Frames with fewer people and no obstruction of the lanes are selected for easy labeling. When labeling, each lane usually contains more than 15 positions, and each lane position is drawn using polygons. The drawn polygons are usually quadrilaterals, which are used to separate each position of each lane. At the same time, a unique index number is established for each position in the open source labeling tool Labelme. The index number can start from "1" and increase one by one. The labeled pool image is as follows: Figure 2As shown in the figure, after labeling the entire pool, export the default labeling file of the open source labeling tool Labelme.

[0026] S02, creating a picture with the same size as the video frame and all pixel values ​​being 0, and assigning different pixel values ​​corresponding to each position of each lane on the picture according to the annotation file to obtain a mask image;

[0027] Specifically, according to the order of the index numbers in step S01, pixel values ​​are assigned to each position of each lane from small to large. For example, in the area marked as "1 lane 1 position", on the constructed image, the pixel values ​​of all points in the area are changed to 1; in the area marked as "1 lane 2 position", on the constructed image, the pixel values ​​of all points in the area are changed to 2, and so on, until all positions in all lanes are assigned unique pixel values;

[0028] For the annotation file obtained in step S01, in each region corresponding to a different index number, the pixel value of the pixel point at the corresponding position in the established image is changed to the same as its index number. The pixel value can also be set to other values, as long as the pixel value in each region does not repeat the pixel value in other regions. The mask image obtained after processing is as follows: Figure 3 shown.

[0029] S03, establishing a dictionary that corresponds one pixel value to a lane position;

[0030] Specifically, the dictionary establishes a correspondence between lane positions and pixel values ​​in the form of key-value pairs, such as the key-value pair "1:1 Lane 1 Position" indicates that the area with a pixel value of 1 corresponds to position 1 of Lane 1.

[0031] S04. For any target detection model, any swimming pool monitoring frame is input, the swimmer detection frame is output, the center position of the detection frame is calculated, the pixel value corresponding to the center position is read out on the mask image, and the dictionary is queried to obtain the lane position corresponding to the pixel value.

[0032] Specifically, the arbitrary object detection model refers to a machine learning or deep learning model that can input a swimming pool image and output a swimmer detection frame, such as yolov3, yolov5, etc. For any swimmer detection frame [x1, y1, x2, y2] output by the model, the coordinates of the center point of the detection frame (x c ,y c )for:

[0033]

[0034] Among them, x1, y1 are the horizontal coordinates and vertical coordinates of the upper left corner of the detection frame, and x2, y2 are the horizontal coordinates and vertical coordinates of the lower right corner of the detection frame. c ,yc ) and query the dictionary to get the swimmer’s lane position.

[0035] In this embodiment, the mask-based swimmer position identification method under the anti-drowning monitoring platform provided by the present invention fills the gap in the technology of quickly locating the lane position of swimmers in the swimming pool, and can effectively prevent the untimely rescue caused by unclear location of the drowning person; the method realizes the monitoring and identification of swimmers by combining multiple technical means, including establishing a mask map, establishing a query dictionary, etc., so as to accurately determine the location of the swimmer; in addition, the technical means of the method involve high-tech technologies such as computer graphics and computer vision, which can have a positive role in promoting the research and development in related fields.

[0036] What is disclosed above is only a preferred embodiment of the present invention, and it certainly cannot be used to limit the scope of rights of the present invention. Ordinary technicians in this field can understand that all or part of the processes of the above embodiment and equivalent changes made according to the claims of the present invention still fall within the scope of the invention.

Claims

1. A method for identifying the position of a swimmer based on a mask under a drowning prevention monitoring platform, characterized in that: The steps include: S01. Collect the video frames of the swimming pool monitoring, use the open source annotation tool Labelme to draw several polygonal areas, and mark the positions of each lane respectively, and assign different index numbers to each lane position to obtain the annotation file; S02, creating a picture with the same size as the video frame and all pixel values ​​being 0, and assigning different pixel values ​​corresponding to each position of each lane on the picture according to the annotation file to obtain a mask image; S03, establishing a dictionary that corresponds one pixel value to a lane position; S04. For any target detection model, any swimming pool monitoring frame is input, the swimmer detection frame is output, the center position of the detection frame is calculated, the pixel value corresponding to the center position is read out on the mask image, and the dictionary is queried to obtain the lane position corresponding to the pixel value.

2. The method for identifying the position of a swimmer based on a mask under a drowning prevention monitoring platform according to claim 1, characterized in that: In step S01, the lane refers to each water area divided by a lane line in the picture of the swimming pool monitoring video frame, and the lane position refers to a position in the lane corresponding to each continuous color lane line segment according to the color segment of the lane line for any one of the lanes.

3. The method for identifying the position of a swimmer based on a mask under a drowning prevention monitoring platform according to claim 2, characterized in that: In step S02, the specific steps of assigning different pixel values ​​to each position corresponding to each lane on the image are: sorting by the index number in step S01, assigning pixel values ​​to each position in each lane from small to large, until all positions in all lanes are assigned unique pixel values.

4. The method for identifying the position of a swimmer based on a mask under a drowning prevention monitoring platform according to claim 3, characterized in that: In step S03, the dictionary establishes a correspondence between lane positions and pixel values ​​in the form of key-value pairs.

5. The method for identifying the position of a swimmer based on a mask under a drowning prevention monitoring platform according to claim 3, characterized in that: In step S04, the arbitrary object detection model refers to a machine learning or deep learning model that can input a swimming pool image and output a swimmer detection frame. For any swimmer detection frame [x1, y1, x2, y2] output by the model, the coordinates of the center point of the detection frame (x c ,y c )for: Among them, x1, y1 are the horizontal and vertical coordinates of the upper left corner of the detection box, and x2, y2 are the horizontal and vertical coordinates of the lower right corner of the detection box.