CN117854152A - Climbing behavior identification method, device, equipment and storage medium - Google Patents

Climbing behavior identification method, device, equipment and storage medium Download PDF

Info

Publication number
CN117854152A
CN117854152A CN202410044458.0A CN202410044458A CN117854152A CN 117854152 A CN117854152 A CN 117854152A CN 202410044458 A CN202410044458 A CN 202410044458A CN 117854152 A CN117854152 A CN 117854152A
Authority
CN
China
Prior art keywords
model
target
climbing
human body
acquiring
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.)
Pending
Application number
CN202410044458.0A
Other languages
Chinese (zh)
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.)
Beijing Shengzhe Science & Technology Co ltd
Original Assignee
Beijing Shengzhe Science & 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 Beijing Shengzhe Science & Technology Co ltd filed Critical Beijing Shengzhe Science & Technology Co ltd
Priority to CN202410044458.0A priority Critical patent/CN117854152A/en
Publication of CN117854152A publication Critical patent/CN117854152A/en
Pending legal-status Critical Current

Links

Landscapes

  • Alarm Systems (AREA)

Abstract

The invention discloses a climbing behavior identification method, a climbing behavior identification device, climbing behavior identification equipment and a storage medium. Comprising the following steps: constructing a target detection model, acquiring a monitoring image of a monitoring area, and determining a detected human body target according to the monitoring image and the target detection model; tracking and calculating the detected human body target by adopting a preset target tracking algorithm to generate a tracked human body target; and obtaining a climbing action recognition model, and carrying out climbing action warning based on the tracking human body target and the climbing action recognition model. By using a mode of cascading a plurality of models, whether people climb or not is judged, and the stability and the accuracy of the detected human body are ensured by adding the human body tracking. Finally, whether the target personnel have climbing behaviors or not is finally judged by using a logic judgment mode, and then alarm processing is carried out according to the final result of logic judgment. The environment interference is avoided, the accuracy and the efficiency of climbing behavior recognition are improved, climbing personnel can be accurately detected without manual patrol, and manpower is liberated.

Description

