Behavior recognition method, device, terminal device and storage medium

By extracting and matching feature vectors in video frames, combined with the behavior recognition model, multi-target and multi-perspective behavior recognition is achieved, solving the problem of insufficient complex action recognition capabilities in the existing technology, and improving the intelligent monitoring effect of behavior recognition. .

CN114764897BActive Publication Date: 2024-09-03SHENZHEN YEAHKA TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210321459.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-29
Publication Date
2024-09-03
Estimated Expiration
2042-03-29

AI Technical Summary

Technical Problem

Existing behavior recognition technology cannot realize complex behavior recognition of multiple targets and multiple perspectives, and its ability to recognize coherent and complex actions is insufficient.

Method used

By acquiring continuous video frames from several viewing angles, using a pre-created feature extraction model to extract feature vectors, and achieving multi-target and multi-view tracking results through matching and clustering, combined with the pre-created behavior recognition model to process target images, obtain multi-target and multi-view tracking results. Perspective behavior recognition results.

Benefits of technology

It realizes complex behavior recognition under multiple targets and multiple perspectives, improves the application effect of behavior recognition technology, can identify complex actions and provides higher intelligent monitoring capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114764897B
    Figure CN114764897B
Patent Text Reader

Abstract

The present invention discloses a behavior recognition method, device, terminal device and storage medium, wherein the behavior recognition method comprises: obtaining a target image; extracting features of the target image through a pre-created feature extraction model to obtain a number of feature vectors, and obtaining multi-target multi-view tracking results through matching and clustering between the several feature vectors; processing the target image through a pre-created behavior recognition model to obtain a behavior recognition result; combining the multi-target multi-view tracking result with the behavior recognition result to obtain a multi-target multi-view behavior recognition result. The present application realizes complex behavior recognition of multiple targets and multiple viewpoints, and improves the application effect of behavior recognition technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision, and in particular to a behavior recognition method, device, terminal equipment and storage medium. Background Art

[0002] Behavior recognition is an important branch of computer vision technology, which is usually applied to video surveillance. When abnormal behavior is detected, a warning is issued to alert relevant managers. Behavior recognition greatly enhances the role and capabilities of video surveillance systems, making surveillance systems more intelligent and reducing resource and personnel allocation.

[0003] Existing behavior recognition technologies are generally based on a single view and current frame, and cannot achieve multi-target multi-view tracking through information sharing between views and information processing of consecutive multiple frames. In addition, the processing of the current frame can only identify simple actions, and does not have the conditions for identifying coherent and complex actions. In summary, there is currently a lack of a complex behavior recognition solution for multiple targets and multiple views. Summary of the invention

[0004] The main purpose of the present invention is to provide a behavior recognition method, apparatus, terminal device and storage medium, aiming to realize multi-target and multi-perspective complex behavior recognition by processing continuous video frames under several perspectives, thereby improving the application effect of behavior recognition technology.

[0005] To achieve the above object, the present invention provides a behavior recognition method, which comprises:

[0006] Get the target image;

[0007] The features of the target image are extracted by a pre-created feature extraction model to obtain a number of feature vectors, and a multi-target multi-view tracking result is obtained by matching and clustering the number of feature vectors;

[0008] Processing the target image by using a pre-created behavior recognition model to obtain a behavior recognition result;

[0009] The multi-target multi-view tracking result is combined with the behavior recognition result to obtain a multi-target multi-view behavior recognition result.

[0010] Optionally, the step of acquiring the target image includes:

[0011] Obtain continuous video frames from several viewing angles;

[0012] The target image is obtained by cutting the continuous video frames under the several viewing angles according to the target detection frame through the pre-created target detection model.

[0013] Optionally, the step of extracting features of the target image by using a pre-created feature extraction model to obtain a plurality of feature vectors, and obtaining multi-target multi-view tracking results by matching and clustering the plurality of feature vectors comprises:

[0014] Extracting motion features and appearance features of the target image using a pre-created feature extraction model to obtain a number of feature vectors;

[0015] Obtaining a multi-target tracking result by matching the plurality of feature vectors, wherein the matching is performed according to one or more of a motion feature matching algorithm and an appearance feature matching algorithm, and the multi-target tracking result includes an identity identification number;

[0016] Obtaining a multi-view tracking result by clustering the plurality of feature vectors, wherein the clustering is performed according to a feature clustering algorithm, and the multi-view tracking result includes the identity identification number;

[0017] The multi-target tracking result and the multi-view tracking result are combined by associating the identity identification number to obtain the multi-target multi-view tracking result, wherein the multi-target multi-view tracking result includes the identity identification number.

[0018] Optionally, the step of obtaining a multi-target tracking result by matching the plurality of feature vectors, wherein the matching is performed according to one or more of a motion feature matching algorithm and an appearance feature matching algorithm, comprises:

[0019] By matching the plurality of feature vectors according to the motion feature matching algorithm, if the multi-target tracking result is obtained, matching is no longer performed according to the appearance feature matching algorithm;

[0020] If the multi-target tracking result cannot be obtained, the multi-target tracking result is obtained by matching according to the appearance feature matching algorithm.

[0021] Optionally, the step of processing the target image by using a pre-created behavior recognition model to obtain a behavior recognition result includes:

[0022] Processing the target image by using the pre-created behavior recognition model to obtain a basic behavior sequence;

[0023] The basic behavior sequence is judged according to a preset behavior judgment rule to obtain the behavior recognition result.

[0024] Optionally, the step of processing the target image by using the pre-created behavior recognition model to obtain a basic behavior sequence includes:

[0025] Scoring the target image according to the optimal viewing angle selection algorithm using the pre-created behavior recognition model;

[0026] The target image with the highest score is selected as the optimal viewing angle target image, and the optimal viewing angle target image is processed to obtain the basic behavior sequence.

[0027] Optionally, the step of combining the multi-target multi-view tracking result with the behavior recognition result to obtain the multi-target multi-view behavior recognition result includes:

[0028] The behavior recognition result includes the identity identification number;

[0029] The multi-target multi-view tracking result is combined with the behavior recognition result by associating the identity identification number to obtain a multi-target multi-view behavior recognition result.

[0030] The present application also provides a behavior recognition device, which includes:

[0031] An acquisition module, used for acquiring a target image;

[0032] The behavior recognition module is used to extract the features of the target image through a pre-created feature extraction model to obtain a number of feature vectors, and obtain multi-target multi-view tracking results through matching and clustering the several feature vectors; process the target image through a pre-created behavior recognition model to obtain a behavior recognition result; and combine the multi-target multi-view tracking result with the behavior recognition result to obtain a multi-target multi-view behavior recognition result.

[0033] An embodiment of the present application further proposes a terminal device, which includes a memory, a processor, and a behavior recognition program stored in the memory and executable on the processor, wherein the behavior recognition program implements the steps of the behavior recognition method described above when executed by the processor.

[0034] The embodiment of the present application further provides a computer-readable storage medium, on which a behavior recognition program is stored. When the behavior recognition program is executed by a processor, the steps of the behavior recognition method described above are implemented.

[0035] The behavior recognition method, apparatus, terminal device, and storage medium proposed in the embodiments of the present application are as follows: acquiring a target image; extracting features of the target image through a pre-created feature extraction model to obtain a number of feature vectors, and obtaining multi-target multi-view tracking results through matching and clustering between the several feature vectors; processing the target image through a pre-created behavior recognition model to obtain a behavior recognition result; combining the multi-target multi-view tracking result with the behavior recognition result to obtain a multi-target multi-view behavior recognition result. The target image is processed through a number of preset processing models to obtain the multi-target multi-view tracking result and the behavior recognition result, and the two are combined to realize behavior recognition under multi-target and multi-view conditions, thereby improving the application effect of the behavior recognition technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 This is a schematic diagram of the functional modules of the terminal device to which the behavior recognition device of this application belongs;

[0037] Figure 2 This is a flow chart of the first exemplary embodiment of the behavior recognition method of the present application;

[0038] Figure 3 This is a flow chart of a second exemplary embodiment of the behavior recognition method of the present application;

[0039] Figure 4 This is a flow chart of a third exemplary embodiment of the behavior recognition method of the present application;

[0040] Figure 5 for Figure 4 Detailed flow chart of step S202;

[0041] Figure 6 This is a flowchart of a fourth exemplary embodiment of the behavior recognition method of the present application;

[0042] Figure 7 for Figure 6 Detailed flowchart of step S301 in FIG.

[0043] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0044] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0045] The main solution of the embodiment of the present invention is: obtain a target image; extract the features of the target image through a pre-created feature extraction model to obtain a number of feature vectors, and obtain a multi-target multi-perspective tracking result by matching and clustering the feature vectors; process the target image through a pre-created behavior recognition model to obtain a behavior recognition result; combine the multi-target multi-perspective tracking result with the behavior recognition result to obtain a multi-target multi-perspective behavior recognition result. Based on the present application scheme, on the basis of obtaining the target image and creating a processing model, the multi-target multi-perspective tracking result and the behavior recognition result are obtained, and the two are combined to realize behavior recognition under multi-target and multi-perspective conditions, thereby improving the application effect of behavior recognition technology.

[0046] Specifically, refer to Figure 1 , Figure 1 This is a functional module diagram of the terminal device to which the behavior recognition device of this application belongs. The behavior recognition device can be a device independent of the terminal device that can perform behavior recognition and comparison, and it can be carried on the terminal device in the form of hardware or software. The terminal device can be a smart mobile terminal with data processing functions such as a mobile phone or a tablet computer, or a fixed terminal device or server with data processing functions.

[0047] In this embodiment, the terminal device to which the behavior recognition apparatus belongs includes at least an output module 110 , a processor 120 , a memory 130 and a communication module 140 .

[0048] The memory 130 stores an operating system and a behavior recognition program. The behavior recognition device can store the acquired target image; several feature vectors obtained by extracting the features of the target image through a pre-created feature extraction model; multi-target multi-view tracking results obtained by matching and clustering the several feature vectors; behavior recognition results obtained by processing the target image through a pre-created behavior recognition model; and multi-target multi-view behavior recognition results obtained by combining the multi-target multi-view tracking results with the behavior recognition results in the memory 130; the output module 110 can be a display screen, etc. The communication module 140 can include a WIFI module, a mobile communication module, a Bluetooth module, etc., and communicates with an external device or server through the communication module 140.

[0049] The behavior recognition program and the comparison program in the memory 130 implement the following steps when executed by the processor:

[0050] Get the target image;

[0051] The features of the target image are extracted by a pre-created feature extraction model to obtain a number of feature vectors, and a multi-target multi-view tracking result is obtained by matching and clustering the number of feature vectors;

[0052] Processing the target image by using a pre-created behavior recognition model to obtain a behavior recognition result;

[0053] The multi-target multi-view tracking result is combined with the behavior recognition result to obtain a multi-target multi-view behavior recognition result.

[0054] Furthermore, when the behavior recognition program in the memory 130 is executed by the processor, the following steps are also implemented:

[0055] Obtain continuous video frames from several viewing angles;

[0056] The target image is obtained by cutting the continuous video frames under the several viewing angles according to the target detection frame through the pre-created target detection model.

[0057] Furthermore, when the behavior recognition program in the memory 130 is executed by the processor, the following steps are also implemented:

[0058] Extracting motion features and appearance features of the target image using a pre-created feature extraction model to obtain a number of feature vectors;

[0059] Obtaining a multi-target tracking result by matching the plurality of feature vectors, wherein the matching is performed according to one or more of a motion feature matching algorithm and an appearance feature matching algorithm, and the multi-target tracking result includes an identity identification number;

[0060] Obtaining a multi-view tracking result by clustering the plurality of feature vectors, wherein the clustering is performed according to a feature clustering algorithm, and the multi-view tracking result includes the identity identification number;

[0061] The multi-target tracking result and the multi-view tracking result are combined by associating the identity identification number to obtain the multi-target multi-view tracking result, wherein the multi-target multi-view tracking result includes the identity identification number.

[0062] Furthermore, when the behavior recognition program in the memory 130 is executed by the processor, the following steps are also implemented:

[0063] By matching the plurality of feature vectors according to the motion feature matching algorithm, if the multi-target tracking result is obtained, matching is no longer performed according to the appearance feature matching algorithm;

[0064] If the multi-target tracking result cannot be obtained, the multi-target tracking result is obtained by matching according to the appearance feature matching algorithm.

[0065] Furthermore, when the behavior recognition program in the memory 130 is executed by the processor, the following steps are also implemented:

[0066] Processing the target image by using the pre-created behavior recognition model to obtain a basic behavior sequence;

[0067] The basic behavior sequence is judged according to a preset behavior judgment rule to obtain the behavior recognition result.

[0068] Furthermore, when the behavior recognition program in the memory 130 is executed by the processor, the following steps are also implemented:

[0069] Scoring the target image according to the optimal viewing angle selection algorithm using the pre-created behavior recognition model;

[0070] The target image with the highest score is selected as the optimal viewing angle target image, and the optimal viewing angle target image is processed to obtain the basic behavior sequence.

[0071] Furthermore, when the behavior recognition program in the memory 130 is executed by the processor, the following steps are also implemented:

[0072] The behavior recognition result includes the identity identification number;

[0073] The multi-target multi-view tracking result is combined with the behavior recognition result by associating the identity identification number to obtain a multi-target multi-view behavior recognition result.

[0074] This embodiment adopts the above scheme, specifically by acquiring a target image; extracting the features of the target image through a pre-created feature extraction model to obtain a number of feature vectors, and obtaining a multi-target multi-view tracking result through matching and clustering the feature vectors; processing the target image through a pre-created behavior recognition model to obtain a behavior recognition result; combining the multi-target multi-view tracking result with the behavior recognition result to obtain a multi-target multi-view behavior recognition result. The target image is processed through a number of preset processing models to obtain the multi-target multi-view tracking result and the behavior recognition result, and the two are combined to realize behavior recognition under multi-target and multi-view, thereby improving the application effect of behavior recognition technology.

[0075] Based on the above terminal device architecture but not limited to the above architecture, an embodiment of the method of the present application is proposed. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described can be performed in a different order than here. The execution subject of the method of this embodiment can be a behavior recognition device, or a behavior recognition terminal device or server. This embodiment takes a behavior recognition device as an example, and the behavior recognition device can be integrated in a terminal device such as a desktop computer, a laptop computer, etc. with a data processing function.

[0076] Reference Figure 2 The first embodiment of the behavior recognition method of the present invention provides a flow chart, and the behavior recognition method includes:

[0077] Step S10, acquiring a target image;

[0078] Specifically, the terminal device sends a request to the monitoring device to obtain the target image. After receiving the request, the monitoring device performs permission verification. If the permission verification is passed, the target image is retrieved and returned to the terminal device. The monitoring device can be a network camera, an infrared camera, a full-color camera, etc., which can capture and store real-time images in the production environment and has a reserved data input and output interface; the target image reflects the image information of the monitoring area pre-set by the administrator.

[0079] Step S20, extracting features of the target image by using a pre-created feature extraction model to obtain a number of feature vectors, and obtaining a multi-target multi-view tracking result by matching and clustering the number of feature vectors;

[0080] Specifically, the feature vector of the target in the target image is first extracted through a pre-created feature extraction model, and each extracted feature vector is a one-dimensional vector. The pre-created feature extraction model uses machine learning technology and is trained through a large amount of feature data. The feature extraction model can accurately identify the features in the target image and extract them as a one-dimensional feature vector output. The feature vector is generally multiple, belonging to different targets under different perspectives, that is, belonging to multiple people in different monitoring screens.

[0081] Then, by matching the feature vectors of consecutive frames in the same perspective, multi-target tracking in the same perspective can be achieved; by clustering the feature vectors in different perspectives, multi-view tracking of the same target can be achieved. Combining the above two tracking effects, multi-target multi-view tracking can be achieved.

[0082] Step S30, processing the target image by using a pre-created behavior recognition model to obtain a behavior recognition result;

[0083] Specifically, the target image is input into the pre-created behavior recognition model. The pre-created behavior recognition model is obtained by training with a large amount of behavior data using machine learning technology. The behavior recognition model can judge the behavior in the target image, including basic behaviors such as "picking up" and "putting down" of the hands, and "standing" and "walking" of the legs, as well as complex behaviors such as "stealing".

[0084] Step S40, combining the multi-target multi-view tracking result with the behavior recognition result to obtain a multi-target multi-view behavior recognition result.

[0085] Specifically, the multi-target multi-view tracking result refers to the video surveillance tracking of different targets under different viewpoints, and each target has a corresponding identity identification number, that is, ID. The behavior recognition result means that each target in the video surveillance is marked with a corresponding behavior, that is, each behavior mark has a corresponding target identity identification number.

[0086] In summary, the identity identification number associates different targets and behaviors under different perspectives, thereby achieving the multi-target and multi-perspective behavior recognition result.

[0087] This embodiment adopts the above scheme, specifically by acquiring a target image; extracting the features of the target image through a pre-created feature extraction model to obtain a number of feature vectors, and obtaining a multi-target multi-view tracking result through matching and clustering the feature vectors; processing the target image through a pre-created behavior recognition model to obtain a behavior recognition result; combining the multi-target multi-view tracking result with the behavior recognition result to obtain a multi-target multi-view behavior recognition result. This embodiment processes the target image through a number of preset processing models, tracks different targets under different perspectives and identifies their behaviors, obtains the multi-target multi-view tracking result and the behavior recognition result, and combines the two to achieve multi-target multi-view behavior recognition under multi-perspective, thereby improving the application effect of behavior recognition technology.

[0088] Further, see Figure 3 The second embodiment of the behavior recognition method of the present invention provides a flow chart based on the above Figure 2 In the embodiment shown, the step of acquiring the target image includes:

[0089] In this embodiment, step S101, obtaining continuous video frames under several viewing angles;

[0090] Specifically, the terminal device sends a request to obtain a monitoring screen to several monitoring devices, and the monitoring screen actually includes the continuous video frames. After receiving the request, the monitoring device performs an authorization verification. If the authorization verification passes, the continuous video frames are retrieved and returned to the terminal device.

[0091] Step S102, using a pre-created target detection model to crop continuous video frames under the plurality of viewing angles according to the target detection frame to obtain the target image.

[0092] Specifically, after receiving the continuous video frames, the terminal device detects the targets in the continuous video frames through the pre-created target detection model, and obtains the detection frame of each target in each frame. The target detection frame is generally rectangular and includes the target, so that the position and size of each target under each viewing angle can be determined. Then, the continuous video frames are cropped according to the shape of the target detection frame to obtain a rectangular target image.

[0093] This embodiment adopts the above scheme, specifically by obtaining continuous video frames under several viewing angles; and using a pre-created target detection model to crop the continuous video frames under the several viewing angles according to the target detection frame to obtain the target image. In this embodiment, the target detection model crops the target-related video frames in the surveillance video screen to obtain a target image of a moderate size, which contains complete target information and prepares the necessary materials for the subsequent feature extraction and behavior recognition.

[0094] Further, see Figure 4 The third embodiment of the behavior recognition method of the present invention provides a flow chart based on the above Figure 2 In the embodiment shown, in the embodiment, the above step S20, extracting the features of the target image by a pre-created feature extraction model to obtain a plurality of feature vectors, and obtaining a multi-target multi-view tracking result by matching and clustering the plurality of feature vectors includes:

[0095] Step S201, extracting motion features and appearance features of the target image by using a pre-created feature extraction model to obtain a number of feature vectors;

[0096] Specifically, the target image is first received as input through a pre-created feature extraction model, the target motion features and appearance features in the image are identified, and the two features are output in the form of a one-dimensional feature vector to prepare necessary materials for the next step of feature matching and clustering.

[0097] Step S202, obtaining a multi-target tracking result by matching the plurality of feature vectors, wherein the matching is performed according to one or more of a motion feature matching algorithm and an appearance feature matching algorithm, and the multi-target tracking result includes an identity identification number;

[0098] Specifically, the several feature vectors are expressions of motion features and appearance features. The motion features and appearance features of different targets at the same viewing angle are different. By matching the motion features and appearance features of multiple consecutive frames at the same viewing angle, tracking of all targets at the same viewing angle can be achieved.

[0099] The motion feature matching algorithm is based on the Kalman filter algorithm. The principle is that according to the position, size and speed of the target in the previous frame, the approximate range of the target in the current frame can be predicted. If there is only one detection frame at the predicted position and no other detection frames are attached, it can be determined that this detection frame belongs to the target, thus realizing multi-target tracking under a single perspective.

[0100] The appearance feature matching algorithm is based on the target re-identification algorithm. The principle is to calculate the cosine distance of different feature vectors. Due to the similarity, the cosine distance between the feature vectors of the same target will be smaller than that of different targets, so matching can be performed to achieve multi-target tracking under a single perspective.

[0101] Step S203, obtaining a multi-view tracking result by clustering the plurality of feature vectors, wherein the clustering is performed according to a feature clustering algorithm, and the multi-view tracking result includes the identity identification number;

[0102] Specifically, the appearance features of the same target under different perspectives are similar. Clustering the appearance features under different perspectives means grouping multiple scattered feature vectors into multiple classes according to their similarities. This can associate the same target under different perspectives and thus achieve single target tracking under multiple perspectives.

[0103] Step S204, combining the multi-target tracking result and the multi-view tracking result by associating the identity identification number to obtain the multi-target multi-view tracking result, wherein the multi-target multi-view tracking result includes the identity identification number.

[0104] Whether it is multi-target tracking under a single perspective or single-target tracking under multiple perspectives, as long as it is the same target, it will have a unique identification number, and multi-target multi-perspective tracking can be achieved by associating the identification number.

[0105] In this embodiment, through the above scheme, the motion features and appearance features of the target image are extracted by a pre-created feature extraction model to obtain several feature vectors; the multi-target tracking results are obtained by matching the several feature vectors, wherein the matching is performed according to one or more of the motion feature matching algorithm and the appearance feature matching algorithm, and the multi-target tracking results include the identity identification number; the multi-view tracking results are obtained by clustering the several feature vectors, wherein the clustering is performed according to the feature clustering algorithm, and the multi-view tracking results include the identity identification number; the multi-target tracking results and the multi-view tracking results are combined by associating the identity identification number to obtain the multi-target multi-view tracking results, wherein the multi-target multi-view tracking results include the identity identification number. In this embodiment, the feature extraction model applies machine learning technology, which is obtained through a large amount of data training, and can effectively identify and extract the motion features and appearance features of the target, convert the features of the target into the form of feature vectors and use them for the next stage of processing. In addition, by applying the feature matching algorithm and the feature clustering algorithm, multi-target tracking and multi-view tracking can be realized, and then the two are combined to realize multi-target multi-view tracking.

[0106] Further, see Figure 5 , based on the above Figure 4 The embodiment shown, Figure 4 Step S202 is refined, wherein the multi-target tracking result is obtained by matching the plurality of feature vectors, wherein the matching is performed according to one or more of a motion feature matching algorithm and an appearance feature matching algorithm, including:

[0107] Step S2020, matching the plurality of feature vectors according to the motion feature matching algorithm;

[0108] Step S2021, if the multi-target tracking result is obtained, matching is no longer performed according to the appearance feature matching algorithm;

[0109] Specifically, the several feature vectors are first matched through the motion feature matching algorithm. According to the position, size and speed of the target in the previous frame, the approximate range of the target in the current frame can be predicted. If there is only one detection frame at the predicted position and no other detection frames are attached, then it can be determined that this detection frame belongs to the target, and the matching process is considered to be completed, realizing multi-target tracking under a single perspective, and there is no need to enter the next step of appearance feature matching algorithm matching.

[0110] Step S2022: If the multi-target tracking result cannot be obtained, matching is performed according to the appearance feature matching algorithm to obtain the multi-target tracking result.

[0111] Specifically, if multiple detection frames appear within the predicted position of a target when matching according to the motion feature matching algorithm, it means that the motion feature matching fails and needs to be converted to appearance feature matching. Then, the cosine distances of different feature vectors are calculated according to the appearance feature matching algorithm. Due to the similarity, the cosine distances between feature vectors of the same target will be smaller than those of different targets, so matching can be performed to achieve multi-target tracking under a single perspective.

[0112] This embodiment adopts the above scheme, specifically by matching the several feature vectors according to the motion feature matching algorithm. If the multi-target tracking result is obtained, the appearance feature matching algorithm is no longer used for matching; if the multi-target tracking result cannot be obtained, the multi-target tracking result is obtained by matching according to the appearance feature matching algorithm. This embodiment limits the selection order of the algorithm in the feature matching stage, and preferentially selects the motion feature algorithm for matching. If the match is successful, the matching process ends. If the match fails, the appearance feature matching algorithm is selected for matching. This matching order can speed up the matching speed.

[0113] Further, see Figure 6 The fourth embodiment of the behavior recognition method of the present invention provides a flow chart based on the above Figure 2 In the illustrated embodiment, the step of processing the target image by using a pre-created behavior recognition model to obtain a behavior recognition result includes:

[0114] Step S301, processing the target image by using the pre-created behavior recognition model to obtain a basic behavior sequence;

[0115] Specifically, the target image is first received as input through a pre-created behavior recognition model, and the behavior of the target in the target image is recognized. The basic behaviors of the target such as "picking up" and "putting down" of the hands and "standing" and "walking" of the legs are identified, and a basic behavior sequence is established for each target.

[0116] Step S302: determining the basic behavior sequence according to a preset behavior determination rule to obtain the behavior recognition result.

[0117] Specifically, as the target tracking process continues, the target image input increases, and the basic behavior sequence gradually increases. By judging the basic behavior sequence according to the preset behavior judgment rules, it can be known whether a high-level behavior, such as "theft", has occurred. Then the manager can implement dangerous behavior warning by setting up a corresponding warning mechanism. For example, if a customer takes (basic behavior) and puts (basic behavior) items in a store many times, if it is recognized that the number of items taken by the target is more than the number of items placed, and finally leaves without paying (basic behavior), a theft behavior (high-level behavior) warning will be triggered.

[0118] In this embodiment, the target image is processed by the pre-created behavior recognition model to obtain a basic behavior sequence; and the basic behavior sequence is judged according to a preset behavior judgment rule to obtain the behavior recognition result. In this embodiment, the basic behavior of the target is firstly recognized to obtain a basic behavior sequence, and then a basic behavior sequence of a certain length is judged, thereby realizing the recognition of complex actions of the target.

[0119] Further, see Figure 7 , based on the above Figure 6 The embodiment shown, Figure 6 The step S301 is refined, and the step of processing the target image by the pre-created behavior recognition model to obtain a basic behavior sequence includes:

[0120] Step S3011, scoring the target image according to the optimal viewing angle selection algorithm using the pre-created behavior recognition model;

[0121] Specifically, the target image is first received as input through a pre-created behavior recognition model, and the viewing angle is scored according to factors such as the current standing area and orientation of each target. The viewing angle with the highest comprehensive score can be determined as the optimal viewing angle. The target features under the optimal viewing angle are clearer, which is convenient for the next step of image processing.

[0122] Step S3012: Select the target image with the highest score as the optimal viewing angle target image, and process the optimal viewing angle target image to obtain the basic behavior sequence.

[0123] Specifically, firstly take 16 consecutive frames of the target image under the optimal viewing angle, extract a frame at an interval of 1, and obtain 8 frames of the target image with a certain sequence as the optimal viewing angle target image, and then process the optimal viewing angle target image to identify the basic behavior of the target therein and obtain the basic behavior sequence.

[0124] This embodiment uses the above scheme to score the target image according to the optimal viewing angle selection algorithm through the pre-created behavior recognition model; selects the target image with the highest score as the optimal viewing angle target image, and processes the optimal viewing angle target image to obtain the basic behavior sequence. This embodiment automatically switches the optimal vision under many monitoring screens, and then obtains the target image under the optimal viewing angle. The target image under this viewing angle contains more information, which can improve the accuracy of behavior recognition.

[0125] In addition, the embodiment of the present application further provides a behavior recognition device, the behavior recognition device comprising:

[0126] An acquisition module, used for acquiring a target image;

[0127] The behavior recognition module is used to extract the features of the target image through a pre-created feature extraction model to obtain a number of feature vectors, and obtain multi-target multi-view tracking results through matching and clustering the several feature vectors; process the target image through a pre-created behavior recognition model to obtain a behavior recognition result; and combine the multi-target multi-view tracking result with the behavior recognition result to obtain a multi-target multi-view behavior recognition result.

[0128] For the principle and implementation process of implementing behavior recognition in this embodiment, please refer to the above embodiments and will not be repeated here.

[0129] In addition, an embodiment of the present application also proposes a terminal device, which includes a memory, a processor, and a behavior recognition program stored in the memory and executable on the processor, wherein the behavior recognition program implements the steps of the behavior recognition method described above when executed by the processor.

[0130] Since all the technical solutions of all the aforementioned embodiments are adopted when the behavior recognition program is executed by the processor, it has at least all the beneficial effects brought by all the technical solutions of all the aforementioned embodiments, which will not be described one by one here.

[0131] In addition, an embodiment of the present application further proposes a computer-readable storage medium, on which a behavior recognition program is stored. When the behavior recognition program is executed by a processor, the steps of the behavior recognition method described above are implemented.

[0132] Since all the technical solutions of all the aforementioned embodiments are adopted when the behavior recognition program is executed by the processor, it has at least all the beneficial effects brought by all the technical solutions of all the aforementioned embodiments, which will not be described one by one here.

[0133] Compared with the prior art, the behavior recognition method, apparatus, terminal device and storage medium proposed in the embodiments of the present application acquire a target image; extract the features of the target image through a pre-created feature extraction model to obtain a number of feature vectors, obtain a multi-target multi-view tracking result through matching and clustering the several feature vectors; process the target image through a pre-created behavior recognition model to obtain a behavior recognition result; combine the multi-target multi-view tracking result with the behavior recognition result to obtain a multi-target multi-view behavior recognition result. The target image is processed through a number of preset processing models to obtain the multi-target multi-view tracking result and the behavior recognition result, and the two are combined to realize behavior recognition under multi-target and multi-view, thereby improving the application effect of behavior recognition technology.

[0134] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0135] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0136] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, a controlled terminal, or a network device, etc.) to execute the method of each embodiment of the present application.

