Dangerous area personnel climbing behavior identification method, storage medium and terminal
By constructing and training algorithms for human object detection and personnel climbing behavior classification data sets, the problem of difficulty in time discovering people climbing behavior in dangerous areas is solved, real-time identification of climbing behavior and reducing safety risks is achieved.
Patent Information
- Application Number
- CN202411314322.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2025-02-07
AI Technical Summary
Traditional manual inspections are difficult to detect people climbing up in a timely manner in dangerous areas, resulting in safety accidents.
By collecting image data, a human object detection data set and a human climbing behavior classification data set are constructed, a human target detection algorithm and a human climbing behavior classification algorithm are trained, and a human climbing behavior classification algorithm are identified and judged whether a human climbing behavior exists.
Real-time identification of people climbing up the person in dangerous areas has been achieved, safety risks have been reduced, and safety accidents caused by climbing up the person.
Smart Images

Figure CN119399830A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of pattern recognition and artificial intelligence application technology, and specifically relates to a method for identifying climbing behavior of people in dangerous areas, a storage medium and a terminal. Background Art
[0002] There are often some dangerous areas where people are prohibited from climbing in power plants, substations or construction sites. Climbing the fences in dangerous areas or the facilities and equipment at the site often brings huge safety hazards. That is, climbing fences or dangerous facilities and equipment can not only easily cause personal injuries, but also cause safety accidents such as equipment damage.
[0003] In order to avoid safety accidents caused by climbing in dangerous areas, it is of great significance to identify whether climbing behavior occurs in dangerous areas in real time.
[0004] In recent years, computer vision technology has developed rapidly and has been widely used in many fields such as personnel safety management and inspection. The recognition of human behavior is also a research hotspot in the field of computer vision.
[0005] Based on the above problems, the present invention provides a method, storage medium and terminal for identifying climbing behavior of people in dangerous areas. Summary of the invention
[0006] Purpose of the invention: The purpose of the present invention is to provide a method, storage medium and terminal for identifying climbing behavior of people in dangerous areas, so as to solve the problem that traditional manual inspection methods are difficult to detect climbing behavior of people in dangerous areas in a timely manner.
[0007] Technical solution: The first aspect of the present invention provides a method for identifying climbing behavior of people in dangerous areas, including the following steps: S1, collecting and annotating image data to construct a human target detection data set; S2, using the constructed human target detection data set to train a human target detection algorithm; S3, collecting and annotating image data to construct a personnel climbing behavior classification data set; S4, using the constructed personnel climbing behavior classification data set to train a personnel climbing behavior classification algorithm; S5, configuring a personnel climbing behavior recognition area; S6, processing image data through the trained human target detection algorithm to obtain the position information of the person and the image blocks of the person's body area; S7, comparing the person's position information to determine whether the person appears in the personnel climbing behavior recognition area; S8, classifying the image blocks of the person's body area that appear in the personnel climbing behavior recognition area through the trained personnel climbing behavior classification algorithm to determine whether there is personnel climbing behavior.
[0008] In the technical solution, S1 includes collecting corresponding image data and manually marking the human body detection frame labels of the people in the image; randomly dividing the labeled data set into a training set and a test set in a certain proportion according to specific needs to construct a human body detection data set; wherein the detection frame annotation position of the manually labeled human target detection data set is the whole body of the person.
[0009] In the present technical solution, the S2 uses the constructed human detection data set to train the human target detection algorithm; during training, the model parameters are first initialized, the data is divided into small batches, and then forward propagation is performed, the small batch data is input into the model to calculate the result, and the loss value is calculated according to the selected loss function, and then the gradient of the model parameters is calculated according to the loss value through the back propagation algorithm, and the model parameters are updated according to the calculated gradient using the selected appropriate optimizer, and multiple training cycles are repeated to observe the changes in loss value and model performance, to determine whether the model converges or reaches the set number of training cycles, and finally complete the algorithm training.
[0010] In the present technical solution, the S3 includes collecting corresponding image data and manually marking the climbing behavior and normal behavior of people; the marked data needs to be further processed, and the image is divided into two different image blocks according to the marked climbing behavior detection frame and the normal behavior detection frame; the marked data set is randomly divided into a training set and a test set in a certain proportion according to specific needs, and a people climbing behavior classification data set is constructed; wherein, the manually marked people climbing behavior classification data set divides the data set images into two categories: people climbing behavior and normal behavior.
[0011] In the technical solution, S4 is to use the constructed personnel climbing behavior classification data set to train the personnel climbing behavior classification algorithm; during training, first initialize the model parameters, and the model parameters include the weights and biases of each layer; then, input the samples in the data set into the model in batches, and in the forward propagation process, the data is input into the model to obtain the predicted output, and then the loss function is used to calculate the loss value according to the predicted output and the true label, and based on the calculated loss value, the gradient of the parameters of each layer with respect to the loss is calculated through the back propagation algorithm, and the optimizer is used to update the parameters of the model according to the calculated gradient, and the weights and biases are adjusted so that the loss of the model on the training data set is gradually reduced. In multiple rounds of training cycles, the model continuously learns the features and patterns in the data, and its ability to fit the data is gradually enhanced until the model converges or reaches the predetermined training round; finally, the algorithm training is completed.
[0012] In the technical solution, S5 is to configure the area in the image where the climbing behavior needs to be identified.
[0013] In the present technical solution, S6 is to input the image into a trained human target detection algorithm, detect the person in the image, obtain the person's position information and crop the image block of the person's body area according to the position information.
[0014] In the technical solution, S7 is to compare the obtained personnel location information with the configured personnel climbing behavior identification area to determine whether the person appears in the personnel climbing behavior identification area.
[0015] In the technical solution, the S8 is to input the image block of the human body area appearing in the human climbing behavior identification area into the trained human climbing behavior classification algorithm to determine whether there is human climbing behavior.
[0016] The second aspect of the present invention provides a computer-readable storage medium and a terminal, wherein the computer-readable storage medium stores a program for a method for identifying climbing behaviors of people in dangerous areas, and when the method for identifying climbing behaviors of people in dangerous areas is executed by a processor, the steps of the method for identifying climbing behaviors of people in dangerous areas are implemented; the terminal includes a memory, a processor, and a program for identifying climbing behaviors of people in dangerous areas stored in the memory and executable on the processor, and when the processor executes the program for identifying climbing behaviors of people in dangerous areas, the steps of the method for identifying climbing behaviors of people in dangerous areas are implemented.
[0017] Compared with the prior art, the beneficial effects of the method, storage medium and terminal for identifying climbing behavior of people in dangerous areas of the present invention are: image recognition technology can be used to process and analyze image data to obtain personnel behavior information therein, making it possible to realize the identification of personnel climbing behavior and reducing the safety risks brought by the climbing behavior of people in dangerous areas. 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 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 flow chart of the present invention. DETAILED DESCRIPTION
[0020] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0021] In the description of the present invention, it should be noted that the orientations or positional relationships indicated by the terms "top", "bottom", "one side", "the other side", "front", "back", "middle part", "inside", "top end", "bottom end", etc. are based on the orientations or positional relationships shown in the 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 cannot be understood as limiting the present invention; the terms "first", "second", and "third" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance; in addition, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be a connection between the two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0022] Example
[0023] like Figure 1 A method for identifying climbing behavior of people in dangerous areas is shown, and the method specifically includes the following steps:
[0024] S1. Collect and annotate image data to build a human target detection dataset, including:
[0025] Collect the corresponding image data and manually mark the human body detection frame labels of the people in the image;
[0026] The labeled data set is randomly divided into training set and test set in a certain proportion according to specific needs to construct a human target detection data set.
[0027] Preferably, the data sources of the constructed human target detection dataset include but are not limited to on-site shooting, open source datasets, and Internet crawling;
[0028] Preferably, the human body of the person is annotated using an open source annotation tool;
[0029] Preferably, the manually marked part is the entire human body of the person, and the entire human body visible in the image is marked with a detection frame to distinguish different persons;
[0030] Preferably, the labeled data set is randomly divided into a training set and a test set in a certain ratio according to the specific needs of actual training, such as 8:2.
[0031] S2. Use the constructed human detection dataset to train the human target detection algorithm. During training, first initialize the model parameters, divide the data into small batches, and then perform forward propagation. Input the small batch data into the model to calculate the results, and calculate the loss value according to the selected loss function. Then use the backpropagation algorithm to calculate the gradient of the model parameters according to the loss value, and use the selected appropriate optimizer to update the model parameters according to the calculated gradient. Repeat this for multiple training cycles, observe the loss value and model performance changes, and determine whether the model converges or reaches the set number of training cycles, and finally complete the algorithm training.
[0032] Preferably, the target detection algorithm includes but is not limited to RCNN, RetinaNet, EfficientDet, YOLO series, etc.;
[0033] Preferably, the optimizer used during network back propagation includes but is not limited to SGD, ASGD, Adagrad, Adam, etc.
[0034] S3. Collect and annotate image data to build a classification dataset of human climbing behavior, including:
[0035] Collect relevant image data and manually mark the climbing behavior and normal behavior of personnel;
[0036] The labeled data set is randomly divided into training set and test set in a certain proportion according to specific needs to construct a classification data set of people's climbing behavior.
[0037] Preferably, the data sources of the constructed personnel climbing behavior classification dataset include but are not limited to on-site shooting, open source datasets and Internet crawling;
[0038] Preferably, the person climbing behavior detection frame and the normal behavior detection frame are annotated using an open source annotation tool;
[0039] Preferably, the annotated data needs to be further processed, and the image is divided into two different types of image blocks according to the annotated human climbing behavior detection frame and normal behavior detection frame;
[0040] Preferably, the labeled data set is randomly divided into a training set and a test set in a certain ratio according to the specific needs of actual training, such as 8:2.
[0041] S4. Use the constructed personnel climbing behavior classification dataset to train the personnel climbing behavior classification algorithm. During training, initialize the model parameters, which include the weights and biases of each layer; then, input the samples in the dataset into the model in batches. During the forward propagation process, the data is input into the model to obtain the predicted output. Next, use the loss function to calculate the loss value based on the predicted output and the true label. Based on the calculated loss value, the gradient of the parameters of each layer with respect to the loss is calculated through the back propagation algorithm. Use the optimizer to update the parameters of the model according to the calculated gradient, adjust the weights and biases, so that the loss of the model on the training dataset gradually decreases; finally, in multiple rounds of training cycles, the model continuously learns the features and patterns in the data, and its ability to fit the data gradually increases until the model converges or reaches the predetermined training rounds, and the algorithm training is completed.
[0042] Preferably, the image classification algorithm includes but is not limited to AlexNet, VGG, GoogLeNet, ResNet, DenseNet, etc.;
[0043] Preferably, the loss function used to calculate the loss value when training the algorithm includes but is not limited to CrossEntropy Loss, Hinge Loss, etc.;
[0044] Preferably, the optimizer used in network back propagation includes but is not limited to SGD, RMSProp, Adagrad, Adam, etc.
[0045] S5. Configuring a region for identifying a person's climbing behavior, that is, configuring a region in the image where the climbing behavior needs to be identified.
[0046] S6. Process the image data using the trained human target detection algorithm to obtain the person's location information and the person's body area image blocks, including:
[0047] The image is input into the trained human target detection algorithm, the person in the image is detected, the person's position information is obtained, and the image block of the person's body area is cropped according to the position information.
[0048] Among them, the human detection frame is obtained through the human target detection algorithm, and the position information of the person in the image can be obtained. The position information of the person will be used to compare with the configured area where the climbing behavior of the person needs to be identified. At the same time, the obtained human detection frame can be used to cut out the human image block of the person in the image, and then used to classify the person's behavior and determine whether the person's behavior is normal behavior or climbing behavior.
[0049] S7. Compare the personnel location information to determine whether the personnel appears in the personnel climbing behavior identification area, including: compare the obtained personnel location information with the configured personnel climbing behavior identification area to determine whether the personnel appears in the personnel climbing behavior identification area.
[0050] Among them, by comparing the personnel location information with the personnel climbing behavior identification area, it is determined whether the person appears in the personnel climbing behavior identification area, and the image block of the person appearing in the personnel climbing behavior identification area will enter the next step of processing, while the person who does not appear in the personnel climbing behavior identification area will not be processed further.
[0051] S8. Classify the image blocks of the human body area that appear in the human climbing behavior identification area through the trained human climbing behavior classification algorithm to determine whether there is human climbing behavior, including:
[0052] The image blocks of the human body area appearing in the human climbing behavior identification area are input into the trained human climbing behavior classification algorithm to determine whether there is human climbing behavior.
[0053] Among them, if the result obtained by the human climbing behavior classification algorithm is human climbing behavior, it means that the person in the image has human climbing behavior. If the result obtained by the human climbing behavior classification algorithm is normal behavior, it means that the person in the image does not have human climbing behavior.
[0054] It should be noted that, in this article, terms such as "comprises", "includes" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of more restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0055] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
Claims
1. A method for identifying climbing behavior of people in dangerous areas, characterized by: The following steps are included: S1, collect and annotate image data to build a human target detection dataset; S2. Use the constructed human target detection dataset to train the human target detection algorithm; S3, collect and annotate image data to build a classification dataset of people's climbing behavior; S4. Use the constructed personnel climbing behavior classification dataset to train the personnel climbing behavior classification algorithm; S5. Configure a personnel climbing behavior identification area; S6. Process the image data using a trained human target detection algorithm to obtain the location information of the person and the image block of the person's body area; S7. Compare the location information of the person to determine whether the person is in the person climbing behavior identification area; S8. Classify the image blocks of the human body area appearing in the human climbing behavior identification area through the trained human climbing behavior classification algorithm to determine whether there is human climbing behavior.
2. A method for identifying climbing behavior of people in dangerous areas according to claim 1, characterized in that: S1 includes collecting corresponding image data and manually marking human body detection frame labels of people in the image; randomly dividing the marked data set into a training set and a test set in a certain proportion according to specific needs to construct a human body detection data set; Among them, the manually annotated human target detection data set detection frame annotated position is the whole body of the person.
3. The method for identifying climbing behavior of people in dangerous areas according to claim 1, characterized in that: The S2 uses the constructed human detection data set to train a human target detection algorithm; During training, first initialize the model parameters and divide the data into small batches. Then perform forward propagation, input small batches of data into the model to calculate the results, and calculate the loss value according to the selected loss function. Then use the backpropagation algorithm to calculate the gradient of the model parameters according to the loss value, and use the selected appropriate optimizer to update the model parameters according to the calculated gradient. Repeat this for multiple training cycles, observe the changes in loss value and model performance, and determine whether the model converges or reaches the set number of training cycles, and finally complete the algorithm training.
4. The method for identifying climbing behavior of people in dangerous areas according to claim 1, characterized in that: The S3 includes collecting corresponding image data and manually marking the climbing behavior and normal behavior of personnel; the marked data needs to be further processed, and the image is divided into two different types of image blocks according to the marked personnel climbing behavior detection frame and the normal behavior detection frame; the marked data set is randomly divided into a training set and a test set according to a certain ratio according to specific needs, and a personnel climbing behavior classification data set is constructed; Among them, the manually annotated human climbing behavior classification data set divides the data set images into two categories: human climbing behavior and normal behavior.
5. The method for identifying climbing behavior of people in dangerous areas according to claim 1, characterized in that: S4 is to use the constructed personnel climbing behavior classification data set to train the personnel climbing behavior classification algorithm; During training, the model parameters are first initialized, including the weights and biases of each layer; Then, the samples in the data set are input into the model in batches. In the forward propagation process, the data is input into the model to obtain the predicted output. Then, the loss function is used to calculate the loss value according to the predicted output and the true label. Based on the calculated loss value, the gradient of the parameters of each layer with respect to the loss is calculated through the back propagation algorithm. The optimizer is used to update the parameters of the model according to the calculated gradient, and the weights and biases are adjusted so that the loss of the model on the training data set is gradually reduced. In multiple rounds of training cycles, the model continuously learns the features and patterns in the data, and its ability to fit the data is gradually enhanced until the model converges or reaches the predetermined training round. Finally, the algorithm training is completed.
6. The method for identifying climbing behavior of people in dangerous areas according to claim 1, characterized in that: The step S5 is to configure the area in the image where the climbing behavior needs to be identified.
7. The method for identifying climbing behavior of people in dangerous areas according to claim 1, characterized in that: The step S6 is to input the image into a trained human target detection algorithm, detect the person in the image, obtain the person's position information, and crop the image block of the person's body area according to the position information.
8. The method for identifying climbing behavior of people in dangerous areas according to claim 1, characterized in that: The step S7 is to compare the obtained personnel location information with the configured personnel climbing behavior identification area to determine whether the personnel appears in the personnel climbing behavior identification area.
9. The method for identifying climbing behavior of people in dangerous areas according to claim 1, characterized in that: The step S8 is to input the image blocks of the human body area appearing in the human climbing behavior identification area into the trained human climbing behavior classification algorithm to determine whether there is human climbing behavior.
10. A computer-readable storage medium and a terminal, characterized in that: The computer-readable storage medium stores a method program for identifying climbing behaviors of people in dangerous areas. When the method for identifying climbing behaviors of people in dangerous areas is executed by a processor, the steps of the method for identifying climbing behaviors of people in dangerous areas according to any one of claims 1 to 9 are implemented; The terminal includes a memory, a processor, and a program for identifying climbing behavior of people in dangerous areas that is stored in the memory and can be run on the processor. When the processor executes the program for identifying climbing behavior of people in dangerous areas, the steps of the method for identifying climbing behavior of people in dangerous areas as described in any one of claims 1 to 9 are implemented.