Non-standing posture detection method and device, computer device and storage medium

By acquiring pedestrian videos and 3D models, performing frame-by-frame processing and pedestrian region detection, a pedestrian trajectory map is constructed. The shortest path algorithm is then used to automatically identify non-standing postures, solving the problem that non-standing postures affect the accuracy of recognition in existing technologies, and achieving efficient and accurate non-standing posture detection.

CN114495266BActive Publication Date: 2025-10-17SHENZHEN INTELLIFUSION TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111678971.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2025-10-17
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

In existing methods for detecting pedestrian standing postures, image data of non-standing postures affects the accuracy of recognition, and reliance on manual recognition leads to low efficiency.

Method used

By acquiring pedestrian videos and 3D models, performing frame-by-frame processing and pedestrian region detection, a pedestrian trajectory map is constructed, and the shortest path algorithm is used to detect non-standing postures, automatically identifying non-standing postures.

Benefits of technology

It enables accurate detection of non-standing postures in pedestrian videos without human intervention, improving detection accuracy and efficiency while reducing labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114495266B_ABST
    Figure CN114495266B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of artificial intelligence, and discloses a non-standing posture detection method and device, computer equipment and a storage medium.The method comprises the following steps: acquiring a pedestrian video and a three-dimensional model associated with the pedestrian video, and performing frame processing on the pedestrian video to obtain a plurality of pedestrian images; performing pedestrian region detection on each pedestrian image to obtain a pedestrian region corresponding to each pedestrian image; constructing a pedestrian trajectory graph in the three-dimensional model according to each pedestrian image and the pedestrian region corresponding thereto; using a shortest path algorithm to perform shortest path identification on the pedestrian trajectory graph to obtain a shortest path trajectory; and performing non-standing posture detection on the shortest path trajectory to obtain a detection result.Therefore, the application can accurately, scientifically and automatically detect whether a non-standing posture segment exists in the pedestrian video, and improves the accuracy and efficiency of non-standing posture detection.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, and in particular to a non-standing posture detection method and device, computer equipment and a storage medium. BACKGROUND

[0002] The detection of the standing posture of pedestrians has very important application value in real life, such as the detection of pedestrians on sidewalks, motion detection, and medical diagnosis, etc. At present, the existing method for detecting the standing posture of pedestrians is to collect a sequence of image data by a camera and perform deep learning to recognize the detection result of the standing posture of pedestrians. However, the collected image data may have a non-standing posture, such as a bent posture or a falling posture, which will affect the recognition of the standing posture and reduce the accuracy of the recognition. The existing technology usually manually recognizes the image data of the non-standing posture, and then removes the recognized image data of the non-standing posture. Therefore, the manual cost is greatly increased, the efficiency is low, and it is not conducive to the recognition of the standing posture of pedestrians. SUMMARY

[0003] The present application provides a non-standing posture detection method and device, computer equipment and a storage medium, which automatically detects whether a pedestrian video has a non-standing posture segment, without manual recognition, and improves the accuracy and efficiency of non-standing posture detection.

[0004] A non-standing posture detection method, comprising:

[0005] obtaining a pedestrian video and a three-dimensional model associated with the pedestrian video, and performing frame processing on the pedestrian video to obtain a plurality of pedestrian images;

[0006] detecting a pedestrian area for each of the pedestrian images to obtain a pedestrian area corresponding to each of the pedestrian images;

[0007] constructing a pedestrian trajectory graph in the three-dimensional model according to each of the pedestrian images and the pedestrian area corresponding thereto;

[0008] applying a shortest path algorithm to the pedestrian trajectory graph to identify a shortest path trajectory;

[0009] detecting a non-standing posture for the shortest path trajectory to obtain a detection result, wherein the detection result represents whether a pedestrian in the pedestrian video has a non-standing posture.

[0010] A non-standing posture detection device, comprising:

[0011] an obtaining module configured to obtain a pedestrian video and a three-dimensional model associated with the pedestrian video, and perform frame processing on the pedestrian video to obtain a plurality of pedestrian images;

[0012] detecting a pedestrian region in each of the pedestrian images to obtain a pedestrian region corresponding to each of the pedestrian images;

[0013] constructing a pedestrian trajectory graph in the three-dimensional model according to each of the pedestrian images and the pedestrian region corresponding thereto;

[0014] recognizing a shortest path trajectory in the pedestrian trajectory graph by using a shortest path algorithm;

[0015] outputting a detection result by detecting a non-standing posture in the shortest path trajectory; the detection result represents whether a non-standing posture exists in the pedestrian video.

[0016] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the non-standing posture detection method when executing the computer program.

[0017] A computer readable storage medium stores a computer program, and the computer program implements the steps of the non-standing posture detection method when executed by a processor.

[0018] The non-standing posture detection method, device, computer device, and storage medium provided by the present application obtain a pedestrian video and a three-dimensional model associated with the pedestrian video, perform frame processing on the pedestrian video to obtain a plurality of pedestrian images, detect a pedestrian region in each of the pedestrian images to obtain a pedestrian region corresponding to each of the pedestrian images, construct a pedestrian trajectory graph in the three-dimensional model according to each of the pedestrian images and the pedestrian region corresponding thereto, recognize a shortest path trajectory in the pedestrian trajectory graph by using a shortest path algorithm, and output a detection result by detecting a non-standing posture in the shortest path trajectory. The detection result represents whether a non-standing posture exists in the pedestrian video. Thus, the present application divides pedestrian images in a pedestrian video by frame processing, automatically detects a pedestrian region in a pedestrian image, outputs the pedestrian region, constructs a pedestrian trajectory graph based on each pedestrian region, and automatically detects a detection result of whether a non-standing posture exists in a pedestrian video by using a shortest path algorithm. In this way, the present application accurately, scientifically, and automatically detects a segment in which a non-standing posture exists in a pedestrian video without manual recognition, reduces labor costs, and improves the accuracy and efficiency of non-standing posture detection. BRIEF DESCRIPTION OF DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the description of the embodiments of the present application. Obviously, the drawings described in the following description are only some embodiments of the present application, and all other drawings obtained by those of ordinary skill in the art based on the drawings without creative labor should also be within the protection scope of the present application.

[0020] Figure 1 is a schematic diagram of an application environment of a non-standing posture detection method in an embodiment of the present application;

[0021] Figure 2 is a flowchart of a non-standing posture detection method in an embodiment of the present application;

[0022] Figure 3 is a flowchart of step S30 of a non-standing posture detection method in an embodiment of the present application;

[0023] Figure 4 is a flowchart of step S50 of a non-standing posture detection method in an embodiment of the present application;

