CN114359967A - Method and device for detecting drowning-preventing human body target in swimming pool, computer equipment and storage medium - Google Patents

Method and device for detecting drowning-preventing human body target in swimming pool, computer equipment and storage medium Download PDF

Info

Publication number
CN114359967A
CN114359967A CN202210022848.9A CN202210022848A CN114359967A CN 114359967 A CN114359967 A CN 114359967A CN 202210022848 A CN202210022848 A CN 202210022848A CN 114359967 A CN114359967 A CN 114359967A
Authority
CN
China
Prior art keywords
network
swimming pool
training
target detection
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210022848.9A
Other languages
Chinese (zh)
Other versions
CN114359967B (en
Inventor
任小枫
谢欣
郭羽
郭东岩
王振华
张剑华
张都思
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Juyan Xincheng Technology Co ltd
Original Assignee
Hangzhou Juyan Xincheng Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Juyan Xincheng Technology Co ltd filed Critical Hangzhou Juyan Xincheng Technology Co ltd
Priority to CN202210022848.9A priority Critical patent/CN114359967B/en
Publication of CN114359967A publication Critical patent/CN114359967A/en
Application granted granted Critical
Publication of CN114359967B publication Critical patent/CN114359967B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The embodiment of the invention discloses a method and a device for detecting a drowning-preventing human target of a swimming pool, computer equipment and a storage medium. The method comprises the following steps: acquiring images shot by a plurality of cameras above the water surface of the swimming pool to obtain an original image; inputting the original image into a target detection model to perform anti-drowning human target detection of the swimming pool so as to obtain a detection result; outputting the detection result; the target detection model is obtained by training a convolutional neural network by using a plurality of images with position labels of human body targets as sample sets. By implementing the method provided by the embodiment of the invention, the human body target of the swimming pool can be quickly and accurately detected, and the accuracy of drowning supervision is improved.

Description

Method and device for detecting drowning-preventing human body target in swimming pool, computer equipment and storage medium
Technical Field
The invention relates to a target detection method, in particular to a method and a device for detecting a drowning-preventing human target in a swimming pool, computer equipment and a storage medium.
Background
With the development of sports industry, people have an increasing enthusiasm for participating in sports activities, and swimming, which is one of popular sports, is the highest sport of safety accidents. According to incomplete statistical data published by the ministry of health, about 5.7 million people die from drowning accidents every year in China, wherein the percentage of teenagers reaches 56.04%, which becomes the first cause of death of the teenagers, and the drowning death rate in China is the highest worldwide.
At present when preventing drowned supervision, all can detect the location to personnel in the swimming pool relatively, but the means of current adoption is sat in higher position by the lifeguard basically and is watched, hardly detect all personnel, and multiple facility and debris can appear on the swimming pool bank for example stand, lifesaving equipment, the training is established and individual article of swimmer etc. also can appear in the swimming pool, multiple floater is for example swimming lane line and training equipment etc. influence the judgement easily, thereby it is inaccurate to lead to the swimming pool to prevent drowned human target detection, and then influences the rate of accuracy of drowned supervision.
Therefore, it is necessary to design a new method for rapidly and accurately detecting the human target of the swimming pool and improving the accuracy of drowning supervision.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a method and a device for detecting a drowning-preventing human target of a swimming pool, computer equipment and a storage medium.
In order to achieve the purpose, the invention adopts the following technical scheme: a method for detecting a drowning-preventing human target in a swimming pool comprises the following steps:
acquiring images shot by a plurality of cameras above the water surface of the swimming pool to obtain an original image;
inputting the original image into a target detection model to perform anti-drowning human target detection of the swimming pool so as to obtain a detection result;
outputting the detection result;
the target detection model is obtained by training a convolutional neural network by using a plurality of images with position labels of human body targets as sample sets.
The further technical scheme is as follows: the target detection model is obtained by training a convolutional neural network by using a plurality of images with position labels of human body targets as a sample set, and comprises the following steps:
constructing an image with a position label of a human body target as a sample set;
dividing the sample set to obtain a training set, a verification set and a test set;
performing enhancement processing on the training set, the verification set and the test set to obtain a processing result;
constructing a Yolov5 network, and adding a DLA-34 network, a Semantic Self-authorization mechanism and an Anchor-free network in the Yolov5 network to obtain an initial network;
training and verifying the initial network by using a training set and a verification set in the processing result, and calculating a loss value in the training process;
and when the loss value is kept unchanged, testing the initial network by using the test set in the processing result so as to take the trained initial network as a target detection model.
The further technical scheme is as follows: the method comprises the steps of constructing a Yolov5 network, and adding a DLA-34 network, a Semantic Self-authorization mechanism and an Anchor-free network in the Yolov5 network to obtain an initial network, wherein the steps comprise:
constructing a Yolov5 network;
adding a DLA-34 network as a backbone network in the Yolov5 network, and extracting features to obtain a first network;
adding a Semantic Self-authorization mechanism to the first network to obtain a second network;
an Anchor-free network is used in the target regression box network of the second network to obtain the initial network.
The further technical scheme is as follows: the detection result comprises the position of the human target of the swimming pool.
The invention also provides a drowning-preventing human target detection device for the swimming pool, which comprises:
the swimming pool water surface monitoring system comprises an image acquisition unit, a control unit and a control unit, wherein the image acquisition unit is used for acquiring images shot by a plurality of cameras positioned above the water surface of a swimming pool so as to obtain an original image;
the target detection unit is used for inputting the original image into a target detection model to perform drowning-preventing human target detection of the swimming pool so as to obtain a detection result;
and the output unit is used for outputting the detection result.
The further technical scheme is as follows: the device also comprises a model generation unit;
the model generation unit is used for training the convolutional neural network by using a plurality of images with position labels of human body targets as a sample set so as to obtain a target detection model.
The further technical scheme is as follows: the model generation unit includes:
the sample set constructing subunit is used for constructing an image with a position label of a human body target as a sample set;
the dividing subunit is used for dividing the sample set to obtain a training set, a verification set and a test set;
the enhancement processing subunit is used for carrying out enhancement processing on the training set, the verification set and the test set to obtain a processing result;
the initial network generation subunit is used for constructing a Yolov5 network, and adding a DLA-34 network, a Semantic Self-authorization mechanism and an Anchor-free network in the Yolov5 network to obtain an initial network;
the training subunit is used for training and verifying the initial network by using a training set and a verification set in the processing result, and calculating a loss value in the training process;
and the testing subunit is used for testing the initial network by using the test set in the processing result when the loss value is kept unchanged, so as to take the trained initial network as a target detection model.
The further technical scheme is as follows: the initial network generation subunit includes:
the basic network construction module is used for constructing a Yolov5 network;
the first network generation module is used for adding a DLA-34 network in the Yolov5 network as a backbone network, and extracting features to obtain a first network;
the second network generation module is used for adding a Semantic Self-authorization mechanism in the first network to obtain a second network;
and the network processing module is used for constructing an Anchor-free network in the target regression frame network of the second network so as to obtain an initial network.
The invention also provides computer equipment which comprises a memory and a processor, wherein the memory is stored with a computer program, and the processor realizes the method when executing the computer program.
The invention also provides a storage medium storing a computer program which, when executed by a processor, implements the method described above.
Compared with the prior art, the invention has the beneficial effects that: the invention obtains images shot by a plurality of cameras positioned above the water surface of the swimming pool, and carries out the drowning prevention human body target detection of the swimming pool by means of the target detection model, wherein the target detection model is formed by adding a DLA-34 network, a Semantic Self-orientation mechanism and an Anchor-free network to a Yolov5 network, and the drowning prevention human body target detection method can obtain more effective information through training, has high accuracy, realizes the rapid and accurate detection of the swimming pool human body target, and improves the accuracy of drowning supervision.
The invention is further described below with reference to the accompanying drawings and specific embodiments.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of a method for detecting a human target in drowning prevention of a swimming pool according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a method for detecting a human target in a swimming pool for drowning prevention according to an embodiment of the present invention;
FIG. 3 is a schematic view of a sub-flow chart of a method for detecting a human target in a swimming pool for drowning prevention according to an embodiment of the present invention;
FIG. 4 is a sub-flowchart of a method for detecting a human target in a swimming pool for drowning prevention according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a target detection model generating three scale feature maps according to an embodiment of the present invention
FIG. 6 is a schematic block diagram of a human target detection device for drowning prevention in a swimming pool according to an embodiment of the present invention;
FIG. 7 is a schematic block diagram of a computer device provided by an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1 and fig. 2, fig. 1 is a schematic view of an application scenario of a method for detecting a human target in a swimming pool for drowning prevention according to an embodiment of the present invention. Fig. 2 is a schematic flow chart of a method for detecting a human target in a swimming pool for preventing drowning according to an embodiment of the present invention. The method for detecting the drowning-preventing human body target of the swimming pool is applied to a server. The server performs data interaction with the plurality of cameras and the terminal, performs target detection through images acquired by the plurality of cameras, and outputs a detection result.
Fig. 2 is a schematic flow chart of a method for detecting a human target in drowning prevention of a swimming pool according to an embodiment of the present invention. As shown in fig. 2, the method includes the following steps S110 to S150.
And S110, acquiring images shot by a plurality of cameras above the water surface of the swimming pool to obtain an original image.
In this embodiment, a plurality of cameras are deployed above the surface of the pool, and are used to capture an omnidirectional image of the pool, thereby forming an original image.
And S120, inputting the original image into a target detection model to perform anti-drowning human target detection of the swimming pool so as to obtain a detection result.
In this embodiment, the detection result includes the position of the human target in the swimming pool, and also includes the result that no human target exists in the swimming pool.
The target detection model is obtained by training a convolutional neural network by using a plurality of images with position labels of human body targets as sample sets.
In an embodiment, referring to fig. 3, the step S120 may include steps S121 to S126.
And S121, constructing an image with a position label of the human body target as a sample set.
In this embodiment, the sample set refers to a plurality of images of the swimming pool, and the images formed by manually labeling the positions of the human targets.
And S122, dividing the sample set to obtain a training set, a verification set and a test set.
In the embodiment, the sample set is divided, and the division can be used for training, verifying and testing the model.
And S123, performing enhancement processing on the training set, the verification set and the test set to obtain a processing result.
In this embodiment, the processing result refers to a result obtained by processing the training set, the verification set, and the test set by an enhancement operation means such as rotation and inversion.
The training set, the verification set and the test set are subjected to enhancement processing, so that the stability of the model can be improved.
S124, constructing a Yolov5 network, and adding a DLA-34 network, a Semantic Self-extension mechanism and an Anchor-free network in the Yolov5 network to obtain an initial network.
In this embodiment, the initial network refers to a convolutional neural network formed by adding a DLA-34 network, a Semantic Self-anchoring mechanism and an Anchor-free network to a Yolov5 network.
In an embodiment, referring to fig. 4, the step S124 may include steps S1241 to S1244.
S1241, constructing a Yolov5 network;
s1242, adding a DLA-34 network as a backbone network in the Yolov5 network, and extracting features to obtain a first network.
In this embodiment, the first network refers to a network structure formed after the Yolov5 network adds the DLA-34 network as a backbone network.
DLA-34 in CenterNet is added as a Backbone for extracting characteristics on the basis of a used Yolov5 target detection model. DLA (Deep Layer Aggregation) is an image classification network with multi-level jump connection, and information of different layers can be better aggregated through deeper fusion. And the DLA-34 uses Deformable Convolution, namely DCN (Deformable Convolutional), so that the DLA-34 serving as a network structure of multi-target tracking can fuse the characteristic information in an iterative mode, and more effective information is obtained.
S1243, adding a Semantic Self-authorization mechanism in the first network to obtain a second network.
In this embodiment, the second network refers to a Yolov5 network, which adds a DLA-34 network as a backbone network as a foundation and adds a network formed by a Semantic Self-authorization mechanism.
In the target detection model, SSA (Self-Attention mechanism) is also added. Firstly, the Self-Attention mechanism of Self-Attention is to process global information, and the Self-Attention mechanism of Self-Attention takes a target detection frame as a segmented manually labeled frame ground route, and learns the segmented characteristics by using the target detection frame ground route, and fuses the characteristics and the detection characteristics, namely an Attention focused information range Attention map as the detection characteristics is detected. The process is as follows: the detection frame of the truth value is used as a divided mask, the mask is learned on the original characteristic diagram through convolution, and the characteristic diagram obtained through learning is used as an information range focused by attention and is fused on the original characteristic diagram.
S1244, using an Anchor-free network in the target regression box network of the second network to obtain an initial network.
In this embodiment, in the final target regression frame network, the Anchor-free algorithm is used, and the boundary frame where the final target is located is obtained according to the feature maps with the category information and the location information and then according to the feature maps.
Specifically, the target box, i.e. the bounding box prediction program where the target is located, implements: as shown in fig. 5, three scale feature maps are formed, in which the number below the convolutional layer is the number of channels, the number above is the two-dimensional image size value, and the input image is 736 × 1280, 3 channels. The different scale characteristic graphs deepen along with the convolution layer, the receptive fields on the input images are different, namely the sizes of the input image grids corresponding to the characteristic graphs are different
When the target detection model is used for reasoning, multiplying the class information of each grid prediction and the confidence coefficient of the target frame prediction to obtain a class-specific confidence score of each target frame:
Figure BDA0003463157200000071
the first term on the left of the equation is the class probability of each mesh prediction, and the second third term is the confidence of each target box prediction. The product is the probability that the predicted target frame belongs to a certain category and also the probability of the accuracy of the target frame. After the class-confidence score of each target frame is obtained, setting a threshold value, filtering out target frames with low scores, and carrying out NMS (non-maximum suppression) treatment on the reserved target frames to obtain a final detection result; i.e. the location of the human target in the pool.
And S125, training and verifying the initial network by utilizing the training set and the verification set in the processing result, and calculating a loss value in the training process.
In this embodiment, the loss value refers to the variance between the result obtained by the training process and the actually labeled label.
And S126, when the loss value is kept unchanged, testing the initial network by using the test set in the processing result so as to take the trained initial network as a target detection model.
When the loss value is maintained unchanged, that is, the current network is already converged, that is, the loss value is basically unchanged and very small, it is also indicated that the current network can be used as a candidate target detection model, generally, the loss value is relatively large when training is started, the loss value is smaller after training, and if the loss value is not maintained unchanged, it is indicated that the current network cannot be used as the candidate target detection model, that is, the detected result is not accurate, which may cause the classification of the interference signal in the later period to be inaccurate; if the loss value is not maintained, adjusting parameters of each layer of the network, and executing the sequence as an input value to be input into the network for training the network.
And S130, outputting the detection result.
In this embodiment, the detection result is output to the terminal for the terminal to check.
The swimming pool drowning prevention human body target detection method comprises the steps of obtaining images shot by a plurality of cameras located above the water surface of a swimming pool, and carrying out swimming pool drowning prevention human body target detection in a target detection model, wherein the target detection model is formed by adding a DLA-34 network, a Semantic Self-orientation mechanism and an Anchor-free network into a Yolov5 network and is obtained through training, more effective information can be obtained, the accuracy rate is high, the swimming pool human body target can be quickly and accurately detected, and the accuracy rate of drowning supervision is improved.
Fig. 6 is a schematic block diagram of a swimming pool drowning prevention human target detection apparatus 300 according to an embodiment of the present invention. As shown in fig. 6, the present invention also provides a human target detection device 300 for detecting drowning of swimming pool, corresponding to the above method for detecting drowning human target of swimming pool. The swimming pool drowning prevention human target detection apparatus 300 includes a unit for performing the above-described swimming pool drowning prevention human target detection method, and the apparatus may be configured in a server. Specifically, referring to fig. 6, the swimming pool drowning prevention human target detection apparatus 300 includes an image acquisition unit 301, a target detection unit 302, and an output unit 303.
An image acquisition unit 301, configured to acquire images captured by a plurality of cameras above the water surface of the swimming pool to obtain an original image; a target detection unit 302, configured to input the original image into a target detection model for detecting a human target in the swimming pool for drowning prevention, so as to obtain a detection result; an output unit 303, configured to output the detection result.
In one embodiment, the swimming pool drowning prevention human target detection apparatus 300 further comprises a model generation unit;
the model generation unit is used for training the convolutional neural network by using a plurality of images with position labels of human body targets as a sample set so as to obtain a target detection model.
In an embodiment, the model generation unit includes a sample set construction subunit, a division subunit, an enhancement processing subunit, an initial network generation subunit, a training subunit, and a testing subunit.
The sample set constructing subunit is used for constructing an image with a position label of a human body target as a sample set; the dividing subunit is used for dividing the sample set to obtain a training set, a verification set and a test set; the enhancement processing subunit is used for carrying out enhancement processing on the training set, the verification set and the test set to obtain a processing result; the initial network generation subunit is used for constructing a Yolov5 network, and adding a DLA-34 network, a Semantic Self-authorization mechanism and an Anchor-free network in the Yolov5 network to obtain an initial network; the training subunit is used for training and verifying the initial network by using a training set and a verification set in the processing result, and calculating a loss value in the training process; and the testing subunit is used for testing the initial network by using the test set in the processing result when the loss value is kept unchanged, so as to take the trained initial network as a target detection model.
In an embodiment, the initial network generation subunit includes a basic network construction module, a first network generation module, a second network generation module, and a network processing module.
The basic network construction module is used for constructing a Yolov5 network; the first network generation module is used for adding a DLA-34 network in the Yolov5 network as a backbone network, and extracting features to obtain a first network; the second network generation module is used for adding a Semantic Self-authorization mechanism in the first network to obtain a second network; and the network processing module is used for constructing an Anchor-free network in the target regression frame network of the second network so as to obtain an initial network.
It should be noted that, as will be clear to those skilled in the art, the concrete implementation processes of the above-mentioned drowning human target detection apparatus 300 and each unit of the swimming pool can refer to the corresponding descriptions in the foregoing method embodiments, and for the convenience and brevity of description, no further description is provided herein.
The above-described swimming pool drowning prevention human target detection apparatus 300 can be implemented in the form of a computer program that can be run on a computer device as shown in fig. 7.
Referring to fig. 7, fig. 7 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 500 may be a server, wherein the server may be an independent server or a server cluster composed of a plurality of servers.
Referring to fig. 7, the computer device 500 includes a processor 502, memory, and a network interface 505 connected by a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer programs 5032 include program instructions that, when executed, cause the processor 502 to perform a method of detecting a human target in drowning prevention in a pool.
The processor 502 is used to provide computing and control capabilities to support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503, and when the computer program 5032 is executed by the processor 502, the processor 502 can be enabled to perform a method for detecting a drowning human target in a swimming pool.
The network interface 505 is used for network communication with other devices. Those skilled in the art will appreciate that the configuration shown in fig. 7 is a block diagram of only a portion of the configuration associated with the present application and does not constitute a limitation of the computer device 500 to which the present application may be applied, and that a particular computer device 500 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
Wherein the processor 502 is configured to run the computer program 5032 stored in the memory to implement the following steps:
acquiring images shot by a plurality of cameras above the water surface of the swimming pool to obtain an original image; inputting the original image into a target detection model to perform anti-drowning human target detection of the swimming pool so as to obtain a detection result; outputting the detection result;
the target detection model is obtained by training a convolutional neural network by using a plurality of images with position labels of human body targets as sample sets.
The detection result comprises the position of the human target of the swimming pool.
In an embodiment, when implementing the target detection model is a step of training a convolutional neural network by using a plurality of images with position labels of human targets as sample sets, the processor 502 specifically implements the following steps:
constructing an image with a position label of a human body target as a sample set; dividing the sample set to obtain a training set, a verification set and a test set; performing enhancement processing on the training set, the verification set and the test set to obtain a processing result; constructing a Yolov5 network, and adding a DLA-34 network, a Semantic Self-authorization mechanism and an Anchor-free network in the Yolov5 network to obtain an initial network; training and verifying the initial network by using a training set and a verification set in the processing result, and calculating a loss value in the training process; and when the loss value is kept unchanged, testing the initial network by using the test set in the processing result so as to take the trained initial network as a target detection model.
In an embodiment, when the processor 502 implements the above-mentioned building of the Yolov5 network and adds the DLA-34 network, the Semantic Self-authorization mechanism, and the Anchor-free network to the Yolov5 network to obtain the initial network step, the following steps are specifically implemented:
constructing a Yolov5 network; adding a DLA-34 network as a backbone network in the Yolov5 network, and extracting features to obtain a first network; adding a Semantic Self-authorization mechanism to the first network to obtain a second network; an Anchor-free network is used in the target regression box network of the second network to obtain the initial network.
It should be understood that in the embodiment of the present Application, the Processor 502 may be a Central Processing Unit (CPU), and the Processor 502 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
It will be understood by those skilled in the art that all or part of the flow of the method implementing the above embodiments may be implemented by a computer program instructing associated hardware. The computer program includes program instructions, and the computer program may be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.
Accordingly, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program, when executed by a processor, causes the processor to perform the steps of:
acquiring images shot by a plurality of cameras above the water surface of the swimming pool to obtain an original image; inputting the original image into a target detection model to perform anti-drowning human target detection of the swimming pool so as to obtain a detection result; outputting the detection result;
the target detection model is obtained by training a convolutional neural network by using a plurality of images with position labels of human body targets as sample sets.
The detection result comprises the position of the human target of the swimming pool.
In an embodiment, when the processor executes the computer program to implement the step of training the convolutional neural network by using a plurality of images with position labels of the human body targets as a sample set, the processor implements the following steps:
constructing an image with a position label of a human body target as a sample set; dividing the sample set to obtain a training set, a verification set and a test set; performing enhancement processing on the training set, the verification set and the test set to obtain a processing result; constructing a Yolov5 network, and adding a DLA-34 network, a Semantic Self-authorization mechanism and an Anchor-free network in the Yolov5 network to obtain an initial network; training and verifying the initial network by using a training set and a verification set in the processing result, and calculating a loss value in the training process; and when the loss value is kept unchanged, testing the initial network by using the test set in the processing result so as to take the trained initial network as a target detection model.
In an embodiment, when the processor executes the computer program to implement the building of the Yolov5 network and adds the DLA-34 network, the Semantic Self-authorization mechanism, and the Anchor-free network to the Yolov5 network to obtain the initial network step, the following steps are specifically implemented:
constructing a Yolov5 network; adding a DLA-34 network as a backbone network in the Yolov5 network, and extracting features to obtain a first network; adding a Semantic Self-authorization mechanism to the first network to obtain a second network; an Anchor-free network is used in the target regression box network of the second network to obtain the initial network.
The storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, which can store various computer readable storage media.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, various elements or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented.
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the invention can be merged, divided and deleted according to actual needs. In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a terminal, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method for detecting drowning human targets in a swimming pool is characterized by comprising the following steps:
acquiring images shot by a plurality of cameras above the water surface of the swimming pool to obtain an original image;
inputting the original image into a target detection model to perform anti-drowning human target detection of the swimming pool so as to obtain a detection result;
outputting the detection result;
the target detection model is obtained by training a convolutional neural network by using a plurality of images with position labels of human body targets as sample sets.
2. The method as claimed in claim 1, wherein said object detection model is obtained by training convolutional neural network using a plurality of images with position labels of human objects as sample set, comprising:
constructing an image with a position label of a human body target as a sample set;
dividing the sample set to obtain a training set, a verification set and a test set;
performing enhancement processing on the training set, the verification set and the test set to obtain a processing result;
constructing a Yolov5 network, and adding a DLA-34 network, a Semantic Self-authorization mechanism and an Anchor-free network in the Yolov5 network to obtain an initial network;
training and verifying the initial network by using a training set and a verification set in the processing result, and calculating a loss value in the training process;
and when the loss value is kept unchanged, testing the initial network by using the test set in the processing result so as to take the trained initial network as a target detection model.
3. The method for detecting drowning human target in swimming pool as claimed in claim 2, wherein said constructing Yolov5 network and adding DLA-34 network, Semantic Self-anchoring mechanism and Anchor-free network in Yolov5 network to obtain initial network comprises:
constructing a Yolov5 network;
adding a DLA-34 network as a backbone network in the Yolov5 network, and extracting features to obtain a first network;
adding a Semantic Self-authorization mechanism to the first network to obtain a second network;
an Anchor-free network is used in the target regression box network of the second network to obtain the initial network.
4. The method as claimed in claim 1, wherein the detection result includes the location of the human target in the swimming pool.
5. Human target detection device of drowning is prevented to swimming pool, its characterized in that includes:
the swimming pool water surface monitoring system comprises an image acquisition unit, a control unit and a control unit, wherein the image acquisition unit is used for acquiring images shot by a plurality of cameras positioned above the water surface of a swimming pool so as to obtain an original image;
the target detection unit is used for inputting the original image into a target detection model to perform drowning-preventing human target detection of the swimming pool so as to obtain a detection result;
and the output unit is used for outputting the detection result.
6. The swimming pool drowning prevention human target detection device according to claim 5, further comprising a model generation unit;
the model generation unit is used for training the convolutional neural network by using a plurality of images with position labels of human body targets as a sample set so as to obtain a target detection model.
7. The swimming pool drowning prevention human target detection device according to claim 6, wherein the model generation unit comprises:
the sample set constructing subunit is used for constructing an image with a position label of a human body target as a sample set;
the dividing subunit is used for dividing the sample set to obtain a training set, a verification set and a test set;
the enhancement processing subunit is used for carrying out enhancement processing on the training set, the verification set and the test set to obtain a processing result;
the initial network generation subunit is used for constructing a Yolov5 network, and adding a DLA-34 network, a Semantic Self-authorization mechanism and an Anchor-free network in the Yolov5 network to obtain an initial network;
the training subunit is used for training and verifying the initial network by using a training set and a verification set in the processing result, and calculating a loss value in the training process;
and the testing subunit is used for testing the initial network by using the test set in the processing result when the loss value is kept unchanged, so as to take the trained initial network as a target detection model.
8. The swimming pool drowning prevention human target detection device of claim 7, wherein the initial network generation subunit comprises:
the basic network construction module is used for constructing a Yolov5 network;
the first network generation module is used for adding a DLA-34 network in the Yolov5 network as a backbone network, and extracting features to obtain a first network;
the second network generation module is used for adding a Semantic Self-authorization mechanism in the first network to obtain a second network;
and the network processing module is used for constructing an Anchor-free network in the target regression frame network of the second network so as to obtain an initial network.
9. A computer arrangement, characterized in that the computer arrangement comprises a memory having stored thereon a computer program and a processor implementing the method according to any of claims 1-4 when executing the computer program.
10. A storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 4.
CN202210022848.9A 2022-01-10 2022-01-10 Method and device for detecting drowning-preventing human body target in swimming pool, computer equipment and storage medium Active CN114359967B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210022848.9A CN114359967B (en) 2022-01-10 2022-01-10 Method and device for detecting drowning-preventing human body target in swimming pool, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210022848.9A CN114359967B (en) 2022-01-10 2022-01-10 Method and device for detecting drowning-preventing human body target in swimming pool, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114359967A true CN114359967A (en) 2022-04-15
CN114359967B CN114359967B (en) 2022-08-09

Family

ID=81108413

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210022848.9A Active CN114359967B (en) 2022-01-10 2022-01-10 Method and device for detecting drowning-preventing human body target in swimming pool, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114359967B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115376210A (en) * 2022-10-24 2022-11-22 杭州巨岩欣成科技有限公司 Drowning behavior identification method, device, equipment and medium for preventing drowning in swimming pool

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002097758A1 (en) * 2001-05-25 2002-12-05 Nanyang Technological University, Centre For Signal Processing Drowning early warning system
CN110309706A (en) * 2019-05-06 2019-10-08 深圳市华付信息技术有限公司 Face critical point detection method, apparatus, computer equipment and storage medium
CN110569772A (en) * 2019-08-30 2019-12-13 北京科技大学 Method for detecting state of personnel in swimming pool
CN110781836A (en) * 2019-10-28 2020-02-11 深圳市赛为智能股份有限公司 Human body recognition method and device, computer equipment and storage medium
CN110909693A (en) * 2019-11-27 2020-03-24 深圳市华付信息技术有限公司 3D face living body detection method and device, computer equipment and storage medium
CN111191486A (en) * 2018-11-14 2020-05-22 杭州海康威视数字技术股份有限公司 Drowning behavior recognition method, monitoring camera and monitoring system
CN113158962A (en) * 2021-05-06 2021-07-23 北京工业大学 Swimming pool drowning detection method based on YOLOv4
CN113688724A (en) * 2021-08-24 2021-11-23 桂林电子科技大学 Swimming pool drowning monitoring method based on binocular vision
CN113743385A (en) * 2021-11-05 2021-12-03 陕西欧卡电子智能科技有限公司 Unmanned ship water surface target detection method and device and unmanned ship
CN113822259A (en) * 2021-11-24 2021-12-21 深圳市万物云科技有限公司 Off-duty detection method and device, computer equipment and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002097758A1 (en) * 2001-05-25 2002-12-05 Nanyang Technological University, Centre For Signal Processing Drowning early warning system
CN111191486A (en) * 2018-11-14 2020-05-22 杭州海康威视数字技术股份有限公司 Drowning behavior recognition method, monitoring camera and monitoring system
CN110309706A (en) * 2019-05-06 2019-10-08 深圳市华付信息技术有限公司 Face critical point detection method, apparatus, computer equipment and storage medium
CN110569772A (en) * 2019-08-30 2019-12-13 北京科技大学 Method for detecting state of personnel in swimming pool
CN110781836A (en) * 2019-10-28 2020-02-11 深圳市赛为智能股份有限公司 Human body recognition method and device, computer equipment and storage medium
CN110909693A (en) * 2019-11-27 2020-03-24 深圳市华付信息技术有限公司 3D face living body detection method and device, computer equipment and storage medium
CN113158962A (en) * 2021-05-06 2021-07-23 北京工业大学 Swimming pool drowning detection method based on YOLOv4
CN113688724A (en) * 2021-08-24 2021-11-23 桂林电子科技大学 Swimming pool drowning monitoring method based on binocular vision
CN113743385A (en) * 2021-11-05 2021-12-03 陕西欧卡电子智能科技有限公司 Unmanned ship water surface target detection method and device and unmanned ship
CN113822259A (en) * 2021-11-24 2021-12-21 深圳市万物云科技有限公司 Off-duty detection method and device, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
乔羽: "基于Mask R-CNN泳池中溺水行为检测系统的设计与实现", 《中国优秀博硕士学位论文全文数据库(硕士)》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115376210A (en) * 2022-10-24 2022-11-22 杭州巨岩欣成科技有限公司 Drowning behavior identification method, device, equipment and medium for preventing drowning in swimming pool
CN115376210B (en) * 2022-10-24 2023-03-21 杭州巨岩欣成科技有限公司 Drowning behavior identification method, device, equipment and medium for preventing drowning in swimming pool

Also Published As

Publication number Publication date
CN114359967B (en) 2022-08-09

Similar Documents

Publication Publication Date Title
US11657269B2 (en) Systems and methods for verification of discriminative models
Chen et al. A deep neural network based on an attention mechanism for SAR ship detection in multiscale and complex scenarios
US9652694B2 (en) Object detection method, object detection device, and image pickup device
CN108921877B (en) Long-term target tracking method based on width learning
CN111079739B (en) Multi-scale attention feature detection method
CN110781836A (en) Human body recognition method and device, computer equipment and storage medium
CN107563299B (en) Pedestrian detection method using RecNN to fuse context information
KR102320985B1 (en) Learning method and learning device for improving segmentation performance to be used for detecting road user events using double embedding configuration in multi-camera system and testing method and testing device using the same
CN112417955B (en) Method and device for processing tour inspection video stream
CN113989662A (en) Remote sensing image fine-grained target identification method based on self-supervision mechanism
CN111967464B (en) Weak supervision target positioning method based on deep learning
CN110580466A (en) infant quilt kicking behavior recognition method and device, computer equipment and storage medium
CN112001403A (en) Image contour detection method and system
CN109871792B (en) Pedestrian detection method and device
CN114359967B (en) Method and device for detecting drowning-preventing human body target in swimming pool, computer equipment and storage medium
Guo et al. D3-Net: Integrated multi-task convolutional neural network for water surface deblurring, dehazing and object detection
CN112651417B (en) License plate recognition method, device, equipment and storage medium
CN113393385A (en) Unsupervised rain removal method, system, device and medium based on multi-scale fusion
CN115376210B (en) Drowning behavior identification method, device, equipment and medium for preventing drowning in swimming pool
CN112001453A (en) Method and device for calculating accuracy of video event detection algorithm
Grcić et al. Dense out-of-distribution detection by robust learning on synthetic negative data
CN116343159A (en) Unstructured scene passable region detection method, device and storage medium
CN115937991A (en) Human body tumbling identification method and device, computer equipment and storage medium
CN116402847A (en) Swimming pool drowning prevention water surface head tracking method and device, computer equipment and storage medium
CN115546668A (en) Marine organism detection method and device and unmanned aerial vehicle

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant