Target motion state recognition method, device, equipment and medium

CN114882074BActive Publication Date: 2024-10-11CHENGDU VISION ZENITH TECH DEV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210568496.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-24
Publication Date
2024-10-11
Estimated Expiration
2042-05-24

AI Technical Summary

Technical Problem

[0003]违法审核场景的图片流行人跟踪的难点在于:图片之间时间跨度极大,甚至可以达到10秒级别,图与图之间时间间隔也不是均匀的,因此每张图之间行人状态变化很大,在现实场景人行人又往往拥挤、穿着相像、不规则运动,最终导致该场景的行人跟踪不属于常规跟踪问题,相比普通跟踪场景难度提速了好几个等级

Benefits of technology

[0069] (1) This invention is different from traditional online tracking or simply set offline tracking. It is a special tracking method based on the scene. It takes into account the long time interval unique to the scene, the object's orientation attribute, the consistency of the object's trajectory and orientation, Due to the apparent characteristics of objects and other properties, it can provide pedestrian tracking results that are effective and adaptable to the scene for the image stream of illegal review scenes, which is much better than the traditional method of directly applying online/offline tracking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114882074B_ABST
    Figure CN114882074B_ABST
Patent Text Reader

Abstract

The present invention discloses a target motion state recognition method, device, equipment and medium. The present invention takes the basic idea of ​​the network flow offline tracking algorithm as the framework, and provides a new image flow pedestrian motion state recognition method based on deep learning, which can provide good and scene-adaptive pedestrian tracking results for the image flow of the illegal review scene, which is much more effective than the traditional method of directly applying online / offline tracking, and provides the final pedestrian motion state information that is not easy to directly obtain by the traditional method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of image processing technology, and in particular relates to a method, device, equipment and medium for identifying a target motion state. Background Art

[0002] In the review of traffic violation evidence images, for violations of not giving way to pedestrians, it is first necessary to determine the status of all pedestrians appearing in the image stream with a long and indefinite interval, including their position, trajectory, etc. Therefore, it is first necessary to use a detector to detect pedestrians in each image, then track the pedestrians, and finally determine the movement status of each tracked pedestrian ID based on its position trajectory, such as whether it is motionless, moving from left to right, moving from right to left, whether the starting point is from the zebra crossing, the time of appearance and disappearance, vertical movement, etc., to provide a basis for further judgment on whether the illegal vehicle has not given way to pedestrians.

[0003] The difficulty of tracking pedestrians in pictures of illegal review scenarios lies in the following: the time span between pictures is extremely large, even up to 10 seconds, and the time interval between pictures is not uniform, so the status of pedestrians varies greatly between each picture. In real scenes, pedestrians are often crowded, dressed similarly, and move irregularly, which ultimately results in pedestrian tracking in this scene not being a regular tracking problem, and the difficulty is several levels higher than that of ordinary tracking scenarios.

[0004] For pedestrian tracking, traditional solutions such as deepsort are mainly suitable for real-time video stream tracking. They cannot adapt to image stream tracking with a very large time span, uncertain intervals between each image, and mostly 2 to 3 or 6 images at most. In addition, deepsort is an online tracking method and does not use global information. Image stream tracking in illegal review scenarios only involves a maximum of 6 images.

[0005] The problem with traditional tracking methods is that they do not utilize the pedestrian's unique single-frame posture / orientation information to assist tracking, which is very necessary in tracking a small amount of image streams with severe information deficiency. On the other hand, tracking is to ultimately provide pedestrian motion status information, so ultimately there is a need for further methods to determine the motion status of each pedestrian ID in these images as accurately as possible based on the tracking results. Summary of the invention

[0006] The purpose of the present invention is to overcome the defects of the prior art and provide a target motion state recognition method, device, equipment and medium, which can provide good and scene-adaptive pedestrian tracking results for the image stream of the illegal review scene, which is much better than the traditional method of directly applying online / offline tracking, and provides the final pedestrian motion state information that is not easy to directly obtain by the traditional method.

[0007] The object of the present invention is achieved through the following technical solutions:

[0008] A method for identifying a target motion state, the method comprising:

[0009] Get pictures of pedestrians violating traffic regulations in different scenarios;

[0010] annotating the image with a pedestrian detection frame, a pedestrian ID, and a pedestrian body posture orientation, and training a pedestrian detector, a pedestrian re-ID model, and a pedestrian orientation classification model;

[0011] For any group of pictures of pedestrians violating traffic regulations, the pedestrian detector is used to detect the pedestrians in each picture, the feature information of the bounding box of each detected pedestrian is extracted by the pedestrian reid model, and the pedestrian orientation classification model is used to obtain an m-dimensional probability distribution with a sum of 1, and the dimension with the highest score in the probability distribution is taken as the orientation of the bounding box of the pedestrian;

[0012] Establishing the starting point and the end point of the network flow, and then establishing the nodes and edges of the directed graph of the network flow for the pedestrian border information of each image in chronological order, wherein the edges include corresponding weights;

[0013] Determining the maximum possible flow and the minimum possible flow of the network flow according to the number of nodes of the directed graph, and obtaining the optimal solution of the network flow according to the maximum possible flow and the minimum possible flow;

[0014] The motion state of the pedestrian is detected according to the optimal solution of the network flow.

[0015] Furthermore, the establishment of the starting point and the end point of the network flow, and then sequentially establishing the nodes and edges of the directed graph of the network flow for the pedestrian border information of each image in chronological order, wherein the edges include corresponding weights, specifically comprises the following steps:

[0016] According to any pedestrian bounding box_k of the picture corresponding to any frame, the detector score score_k of the pedestrian detector, the pedestrian feature f_k extracted by the pedestrian reid model and the pedestrian orientation r_k detected by the pedestrian orientation classification model are obtained;

[0017] Calculate the scores of the enter edge and the exit edge, and calculate the pedestrian's initial entry probability p_enter and pedestrian exit probability p_exit according to the relative proportion of the position and size of box_k in the original image and the pedestrian's orientation r_k;

[0018] Calculate the score of the observation edge, and optimize the probability of false detection border p_ob based on the fixed false detection probability p_f and the detector score score_k;

[0019] Calculate the score of the transition edge, and calculate the probability p_trans that the pedestrian in the current frame and the pedestrian in the next frame belong to the same id based on the current frame feature f_k of the pedestrian in the current frame, the pedestrian orientation r_k of the pedestrian in the current frame, and the next frame feature f_j and pedestrian orientation r_j of the pedestrian in the next frame;

[0020] Calculate the edge weights, and calculate the weights of the enter edge, exit edge, observation edge, and transition edge of the directed graph based on the pedestrian's initial entry probability p_enter, pedestrian departure probability p_exit, false detection border probability p_ob, and the probability p_trans that the pedestrian in the current frame and the pedestrian in the next frame belong to the same ID.

[0021] Furthermore, the calculation of the scores of the enter edge and the exit edge specifically includes:

[0022] According to the relative proportion of the position and size of box_k in the original image and the pedestrian orientation r_k, the score p_enter of the enter edge is calculated based on the fact that the probability of an object near the edge entering the scene is greater than that of an object in the middle and the probability of an object facing away from the image boundary entering the scene is greater than that of an object facing toward the image boundary;

[0023] According to the relative proportion of the position and size of box_k in the original image and the pedestrian orientation r_k, the score p_exit of the exit edge is calculated based on the fact that the probability of objects close to the edge leaving the scene is greater than that of objects in the middle and the probability of objects facing the boundary of the image leaving the scene is greater than that of objects facing away from the boundary of the image.

[0024] Further, calculating the score of the observation edge includes calculating the score of the observation edge according to a fixed false detection probability p_f and the detector score score_k.

[0025] Furthermore, the calculation of the score of the transition edge specifically includes:

[0026] Calculate the box displacement based on the position of box_k and the pedestrian box box_j of another frame;

[0027] Calculate the position change speed and size change speed of the box_k and the box_j;

[0028] Score the transition edge according to the position change speed and the size change speed;

[0029] The calculation of the position change speed specifically includes:

[0030] The displacement size of the frame is normalized and divided by the frame interval between the box_k and the box_j to obtain the speed of position change;

[0031] The calculation of the dimensional change rate specifically includes:

[0032] Take the square root of the ratio of the area of ​​box_k to the area of ​​box_j;

[0033] The size change speed is obtained by normalizing or setting to zero according to a preset threshold and dividing by the frame interval between the box_k and the box_j.

[0034] Furthermore, the calculation of edge weights specifically includes:

[0035] According to the scores of enter edge, exit edge, observation edge and transition edge, the logarithm is taken as the weight of each edge.

[0036] Furthermore, the method further includes multiplying the weights of the enter edge, the exit edge, the observation edge and the transition edge by a large number and rounding the result.

[0037] On the other hand, the present invention also provides a target motion state recognition device, the device comprising:

[0038] An image acquisition module is used to acquire images of pedestrians violating traffic regulations in different scenarios;

[0039] A labeling training module is used to label the image with a pedestrian detection frame, a pedestrian ID, and a pedestrian body posture orientation, and to train a pedestrian detector, a pedestrian re-ID model, and a pedestrian orientation classification model;

[0040] A feature detection module is used to detect pedestrians in each picture of any group of pedestrians violating traffic regulations using the pedestrian detector, extract feature information from the bounding box of each detected pedestrian using the pedestrian reid model, and use the pedestrian orientation classification model to obtain an m-dimensional probability distribution with a sum of 1, and take the dimension with the highest score in the probability distribution as the orientation of the pedestrian bounding box;

[0041] A network flow establishment module is used to establish the starting point and the end point of the network flow, and then establish the nodes and edges of the directed graph of the network flow for the pedestrian border information of each image in chronological order, wherein the edges include corresponding weights;

[0042] A network flow optimal solution acquisition module, used to obtain the maximum possible flow and the minimum possible flow of the network flow according to the number of nodes of the directed graph, and obtain the optimal solution of the network flow according to the maximum possible flow and the minimum possible flow;

[0043] The motion state recognition module is used to detect the motion state of pedestrians according to the optimal solution of the network flow.

[0044] Optionally, the network flow establishment module establishes the starting point and the end point of the network flow, and then establishes the nodes and edges of the directed graph of the network flow for the pedestrian border information of each image in chronological order, wherein the edges include corresponding weights and specifically include the following steps:

[0045] According to any pedestrian bounding box_k of the picture corresponding to any frame, the detector score score_k of the pedestrian detector, the pedestrian feature f_k extracted by the pedestrian reid model and the pedestrian orientation r_k detected by the pedestrian orientation classification model are obtained;

[0046] Calculate the scores of the enter edge and the exit edge, and calculate the pedestrian's initial entry probability p_enter and pedestrian exit probability p_exit according to the relative proportion of the position and size of box_k in the original image and the pedestrian's orientation r_k;

[0047] Calculate the score of the observation edge, and optimize the probability of false detection border p_ob based on the fixed false detection probability p_f and the detector score score_k;

[0048] Calculate the score of the transition edge, and calculate the probability p_trans that the pedestrian in the current frame and the pedestrian in the next frame belong to the same id based on the current frame feature f_k of the pedestrian in the current frame, the pedestrian orientation r_k of the pedestrian in the current frame, and the next frame feature f_j and pedestrian orientation r_j of the pedestrian in the next frame;

[0049] Calculate the edge weights, and calculate the weights of the enter edge, exit edge, observation edge, and transition edge of the directed graph based on the pedestrian's initial entry probability p_enter, pedestrian departure probability p_exit, false detection border probability p_ob, and the probability p_trans that the pedestrian in the current frame and the pedestrian in the next frame belong to the same ID.

[0050] Optionally, the network flow establishing module calculates the scores of the enter edge and the exit edge specifically including:

[0051] According to the relative proportion of the position and size of box_k in the original image and the pedestrian orientation r_k, the score p_enter of the enter edge is calculated based on the fact that the probability of an object near the edge entering the scene is greater than that of an object in the middle and the probability of an object facing away from the image boundary entering the scene is greater than that of an object facing toward the image boundary;

[0052] According to the relative proportion of the position and size of box_k in the original image and the pedestrian orientation r_k, the score p_exit of the exit edge is calculated based on the fact that the probability of objects close to the edge leaving the scene is greater than that of objects in the middle and the probability of objects facing the boundary of the image leaving the scene is greater than that of objects facing away from the boundary of the image.

[0053] Optionally, the network flow establishment module calculates the score of the observation edge, including calculating the score of the observation edge according to a fixed false detection probability p_f and the detector score score_k.

[0054] Optionally, the network flow establishment module calculates the score of the transition edge specifically including:

[0055] Calculate the box displacement based on the position of box_k and the pedestrian box box_j of another frame;

[0056] Calculate the position change speed and size change speed of the box_k and the box_j;

[0057] Score the transition edge according to the position change speed and the size change speed;

[0058] The calculation of the position change speed specifically includes:

[0059] The displacement size of the frame is normalized and divided by the frame interval between the box_k and the box_j to obtain the speed of position change;

[0060] The calculation of the dimensional change rate specifically includes:

[0061] Take the square root of the ratio of the area of ​​box_k to the area of ​​box_j;

[0062] The size change speed is obtained by normalizing or setting to zero according to a preset threshold and dividing by the frame interval between the box_k and the box_j.

[0063] Optionally, the network flow establishment module calculates the edge weights specifically including:

[0064] According to the scores of enter edge, exit edge, observation edge and transition edge, the logarithm is taken as the weight of each edge.

[0065] Optionally, the network flow establishment module further multiplies the weights of the enter edge, the exit edge, the observation edge and the transition edge by a large number and rounds the result.

[0066] On the other hand, the present invention further provides a computer device, comprising a processor and a memory, wherein the memory stores a computer program, and the computer program is loaded and executed by the processor to implement any one of the above-mentioned target motion state recognition methods.

[0067] On the other hand, the present invention further provides a computer-readable storage medium, in which a computer program is stored. The computer program is loaded and executed by a processor to implement any of the above-mentioned target motion state recognition methods.

[0068] The beneficial effects of the present invention are:

[0069] (1) The present invention is different from traditional online tracking or simply set offline tracking. It is a dedicated tracking method based on scene specialization, taking into account the long time interval unique to the scene, the orientation attribute of the object, the consistency of the object trajectory and orientation, the apparent characteristics of the object and other properties. Therefore, it provides good and scene-adaptive pedestrian tracking results for the image stream of the illegal review scene, which is much better than the traditional method of directly applying online / offline tracking.

[0070] (2) The present invention can provide final pedestrian motion state information that is not easily obtained directly by traditional online / offline tracking methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] Figure 1 It is a schematic diagram of the flow chart of the target motion state recognition method provided by an embodiment of the present invention;

[0072] Figure 2 It is a schematic diagram of directed angles of two frames in the same direction provided by an embodiment of the present invention;

[0073] Figure 3 This is a schematic diagram of the first type of directed angles between two frames in different directions provided by an embodiment of the present invention;

[0074] Figure 4 This is a schematic diagram of a second type of directed angle between two frames in different directions provided by an embodiment of the present invention;

[0075] Figure 5 This is a schematic diagram of finding the optimal solution for network flow provided by an embodiment of the present invention;

[0076] Figure 6 It is a structural block diagram of a target motion state recognition device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0077] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0078] Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in the field without making any creative work shall fall within the scope of protection of the present invention.

[0079] The problem with traditional tracking methods is that they do not utilize the pedestrian's unique single-frame posture / orientation information to assist tracking, which is very necessary in tracking a small amount of image streams with severe information deficiency. On the other hand, tracking is to ultimately provide pedestrian motion status information, so ultimately there is a need for further methods to determine the motion status of each pedestrian ID in these images as accurately as possible based on the tracking results.

[0080] In order to solve the above technical problems, the following embodiments of the target motion state recognition method, device, equipment and medium of the present invention are proposed.

[0081] Example 1

[0082] Reference Figure 1 ,like Figure 1 FIG. 1 is a flow chart of a target motion state recognition method provided by the present embodiment, and the method specifically comprises the following steps:

[0083] Step S100: Acquire pictures of pedestrians violating traffic regulations in different scenarios.

[0084] In this embodiment, evidence pictures of violations of not giving way to pedestrians in different scenes taken by various devices (such as surveillance cameras on the street, etc.) are collected.

[0085] Step S200: annotate the image with pedestrian detection frames, pedestrian IDs, and pedestrian body posture orientations, and train pedestrian detectors, pedestrian re-ID models, and pedestrian orientation classification models.

[0086] The collected images are labeled with pedestrian detection boxes, pedestrian IDs, and 8 categories of pedestrian body posture orientations (up, down, left, right, top left, bottom left, bottom right, top right); based on the collected image annotations, pedestrian detectors, pedestrian re-ID models, and pedestrian orientation classification models are trained. The training of the three models belongs to standard postures and will not be repeated here.

[0087] Step S300: For any group of pictures of pedestrians violating traffic regulations, use a pedestrian detector to detect the pedestrians in each picture, extract feature information from the bounding box of each detected pedestrian through a pedestrian reid model, and use a pedestrian orientation classification model to obtain an m-dimensional probability distribution with a sum of 1, and take the dimension with the highest score in the probability distribution as the orientation of the pedestrian's bounding box.

[0088] Specifically, in this embodiment, for any group of illegal review and impolite pedestrian image streams, a detector is used to detect pedestrians in each image, and a patch (mask) is extracted from each detected pedestrian border, and feature information is extracted through a pedestrian reid model, and orientation classification information is obtained using a pedestrian orientation classification model. For the orientation classification information extracted by the model, an 8-dimensional probability distribution [p1, p2, …, p8] with a sum of 1 can be obtained, corresponding to categories [up, upper right, right, lower right, lower, lower left, left, upper left], and categories correspond to angles [0, 45, 90, 135, 180, 225, 270, 315]. The angle r corresponding to the dimension with the highest probability distribution score is taken as the orientation angle of the pedestrian box.

[0089] Step S400: Establish the starting point and the end point of the network flow, and then establish the nodes and edges of the directed graph of the network flow for the pedestrian border information of each image in chronological order, wherein the edges include corresponding weights.

[0090] Specifically, according to the basic process of the network flow algorithm, the start point and the end point in the network flow are first established, and then the nodes and edges of the graph are established for the pedestrian box information of each image in chronological order. For any pedestrian box_k in the image corresponding to a specific frame t, the detector score score_k, the pedestrian feature f_k and the pedestrian orientation angle r_k can be obtained.

[0091] The edge calculation includes:

[0092] Calculate the scores of the enter edge and the exit edge, and calculate the pedestrian's initial entry probability p_enter and pedestrian exit probability p_exit according to the relative proportion of the position and size of box_k in the original image and the pedestrian's orientation r_k;

[0093] Calculate the score of the observation edge, and optimize the probability of false detection border p_ob based on the fixed false detection probability p_f and the detector score score_k;

[0094] Calculate the score of the transition edge, and calculate the probability p_trans that the pedestrian in the current frame and the pedestrian in the subsequent frame belong to the same ID based on the current frame feature f_k and the pedestrian orientation r_k of the current frame and the subsequent frame feature f_j and the pedestrian orientation r_j of the subsequent frame of the pedestrian; each frame has multiple detected pedestrians, and the apparent similarity of pedestrians is evaluated by calculating the feature similarity between each pair of pedestrians.

[0095] Calculate the edge weights, and calculate the weights of the enter edge, exit edge, observation edge, and transition edge of the directed graph based on the pedestrian's initial entry probability p_enter, pedestrian departure probability p_exit, false detection border probability p_ob, and the probability p_trans that the pedestrian in the current frame and the pedestrian in the next frame belong to the same ID.

[0096] As an implementation mode, in this embodiment, calculating the scores of the enter edge and the exit edge specifically includes:

[0097] According to the relative proportion of the position and size of box_k in the original image and the pedestrian orientation r_k, the score p_enter of the enter edge is calculated based on the fact that the probability of an object near the edge entering the scene is greater than that of an object in the middle and the probability of an object facing away from the image boundary entering the scene is greater than that of an object facing toward the image boundary;

[0098] According to the relative proportion of the position and size of box_k in the original image and the pedestrian orientation r_k, the score p_exit of the exit edge is calculated based on the fact that the probability of objects close to the edge leaving the scene is greater than that of objects in the middle and the probability of objects facing the boundary of the image leaving the scene is greater than that of objects facing away from the boundary of the image.

[0099] Here are some examples:

[0100] Reference Figure 2-4 ,like Figure 2 The figure shows a schematic diagram of the directed angles of two frames in the same direction in this embodiment. Figure 2 This is a schematic diagram of the first type of directed angle between two frames with different directions. Figure 3 This is a schematic diagram of the second type of directed angle between two frames with different directions.

[0101] Wherein, start_degree is the angle between the ray representing the orientation of the frame of the previous frame and the trajectory ray from the frame of the previous frame to the frame of the next frame, and end_degree is the angle between the trajectory ray from the frame of the previous frame to the frame of the next frame and the ray representing the orientation of the frame of the next frame. It should be noted that in this embodiment, the clockwise direction is the positive direction.

[0102] When start_degree and end_degree are both positive or both negative, the scoring angle is 0. When start_degree and end_degree are one positive and one negative, the smaller of the absolute values ​​of start_degree and end_degree is used as the scoring angle. The same sign indicates that the trajectory is normal, and different signs indicate that there is a problem with the trajectory. According to the characteristics of rigid objects, the probability of obviously unreasonable angles is set to zero, the probability of unreasonable angles is reduced, and the probability of reasonable angles is increased. The scoring is performed by setting the score threshold when the signs are different. For example, if the threshold is set to 55, the score is 1 point when the scoring angle is 0, the score is 0.5 points when the scoring angle is between 0-55, and the score is 0 when the scoring angle is greater than 55. When the trajectory is like Figure 2 When the scoring angle is 0, the score is 1 point; when the trajectory is Figure 3 When the scoring angle is 30, the score is 0.5 points; when the trajectory is Figure 4 , the scoring angle is 60 and the score is 0.

[0103] As an implementation manner, in this embodiment, calculating the score of the observation edge includes calculating the score of the observation edge according to a fixed false detection probability p_f and the detector score score_k.

[0104] As an implementation mode, in this embodiment, calculating the score of the transition edge specifically includes:

[0105] Calculate the box displacement based on the position of box_k and the pedestrian box box_j of another frame;

[0106] Calculate the position change speed and size change speed of the box_k and the box_j;

[0107] Score the transition edge according to the position change speed and the size change speed;

[0108] The calculation of the position change speed specifically includes:

[0109] The displacement size of the frame is normalized and divided by the frame interval between the box_k and the box_j to obtain the speed of position change;

[0110] The calculation of the dimensional change rate specifically includes:

[0111] Take the square root of the ratio of the area of ​​box_k to the area of ​​box_j;

[0112] The size change speed is obtained by normalizing or setting to zero according to a preset threshold and dividing by the frame interval between the box_k and the box_j.

[0113] As an implementation method, in this embodiment, calculating the weight of an edge specifically includes:

[0114] According to the scores of the enter edge, exit edge, observation edge, and transition edge, the logarithm is taken as the weight of each edge. It should be noted that the final edge weight can be calculated using -log(score) or log(score) according to the scores of each edge.

[0115] As an implementation method, because the library used by the code requires that the edge weight must be an integer, most of the calculated edge values ​​are floating point numbers between 0 and 1, so they need to be converted to integers. In this embodiment, the method also includes multiplying the weights of the enter edge, exit edge, observation edge, and transition edge by a large number (for example, 10^6) and rounding them, so that the method is suitable for the code solution.

[0116] Step S500: deriving the maximum possible flow and the minimum possible flow of the network flow according to the number of nodes of the directed graph, and obtaining the optimal solution of the network flow according to the maximum possible flow and the minimum possible flow.

[0117] Reference Figure 5 ,like Figure 5 The figure shows a schematic diagram of searching for the optimal solution of network flow in this embodiment. The endpoints are set according to the number of objects currently detected, and then the theoretical convex function is searched and calculated by binary or multi-point division. According to the optimal value of the current flow calculated each time, it is inferred where the global optimal should fall, and the range is continuously narrowed to finally obtain the optimal solution.

[0118] Specifically, after obtaining the maximum possible flow and minimum possible flow of the network flow according to the number of nodes n in the graph, the solution is obtained according to the convex function characteristics of the network flow: starting with the maximum flow_max and the minimum flow_min, set the current optimal flow interval to [flow_min, flow_max]; take the guessed flow = (flow_max + flow_min) / 2, and solve the minimum cost of the network flow under the current flow, flow_max, and flow_min; based on the three costs, update the list of possible optimal flow intervals; recursively solve each possible optimal flow until the last flow_min = flow = flow_max, at which point the flow is the optimal flow, the minimum cost at this time is the optimal cost, and the minimum cost network flow solution for the flow at this time is the optimal solution for the network flow.

[0119] Step S600: The pedestrian movement state is detected according to the optimal solution of the network flow.

[0120] Specifically, according to the optimal solution path of the network flow, the edge that flows through is the selected edge. Each path from start to terminate is the complete information of a person's id, including the passed frames and the person box corresponding to the frame; the person box that is not selected by any id in the end is the false detection box.

[0121] Since the network flow modeling and scoring involves the consistency of the person's orientation and trajectory, the person's trajectory finally solved must also satisfy the consistency of orientation and trajectory.

[0122] For each person’s ID information, according to the corresponding person box information in each frame, the person’s motion state classification is calculated under the premise that the direction and trajectory are consistent: upward movement, downward movement, from left to right, from right to left, no movement, and the movement distance corresponding to each state.

[0123] The target motion state information obtained using the above method can be used to make subsequent judgments.

[0124] The target motion state recognition method provided in this embodiment is different from traditional online tracking or simple offline tracking. It is a special tracking method based on scene specialization, which takes into account the long time interval unique to the scene, the orientation attribute of the object, the consistency of the object trajectory and orientation, the apparent characteristics of the object, etc. Therefore, it provides good and scene-adaptive pedestrian tracking results for the image stream of the illegal review scene, which is much better than the traditional method of directly applying online / offline tracking. This method can provide the final pedestrian motion state information that is not easy to directly obtain by traditional online / offline tracking methods.

[0125] Example 2

[0126] Reference Figure 6 ,like Figure 6 FIG. 1 is a block diagram of a target motion state recognition device provided in this embodiment, and the device specifically includes:

[0127] An image acquisition module 10 is used to acquire images of pedestrians violating traffic regulations in different scenarios;

[0128] The annotation training module 20 is used to annotate the image with a pedestrian detection frame, a pedestrian ID and a pedestrian body posture orientation, and to train a pedestrian detector, a pedestrian re-ID model and a pedestrian orientation classification model;

[0129] The feature detection module 30 is used to detect the pedestrians in each picture of any group of pedestrians violating traffic regulations using a pedestrian detector, extract feature information from the bounding box of each detected pedestrian using a pedestrian re-id model, and obtain an m-dimensional probability distribution with a sum of 1 using a pedestrian orientation classification model, and take the dimension with the highest score in the probability distribution as the orientation of the bounding box of the pedestrian;

[0130] The network flow establishment module 40 is used to establish the starting point and the end point of the network flow, and then establish the nodes and edges of the directed graph of the network flow for the pedestrian border information of each image in chronological order, wherein the edges include corresponding weights;

[0131] A network flow optimal solution acquisition module 50 is used to obtain the maximum possible flow and the minimum possible flow of the network flow according to the number of nodes in the directed graph, and obtain the optimal solution of the network flow according to the maximum possible flow and the minimum possible flow;

[0132] The motion state recognition module 60 is used to detect the motion state of pedestrians according to the optimal solution of the network flow.

[0133] As an implementation mode, the network flow establishment module 40 establishes the starting point and the end point of the network flow, and then establishes the nodes and edges of the directed graph of the network flow for the pedestrian border information of each image in chronological order, wherein the edges include the corresponding weights and specifically include the following steps:

[0134] According to any pedestrian bounding box_k of the picture corresponding to any frame, the detector score score_k of the pedestrian detector, the pedestrian feature f_k extracted by the pedestrian reid model and the pedestrian orientation r_k detected by the pedestrian orientation classification model are obtained;

[0135] Calculate the scores of the enter edge and the exit edge, and calculate the pedestrian's initial entry probability p_enter and pedestrian exit probability p_exit according to the relative proportion of the position and size of box_k in the original image and the pedestrian's orientation r_k;

[0136] Calculate the score of the observation edge, and optimize the probability of false detection border p_ob based on the fixed false detection probability p_f and the detector score score_k;

[0137] Calculate the score of the transition edge, and calculate the probability p_trans that the pedestrian in the current frame and the pedestrian in the next frame belong to the same id based on the current frame feature f_k of the pedestrian in the current frame, the pedestrian orientation r_k of the pedestrian in the current frame, and the next frame feature f_j and pedestrian orientation r_j of the pedestrian in the next frame;

[0138] Calculate the edge weights, and calculate the weights of the enter edge, exit edge, observation edge, and transition edge of the directed graph based on the pedestrian's initial entry probability p_enter, pedestrian departure probability p_exit, false detection border probability p_ob, and the probability p_trans that the pedestrian in the current frame and the pedestrian in the next frame belong to the same ID.

[0139] As an implementation manner, the network flow establishing module 40 calculates the scores of the enter edge and the exit edge specifically including:

[0140] According to the relative proportion of the position and size of box_k in the original image and the pedestrian orientation r_k, the score p_enter of the enter edge is calculated based on the fact that the probability of an object near the edge entering the scene is greater than that of an object in the middle and the probability of an object facing away from the image boundary entering the scene is greater than that of an object facing toward the image boundary;

[0141] According to the relative proportion of the position and size of box_k in the original image and the pedestrian orientation r_k, the score p_exit of the exit edge is calculated based on the fact that the probability of objects close to the edge leaving the scene is greater than that of objects in the middle and the probability of objects facing the boundary of the image leaving the scene is greater than that of objects facing away from the boundary of the image.

[0142] As an implementation manner, the network flow establishment module 40 calculates the score of the observation edge, including calculating the score of the observation edge according to a fixed false detection probability p_f and a detector score score_k.

[0143] As an implementation manner, the network flow establishment module 40 calculates the score of the transition edge specifically including:

[0144] Calculate the box displacement based on the position of box_k and the pedestrian box box_j of another frame;

[0145] Calculate the position change speed and size change speed of box_k and box_j;

[0146] Score the transition edge based on the position change speed and size change speed;

[0147] The calculation of the position change speed specifically includes:

[0148] Normalize the border displacement size and divide it by the frame interval between box_k and box_j to get the speed of position change;

[0149] The calculation of the dimensional change rate specifically includes:

[0150] Take the square root of the ratio of the areas of box_k and box_j;

[0151] The size change rate is obtained by normalizing or setting to zero according to a preset threshold and dividing by the frame interval between box_k and box_j.

[0152] As an implementation manner, the network flow establishment module 40 calculates the edge weights specifically including:

[0153] According to the scores of enter edge, exit edge, observation edge and transition edge, the logarithm is taken as the weight of each edge.

[0154] As an implementation method, the network flow establishment module 40 also multiplies the weights of the enter edge, the exit edge, the observation edge, and the transition edge by a large number and rounds the weights.

[0155] The target motion state recognition device provided in this embodiment is different from the traditional online tracking or simply set offline tracking. It is a special tracking device specialized according to the scene, taking into account the long time interval unique to the scene, the orientation attribute of the object, the consistency of the object trajectory and orientation, the apparent characteristics of the object, etc. Therefore, it provides good and scene-adaptive pedestrian tracking results for the image stream of the illegal review scene, which is much better than the traditional method of directly applying online / offline tracking. The device can provide the final pedestrian motion state information that is not easy to directly obtain by the traditional online / offline tracking method.

[0156] Example 3

[0157] This preferred embodiment provides a computer device, which can implement the steps in any embodiment of the target motion state identification method provided in the embodiments of the present application. Therefore, the beneficial effects of the target motion state identification method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0158] Example 4

[0159] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling related hardware through instructions, and the instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. To this end, an embodiment of the present invention provides a storage medium, which stores a plurality of instructions, and the instructions can be loaded by a processor to execute the steps of any embodiment of the target motion state recognition method provided by the embodiment of the present invention.

[0160] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0161] Since the instructions stored in the storage medium can execute the steps in any target motion state recognition method embodiment provided in the embodiments of the present invention, the beneficial effects that can be achieved by any target motion state recognition method provided in the embodiments of the present invention can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0162] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for identifying target motion state, characterized in that: The method comprises: Get pictures of pedestrians violating traffic regulations in different scenarios; annotating the image with a pedestrian detection frame, a pedestrian ID, and a pedestrian body posture orientation, and training a pedestrian detector, a pedestrian re-ID model, and a pedestrian orientation classification model; For any group of pictures of pedestrians violating traffic regulations, the pedestrian detector is used to detect the pedestrians in each picture, the feature information of the bounding box of each detected pedestrian is extracted by the pedestrian reid model, and the pedestrian orientation classification model is used to obtain an m-dimensional probability distribution with a sum of 1, and the dimension with the highest score in the probability distribution is taken as the orientation of the bounding box of the pedestrian; Establishing the starting point and the end point of the network flow, and then establishing the nodes and edges of the directed graph of the network flow for the pedestrian border information of each image in chronological order, wherein the edges include corresponding weights; Determining the maximum possible flow and the minimum possible flow of the network flow according to the number of nodes of the directed graph, and obtaining the optimal solution of the network flow according to the maximum possible flow and the minimum possible flow; The motion state of the pedestrian is detected according to the optimal solution of the network flow.