[0024] Figure 5 is a schematic diagram of the relationship between the coordinates of the ground and the imaging plane in an embodiment of the present application;

[0025] Figure 6 is a schematic diagram of generating a pedestrian base map in an embodiment of the present application;

[0026] Figure 7 is a schematic diagram of cross-point connection in an embodiment of the present application;

[0027] Figure 8 is a principle block diagram of a non-standing posture detection device in an embodiment of the present application;

[0028] Figure 9 is a schematic diagram of a computer device in an embodiment of the present application. DETAILED DESCRIPTION

[0029] The technical solutions in the embodiments of the present application will be described clearly and completely in the following with reference to the drawings of the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, and not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor should also be within the protection scope of the present application.

[0030] The non-standing posture detection method provided by the present application can be applied in, for example, Figure 1The application environment is a client-server application environment, in which a client (computer device or terminal) communicates with a server through a network. The client (computer device or terminal) includes, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices. The server can be implemented by an independent server or a server cluster composed of multiple servers.

[0031] In an embodiment, as shown in FIG. 1, a non-standing posture detection method is provided, and the technical scheme mainly includes the following steps S10-S50. Figure 2

[0032] S10, acquiring a pedestrian video and a three-dimensional model associated with the pedestrian video, and performing frame processing on the pedestrian video to obtain a plurality of pedestrian images.

[0033] Understandably, the pedestrian video is a video of multiple human bodies walking, which is captured by a video capture device identified by a device identifier. One pedestrian video is associated with one device identifier. The device identifier is a unique identifier for defining a video capture device. One device identifier is associated with one three-dimensional model. The three-dimensional model is a three-dimensional coordinate system constructed according to the internal and external parameters of the associated device identifier and the ground parameters. The internal and external parameters include the mapping relationship between the shooting angle parameters, imaging internal parameters and imaging external parameters of the video capture device corresponding to the device identifier, etc. The ground parameters include the parameters related to the ground captured by the video capture device corresponding to the device identifier, such as the distance between the ground and the video capture device.

[0034] The frame processing process of the pedestrian video is an operation process of segmenting or extracting an image from each frame of the input video. The frame processing of the pedestrian video can obtain a plurality of pedestrian images. The pedestrian image is each frame of the pedestrian video, that is, the pedestrian image contains multiple human bodies.

[0035] S20, performing pedestrian region detection on each pedestrian image to obtain a pedestrian region corresponding to each pedestrian image.

[0036] ​Understandably, the process of pedestrian region detection can be implemented by a pedestrian region detection model, the pedestrian region detection model comprising a head detection network and a body detection network, the pedestrian region detection comprising head detection and body detection, the process of head detection can be implemented by a trained head detection network, the network structure of the head detection network can be set according to requirements, such as the network structure of the head detection network can be Faster R-CNN, SSD and YOLO network structure, etc., the head feature of the input pedestrian image is extracted by the head detection network, the head region is positioned according to the extracted head feature, the positioned head region is classified, it is judged whether the region is a head, the region containing the head is identified and determined as a head region, the head feature is a feature related to the head of the human body, such as hair, eyes, nose, mouth, eyebrow, face, etc., the process of body detection can be implemented by a trained body detection network, the network structure of the body detection network can be set according to requirements, such as the network structure of the body detection network can be Faster R-CNN, SSD and YOLO network structure, etc., the body feature of the input pedestrian image is extracted by the body detection network, the body region is positioned according to the extracted body feature, the positioned body region is classified, it is judged whether the region is a body, the region containing the body is identified and determined as a body region, the body feature is a feature related to the part of the human body, such as head, hair, hand, face, torso, clothes, leg, foot, etc., which can reflect the features of a human body, the identified head region and body region are determined as the pedestrian region, that is, the pedestrian region comprises the head region and the body region, a head region corresponds to a body region, and the head region and the body region overlap (completely or partially).

[0037] In an embodiment, the step S20, i.e., the pedestrian region detection of each pedestrian image, obtains a pedestrian region corresponding to each pedestrian image.

[0038] Each pedestrian image is detected by a head detection network to obtain a head region corresponding to each pedestrian image.

[0039] Understandably, the human head detection network is a neural network for detecting a region with human head features in an input image, and a network structure of the human head detection network can be set according to requirements, such as the network structure of the human head detection network can be a Faster R-CNN, an SSD, a CenterNet and a YOLO network structure, and preferentially, the network structure of the human head detection network is a network structure of the CenterNet, because the network structure of the CenterNet can accurately locate the position of the human head. A training process of the human head detection network is as follows: inputting a human head sample image containing a human head labeled region, generating 1K-2K candidate regions for the human head sample image, using a convolution layer to extract human head features for each candidate region, sending the extracted human head features into a human head classifier to determine whether the candidate region contains a human head, using a regressor to finely correct the candidate frame position, finally identifying a region containing a human head in the human head sample image, calculating a loss value between the region and the human head labeled region, iteratively updating parameters of the human head detection network according to the loss value, until the loss value reaches a convergence condition, thereby stopping the training process. The human head features are features related to the head of the human body, such as hair, eyes, nose, mouth, eyebrows, face and the like. The human head detection process is as follows: extracting the human head features of the input pedestrian image through the human head detection network, locating the human head region according to the extracted human head features, classifying the located human head region, determining whether the region is a human head, identifying the region containing the human head as the human head region. The human head region is a rectangular region of the head of the human in the pedestrian image.

[0040] Each pedestrian image is detected by the human body detection network to obtain a human body region corresponding to each pedestrian image.

[0041] Understandably, the human body detection network is a neural network for detecting a region with human body features in an input image, and the network structure of the human body detection network can be set according to requirements, such as the network structure of the human body detection network can be network structures such as Faster R-CNN, SSD, CenterNet and YOLO, preferably, the network structure of the human body detection network is the network structure of YOLO V3, because the network structure of YOLO V3 can quickly locate the position of the human body from different scales, the training process of the human body detection network is to input a human body sample image containing a human body labeled region, perform human body feature extraction (convolution) on the human body sample image, obtain a small-scale feature map according to the extracted human body features, perform upsampling and tensor splicing on the small-scale feature map to obtain a medium-scale feature map, then perform upsampling and tensor splicing on the medium-scale feature map to obtain a large-scale feature map, then perform multi-scale detection on the small-scale, medium-scale and large-scale feature maps to predict a rectangular region of a human body with human body features, calculate the loss value between the region and the human body labeled region, and iteratively update the parameters of the human body detection network according to the loss value until the loss value reaches the convergence condition, thereby stopping the training process, wherein the small scale, the medium scale and the large scale can be 1 / 32 scale, 1 / 16 scale and 1 / 8 scale relative to the size of the pedestrian image, and more fine-grained human body features can be detected through feature maps of different scales, the upsampling is the reverse propagation of convolution, that is, the deconvolution or the transpose of the forward propagation, the tensor splicing is a splicing process of the intermediate layer in the convolution process and the upsampling result of the adjacent next layer, the human body features are features related to the parts of the human body, such as head, hair, hand, face, torso, clothes, leg, foot, etc. which can reflect the features of a human body, and the human body detection process is to extract human body features from the input pedestrian image through the human body detection network, predict the human body region according to the extracted human body features, and predict a rectangular region containing a human body, which is determined as the human body region, the human body region is a rectangular region of a human body in the pedestrian image.

[0042] The human head region and the human body region corresponding to the same pedestrian image are recorded as the pedestrian region corresponding to the pedestrian image.

[0043] Understandably, the human head region and the human body region corresponding to the same pedestrian image are determined as the pedestrian region corresponding to the pedestrian image, and the human body region and the human head region partially overlap.

[0044] The application realizes head detection of each pedestrian image through a head detection network to obtain a head region corresponding to each pedestrian image; realizes body detection of each pedestrian image through a body detection network to obtain a body region corresponding to each pedestrian image; and records the head region and the body region corresponding to the same pedestrian image as the pedestrian region corresponding to the pedestrian image. In this way, the head detection through the head detection network and the body detection through the body detection network are realized, the head region and the body region in the input pedestrian image are automatically identified, manual identification is not needed, costs are saved, accurate data basis is quickly provided for subsequent construction of a pedestrian trajectory graph, and the accuracy and efficiency of non-standing posture detection are improved.

[0045] S30, constructing a pedestrian trajectory graph in the three-dimensional model according to each pedestrian image and the pedestrian region corresponding thereto.

[0046] Understandably, the process of constructing in the three-dimensional model is as follows: first, height prediction is performed on the body region in the pedestrian image, the input pedestrian image and the framed body region can be subjected to height prediction through a trained height prediction model, and a predicted height value corresponding to each pedestrian image can be predicted; second, clustering processing is performed on all the predicted height values, and a pedestrian height value in the pedestrian image can be determined; and finally, according to the pedestrian height value, each head region and each body region, a back projection ray algorithm is used to calculate a head trajectory point of each head region and a body trajectory point of each body region, and a pedestrian trajectory graph is constructed in the three-dimensional model according to all the head trajectory points and the body trajectory points, the pedestrian trajectory graph being a collection of route trajectories of the head and the body of the pedestrian in the three-dimensional model.

[0047] In an embodiment, as shown in Figure 3 The step S30, i.e., constructing a pedestrian trajectory graph in the three-dimensional model according to each pedestrian image and the pedestrian region corresponding thereto, includes:

[0048] S301, performing height prediction on the body region in each pedestrian image and the pedestrian region corresponding thereto to obtain a predicted height value corresponding to each pedestrian image.

[0049] It can be understood that the process of predicting the height of the human body area in the pedestrian image can be achieved through a height prediction model. The height prediction model can be a trained deep learning model. The training process of the height prediction model is to collect height image samples. The height image samples are historically collected images of a single human body standing on the ground corresponding to the ground parameters taken by the video acquisition device. A height image sample containing a human body area is associated with a human body position label and a height label. The deep learning model contains initial parameters. The input height image sample is used to locate the pedestrian position and extract the height feature. The height of the pedestrian in the human body area is predicted based on the located pedestrian position and the extracted height feature. The height feature is the ratio feature of the shoulder width and vertical height of the pedestrian in the pedestrian image. The prediction process is to map the height value based on the distance of the located pedestrian relative to the video acquisition device and the combined function between the height features. The method comprises the following steps: calculating the difference between the human body position label and the located pedestrian position to obtain a first loss value, and calculating the difference between the height label and the predicted height value to obtain a second loss value. The first loss value and the second loss value are weightedly summed to obtain a total loss value. When it is detected that the total loss value has not reached the convergence condition, the initial parameters of the deep learning model are iteratively updated, and the steps of locating the pedestrian position and extracting the height features of the pedestrian image and the human body area are performed. The method is looped until the total loss value reaches the convergence condition, and the training is stopped. The deep learning model after convergence is recorded as a height prediction model. The height prediction process is to locate the pedestrian position and extract the height features of the input pedestrian image and the human body area through the trained height prediction model, and predict the corresponding height value based on the located pedestrian position and the extracted height features. The predicted height value is recorded as the predicted height value, which represents the estimated height value of the pedestrian in the input pedestrian image.

[0050] In which, the height prediction model can also be a projection calculation model constructed based on a three-dimensional model. The height prediction process is to calculate the vertical distance between the human body area and the pedestrian image, and obtain a first vertical distance between the human body area and the upper frame of the pedestrian image, and a second vertical distance between the human body area and the lower frame of the pedestrian image. Based on the first vertical distance and the second vertical distance, the distance of the pedestrian projection can be mapped in the coordinate axis of the ground parameter, that is, the horizontal distance of the shooting with the ground as the horizontal coordinate in the ground parameter minus the sum of the horizontal distance mapped by the first vertical distance and the horizontal distance mapped by the second vertical distance. Based on the first distance, the standing coordinates of the pedestrian's horizontal coordinate in the ground parameter can be located. Using a back-projection ray algorithm, the plane formed by the back-projection ray of the horizontal distance mapped by the first vertical distance in the three-dimensional model intersects with the plane of the vertical line of the standing coordinate relative to the ground to form an intersection segment. The vertical height of the intersection segment occupied by the vertical line can be calculated, so that the vertical height can be recorded as the pedestrian's height prediction process. Through this height prediction method, an estimated height value of the pedestrian in each pedestrian image input into the height prediction model can be output.

[0051] The back-projection ray algorithm is an algorithm for obtaining corresponding pixel points in an image (also called an imaging plane or picture) by back-projecting rays of each point on the ground in the real ground parameters captured by a video acquisition device (e.g., a camera). Figure 5 As shown, for example: a pixel point on the imaging plane (such as the vertex of a human head) is projected onto the top of a real human head and projected onto a coordinate point on the ground. The projection line formed by the three points is also the back-projection ray of the coordinate point on the ground. The back-projection ray of each coordinate point can be used to establish a mapping relationship with each pixel point on the imaging plane. The back-projection ray algorithm can be used to conveniently calculate the mapping relationship between the coordinate point of the ground in the ground parameters and the imaged image, and the back-projection ray of each coordinate point can also be depicted in the three-dimensional model, that is, the connecting line between the coordinate point of the ground in the three-dimensional model and the coordinate position of the video acquisition device.

[0052] S302: Perform clustering processing on all the predicted height values ​​to obtain pedestrian height values.

[0053] It can be understood that all the predicted height values ​​are formed into a one-dimensional array, and the clustering processing is performed on the one-dimensional array. The clustering processing can be set according to needs. For example, the clustering processing can be a process of removing the minimum value from the one-dimensional array and taking the average, and recording the average as the pedestrian height value. It can also be a process of clustering the one-dimensional array using the K-means clustering algorithm to determine the height value of a new person. The pedestrian height value is the one that best reflects the true height of the pedestrian in the pedestrian video.

[0054] The K-means clustering algorithm is to randomly select K points in a one-dimensional array, the K points representing the center points of K clusters, then calculate the distance between each predicted height value in the one-dimensional array and the K center points, divide a predicted height value into the cluster corresponding to the nearest center point, and finally, for the just generated classified clusters, recalculate the center points of the clusters until a suitable result of K center points is obtained. The processing procedure of using the K-means clustering algorithm to cluster the one-dimensional array to determine a new person height value is as follows: first, determine the number of K according to the total number of predicted height values in the one-dimensional array, for example, the number of K is the total number of predicted height values divided by N and rounded, for example, the total number of predicted height values is 16, and N is 5, then K is 3; second, use the K-means clustering algorithm to output K values in the one-dimensional array; and finally, perform mean value processing or mean value processing after removing the minimum value on the K values to obtain a mean value, and record the mean value as the pedestrian height value. In this way, the predicted height values output in the case that the pedestrian in the pedestrian image is blocked or the pedestrian is bending can be filtered, and the real height of the pedestrian can be accurately determined from all predicted height values, avoiding the influence of the case that the pedestrian is blocked or the pedestrian is bending.

[0055] S303, constructing a pedestrian trajectory graph in the three-dimensional model according to the pedestrian height value, each head region and each body region.

[0056] Understandably, the process of constructing the pedestrian trajectory graph in the three-dimensional model is as follows: first, using a back projection ray algorithm, determining head trajectory points corresponding to each head region in the three-dimensional model according to the pedestrian height value, each head region and a ground parameter in the three-dimensional model, second, using the back projection ray algorithm, determining body trajectory points corresponding to each body region in the three-dimensional model according to each body region and the ground parameter, and finally, constructing the pedestrian trajectory graph based on all the head trajectory points and the body trajectory points, the pedestrian trajectory graph embodying a set of possible trajectories of the pedestrian.

[0057] The back projection ray algorithm is an algorithm for imaging the corresponding pixel points in the image through the back projection rays of each point on the ground in the real ground parameter. Through the back projection ray algorithm, the mapping relationship between the coordinate points of the ground in the ground parameter and the imaged image can be calculated, and the back projection rays of each coordinate point can also be depicted in the three-dimensional model, that is, the connecting lines between the coordinate points of the ground in the three-dimensional model and the coordinate positions of the video acquisition device.

[0058] The application realizes height prediction on the human body region in each pedestrian image and the pedestrian region corresponding thereto, obtains the predicted height value corresponding to each pedestrian image, performs clustering processing on all the predicted height values, obtains the pedestrian height value, and constructs a pedestrian trajectory graph in the three-dimensional model according to the pedestrian height value, each head region and each human body region, so that the height of the pedestrian in the pedestrian image is automatically identified and predicted, the predicted height value in each pedestrian image is obtained, the pedestrian height value is scientifically predicted through clustering processing, and the pedestrian trajectory graph is automatically constructed based on the pedestrian height value, all head regions and all human body regions, thereby improving the completeness, accuracy and correctness of the pedestrian trajectory graph output.

[0059] In an embodiment, the constructing a pedestrian trajectory graph in the three-dimensional model according to the pedestrian height value, each head region and each human body region comprises:

[0060] The back projection ray algorithm is used to determine the head trajectory point corresponding to each head region in the three-dimensional model according to the pedestrian height value, each head region and the ground parameter in the three-dimensional model.

[0061] As can be understood, the pixel coordinates of the middle point of the top edge (close to the upper edge frame of the pedestrian image) of the top edge are extracted, the middle point of the top edge is used as the pixel point of the pedestrian image imaged by the back projection ray of the point on the ground in the real ground parameter by using the back projection ray algorithm, the coordinate position of the middle point of the top edge projected into the ground parameter in the three-dimensional model can be determined, as shown in Figure 5 Accordingly, the back projection ray in the three-dimensional model can be formed by the coordinate position and the coordinate position of the video acquisition device, the line segment perpendicular to the ground in the ground parameter and the pedestrian height value is projected to the coordinate position of the middle point of the top edge in the ground parameter in the three-dimensional model, until the back projection ray, the line segment of the pedestrian height value and the ground of the ground parameter just enclose a closed triangle, the three-dimensional coordinates of the intersection of the line segment of the pedestrian height value and the back projection ray are recorded as the head coordinates of the pedestrian, and the standing coordinates of the head coordinates on the ground of the ground parameter are recorded as the head trajectory point corresponding to the head region, for example: the coordinate position of the middle point of the top edge projected into the ground parameter in the three-dimensional model is (1000, 800, 0) cm, the included angle between the back projection ray of the coordinate position and the ground of the ground parameter is 30 degrees, and the pedestrian height is 170 cm, so that the pedestrian height is just away from the vertical coordinate of the coordinate position When the three points form a closed triangle, the coordinates of the head of the person are determined as (1000, 800-240=560, 170) cm, and the head trajectory point of the person is (1000, 560) cm.

[0062] The back projection ray algorithm is an algorithm for corresponding pixel points in an image formed by back projection rays of each point on the ground in the real ground parameter photographed by the video acquisition device. The back projection ray algorithm can be used to conveniently calculate the mapping relationship between the coordinate points of the ground in the ground parameter and the imaged image, and can also be used to depict the back projection rays of each coordinate point in the three-dimensional model, i.e., the connecting lines between the coordinate points of the ground and the coordinate position of the video acquisition device in the three-dimensional model.

[0063] The back projection ray algorithm is used to determine the human trajectory points corresponding to each human body region in the three-dimensional model according to each human body region and the ground parameter.

[0064] It can be understood that the pixel coordinates of the middle point of the bottom edge (close to the lower edge frame of the pedestrian image) in the human body region are extracted, the back projection ray algorithm is used, and the middle point of the bottom edge is taken as a pixel point of the pedestrian image imaged by the back projection rays of the points on the ground in the real ground parameter. The coordinate position of the middle point of the bottom edge projected into the ground parameter in the three-dimensional model can be determined. Correspondingly, the back projection ray in the three-dimensional model can be formed by the coordinate position and the coordinate position of the video acquisition device, and the standing coordinate of the coordinate position standing on the ground in the ground parameter is recorded as the human trajectory point corresponding to the human body region, for example, the coordinate position of the middle point of the bottom edge projected into the ground parameter in the three-dimensional model is (950, 600, 0) cm, and the coordinate position of the determined human trajectory point is (950, 600) cm.

[0065] The back projection ray algorithm is an algorithm for corresponding pixel points in an image formed by back projection rays of each point on the ground in the real ground parameter photographed by the video acquisition device. The back projection ray algorithm can be used to conveniently calculate the mapping relationship between the coordinate points of the ground in the ground parameter and the imaged image, and can also be used to depict the back projection rays of each coordinate point in the three-dimensional model, i.e., the connecting lines between the coordinate points of the ground and the coordinate position of the video acquisition device in the three-dimensional model.

[0066] The pedestrian trajectory graph is constructed based on all the head trajectory points and the human trajectory points.

[0067] Understandably, one of the pedestrian images corresponds to a timestamp, one of the pedestrian images corresponds to one of the head regions and one of the body regions, one of the head regions corresponds to one of the head trajectory points, and one of the body regions corresponds to one of the body trajectory points, so that one of the head trajectory points corresponds to one of the timestamps, and one of the body trajectory points corresponds to one of the timestamps, that is, the head trajectory points and the body trajectory points both contain timestamps on the same time axis, and the timestamps are the time points at which the pedestrian images are taken, and the construction process is as follows: first, all the head trajectory points and the body trajectory points are associated with timestamps, all the head trajectory points and the body trajectory points are plotted in a coordinate graph based on the ground parameters, the Euclidean distance between the head trajectory points and the body trajectory points with the same timestamp is calculated, and it is determined whether the Euclidean distance is less than a preset distance threshold, if the Euclidean distance is less than the preset distance threshold, the head trajectory point and the body trajectory point are determined as a reliable point pair (such as the reliable point pair shown in Figure 6 Secondly, the plotted head trajectory points / body trajectory points are connected in pairs according to the time sequence order of the timestamps, and the connection process has directionality, that is, the head trajectory points / body trajectory points in the time sequence first are connected to the head trajectory points / body trajectory points in the time sequence later, to obtain the pedestrian base graph shown in Figure 6 Finally, according to a preset rule, such as when the head trajectory points / body trajectory points are directionally connected to other head trajectory points or body trajectory points within a preset range, the connection of the head trajectory points or the body trajectory points after the timestamp of the reliable point pair cannot be crossed, that is, the connection of the head trajectory points or the body trajectory points after the timestamp of the reliable point pair is removed or cut off, as shown in Figure 7 , wherein the preset range can be a preset circular range or a preset rectangular range, which is not limited here, and preferably, the preset range is a circular range with a preset radius R, so that the connected pedestrian base graph is recorded as the pedestrian trajectory graph, and the pedestrian trajectory graph represents a trajectory set that the pedestrian may walk.

[0068] The present application realizes the determination of the head trajectory points corresponding to each head region in the three-dimensional model according to the pedestrian height value, each head region and the ground parameter in the three-dimensional model by using the back projection ray algorithm, the determination of the body trajectory points corresponding to each body region in the three-dimensional model according to each body region and the ground parameter by using the back projection ray algorithm, and the construction of the pedestrian trajectory graph based on all the head trajectory points and the body trajectory points, so that the head trajectory points and the body trajectory points can be accurately determined by using the back projection ray algorithm, and the pedestrian trajectory graph of the trajectory set that the pedestrian may walk is automatically constructed, thereby improving the completeness, accuracy and correctness of the output of the pedestrian trajectory graph.

[0069] In an embodiment, the constructing the pedestrian trajectory graph based on all the head trajectory points and the body trajectory points comprises:

[0070] According to the head trajectory points and the body trajectory points of the same timestamp, a reliable point pair is determined; the head trajectory points and the body trajectory points both contain the timestamp on the same time axis.

[0071] Understandably, the process of determining the reliable point pair according to the head trajectory points and the body trajectory points of the same timestamp is: associating all the head trajectory points and the body trajectory points, for example, the coordinate position of the head trajectory point is (1000, 560), the corresponding timestamp is 09:00, the coordinate position of the body trajectory point is (950, 600), and the corresponding timestamp is 09:00, then the head trajectory point is (1000, 560)-09:00, the body trajectory point is (950, 600)-09:00, all the head trajectory points and the body trajectory points are plotted in a coordinate graph based on the ground parameters, the Euclidean distance between the plotted coordinates of the head trajectory points and the plotted coordinates of the body trajectory points under the same timestamp is calculated in the coordinate graph after plotting, when the distance is less than a preset distance threshold, the head trajectory point and the body trajectory point are determined as a reliable point pair, the reliable point pair represents two trajectory points with high head trajectory point and body trajectory point confidence, which indicates that the reliable point can accurately represent the standing position of the pedestrian, and one reliable point pair contains one head trajectory point and one body trajectory point.

[0072] Wherein, the preset distance threshold can be set according to requirements, such as 5cm, 10cm, etc., and the calculation method of the Euclidean distance is to calculate the shortest distance between two points in two-dimensional space by using the Euclidean distance algorithm, and the Euclidean distance between two points a(x1, y1) and b(x2, y2) in two-dimensional space is:

[0073]

[0074] Wherein, L is the Euclidean distance between point a and point b; x1 is the horizontal coordinate value of point a; x2 is the horizontal coordinate value of point b; y1 is the vertical coordinate value of point a; and y2 is the vertical coordinate value of point b.

[0075] All the head trajectory points are connected in pairs according to the timestamp sequence, and all the body trajectory points are connected in pairs according to the timestamp sequence, to obtain a pedestrian base graph.

[0076] Understandably, two adjacent head trajectory points are connected in time sequence of timestamps, and two adjacent body trajectory points are also connected in time sequence of timestamps, that is, from the head trajectory point / body trajectory point with earlier timestamp to the head trajectory point / body trajectory point with later timestamp, and after all the head trajectory points and body trajectory points are connected, the connected coordinate graph is recorded as the pedestrian base graph.

[0077] The pedestrian base graph is cross-point connected based on the reliable point pair, and the pedestrian trajectory graph is obtained.

[0078] Understandably, a preset first rule and a preset second rule are obtained, the preset first rule is associated with a preset cross-frame radius, and the preset second rule is associated with a preset cross-trajectory radius, the preset cross-frame radius and the cross-trajectory radius can be the same or different, the cross-point connection includes cross-frame connection of the pedestrian base graph according to the preset first rule and cross-trajectory connection of the pedestrian base graph according to the preset second rule, the preset first rule can be a rule that, taking any head trajectory point / body trajectory point as the center, drawing a circular region with the preset cross-frame radius as the radius, connecting the center to the head trajectory point / body trajectory point on the same trajectory as the center in the circular region, and removing or discarding the connection edge of the reliable point pair to the later head trajectory point / body trajectory point in the circular region, and the preset second rule can be a rule that, taking a head trajectory point / body trajectory point as the center, drawing a circular region with the preset cross-trajectory radius as the radius, connecting the center to the body trajectory point on the corresponding body trajectory or the head trajectory point on the head trajectory in the circular region, and removing or discarding the connection edge of the reliable point pair to the later body trajectory point / head trajectory point in the circular region, and the pedestrian base graph after cross-frame connection and cross-trajectory connection is recorded as the pedestrian trajectory graph, and the pedestrian trajectory graph reflects a trajectory set that the pedestrian can walk.

[0079] The present application realizes that the reliable point pair is determined according to the head trajectory point and the body trajectory point with the same timestamp, all the head trajectory points are connected in time sequence, all the body trajectory points are connected in time sequence, the pedestrian base graph is obtained, the pedestrian trajectory graph is obtained by cross-point connection of the pedestrian base graph based on the reliable point pair, thus, the reliable point pair can be automatically identified, the trajectory that the pedestrian can walk is automatically connected by cross-point connection, and the pedestrian trajectory graph is output, without manual identification and connection, so that the artificial cost is reduced, and the integrity, accuracy and correctness of the pedestrian trajectory graph output are improved.

[0080] In an embodiment, the cross-point connection of the pedestrian base graph based on all the reliable point pairs, the cross-frame mechanism and the cross-track mechanism obtains the pedestrian track graph, including:

[0081] Based on the reliable point pairs and a preset first rule, the cross-frame connection of each head track point or each body track point in the same track obtains a plurality of cross-frame edges.

[0082] Understandably, the preset first rule is that a head track point / body track point is taken as the center, a circular area with a preset cross-frame radius as the radius is drawn, there are head track points / body track points other than the center in the circular area, the center is connected to the head track points / body track points other than the center and after the timestamp of the center, if there are reliable point pairs in the head track points / body track points other than the center, the connection edges of the head track points / body track points after the timestamp corresponding to the reliable point pairs are removed or discarded, only the connection edges of the head track points / body track points before the timestamp corresponding to the reliable point pairs are reserved, the cross-frame connection of the track points in the same track is the process of connecting only the head track points or the body track points in the same track in the pedestrian base graph by using the cross-frame mechanism to obtain a plurality of cross-frame edges, the cross-frame edge is the connection edge between the head track points or the body track points in the same track satisfying the cross-frame mechanism, the length of the cross-frame edge is the Euclidean distance between the two head track points / body track points, and the same track can be understood as the track formed by all the head track points or the track formed by all the body track points.

[0083] Among them, the preset cross-frame radius can be set according to requirements, such as 100 cm, 200 cm, etc.

[0084] Based on the reliable point pairs and a preset second rule, the cross-track connection of each head track point or each body track point obtains a plurality of cross-track edges.

[0085] Understandably, the preset second rule is that a person head trajectory point / person body trajectory point is taken as a center, a circle area is drawn according to a preset cross-trajectory radius, there are person body trajectory points / person head trajectory points except the center in the circle area, the center and the person body trajectory points / person head trajectory points except the center are connected, if reliable point pairs of the person body trajectory points / person head trajectory points except the center are detected, the connecting edges of the person body trajectory points / person head trajectory points after the time stamp corresponding to the reliable point pairs are removed or discarded, only the connecting edges of the person body trajectory points / person head trajectory points before and after the time stamp corresponding to the reliable point pairs and the center are reserved, the cross-trajectory mechanism is applied to the connection of the head trajectory point / body trajectory point of one trajectory to the body trajectory point / head trajectory point of another trajectory, the cross-trajectory connection is the process of connecting the head trajectory points and the body trajectory points between different trajectories in the pedestrian basic graph to obtain a plurality of cross-trajectory edges by using the cross-trajectory mechanism, and the cross-trajectory edge is the connecting edge between the head trajectory points and the body trajectory points in different trajectories that meet the cross-frame mechanism, and the length of the cross-trajectory edge is the Euclidean distance between the head trajectory points and the body trajectory points.

[0086] The preset cross-trajectory radius can be set according to requirements, such as 300 cm, 400 cm, etc.

[0087] The pedestrian basic graph, all the cross-frame edges and all the cross-trajectory edges are constructed into the pedestrian trajectory graph.

[0088] Understandably, all the cross-frame edges and all the cross-trajectory edges are embodied in the pedestrian basic graph to obtain the pedestrian trajectory graph, and the pedestrian trajectory graph embodies a trajectory set that a pedestrian can walk.

[0089] The present application realizes that the head trajectory points or the body trajectory points are connected in the same trajectory based on the reliable point pairs and the preset first rule to obtain a plurality of cross-frame edges, the head trajectory points or the body trajectory points are connected across trajectories based on the reliable point pairs and the preset second rule to obtain a plurality of cross-trajectory edges, and the pedestrian basic graph, all the cross-frame edges and all the cross-trajectory edges are constructed into the pedestrian trajectory graph, so that the cross-frame mechanism and the cross-trajectory mechanism are used to automatically connect the cross-frame edges and the cross-trajectory edges that a pedestrian can move, and a pedestrian trajectory graph of a trajectory set that a pedestrian can move is constructed, without manual connection and judgment of the possible moving trajectories, so that the completeness, accuracy and correctness of the pedestrian trajectory graph output are improved.

[0090] S40, a shortest path algorithm is used to identify the shortest path of the pedestrian trajectory graph to obtain a shortest path trajectory.

[0091] Understandably, the shortest path algorithm is an algorithm for seeking a path with the minimum sum of edge lengths in an input pedestrian trajectory graph, and the shortest path identification process is as follows: taking the earliest time-stamped head trajectory point in the pedestrian trajectory graph as the starting point, moving according to the edge length of each directional connection edge, and calculating the minimum sum of edge lengths through various combinations of edge lengths to identify the path that passes through the value, and recording the trajectory formed by the head trajectory points or body trajectory points moved by the value as the shortest path trajectory.

[0092] S50, performing non-standing posture detection on the shortest path trajectory to obtain a detection result; the detection result represents whether the pedestrian in the pedestrian video has a non-standing posture.

[0093] Understandably, the non-standing posture detection is as follows: first, performing body trajectory point segmentation processing on the shortest path trajectory to obtain a plurality of body trajectory segments, then, performing number statistics on each body trajectory segment to count the number of body trajectory points of each body trajectory segment, if the number of body trajectory points is greater than a preset threshold, determining the body trajectory segment corresponding to the number of body trajectory points as a non-standing posture trajectory, and finally, outputting the detection result of the pedestrian video according to all the non-standing posture trajectories, the detection result representing whether the pedestrian in the pedestrian video has a non-standing posture, in a large number of pedestrian videos, performing non-standing posture detection on each pedestrian video to obtain the detection result of each pedestrian video, removing or deleting the pedestrian video with a non-standing posture detection result, so as to extract the pedestrian video with a standing posture from a large number of pedestrian videos, and automatically obtain the pedestrian video with a standing posture without manual identification and extraction.

[0094] The application realizes the following technical effects: a pedestrian video and a three-dimensional model associated with the pedestrian video are acquired, and the pedestrian video is subjected to frame-by-frame processing to obtain a plurality of pedestrian images; pedestrian region detection is performed on each pedestrian image to obtain a pedestrian region corresponding to each pedestrian image; a pedestrian trajectory graph is constructed in the three-dimensional model according to each pedestrian image and the pedestrian region corresponding thereto; a shortest path algorithm is used to perform shortest path identification on the pedestrian trajectory graph to obtain a shortest path trajectory; non-standing posture detection is performed on the shortest path trajectory to obtain a detection result; the detection result represents whether a non-standing posture exists in the pedestrian video, and therefore, the application realizes the following technical effects: the pedestrian images in the pedestrian video are divided by frame-by-frame processing, the pedestrian images are automatically subjected to pedestrian region detection, the pedestrian regions are output, the pedestrian trajectory graph is constructed based on each pedestrian region, and the detection result of whether a non-standing posture exists in the pedestrian video is automatically detected by using the shortest path algorithm, so that the pedestrian video is accurately, scientifically and automatically detected to determine whether a non-standing posture exists in the pedestrian video, manual identification is not required, the labor cost is reduced, and the accuracy and efficiency of non-standing posture detection are improved.

[0095] In an embodiment, as shown in FIG. 5, the step S50, i.e., the non-standing posture detection on the shortest path trajectory to obtain a detection result, includes the following steps. Figure 4

[0096] S501, the shortest path trajectory is subjected to human trajectory point segmentation processing to obtain a plurality of human trajectory segments.

[0097] Understandably, the segmentation processing is to divide a range in which the human trajectory points continuously appear in the shortest path trajectory, and record the divided range as a human trajectory segment, the human trajectory segment being a range between a human trajectory point adjacent to a head trajectory point in the shortest path trajectory and a human trajectory point closest to the head trajectory point.

[0098] S502, the number of each human trajectory segment is counted to obtain the number of human trajectory points in each human trajectory segment.

[0099] Understandably, the number of each human trajectory segment is counted, and the counting processing is a processing procedure for counting the number of human trajectory points in one human trajectory segment, so that the number of human trajectory points in each human trajectory segment can be counted, and the number of human trajectory points represents the sum of the number of human trajectory points in one human trajectory segment.

[0100] ​S503, when it is detected that the number of the human body track points is greater than the preset threshold, determining that the human body track segment corresponding to the number of the human body track points is a non-standing posture track.

[0101] It can be understood that whether each of the number of the human body track points is greater than the preset threshold can be set according to requirements, such as the preset threshold being 500, 600, etc., when it is detected that one of the number of the human body track points is greater than the preset threshold, the human body track segment corresponding to the number of the human body track points is identified as a non-standing posture track, in an embodiment, when it is detected that the number of the human body track points is less than or equal to the preset threshold, it is determined that the human body track segment corresponding to the number of the human body track points is a standing posture track, that is, the human body track segment corresponding to the number of the human body track points is identified as a standing posture track, so that whether each of the human body track segments is a non-standing posture track can be determined.

[0102] S504, determining the detection result according to all the non-standing posture tracks.

[0103] It can be understood that if any of the human body track segments is identified as a non-standing posture track, it is determined that the detection result of the pedestrian video is that there is a non-standing posture, which indicates that the pedestrian in the pedestrian video has a non-standing posture, if all the human body track segments are identified as standing posture tracks, it is determined that the detection result of the pedestrian video is that there is no non-standing posture, which indicates that the pedestrian in the pedestrian video has no non-standing posture.

[0104] The present application realizes that the shortest path track is segmented by human body track points to obtain a plurality of human body track segments, the number of human body track points of each of the human body track segments is counted, when it is detected that the number of the human body track points is greater than a preset threshold, it is determined that the human body track segment corresponding to the number of the human body track points is a non-standing posture track, the detection result is determined according to all the non-standing posture tracks, in this way, whether there is a non-standing posture in the shortest path track can be automatically detected by non-standing posture detection, and the detection result of whether there is a non-standing posture in the pedestrian video can be scientifically and accurately identified.

[0105] It should be understood that the size of the serial number of each step in the above embodiment does not mean the order of execution, the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.

[0106] In an embodiment, a non-standing posture detection device is provided, which corresponds to the non-standing posture detection method in the above embodiment. As shown in Figure 8As shown, the non-standing posture detection apparatus includes an acquisition module 11, a detection module 12, a construction module 13, an identification module 14 and an output module 15. The functions of each module are described in detail as follows:

[0107] The acquisition module 11 is configured to acquire a pedestrian video and a three-dimensional model associated with the pedestrian video, and perform frame processing on the pedestrian video to obtain a plurality of pedestrian images.

[0108] The detection module 12 is configured to perform pedestrian region detection on each pedestrian image to obtain a pedestrian region corresponding to each pedestrian image.

[0109] The construction module 13 is configured to construct a pedestrian trajectory graph in the three-dimensional model according to each pedestrian image and the pedestrian region corresponding thereto.

[0110] The identification module 14 is configured to perform shortest path identification on the pedestrian trajectory graph by using a shortest path algorithm to obtain a shortest path trajectory.

[0111] The output module 15 is configured to perform non-standing posture detection on the shortest path trajectory to obtain a detection result. The detection result represents whether a non-standing posture exists in the pedestrian video.

[0112] The specific limitations of the non-standing posture detection apparatus can be referred to the limitations of the non-standing posture detection method described above, which will not be repeated here. Each module in the non-standing posture detection apparatus described above can be realized by software, hardware and combinations thereof in whole or in part. Each module described above can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to call and execute the operations corresponding to each module by the processor.

[0113] In one embodiment, a computer device is provided, which can be a client or a server, and its internal structure can be as shown in Figure 9 The computer device includes a processor, a memory, a network interface and a database connected by a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a readable storage medium and an internal memory. The readable storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operating system and the computer program in the readable storage medium. The network interface of the computer device is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement a non-standing posture detection method.

[0114] In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the non-standing posture detection method in the above embodiments when executing the computer program.

[0115] In one embodiment, a computer readable storage medium is provided, which stores a computer program, wherein the computer program is executable on a processor to implement the non-standing posture detection method in the above embodiments.

[0116] It can be understood by those skilled in the art that all or part of the processes of the above-mentioned embodiments can be completed by a computer program instructing related hardware, and the computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. Any reference to memory, storage, database or other medium used in the embodiments of the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0117] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional units and modules is exemplified, and in actual application, the above functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the above-described functions.

[0118] The above-described embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit the present application; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

1. A non-standing posture detection method, characterized in that: include: Acquire a pedestrian video and a three-dimensional model associated with the pedestrian video, and perform frame processing on the pedestrian video to obtain multiple pedestrian images; Performing pedestrian region detection on each of the pedestrian images to obtain pedestrian regions corresponding to each of the pedestrian images; Constructing a pedestrian trajectory map in the three-dimensional model based on each of the pedestrian images and the pedestrian regions corresponding thereto; the pedestrian trajectory map is for predicting the height of the human body regions in the pedestrian images, and predicting the predicted height value corresponding to each of the pedestrian images; and determining a pedestrian height value of the pedestrian in the pedestrian image based on the predicted height value; According to the height value of the pedestrian, the corresponding head area and body area in each pedestrian area, a head trajectory point of each head area and a body trajectory point of each body area are calculated, and the obtained result is constructed based on all the head trajectory points and the body trajectory points; Using the shortest path algorithm, the shortest path is identified on the pedestrian trajectory graph to obtain the shortest path trajectory; A non-standing posture detection is performed on the shortest path trajectory to obtain a detection result; the detection result indicates whether the pedestrian in the pedestrian video has a non-standing posture.

2. The non-standing posture detection method according to claim 1, wherein: The performing pedestrian region detection on each of the pedestrian images to obtain pedestrian regions corresponding to each of the pedestrian images comprises: Performing head detection on each of the pedestrian images using a head detection network to obtain a head region corresponding to each of the pedestrian images; Performing human body detection on each of the pedestrian images through a human body detection network to obtain a human body region corresponding to each of the pedestrian images; The head region and the body region corresponding to the same pedestrian image are recorded as the pedestrian region corresponding to the pedestrian image.

3. The non-standing posture detection method according to claim 2, wherein: The step of constructing a pedestrian trajectory map in the three-dimensional model based on each of the pedestrian images and the pedestrian regions corresponding thereto includes: Performing height prediction on each of the pedestrian images and the human body region in the pedestrian region corresponding thereto to obtain a predicted height value corresponding to each of the pedestrian images; Performing clustering processing on all the predicted height values ​​to obtain the height value of the pedestrian; A pedestrian trajectory map is constructed in the three-dimensional model according to the pedestrian height value, each head area and each body area.

4. The non-standing posture detection method according to claim 3, wherein: The step of constructing a pedestrian trajectory map in the three-dimensional model according to the pedestrian height value, each head region, and each body region includes: Using a back-projection ray algorithm, based on the pedestrian's height, each head region, and ground parameters in the three-dimensional model, determine head trajectory points corresponding to each head region in the three-dimensional model; Using a back-projection ray algorithm, based on each of the human body regions and the ground parameters, determining human body trajectory points corresponding to each of the human body regions in the three-dimensional model; The pedestrian trajectory graph is constructed based on all the head trajectory points and the body trajectory points.

5. The non-standing posture detection method according to claim 4, wherein: The constructing the pedestrian trajectory graph based on all the head trajectory points and the body trajectory points includes: Determining a reliable point pair based on the head trajectory point and the body trajectory point with the same timestamp; wherein the head trajectory point and the body trajectory point both include a timestamp on the same time axis; Connecting all the head trajectory points in pairs according to the order of timestamps, and connecting all the body trajectory points in pairs according to the order of timestamps to obtain a pedestrian basic map; The pedestrian basic graph is connected across points based on the reliable point pairs to obtain the pedestrian trajectory graph.

6. The non-standing posture detection method according to claim 5, wherein: The cross-point connection of the pedestrian basic graph based on the reliable point pairs to obtain the pedestrian trajectory graph includes: Based on the reliable points and a preset first rule, performing cross-frame connections on the head trajectory points or the body trajectory points along the same trajectory to obtain a plurality of cross-frame edges; Based on the reliable points and a preset second rule, cross-track connections are performed on the head trajectory points or the body trajectory points to obtain a plurality of cross-track edges; The pedestrian basic graph, all the cross-frame edges and all the cross-track edges are constructed into the pedestrian trajectory graph.

7. The non-standing posture detection method according to claim 1, wherein: The performing non-standing posture detection on the shortest path trajectory to obtain a detection result includes: Performing human body trajectory point segmentation processing on the shortest path trajectory to obtain a plurality of human body trajectory segments; Counting the number of each human body trajectory segment to obtain the number of human body trajectory points of each human body trajectory segment; When it is detected that the number of human body trajectory points is greater than a preset threshold, determining that the human body trajectory segment corresponding to the number of human body trajectory points is a non-standing posture trajectory; The detection result is determined according to all the non-standing posture trajectories.

8. A non-standing posture detection device, characterized in that: include: an acquisition module, configured to acquire a pedestrian video and a three-dimensional model associated with the pedestrian video, and perform frame processing on the pedestrian video to obtain a plurality of pedestrian images; a detection module, configured to perform pedestrian region detection on each of the pedestrian images to obtain a pedestrian region corresponding to each of the pedestrian images; A construction module is configured to construct a pedestrian trajectory map in the three-dimensional model based on each of the pedestrian images and the pedestrian regions corresponding thereto; the pedestrian trajectory map is configured to predict the height of the human body regions in the pedestrian images, and predict the predicted height value corresponding to each of the pedestrian images; and determining a pedestrian height value of the pedestrian in the pedestrian image based on the predicted height value; According to the height value of the pedestrian, the corresponding head area and body area in each pedestrian area, a head trajectory point of each head area and a body trajectory point of each body area are calculated, and the obtained result is constructed based on all the head trajectory points and the body trajectory points; An identification module is used to use a shortest path algorithm to perform shortest path identification on the pedestrian trajectory graph to obtain a shortest path trajectory; The output module is used to perform non-standing posture detection on the shortest path trajectory to obtain a detection result; the detection result represents whether the pedestrian in the pedestrian video has a non-standing posture.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the non-standing posture detection method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the non-standing posture detection method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Human body posture estimation method and device and storage medium

    CN109871800A

  • Posture recognition method and device based on artificial intelligence, terminal and storage medium

    CN111931701A