Climbing behavior identification method, device, equipment and storage medium
Technical Field
The present invention relates to the field of machine vision technologies, and in particular, to a climbing behavior recognition method, apparatus, device, and storage medium.
Background
In the actual life, certain abnormal behaviors of the supervisory personnel are required, such as scenic spots, port wharfs, prisons, stations, invasion of banking personnel and personnel climbing precaution early warning.
The prior art uses an isolation net or a manual patrol method to detect climbing behaviors, for example, the isolation net is installed in a prison enclosing wall to detect, and when personnel climb, damage, surrounding large-scale mechanical construction or weather-proof environment acts, the isolation net can vibrate. However, vibration occurs due to various reasons, including wind, rain, hail, construction, large equipment, vehicles, blasting, etc., and vibration caused by a surreptitious person crossing and breaking the isolation net, and false alarm may be caused if the vibration is caused by weather or noise factors.
And by means of monitoring or patrol and the like, labor is consumed, the climbing behavior recognition accuracy is reduced, and the recognition efficiency is also reduced.
Disclosure of Invention
The invention provides a climbing behavior recognition method, a climbing behavior recognition device, climbing behavior recognition equipment and a climbing behavior recognition storage medium, which are used for recognizing climbing behaviors through machine vision by releasing manpower.
According to an aspect of the present invention, there is provided a climbing behavior recognition method, the method comprising:
constructing a target detection model, acquiring a monitoring image of a monitoring area, and determining a detected human body target according to the monitoring image and the target detection model;
tracking and calculating the detected human body target by adopting a preset target tracking algorithm to generate a tracked human body target;
and obtaining a climbing action recognition model, and carrying out climbing action warning based on the tracking human body target and the climbing action recognition model.
Optionally, constructing the target detection model includes: acquiring sample monitoring data, wherein the sample monitoring data comprises a training set, a testing set and a verification set; constructing an initial network structure of a detection model, and acquiring target iteration times input by a user; performing iterative training on the initial network structure according to the training set, the verification set and the target iteration times to generate an optimal iterative model; inputting the test set into an optimal iteration model to obtain a test result output by the optimal iteration model, determining an actual labeling result corresponding to the test set, and determining the model accuracy according to the actual labeling result and the test result; and obtaining adjustment parameters based on the model accuracy, and performing structural optimization on the optimal iterative model according to the adjustment parameters to generate an optimal iterative model. And generating a target detection model according to the optimal iteration model and the test set.
Optionally, acquiring sample monitoring data includes: acquiring a historical monitoring video based on a designated place, and performing frame extraction processing on the historical monitoring video to generate each historical monitoring image; acquiring user marks based on each historical monitoring image to generate each marked historical monitoring image, wherein the user marks are human body boundary boxes; and acquiring a historical data set, dividing the historical data set and each marked historical monitoring image into a training set, a testing set and a verification set according to a specified proportion, and taking the training set, the testing set and the verification set as sample monitoring data.
Optionally, performing iterative training on the initial network structure according to the training set, the verification set and the target iteration number to generate an optimal iterative model, including: determining the current iteration times, and determining current model evaluation indexes corresponding to the current iteration times according to the verification set; acquiring a history storage model, and determining a history model evaluation index corresponding to the history storage model; updating the historical storage model based on the current iteration model when the current model iteration index is better than the historical model evaluation index; and when the current iteration times are consistent with the target iteration times, taking the final storage model as an optimal iteration model.
Optionally, acquiring a monitoring image of the monitoring area, and determining to detect the human body target according to the monitoring image and the target detection model includes: taking a designated area set by a user as a monitoring area, and shooting a monitoring image of the monitoring area through an image shooting device; and inputting the monitoring image into a target detection model to obtain a detected human body target output by the target detection model.
Optionally, the climbing behavior alarm is performed based on the tracking human body target and the climbing action recognition model, including: inputting the tracked human body target into a climbing action recognition model to obtain an action recognition result output by the climbing action recognition model, wherein the action recognition result comprises sitting, standing and climbing; when the action recognition result is climbing, a user setting area is obtained, and climbing behavior warning is carried out according to the user setting area and the tracking human body target.
Optionally, the step of performing climbing behavior warning according to the user setting area and tracking the human body target includes: determining a target position of a tracked human body target according to preset conditions; when the target position is overlapped with the user setting area, a climbing alarm prompt is generated; and carrying out climbing behavior alarming in a specified mode according to the climbing alarming prompt.
According to another aspect of the present invention, there is provided a climbing behavior recognition apparatus including:
the detection model construction and human body target determination module is used for constructing a target detection model, acquiring a monitoring image of a monitoring area and determining a human body target according to the monitoring image and the target detection model;
the human body target tracking generation module is used for tracking and calculating the detected human body target by adopting a preset target tracking algorithm so as to generate a human body target;
and the climbing behavior alarming module is used for acquiring the climbing action recognition model and alarming the climbing behavior based on the tracking human body target and the climbing action recognition model.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform a climbing behavior identification method according to any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement a climbing behavior recognition method according to any one of the embodiments of the present invention when executed.
According to the technical scheme, whether a person climbs is judged by using a mode of cascading a plurality of models, and the stability and the accuracy of the detected person are ensured by adding the person tracking. Finally, whether the target personnel have climbing behaviors or not is finally judged by using a logic judgment mode, and then alarm processing is carried out according to the final result of logic judgment. The environment interference is avoided, the accuracy and the efficiency of climbing behavior recognition are improved, climbing personnel can be accurately detected without manual patrol, and manpower is liberated.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a climbing behavior recognition method provided in accordance with a first embodiment of the present invention;
FIG. 2 is a flow chart of another climbing behavior identification method provided in accordance with a first embodiment of the present invention;
FIG. 3 is a flowchart of another climbing behavior recognition method provided in accordance with a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of a climbing behavior recognition device according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device implementing a climbing behavior recognition method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a climbing behavior recognition method according to an embodiment of the present invention, where the method may be applied to a case of monitoring a climbing behavior in a designated monitoring area, and the method may be performed by a climbing behavior recognition device, which may be implemented in the form of hardware and/or software, and the climbing behavior recognition device may be configured in a computer controller. As shown in fig. 1, the method includes:
s110, constructing a target detection model, acquiring a monitoring image of the monitoring area, and determining a detected human body target according to the monitoring image and the target detection model.
The object detection model is a computer vision technology, and is used for detecting and identifying an object in an image or video. In this embodiment, the object detection model may identify the detected human object in the monitoring image. The monitoring area refers to a designated area needing to be monitored by climbing, and can be a scenic spot, a port wharf, a prison, a station, a bank and the like, and the monitoring area can be adjusted according to the needs of users.
Fig. 2 is a flowchart of a climbing behavior recognition method according to an embodiment of the present invention, and step S110 mainly includes steps S111 to S117 as follows:
S111, acquiring sample monitoring data, wherein the sample monitoring data comprises a training set, a testing set and a verification set.
The sample monitoring data is the basis for constructing the target detection model. Sample monitoring data typically includes a training set, a test set, and a validation set. The training set is used for training the model, the testing set is used for evaluating the performance of the model, and the verification set is used for adjusting the super parameters of the model. When acquiring sample monitoring data, the quality and diversity of the data need to be ensured so as to improve the generalization capability of the model.
Optionally, acquiring sample monitoring data includes: acquiring a historical monitoring video based on a designated place, and performing frame extraction processing on the historical monitoring video to generate each historical monitoring image; acquiring user marks based on each historical monitoring image to generate each marked historical monitoring image, wherein the user marks are human body boundary boxes; and acquiring a historical data set, dividing the historical data set and each marked historical monitoring image into a training set, a testing set and a verification set according to a specified proportion, and taking the training set, the testing set and the verification set as sample monitoring data.
Specifically, the appointed place can be a place which is appointed by a user and is truly easy to generate climbing behaviors, and the historical monitoring video can be videos from different sources such as a monitoring camera, an unmanned aerial vehicle and a vehicle-mounted camera. And then frame extraction processing is required to be carried out on the historical monitoring video so as to generate each historical monitoring image. The frame extraction process is to extract the image of each frame from the video and store it as an independent image file. Next, user annotations need to be acquired based on each of the historical monitoring images to generate each annotated historical monitoring image. The user labeling refers to performing bounding box labeling on a human body target in the historical monitoring image so as to determine the position and the size of the human body target. The training sample of the detection model comprises a historical data set besides self-standard, and the data set can be an open source data set coco, mot20 and crowing human. And finally dividing the historical data set and each annotated historical monitoring image into a training set, a testing set and a verification set according to a specified proportion, and taking the training set, the testing set and the verification set as sample monitoring data.
S112, constructing an initial network structure of the detection model, and acquiring target iteration times input by a user.
Specifically, when the initial network structure is built, a proper network structure and super parameters are required to be selected according to the requirements of practical problems. In this embodiment, a yolov5s model is used, mosaic enhancement is started, left and right flipping of 0.5 probability is started, and the learning rate is set to 0.001. The target number of iterations is an important parameter for training the model. The target iteration number determines the training time and training effect of the model. When the target iteration times input by the user are acquired, the complexity of the model and the scale of the data need to be considered. In general, the larger the target iteration number is, the better the performance of the model is, but the training time is correspondingly increased. In this embodiment, the optimizer selects Adam, the number of model iterations is 300epochs, and the picture size is 640 x 640.
S113, performing iterative training on the initial network structure according to the training set, the verification set and the target iteration times to generate an optimal iterative model.
Specifically, iterative training refers to training an initial network structure for multiple times according to a training set to improve the performance of a model. In the iterative training process, the model needs to be optimized according to the loss function and the accuracy of the training set.
Optionally, performing iterative training on the initial network structure according to the training set, the verification set and the target iteration number to generate an optimal iterative model, including: determining the current iteration times, and determining current model evaluation indexes corresponding to the current iteration times according to the verification set; acquiring a history storage model, and determining a history model evaluation index corresponding to the history storage model; updating the historical storage model based on the current iteration model when the current model iteration index is better than the historical model evaluation index; and when the current iteration times are consistent with the target iteration times, taking the final storage model as an optimal iteration model.
Specifically, by setting training parameters (including the number of iterations, the manner and proportion of data enhancement, etc.) of the model before training, for example, the iteration round may be set to 300. Training is then started. And training on a training set, determining the current iteration times after each round of training, directly storing the iteration model as a historical model when the current iteration times are 1, and determining a current model evaluation index corresponding to the current iteration times through a verification set when the current iteration times are greater than 1, wherein the model evaluation index is an important parameter for evaluating the performance of the model. The model evaluation index generally comprises mAP_0.5, accuracy, recall, F1 value and the like, and if the current model iteration index is better than the historical model evaluation index, the current iteration model of the iteration is replaced and updated on the historical storage model. And (3) taking the finally stored model as an optimal iteration model, namely a model with optimal model evaluation indexes in the iteration process, until 300 rounds of training are completed.
S114, inputting the test set into the optimal iteration model to obtain a test result output by the optimal iteration model, determining an actual labeling result corresponding to the test set, and determining the model accuracy according to the actual labeling result and the test result.
Specifically, the accuracy of the optimal iterative model can be tested through the test set, the test set is input into the optimal iterative model, then the test result output by the optimal iterative model is obtained, the actual labeling result corresponding to the test set is determined, when the actual labeling result is consistent with the test result, the model output result is accurate, and when the actual labeling result is inconsistent with the test result, the model output result is inaccurate, and then the model accuracy is calculated.
S115, acquiring adjustment parameters based on the model accuracy, and performing structural optimization on the optimal iterative model according to the adjustment parameters to generate an optimal iterative model. And generating a target detection model according to the optimal iteration model and the test set.
Specifically, tuning parameters may be obtained based on some new experimental and model comparisons, e.g., selecting to replace the c3 building block in yolov5 backbone with c2 f. The target detection model is the final result of building the target detection model. When the target detection model is generated, the model needs to be comprehensively evaluated according to each iteration model, each model evaluation index, the test set and the verification set.
S116, taking a designated area set by a user as a monitoring area, and shooting a monitoring image of the monitoring area through an image shooting device.
Specifically, in performing target detection, a monitoring image of a monitoring area needs to be acquired. Specifically, a specified area set by the user may be used as the monitoring area, and a monitoring image of the monitoring area may be captured by the image capturing device.
S117, inputting the monitoring image into the target detection model to obtain a detected human body target output by the target detection model.
Specifically, the controller inputs the monitoring image into the target detection model to obtain the detected human body target output by the target detection model. The controller refers to a computer controller which performs climbing behavior recognition. The object detection model analyzes and processes the monitored image to determine whether a human object is present therein. If a human body target exists, the target detection model outputs the detected human body target in the monitoring image in a frame selection mode.
S120, tracking calculation is carried out on the detected human body target by adopting a preset target tracking algorithm so as to generate a tracked human body target.
Specifically, the method can track the detected human body target by using deepsort and output the track of the tracked human body target, namely the track of multiple targets. Tracking algorithms can be divided into two categories: a multi-target tracking algorithm with ReID and a non-ReID multi-target tracking algorithm. The non-ReID multi-target tracking algorithm, such as ByteTrack, does not need to perform feature calculation, and only uses bbox obtained by target detection to perform target tracking. Although ByteTrack optimizes the secondary matching logic of a low frame, the problem of id replacement caused by shielding in the tracking process is effectively optimized. Although the method of performing the IOU only by bbox is very fast, the ID Switch (change in ID of the tracking target) is still very large. In practical application, it can be found that the object id is easy to switch frequently due to different angles of view and inconsistent object moving speeds in various complex scenes. Therefore, the deepsort tracker with ReID is used in this embodiment. The overall flow of the deepsort tracking algorithm is that Kalman filtering predicts the track of each target in the current frame, then uses Hungary algorithm to match the predicted track with the target frame in the current frame (cascade matching and IOU matching), and finally carries out Kalman filtering to update the new track. The cascade matching mainly uses a feature extraction model (ReID) and a motion model (Markov distance) to calculate similarity, obtain a cost matrix, and match according to the cost matrix. The deepsort considers the matching of coordinates and features, and the deepsort tracker after feature matching ensures that the human body tracking has good effect. The human body feature extraction model used in the embodiment is a small model of a clipping plate, consumes little memory and processing time in practical application, and achieves the balance of speed and precision.
S130, a climbing action recognition model is obtained, and climbing action warning is carried out based on the tracking human body target and the climbing action recognition model.
Specifically, in order to make the climbing behavior recognition system more accurate, the embodiment adds a climbing action recognition model on the basis of detection and tracking, and further filters whether the target personnel have climbing behaviors. The system uses three classification models. The resnet18 is used as a base network of models, and the model categories are sitting (including squat), standing (including walking and running), and climbing. The training set is obtained by collecting an open source data set and a self-sampling self-standard data set together as a model. The dataset of the classification model is a human body small figure (rectangular box of human body boundary, not containing background). The model training steps are as follows: training parameter design: design data enhancement parameters: the color and the color are randomly enhanced; model training parameters: the optimizer selects Adam, the iteration number of the model is 200epochs, and the picture size is 256 x 192; and (3) model structural design: the backup selects resnet18 and the loss function selects bceloss. Model training and storage: and in the training process, the optimal model is stored according to the accuracy of the model on the verification data set. And finally, taking the optimal model as a climbing action recognition model, judging whether a person climbs by using a mode of cascading a plurality of models, and ensuring the stability and the accuracy of the detected person by adding the human body tracking. Finally, whether the target personnel have climbing behaviors or not is finally judged by using a logic judgment mode, and then alarm processing is carried out according to the final result of logic judgment.
According to the technical scheme, whether a person climbs is judged by using a mode of cascading a plurality of models, and the stability and the accuracy of the detected person are ensured by adding the person tracking. Finally, whether the target personnel have climbing behaviors or not is finally judged by using a logic judgment mode, and then alarm processing is carried out according to the final result of logic judgment. The environment interference is avoided, the accuracy and the efficiency of climbing behavior recognition are improved, climbing personnel can be accurately detected without manual patrol, and manpower is liberated.
Example two
Fig. 3 is a flowchart of a climbing behavior recognition method according to a second embodiment of the present invention, where a specific process of obtaining a climbing behavior recognition model and performing a climbing behavior alarm based on a tracking human body target and the climbing behavior recognition model is added on the basis of the first embodiment. The specific contents of steps S210 to S220 are substantially the same as steps S110 to S120 in the first embodiment, and thus, a detailed description is omitted in this embodiment. As shown in fig. 3, the method includes:
s210, constructing a target detection model, acquiring a monitoring image of the monitoring area, and determining a detected human body target according to the monitoring image and the target detection model.
Optionally, constructing the target detection model includes: acquiring sample monitoring data, wherein the sample monitoring data comprises a training set, a testing set and a verification set; constructing an initial network structure of a detection model, and acquiring target iteration times input by a user; performing iterative training on the initial network structure according to the training set, the verification set and the target iteration times to generate an optimal iterative model; inputting the test set into an optimal iteration model to obtain a test result output by the optimal iteration model, determining an actual labeling result corresponding to the test set, and determining the model accuracy according to the actual labeling result and the test result; and obtaining adjustment parameters based on the model accuracy, and performing structural optimization on the optimal iterative model according to the adjustment parameters to generate an optimal iterative model. And generating a target detection model according to the optimal iteration model and the test set.
Optionally, acquiring sample monitoring data includes: acquiring a historical monitoring video based on a designated place, and performing frame extraction processing on the historical monitoring video to generate each historical monitoring image; acquiring user marks based on each historical monitoring image to generate each marked historical monitoring image, wherein the user marks are human body boundary boxes; and acquiring a historical data set, dividing the historical data set and each marked historical monitoring image into a training set, a testing set and a verification set according to a specified proportion, and taking the training set, the testing set and the verification set as sample monitoring data.
Optionally, performing iterative training on the initial network structure according to the training set, the verification set and the target iteration number to generate an optimal iterative model, including: determining the current iteration times, and determining current model evaluation indexes corresponding to the current iteration times according to the verification set; acquiring a history storage model, and determining a history model evaluation index corresponding to the history storage model; updating the historical storage model based on the current iteration model when the current model iteration index is better than the historical model evaluation index; and when the current iteration times are consistent with the target iteration times, taking the final storage model as an optimal iteration model.
Optionally, acquiring a monitoring image of the monitoring area, and determining to detect the human body target according to the monitoring image and the target detection model includes: taking a designated area set by a user as a monitoring area, and shooting a monitoring image of the monitoring area through an image shooting device; and inputting the monitoring image into a target detection model to obtain a detected human body target output by the target detection model.
S220, tracking calculation is carried out on the detected human body target by adopting a preset target tracking algorithm so as to generate a tracked human body target.
S230, obtaining a climbing action recognition model.
S240, inputting the tracked human body target into a climbing action recognition model to obtain an action recognition result output by the climbing action recognition model, wherein the action recognition result comprises sitting, standing and climbing.
Specifically, the tracked human body target can be input into the climbing action recognition model to obtain the action recognition result output by the climbing action recognition model. In this process, the climbing action recognition model analyzes and processes the tracked human target to determine if it is performing a climbing action.
S250, when the action recognition result is climbing, acquiring a user setting area, and alarming climbing actions according to the user setting area and the tracking human body target.
Specifically, if the result of the action recognition output by the climbing action recognition model is climbing, a user setting area needs to be further acquired, and climbing action warning is performed according to the user setting area and the tracking human body target. In this process, the positional relationship between the user setting area and the tracked human target may be determined using an image processing technique and a computer vision algorithm, and whether or not climbing behavior exists may be determined according to the positional relationship.
Optionally, the step of performing climbing behavior warning according to the user setting area and tracking the human body target includes: determining a target position of a tracked human body target according to preset conditions; when the target position is overlapped with the user setting area, a climbing alarm prompt is generated; and carrying out climbing behavior alarming in a specified mode according to the climbing alarming prompt.
Specifically, a target position for tracking a human target may be determined according to a preset condition, and the target position may be, for example, a foot of a person to be detected, that is, a center point of a bottom of a detection frame, and then, when the target position and a user setting area overlap, a climbing alarm prompt is generated. After the climbing alarm prompt is generated, climbing behavior alarm is carried out in a specified mode according to the climbing alarm prompt. The climbing behavior can be found and processed in time by giving an alarm in various modes such as sound, images and characters. In addition, during practical application, a user can adjust alarm conditions according to scenes and demands, for example, x times of personnel intrusion occur in a certain time, and y times of climbing actions occur, namely the current personnel are alarmed.
According to the technical scheme, whether a person climbs is judged by using a mode of cascading a plurality of models, and the stability and the accuracy of the detected person are ensured by adding the person tracking. Finally, whether the target personnel have climbing behaviors or not is finally judged by using a logic judgment mode, and then alarm processing is carried out according to the final result of logic judgment. The environment interference is avoided, the accuracy and the efficiency of climbing behavior recognition are improved, climbing personnel can be accurately detected without manual patrol, and manpower is liberated.
Example III
Fig. 4 is a schematic structural diagram of a climbing behavior recognition device according to a third embodiment of the present invention. As shown in fig. 4, the apparatus includes: the detection model construction and human body target determination module 310 is configured to construct a target detection model, acquire a monitoring image of the monitoring area, and determine a human body target to be detected according to the monitoring image and the target detection model;
the tracked human body target generating module 320 is configured to perform tracking calculation on the detected human body target by using a preset target tracking algorithm to generate a tracked human body target;
the climbing behavior alarm module 330 is configured to obtain a climbing behavior recognition model, and perform climbing behavior alarm based on tracking the human body target and the climbing behavior recognition model.
Optionally, the detection model construction and human body target determination module 310 specifically includes: a sample monitoring data acquisition unit for: acquiring sample monitoring data, wherein the sample monitoring data comprises a training set, a testing set and a verification set; an initial network structure building unit for: constructing an initial network structure of a detection model, and acquiring target iteration times input by a user; the optimal iteration model generation unit is used for: performing iterative training on the initial network structure according to the training set, the verification set and the target iteration times to generate an optimal iterative model; the model accuracy rate determining unit is used for: inputting the test set into an optimal iteration model to obtain a test result output by the optimal iteration model, determining an actual labeling result corresponding to the test set, and determining the model accuracy according to the actual labeling result and the test result; the target detection model generation unit is used for: and obtaining adjustment parameters based on the model accuracy, and performing structural optimization on the optimal iterative model according to the adjustment parameters to generate an optimal iterative model. And generating a target detection model according to the optimal iteration model and the test set.
Optionally, the sample monitoring data acquisition unit is specifically configured to: acquiring a historical monitoring video based on a designated place, and performing frame extraction processing on the historical monitoring video to generate each historical monitoring image; acquiring user marks based on each historical monitoring image to generate each marked historical monitoring image, wherein the user marks are human body boundary boxes; and acquiring a historical data set, dividing the historical data set and each marked historical monitoring image into a training set, a testing set and a verification set according to a specified proportion, and taking the training set, the testing set and the verification set as sample monitoring data.
Optionally, the optimal iterative model generating unit is specifically configured to: determining the current iteration times, and determining current model evaluation indexes corresponding to the current iteration times according to the verification set; acquiring a history storage model, and determining a history model evaluation index corresponding to the history storage model; updating the historical storage model based on the current iteration model when the current model iteration index is better than the historical model evaluation index; and when the current iteration times are consistent with the target iteration times, taking the final storage model as an optimal iteration model.
Optionally, the detection model construction and human target determination module 310 further includes: a detection human body target determining unit for: taking a designated area set by a user as a monitoring area, and shooting a monitoring image of the monitoring area through an image shooting device; and inputting the monitoring image into a target detection model to obtain a detected human body target output by the target detection model.
Optionally, the climbing behavior alarm module 330 specifically includes: an action recognition result generating unit configured to: inputting the tracked human body target into a climbing action recognition model to obtain an action recognition result output by the climbing action recognition model, wherein the action recognition result comprises sitting, standing and climbing; climbing behavior alarm unit for: when the action recognition result is climbing, a user setting area is obtained, and climbing behavior warning is carried out according to the user setting area and the tracking human body target.
Optionally, the climbing behavior alarm unit is specifically configured to: determining a target position of a tracked human body target according to preset conditions; when the target position is overlapped with the user setting area, a climbing alarm prompt is generated; and carrying out climbing behavior alarming in a specified mode according to the climbing alarming prompt.
According to the technical scheme, whether a person climbs is judged by using a mode of cascading a plurality of models, and the stability and the accuracy of the detected person are ensured by adding the person tracking. Finally, whether the target personnel have climbing behaviors or not is finally judged by using a logic judgment mode, and then alarm processing is carried out according to the final result of logic judgment. The environment interference is avoided, the accuracy and the efficiency of climbing behavior recognition are improved, climbing personnel can be accurately detected without manual patrol, and manpower is liberated.
The climbing behavior recognition device provided by the embodiment of the invention can execute the climbing behavior recognition method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 5 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a climbing behavior recognition method. Namely: constructing a target detection model, acquiring a monitoring image of a monitoring area, and determining a detected human body target according to the monitoring image and the target detection model; tracking and calculating the detected human body target by adopting a preset target tracking algorithm to generate a tracked human body target; and obtaining a climbing action recognition model, and carrying out climbing action warning based on the tracking human body target and the climbing action recognition model.
In some embodiments, a climbing behavior recognition method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of one climbing behavior identification method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform a climbing behavior identification method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A climbing behavior recognition method, comprising:
constructing a target detection model, acquiring a monitoring image of a monitoring area, and determining a detected human body target according to the monitoring image and the target detection model;
tracking and calculating the detected human body target by adopting a preset target tracking algorithm to generate a tracked human body target;
and obtaining a climbing action recognition model, and carrying out climbing action alarming based on the tracking human body target and the climbing action recognition model.
2. The method of claim 1, wherein the constructing the object detection model comprises:
acquiring sample monitoring data, wherein the sample monitoring data comprises a training set, a testing set and a verification set;
constructing an initial network structure of a detection model, and acquiring target iteration times input by a user;
performing iterative training on the initial network structure according to the training set, the verification set and the target iteration times to generate an optimal iterative model;
inputting the test set into the optimal iteration model to obtain a test result output by the optimal iteration model, determining an actual labeling result corresponding to the test set, and determining the model accuracy according to the actual labeling result and the test result;
And acquiring adjustment parameters based on the model accuracy, and performing structural optimization on the optimal iterative model according to the adjustment parameters to generate an optimal iterative model.
And generating a target detection model according to the optimal iteration model and the test set.
3. The method of claim 2, wherein the acquiring sample monitoring data comprises:
acquiring a historical monitoring video based on a designated place, and performing frame extraction processing on the historical monitoring video to generate each historical monitoring image;
acquiring user marks based on each historical monitoring image to generate each marked historical monitoring image, wherein the user marks are human body boundary boxes;
and acquiring a historical data set, dividing the historical data set and each marked historical monitoring image into a training set, a testing set and a verification set according to a specified proportion, and taking the training set, the testing set and the verification set as the sample monitoring data.
4. The method of claim 2, wherein iteratively training the initial network structure according to the training set, the validation set, and the target number of iterations to generate an optimal iteration model comprises:
Determining the current iteration times, and determining a current model evaluation index corresponding to the current iteration times according to the verification set;
acquiring a history storage model, and determining a history model evaluation index corresponding to the history storage model;
updating the historical storage model based on the current iteration model when the current model iteration index is better than the historical model evaluation index;
and when the current iteration times are consistent with the target iteration times, taking a final storage model as the optimal iteration model.
5. The method of claim 1, wherein the acquiring a monitoring image of a monitoring area, determining a detected human target based on the monitoring image and the target detection model, comprises:
taking a designated area set by a user as the monitoring area, and shooting a monitoring image of the monitoring area through an image shooting device;
and inputting the monitoring image into the target detection model to obtain a detected human body target output by the target detection model.
6. The method of claim 1, wherein the climbing behavior alert based on the tracked human target and the climbing action recognition model comprises:
Inputting the tracking human body target into the climbing action recognition model to obtain an action recognition result output by the climbing action recognition model, wherein the action recognition result comprises sitting, standing and climbing;
and when the action recognition result is climbing, acquiring a user setting area, and carrying out climbing action warning according to the user setting area and the tracking human body target.
7. The method of claim 6, wherein the climbing behavior alert based on the user-set area and the tracked human target comprises:
determining the target position of the tracked human body target according to preset conditions;
when the target position is overlapped with the user setting area, a climbing alarm prompt is generated;
and carrying out climbing behavior alarming in a specified mode according to the climbing alarming prompt.
8. A climbing behavior recognition device, comprising:
the detection model construction and human body target determination module is used for constructing a target detection model, acquiring a monitoring image of a monitoring area and determining a human body target according to the monitoring image and the target detection model;
the tracking human body target generation module is used for carrying out tracking calculation on the detected human body target by adopting a preset target tracking algorithm so as to generate a tracking human body target;
And the climbing behavior alarming module is used for acquiring a climbing behavior recognition model and alarming the climbing behavior based on the tracking human body target and the climbing behavior recognition model.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
10. A computer storage medium storing computer instructions for causing a processor to perform the method of any one of claims 1-7 when executed.
CN202410044458.0A 2024-01-11 2024-01-11 Climbing behavior identification method, device, equipment and storage medium Pending CN117854152A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410044458.0A CN117854152A (en) 2024-01-11 2024-01-11 Climbing behavior identification method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410044458.0A CN117854152A (en) 2024-01-11 2024-01-11 Climbing behavior identification method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117854152A true CN117854152A (en) 2024-04-09