[0137] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A behavior recognition method, characterized in that: The behavior recognition method comprises the following steps: Get the target image; The features of the target image are extracted by a pre-created feature extraction model to obtain a number of feature vectors, and a multi-target multi-view tracking result is obtained by matching and clustering the number of feature vectors; Processing the target image through a pre-created behavior recognition model to obtain a behavior recognition result; Combining the multi-target multi-view tracking result with the behavior recognition result to obtain a multi-target multi-view behavior recognition result; The step of obtaining multi-target multi-view tracking results by matching and clustering the plurality of feature vectors comprises: Obtaining a multi-target tracking result by matching the plurality of feature vectors, wherein the matching is performed according to one or more of a motion feature matching algorithm and an appearance feature matching algorithm, and the multi-target tracking result includes an identity identification number; Obtaining a multi-view tracking result by clustering the plurality of feature vectors, wherein the clustering is performed according to a feature clustering algorithm, and the multi-view tracking result includes the identity identification number; The multi-target tracking result and the multi-view tracking result are combined by associating the identity identification number to obtain the multi-target multi-view tracking result, wherein the multi-target multi-view tracking result includes the identity identification number.

2. The behavior recognition method according to claim 1, characterized in that: The step of acquiring the target image comprises: Obtain continuous video frames from several viewing angles; The target image is obtained by cutting the continuous video frames under the several viewing angles according to the target detection frame through the pre-created target detection model.

3. The behavior recognition method according to claim 1, characterized in that: The step of extracting the features of the target image by using a pre-created feature extraction model to obtain a plurality of feature vectors comprises: The motion features and appearance features of the target image are extracted through a pre-created feature extraction model to obtain a number of feature vectors.

4. The behavior recognition method according to claim 1, characterized in that: The step of obtaining the multi-target tracking result by matching the plurality of feature vectors, wherein the matching is performed according to one or more of a motion feature matching algorithm and an appearance feature matching algorithm, comprises: By matching the plurality of feature vectors according to the motion feature matching algorithm, if the multi-target tracking result is obtained, matching is no longer performed according to the appearance feature matching algorithm; If the multi-target tracking result cannot be obtained, the multi-target tracking result is obtained by matching according to the appearance feature matching algorithm.

5. The behavior recognition method according to claim 1, characterized in that: The step of processing the target image by using a pre-created behavior recognition model to obtain a behavior recognition result comprises: Processing the target image by using the pre-created behavior recognition model to obtain a basic behavior sequence; The basic behavior sequence is judged according to a preset behavior judgment rule to obtain the behavior recognition result.

6. The behavior recognition method according to claim 5, characterized in that: The step of processing the target image by using the pre-created behavior recognition model to obtain a basic behavior sequence comprises: Scoring the target image according to the optimal viewing angle selection algorithm using the pre-created behavior recognition model; The target image with the highest score is selected as the optimal viewing angle target image, and the optimal viewing angle target image is processed to obtain the basic behavior sequence.

7. The behavior recognition method according to claim 1, characterized in that: The step of combining the multi-target multi-view tracking result with the behavior recognition result to obtain the multi-target multi-view behavior recognition result comprises: The behavior recognition result includes the identity identification number; The multi-target multi-view tracking result is combined with the behavior recognition result by associating the identity identification number to obtain a multi-target multi-view behavior recognition result.

8. A behavior recognition device, characterized in that: The behavior recognition device comprises: An acquisition module, used for acquiring a target image; A behavior recognition module is used to extract the features of the target image through a pre-created feature extraction model to obtain a number of feature vectors, and obtain a multi-target multi-view tracking result through matching and clustering between the several feature vectors; process the target image through a pre-created behavior recognition model to obtain a behavior recognition result; and combine the multi-target multi-view tracking result with the behavior recognition result to obtain a multi-target multi-view behavior recognition result; The behavior recognition module is further used to obtain a multi-target tracking result by matching the plurality of feature vectors, wherein the matching is performed according to one or more of a motion feature matching algorithm and an appearance feature matching algorithm, and the multi-target tracking result includes an identity identification number; Obtaining a multi-view tracking result by clustering the plurality of feature vectors, wherein the clustering is performed according to a feature clustering algorithm, and the multi-view tracking result includes the identity identification number; The multi-target tracking result and the multi-view tracking result are combined by associating the identity identification number to obtain the multi-target multi-view tracking result, wherein the multi-target multi-view tracking result includes the identity identification number.

9. A terminal device, characterized in that: The terminal device includes a memory, a processor, and a behavior recognition program stored in the memory and executable on the processor. When the behavior recognition program is executed by the processor, the steps of the behavior recognition method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a behavior recognition program, and when the behavior recognition program is executed by the processor, the steps of the behavior recognition method according to any one of claims 1 to 7 are implemented.