2. The target motion state recognition method according to claim 1, characterized in that: The step of establishing the starting point and the end point of the network flow, and then sequentially establishing the nodes and edges of the directed graph of the network flow for the pedestrian border information of each image in chronological order, wherein the edges include corresponding weights, specifically comprises the following steps: According to any pedestrian bounding box_k of the picture corresponding to any frame, the detector score score_k of the pedestrian detector, the pedestrian feature f_k extracted by the pedestrian reid model and the pedestrian orientation r_k detected by the pedestrian orientation classification model are obtained; Calculate the scores of the enter edge and the exit edge, and calculate the pedestrian's initial entry probability p_enter and pedestrian exit probability p_exit according to the relative proportion of the position and size of box_k in the original image and the pedestrian's orientation r_k; Calculate the score of the observation edge, and optimize the probability of false detection border p_ob based on the fixed false detection probability p_f and the detector score score_k; Calculate the score of the transition edge, and calculate the probability p_trans that the pedestrian in the current frame and the pedestrian in the next frame belong to the same id based on the current frame feature f_k of the pedestrian in the current frame, the pedestrian orientation r_k of the pedestrian in the current frame, and the next frame feature f_j and pedestrian orientation r_j of the pedestrian in the next frame; Calculate the edge weights, and calculate the weights of the enter edge, exit edge, observation edge, and transition edge of the directed graph based on the pedestrian's initial entry probability p_enter, pedestrian departure probability p_exit, false detection border probability p_ob, and the probability p_trans that the pedestrian in the current frame and the pedestrian in the next frame belong to the same ID.

3. The target motion state recognition method according to claim 2, characterized in that: The calculation of the scores of the enter edge and the exit edge specifically includes: According to the relative proportion of the position and size of box_k in the original image and the pedestrian orientation r_k, the score p_enter of the enter edge is calculated based on the fact that the probability of an object near the edge entering the scene is greater than that of an object in the middle and the probability of an object facing away from the image boundary entering the scene is greater than that of an object facing toward the image boundary; According to the relative proportion of the position and size of box_k in the original image and the pedestrian orientation r_k, the score p_exit of the exit edge is calculated based on the fact that the probability of objects close to the edge leaving the scene is greater than that of objects in the middle and the probability of objects facing the boundary of the image leaving the scene is greater than that of objects facing away from the boundary of the image.

4. The target motion state recognition method according to claim 2, characterized in that: The calculating the score of the observation edge includes calculating the score of the observation edge according to a fixed false detection probability p_f and the detector score score_k.

5. The target motion state recognition method according to claim 2, characterized in that: The calculation of the score of the transition edge specifically includes: Calculate the box displacement based on the position of box_k and the pedestrian box box_j of another frame; Calculate the position change speed and size change speed of the box_k and the box_j; Score the transition edge according to the position change speed and the size change speed; The calculation of the position change speed specifically includes: The displacement size of the frame is normalized and divided by the frame interval between the box_k and the box_j to obtain the speed of position change; The calculation of the dimensional change rate specifically includes: Take the square root of the ratio of the area of ​​box_k to the area of ​​box_j; The size change speed is obtained by normalizing or setting to zero according to a preset threshold and dividing by the frame interval between the box_k and the box_j.

6. The target motion state recognition method according to claim 2, characterized in that: The calculation of edge weights specifically includes: According to the scores of enter edge, exit edge, observation edge and transition edge, the logarithm is taken as the weight of each edge.

7. The target motion state recognition method according to any one of claims 2 to 6, characterized in that: The method also includes multiplying the weights of the enter edge, the exit edge, the observation edge, and the transition edge by a large number and rounding the result.

8. A target motion state recognition device, characterized in that: The device comprises: An image acquisition module is used to acquire images of pedestrians violating traffic regulations in different scenarios; A labeling training module is used to label the image with a pedestrian detection frame, a pedestrian ID, and a pedestrian body posture orientation, and to train a pedestrian detector, a pedestrian re-ID model, and a pedestrian orientation classification model; A feature detection module is used to detect pedestrians in each picture of any group of pedestrians violating traffic regulations using the pedestrian detector, extract feature information from the bounding box of each detected pedestrian using the pedestrian reid model, and use the pedestrian orientation classification model to obtain an m-dimensional probability distribution with a sum of 1, and take the dimension with the highest score in the probability distribution as the orientation of the pedestrian bounding box; A network flow establishment module is used to establish the starting point and the end point of the network flow, and then establish the nodes and edges of the directed graph of the network flow for the pedestrian border information of each image in chronological order, wherein the edges include corresponding weights; A network flow optimal solution acquisition module, used to obtain the maximum possible flow and the minimum possible flow of the network flow according to the number of nodes of the directed graph, and obtain the optimal solution of the network flow according to the maximum possible flow and the minimum possible flow; The motion state recognition module is used to detect the motion state of pedestrians according to the optimal solution of the network flow.

9. A computer device, characterized in that: The computer device includes a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the target motion state recognition method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, which is loaded and executed by a processor to implement the target motion state recognition method according to any one of claims 1 to 7.