Family

ID=90547338

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410044458.0A Pending CN117854152A (en) 2024-01-11 2024-01-11 Climbing behavior identification method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117854152A (en)

Similar Documents

Publication Publication Date Title
CN110321853B (en) Distributed cable external-damage-prevention system based on video intelligent detection
CN113205037B (en) Event detection method, event detection device, electronic equipment and readable storage medium
CN113177968A (en) Target tracking method and device, electronic equipment and storage medium
CN112613569B (en) Image recognition method, training method and device for image classification model
CN113313053A (en) Image processing method, apparatus, device, medium, and program product
CN114692778B (en) Multi-mode sample set generation method, training method and device for intelligent inspection
CN115346171A (en) Power transmission line monitoring method, device, equipment and storage medium
CN115690545B (en) Method and device for training target tracking model and target tracking
CN113420673A (en) Garbage classification method, device, equipment and storage medium
CN111383246A (en) Scroll detection method, device and equipment
CN115359471A (en) Image processing and joint detection model training method, device, equipment and storage medium
CN113569912A (en) Vehicle identification method and device, electronic equipment and storage medium
CN112529836A (en) High-voltage line defect detection method and device, storage medium and electronic equipment
CN111695404A (en) Pedestrian falling detection method and device, electronic equipment and storage medium
CN117854152A (en) Climbing behavior identification method, device, equipment and storage medium
CN115393755A (en) Visual target tracking method, device, equipment and storage medium
CN115116130A (en) Call action recognition method, device, equipment and storage medium
CN114861321A (en) Problem scene extraction method, device, equipment and medium for traffic flow simulation
CN114330542A (en) Sample mining method and device based on target detection and storage medium
CN114708498A (en) Image processing method, image processing apparatus, electronic device, and storage medium
CN114445711B (en) Image detection method, image detection device, electronic equipment and storage medium
CN117877100B (en) Behavior mode determining method and device, electronic equipment and storage medium
CN113806361B (en) Method, device and storage medium for associating electronic monitoring equipment with road
CN114724090B (en) Training method of pedestrian re-identification model, and pedestrian re-identification method and device
CN114092739B (en) Image processing method, apparatus, device, storage medium, and program product

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