A method for analyzing and recognizing the neatness of a queue based on monitoring image recognition

The high-resolution camera combines YOLOv8 and VoxelPose for individual detection and three-dimensional pose estimation, and uses dynamic time regularization algorithm to evaluate queue neatness, solving the problem of impossible to accurately evaluate queue alignment and pose consistency in the prior art, and achieving the accuracy and consistency evaluation of queue arrangement.

CN119540872BActive Publication Date: 2025-08-05NANJING NEBULA SOFTWARE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510004320.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-02
Publication Date
2025-08-05
Estimated Expiration
2045-01-02

AI Technical Summary

Technical Problem

The prior art cannot detect individuals and their key parts in real time and conduct multi-view three-dimensional pose estimation, cannot comprehensively and accurately evaluate queue alignment and pose consistency, cannot quantify the similarity of individual pose sequences, cannot effectively deal with individual movement rhythm differences in complex scenarios, and cannot ensure the accuracy and consistency of queue arrangements.

Method used

The high-resolution surveillance camera is used to collect images in real time, and YOLOv8 is used to detect individuals and their key parts. Three-dimensional pose estimation is carried out in combination with VoxelPose. The consistency between individuals is evaluated by calculating the pose vector similarity, and the pose sequence similarity is calculated using dynamic time regularization algorithm, comprehensively evaluate the queue uniformity and provide optimization measures.

Benefits of technology

It realizes efficient evaluation of queue neatness, adapts to complex scenarios, provides scientific quantitative results, is highly adaptable, can cope with individual action rhythm differences in complex scenarios, and ensures the accuracy and consistency of queue arrangement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119540872B_ABST
    Figure CN119540872B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image recognition technology, and more specifically, to a method for analyzing and identifying the neatness of queues based on surveillance image recognition, which is used to solve the problems that the existing technology cannot quantify the similarity of individual posture sequences, cannot effectively evaluate the dynamic consistency of queues, cannot cope with the differences in individual movement rhythms in complex scenes, and cannot ensure the accuracy and consistency of queue arrangements. The present invention can quantify the similarity of individual posture sequences and effectively evaluate the dynamic consistency of queues through a dynamic time warping algorithm. The dynamic time warping algorithm can handle time axis offset and distortion, adapt to different movement rhythms, calculate the dynamic time warping distance between individuals in a row, comprehensively evaluate dynamic consistency, and provide scientific quantitative results. The method has strong adaptability, can cope with the differences in individual movement rhythms in complex scenes, and provide reliable support for dynamic consistency evaluation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image recognition, and more particularly to a method for analyzing and identifying queue neatness based on monitoring image recognition. Background Art

[0002] In public places, schools, and military training, queue orderliness is an important indicator of order and discipline. Traditional manual inspection methods are not only time-consuming and labor-intensive, but also easily influenced by subjective factors, resulting in inaccurate evaluation results. With the rapid development of artificial intelligence and image recognition technology, automatic identification and evaluation using surveillance images has become possible. However, existing image recognition technology still has problems such as low recognition accuracy and poor adaptability when dealing with queue orderliness analysis in complex scenarios.

[0003] Patent application with reference publication number CN114445329A discloses a method, apparatus, device, and storage medium for identifying tooth alignment. The method comprises: obtaining an image of exposed teeth to be identified; segmenting a tooth image from the exposed tooth image; and identifying the tooth alignment corresponding to the tooth image using a pre-trained alignment recognition model. Application of the present invention allows the pre-trained alignment recognition model to quickly and accurately identify the tooth alignment corresponding to the tooth image, thereby meeting the real-time and convenient requirements for tooth alignment recognition, allowing users to perform tooth alignment testing anytime and anywhere. Furthermore, the method eliminates the need for specialized photographic equipment, significantly reducing the cost of tooth alignment testing for users.

[0004] However, the above-mentioned reference patent realizes the method of uploading exposed tooth images through the user terminal and using a pre-trained model to quickly and accurately identify the tooth alignment, which realizes the anytime, anywhere, low-cost and convenient tooth alignment detection. However, it cannot detect individuals and their key parts in real time and perform multi-view three-dimensional posture estimation. It cannot comprehensively and accurately evaluate the alignment and posture consistency of the formation. At the same time, it cannot quantify the similarity of individual posture sequences, cannot effectively evaluate the dynamic consistency of the formation, cannot cope with the differences in individual movement rhythm in complex scenes, and cannot ensure the accuracy and consistency of the formation arrangement.

[0005] To this end, we propose a queue neatness analysis and recognition method based on surveillance image recognition to address the above problems. Summary of the Invention

[0006] The purpose of the present invention is to provide a method for analyzing and identifying the neatness of formations based on surveillance image recognition, which solves the problems that the existing technology cannot detect individuals and their key parts in real time and perform multi-view three-dimensional posture estimation, cannot comprehensively and accurately evaluate formation alignment and posture consistency, cannot quantify the similarity of individual posture sequences, cannot effectively evaluate the dynamic consistency of formations, cannot cope with the differences in individual movement rhythms in complex scenes, and cannot ensure the accuracy and consistency of formation arrangements.

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

[0008] A method for analyzing and identifying queue neatness based on surveillance image recognition comprises the following steps:

[0009] Step 1: Use a high-resolution surveillance camera to collect images of the queue in real time, and perform preprocessing operations on the collected images to optimize image quality;

[0010] Step 2: Use YOLOv8 to detect individuals and their key parts in the queue, combine it with VoxelPose to estimate 3D poses, and evaluate the consistency between individuals by calculating the similarity of pose vectors;

[0011] Step 3: Check the alignment of rows and columns by calculating the deviation between the individual center point and the average center point of the row. Use the 3D pose vector to calculate the similarity between individuals in the row to evaluate the overall alignment and pose consistency of the column.

[0012] Step 4: Use the dynamic time warping algorithm to calculate the similarity of the posture sequence of each individual, and evaluate and quantify the dynamic consistency of each row in the queue;

[0013] Step 5: Calculate the queue neatness coefficient based on the comprehensive alignment, posture consistency and dynamic consistency, and provide corresponding treatment measures based on the calculation results to optimize the queue arrangement.

[0014] As a preferred embodiment of the present invention, the specific process of step 2 of evaluating the consistency between individuals is as follows:

[0015] YOLOv8 is a deep learning-based object detection algorithm that can detect multiple objects and their key parts in an image in real time. YOLOv8 can directly output the bounding box of each individual and the coordinates of the key parts through a trained model.

[0016] The steps for training the YOLOv8 model are as follows:

[0017] Collect an image dataset containing individuals in formation and their key parts, and annotate each image. The annotation content includes:

[0018] The bounding box coordinates of each individual are (x min,y min , x max ,y max ), where x min is the X-axis coordinate of the upper left corner of the bounding box, y min is the Y-axis coordinate of the upper left corner of the bounding box, x max is the X-axis coordinate of the lower right corner of the bounding box, y max is the Y-axis coordinate of the lower right corner of the bounding box;

[0019] The key part coordinates of each individual are (x 关键部位 ,y 关键部位 ), where x 关键部位 is the X-axis coordinate of the center point of the key part, y 关键部位 Y-axis coordinate of the center point of the key part;

[0020] Each labeled image data is converted into a corresponding set of feature vectors, and the feature vectors are used as the input of the machine learning model. The bounding box of each individual and the coordinates of the key parts corresponding to each labeled image data are used as the output of the machine learning model. The bounding box of each individual and the coordinates of the key parts are used as the prediction target, and the training goal is to minimize the sum of the prediction errors of all training data. The machine learning model is trained until the sum of the prediction errors reaches convergence and the training is stopped. The machine learning model that predicts the bounding box of each individual and the coordinates of the key parts is obtained.

[0021] As a preferred embodiment of the present invention, VoxelPose is a voxel-based 3D pose estimation algorithm that can recover and reconstruct the 3D joint coordinates of an individual from 2D images of multiple perspectives;

[0022] The VoxelPose model training steps are as follows:

[0023] Collect a multi-view image dataset containing individuals in formation and their 3D poses, and annotate each image. The annotation content includes:

[0024] The three-dimensional node coordinates of each individual are:

[0025] P m ={(x m1 ,y m1 ,z m1 ),(x m2 ,y m2 ,z m2 ),…,(x mn ,y mn ,z mn )}, where m is the mth individual, n is the number of key parts detected for the individual, (x mn ,y mn,z mn ) is the coordinate of the nth key part of the mth individual, x mn is the coordinate of the key part on the X axis, y mn is the coordinate of the key part on the Y axis, z mn is the coordinate of the key parts on the Z axis;

[0026] Each labeled image data is converted into a corresponding set of feature vectors, and the feature vectors are used as the input of the machine learning model. The three-dimensional joint point coordinates of each individual corresponding to each labeled image data are used as the output of the machine learning model. The three-dimensional joint point coordinates of each individual are used as the prediction target, and minimizing the sum of the prediction errors of all training data is used as the training target. The machine learning model is trained until the sum of the prediction errors reaches convergence and the training is stopped. The machine learning model that predicts the three-dimensional joint point coordinates of each individual is obtained.

[0027] As a preferred embodiment of the present invention, for each individual, its three-dimensional node coordinates are represented as a posture vector, and the posture vector is represented as follows:

[0028] V m =[x m1 ,y m1 ,z m1 ,x m2 ,y m2 ,z m2 ,…,x mn ,y mn ,z mn ], where m is the mth individual, n is the number of joints, V m is a vector of length 3n;

[0029] The Euclidean distance OJD between two individual pose vectors is calculated using the following formula:

[0030] ;

[0031] where v mk and v jk Represents vector v respectively m and v j The kth component of ;

[0032] Compare the Euclidean distance OJD with the preset Euclidean distance threshold:

[0033] If the OJD is less than the preset Euclidean distance threshold, it indicates that the postures of the two individuals are very similar;

[0034] If OJD is greater than or equal to the preset Euclidean distance threshold, it indicates that the posture difference between the two individuals is large.

[0035] As a preferred embodiment of the present invention, the specific process of evaluating the overall alignment and posture consistency of the formation in step 3 is as follows:

[0036] The steps to calculate the deviation between the individual center point and the row average center point are as follows:

[0037] In the image, each individual will be detected as a bounding box. The coordinates of the upper left corner and lower right corner of the bounding box can be used to calculate the center point of the individual. Assume that the coordinates of the upper left corner of the bounding box of individual m are , the coordinates of the lower right corner are , the center coordinates of individual m are calculated by the following formula:

[0038] ;

[0039] in and Respectively represent the horizontal and vertical coordinates of the center point of individual m in the image;

[0040] Assuming there are s individuals in a row, the average center coordinate of the row can be obtained by taking the average of the center coordinates of all individuals. The specific calculation formula is as follows:

[0041] ;

[0042] where x avg and y avg Respectively represent the horizontal and vertical coordinates of the average center point of the row.

[0043] As a preferred embodiment of the present invention, the deviation of each individual's center point from the row average center point is calculated by the following formula:

[0044] ;

[0045] where d m represents the deviation of the center point of individual m from the row average center point;

[0046] The sum of the deviations between the center points of all individuals in a row and the average center point of the row is divided by the number of individuals s to obtain the average alignment deviation DQP. The calculation formula is as follows:

[0047] ;

[0048] Compare the alignment mean deviation DQP with the preset alignment mean deviation threshold:

[0049] If DQP is less than the preset alignment average deviation threshold, it indicates that the row and column alignment is good;

[0050] If the DQP is greater than or equal to the preset alignment average deviation threshold, it indicates that the row and column alignment is poor.

[0051] As a preferred embodiment of the present invention, the steps for calculating the similarity between individuals in a row using three-dimensional posture vectors are as follows:

[0052] In 3D pose estimation, the pose of each individual is represented by the 3D coordinates of multiple joint points. Assume that the pose of individual m consists of n joint points, and the coordinates of each joint point are (x mj ,y mj ,z mj ), where j represents the index of the joint point, and the three-dimensional posture vector of individual m is expressed as follows:

[0053] V m =[x m1 ,y m1 ,z m1 ,x m2 ,y m2 ,z m2 ,…,x mn ,y mn ,z mn ];

[0054] Get the Euclidean distances between all pairs of individuals in a row, and average the Euclidean distances between all pairs of individuals in a row to get the average Euclidean distance POJ. The calculation formula is as follows:

[0055] ;

[0056] If the POJ value is close to 0, it indicates that the posture consistency among individuals in the entire row is high;

[0057] If the POJ value is far from 0, it indicates that the posture consistency among individuals in the entire row is low.

[0058] As a preferred embodiment of the present invention, the specific process of evaluating and quantifying the dynamic consistency of each row in the queue in step 4 is as follows:

[0059] The Dynamic Time Warping algorithm is used to compare the similarity between two time series. Its core idea is to find the optimal alignment path between the two time series through dynamic programming, so that the offset and distortion of the two series on the time axis are minimized. The specific steps are as follows:

[0060] Assume that there are two individual posture sequences, namely Q=(q1,q2,…,q n ) and C=(c1,c2,…,c m ), where q i and c j Represent the posture vector of the individual at time points i and j respectively;

[0061] Calculate the Euclidean distance d(q between two posture vectorsi ,c j ), construct an n×m distance matrix D, where D(i,j)=d(q i ,c j ), represents the distance between the posture vectors at time points i and j;

[0062] Define a cumulative distance matrix DTW, where DTW(i,j) represents the minimum cumulative distance from the starting point (1,1) to (i,j);

[0063] Initialize DTW(1,1)=D(1,1);

[0064] The recursive formula is: DTW(i,j)=D(i,j)+min(DTW(i-1,j),DTW(i,j-1),DTW(i-1,j-1));

[0065] Among them, DTW (i-1, j) means the transfer from the upper path, DTW (i, j-1) means the transfer from the left path, and DTW (i-1, j-1) means the transfer from the diagonal path;

[0066] The final dynamic time warping distance calculated is DTW(n, m), which represents the minimum cumulative distance between two sequences.

[0067] As a preferred embodiment of the present invention, it is assumed that there are m individuals in a row, and the posture sequence of each individual is Q1, Q2, ..., Q m , the dynamic time warping distance between each pair of individuals is calculated using the following formula:

[0068] ;

[0069] where Q i =(q i1 ,q i2 ,…q in ) and Q j =(q j1 ,q j2 ,…q jn ) represent the posture sequences of individual i and individual j, d(q ik ,c jk ) represents the Euclidean distance between the pose vectors at time point k, and K is the length of the alignment path;

[0070] The average dynamic time warping distance between all pairs of individuals in a row is calculated to obtain the average dynamic time warping distance PDG, which is calculated as follows:

[0071] ;

[0072] Compare the average dynamic time warping distance PDG with the preset average dynamic time warping distance threshold:

[0073] If the PDG is less than the preset average dynamic time warping distance threshold, it means that the posture sequence similarity between individuals in the entire row is high and the dynamic consistency is good;

[0074] If the PDG is greater than or equal to the preset average dynamic time warping distance threshold, it means that the posture sequence similarity between individuals in the entire row is low and the dynamic consistency is poor.

[0075] As a preferred embodiment of the present invention, the specific process of calculating the queue regularity coefficient and providing feedback to optimize the queue arrangement in step 5 is as follows:

[0076] Obtain the average alignment deviation DQP, average Euclidean distance POJ, and average dynamic time warping distance PDG, and calculate the queue neatness coefficient LZX using the following formula:

[0077] ;

[0078] Among them, g1, g2 and g3 are preset proportional factor coefficients, g3>g2>g1>0, and the queue neatness coefficient LZX is compared with the preset queue neatness coefficient threshold:

[0079] If the queue neatness coefficient LZX is less than the preset queue neatness coefficient threshold, it indicates that the overall neatness of the queue is good;

[0080] If the queue neatness coefficient LZX is greater than or equal to the preset queue neatness coefficient threshold, it indicates that the overall neatness of the queue is poor;

[0081] When it is recognized that the overall order of the queue is good, corresponding processing measures are provided to optimize the queue arrangement;

[0082] When it is identified that the overall orderliness of the queue is poor, corresponding processing measures are provided to optimize the queue arrangement.

[0083] Compared with the prior art, the advantages of the present invention are:

[0084] (1) In this invention, YOLOv8 is used to detect individuals and their key parts in real time, and VoxelPose is used to perform multi-view 3D pose estimation and calculate the Euclidean distance between pose vectors. This can effectively evaluate the neatness of the formation. YOLOv8 provides high-precision 2D coordinates, and VoxelPose achieves accurate 3D reconstruction and adapts to complex scenes. By quantifying pose similarity, the model has strong generalization ability and is applicable to various application scenarios, providing scientific support for the analysis of formation neatness.

[0085] (2) In this invention, the deviation between the individual center point and the average center point of the row is calculated to accurately evaluate the alignment of the rows and columns. The Euclidean distance is calculated using the three-dimensional posture vector to quantify the posture consistency. This method comprehensively evaluates the alignment and posture consistency of the team, has strong adaptability, is applicable to complex scenarios, and provides scientific support for the neatness of the team.

[0086] (3) In the present invention, the similarity of individual posture sequences can be quantified through the dynamic time warping algorithm, and the dynamic consistency of the formation can be effectively evaluated. The dynamic time warping algorithm can handle time axis offset and distortion, adapt to different action rhythms, calculate the dynamic time warping distance between individuals in the row, comprehensively evaluate dynamic consistency, and provide scientific quantitative results. This method has strong adaptability and can cope with the differences in individual action rhythms in complex scenes, providing reliable support for dynamic consistency evaluation. BRIEF DESCRIPTION OF THE DRAWINGS

[0087] Figure 1 This is a flow chart of the method for analyzing and identifying queue neatness in the present invention;

[0088] Figure 2 This is a logical flow diagram of the first embodiment of the present invention;

[0089] Figure 3 This is a logical flow diagram of the second embodiment of the present invention. DETAILED DESCRIPTION

[0090] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making creative work shall fall within the scope of protection of the present invention.

[0091] Example 1: Figure 1 and Figure 2 As shown, the present invention proposes a method for analyzing and identifying queue neatness based on surveillance image recognition, comprising the following steps:

[0092] Step 1: Use a high-resolution surveillance camera to capture images of the queue in real time. Preprocess the captured images to optimize image quality. This includes denoising (using Gaussian filtering), grayscaling (using weighted summation), and image enhancement (using histogram equalization and contrast enhancement).

[0093] By capturing queue images with a high-resolution camera and performing denoising, grayscale conversion, and image enhancement processing, image quality can be significantly optimized. Gaussian filtering denoising preserves edge information, grayscale conversion simplifies processing and enhances contrast, and histogram equalization and contrast enhancement improve details and visual effects, thereby improving recognition accuracy and providing high-quality data support for queue neatness analysis.

[0094] Step 2: Use YOLOv8 to detect individuals and their key parts in the queue, combine it with VoxelPose to estimate 3D poses, and evaluate the consistency between individuals by calculating the similarity of pose vectors;

[0095] The specific process of evaluating the consistency between individuals in step 2 is as follows:

[0096] YOLOv8 is a deep learning-based object detection algorithm that can detect multiple objects and their key parts in an image in real time. YOLOv8 can directly output the bounding box of each individual and the coordinates of the key parts through a trained model.

[0097] The steps for training the YOLOv8 model are as follows:

[0098] Collect an image dataset containing individuals and their key parts in a queue. The dataset should contain a large number of queue images in different scenes and lighting conditions. Annotate each image with the following content:

[0099] The bounding box coordinates of each individual are (x min ,y min , x max ,y max ), where x min is the X-axis coordinate of the upper left corner of the bounding box, y min is the Y-axis coordinate of the upper left corner of the bounding box, x max is the X-axis coordinate of the lower right corner of the bounding box, y max is the Y-axis coordinate of the lower right corner of the bounding box;

[0100] The key part coordinates of each individual are (x 关键部位 ,y 关键部位 ), where x 关键部位 is the X-axis coordinate of the center point of the key part, y 关键部位 Y-axis coordinate of the center point of the key part;

[0101] Each labeled image data is converted into a corresponding set of feature vectors, and the feature vectors are used as the input of the machine learning model. The bounding box of each individual and the coordinates of the key parts corresponding to each labeled image data are used as the output of the machine learning model. The bounding box of each individual and the coordinates of the key parts are used as the prediction target, and the sum of the prediction errors of all training data is minimized as the training goal. The machine learning model is trained until the sum of the prediction errors reaches convergence, and the training is stopped to obtain a machine learning model that predicts the bounding box of each individual and the coordinates of the key parts;

[0102] VoxelPose is a voxel-based 3D pose estimation algorithm that can recover and reconstruct the 3D joint coordinates of an individual from 2D images from multiple perspectives.

[0103] The VoxelPose model training steps are as follows:

[0104] Collect a multi-view image dataset containing individuals in formation and their 3D poses. The dataset should contain a large number of formation images in different scenes and lighting conditions. Annotate each image with the following content:

[0105] The three-dimensional node coordinates of each individual are:

[0106] P m ={(x m1 ,y m1 ,z m1 ),(x m2 ,y m2 ,z m2 ),…,(x mn ,y mn ,z mn )}, where m is the mth individual, n is the number of key parts detected for the individual, (x mn ,y mn ,z mn ) is the coordinate of the nth key part of the mth individual, x mn is the coordinate of the key part on the X axis, y mn is the coordinate of the key part on the Y axis, z mn is the coordinate of the key parts on the Z axis;

[0107] Each labeled image data is converted into a corresponding set of feature vectors, and the feature vectors are used as the input of the machine learning model. The three-dimensional joint point coordinates of each individual corresponding to each labeled image data are used as the output of the machine learning model. The three-dimensional joint point coordinates of each individual are used as the prediction target, and the training goal is to minimize the sum of the prediction errors of all training data. The machine learning model is trained until the sum of the prediction errors reaches convergence, and the training is stopped. The machine learning model that predicts the three-dimensional joint point coordinates of each individual is obtained;

[0108] For each individual, its three-dimensional node coordinates are represented as a posture vector, which is expressed as follows:

[0109] V m =[x m1 ,y m1 ,z m1 ,x m2 ,y m2 ,z m2 ,…,x mn ,y mn ,z mn ], where m is the mth individual, n is the number of joints, V m is a vector of length 3n;

[0110] The Euclidean distance OJD between two individual pose vectors is calculated using the following formula:

[0111] ;

[0112] where v mk and v jk Represents vector v respectively m and v j The kth component of ;

[0113] Compare the Euclidean distance OJD with the preset Euclidean distance threshold:

[0114] If the OJD is less than the preset Euclidean distance threshold, it indicates that the postures of the two individuals are very similar;

[0115] If the OJD is greater than or equal to the preset Euclidean distance threshold, it indicates that the posture difference between the two individuals is large;

[0116] By using YOLOv8 for real-time detection of individuals and their key parts, combined with VoxelPose for multi-view 3D pose estimation, and calculating the Euclidean distance between pose vectors to assess inter-individual consistency, the accuracy and efficiency of formation alignment analysis can be significantly improved. YOLOv8's high-precision positioning and real-time detection capabilities provide a reliable 2D coordinate foundation for 3D pose estimation, while VoxelPose achieves accurate 3D joint reconstruction from multi-view image data, making it suitable for complex scenarios. By calculating the Euclidean distance between pose vectors, the pose similarity between individuals can be quantified, facilitating the assessment of formation consistency. Furthermore, the training data covers diverse scenes and lighting conditions, giving the model strong generalization capabilities and adaptability to a variety of practical application scenarios. The combined application of these technologies provides strong support for the scientific analysis of formation alignment.

[0117] Step 3: Check the alignment of rows and columns by calculating the deviation between the individual center point and the average center point of the row. Use the 3D pose vector to calculate the similarity between individuals in the row to evaluate the overall alignment and pose consistency of the column.

[0118] The specific process of evaluating the overall alignment and posture consistency of the formation in step 3 is as follows:

[0119] The steps to calculate the deviation between the individual center point and the row average center point are as follows:

[0120] In the image, each individual will be detected as a bounding box. The coordinates of the upper left corner and lower right corner of the bounding box can be used to calculate the center point of the individual. Assume that the coordinates of the upper left corner of the bounding box of individual m are , the coordinates of the lower right corner are , the center coordinates of individual m are calculated by the following formula:

[0121] ;

[0122] in and Respectively represent the horizontal and vertical coordinates of the center point of individual m in the image;

[0123] Assuming there are s individuals in a row, the average center coordinate of the row can be obtained by taking the average of the center coordinates of all individuals. The specific calculation formula is as follows:

[0124] ;

[0125] where x avg and y avg Respectively represent the horizontal and vertical coordinates of the average center point of the row;

[0126] The deviation of each individual's center point from the row mean center point is calculated using the following formula:

[0127] ;

[0128] where d m represents the deviation of the center point of individual m from the row average center point;

[0129] The sum of the deviations between the center points of all individuals in a row and the average center point of the row is divided by the number of individuals s to obtain the average alignment deviation DQP. The calculation formula is as follows:

[0130] ;

[0131] Compare the alignment mean deviation DQP with the preset alignment mean deviation threshold:

[0132] If DQP is less than the preset alignment average deviation threshold, it indicates that the row and column alignment is good;

[0133] If DQP is greater than or equal to the preset alignment average deviation threshold, it indicates that the row and column alignment is poor;

[0134] The steps to calculate the similarity between individuals in a row using 3D posture vectors are as follows:

[0135] In 3D pose estimation, the pose of each individual is represented by the 3D coordinates of multiple joint points. Assume that the pose of individual m consists of n joint points, and the coordinates of each joint point are (x mj ,y mj ,z mj ), where j represents the index of the joint point, and the three-dimensional posture vector of individual m is expressed as follows:

[0136] V m =[x m1 ,y m1 ,z m1 ,x m2 ,y m2 ,z m2 ,…,x mn ,y mn ,z mn ];

[0137] Get the Euclidean distances between all pairs of individuals in a row, and average the Euclidean distances between all pairs of individuals in a row to get the average Euclidean distance POJ. The calculation formula is as follows:

[0138] ;

[0139] If the POJ value is close to 0, it indicates that the posture consistency among individuals in the entire row is high;

[0140] If the POJ value is far from 0, it indicates that the posture consistency among individuals in the entire row is low;

[0141] By calculating the deviation between the individual center point and the average center point of the row, the alignment of rows and columns can be accurately evaluated to determine whether it meets the preset standards. At the same time, the Euclidean distance between individuals is calculated using three-dimensional posture vectors to quantify the posture similarity between individuals and intuitively reflect the posture consistency of the formation. This comprehensive evaluation method can not only comprehensively analyze the overall alignment and posture consistency of the formation, but also has strong adaptability and can effectively respond to diverse needs in different scenarios and complex environments, providing strong support for the scientific evaluation of formation neatness.

[0142] Step 4: Use the dynamic time warping algorithm to calculate the similarity of the posture sequence of each individual, and evaluate and quantify the dynamic consistency of each row in the queue;

[0143] The specific process of evaluating and quantifying the dynamic consistency of each row in the queue in step 4 is as follows:

[0144] The Dynamic Time Warping algorithm is used to compare the similarity between two time series. Its core idea is to find the optimal alignment path between the two time series through dynamic programming, so that the offset and distortion of the two series on the time axis are minimized. The specific steps are as follows:

[0145] Assume that there are two individual posture sequences, namely Q=(q1,q2,…,q n ) and C=(c1,c2,…,c m ), where q i and c j Represent the posture vector of the individual at time points i and j respectively;

[0146] Calculate the Euclidean distance d(q between two posture vectors i ,c j ), construct an n×m distance matrix D, where D(i,j)=d(q i ,c j ), represents the distance between the posture vectors at time points i and j;

[0147] Define a cumulative distance matrix DTW, where DTW(i,j) represents the minimum cumulative distance from the starting point (1,1) to (i,j);

[0148] Initialize DTW(1,1)=D(1,1);

[0149] The recursive formula is: DTW(i,j)=D(i,j)+min(DTW(i-1,j),DTW(i,j-1),DTW(i-1,j-1));

[0150] Among them, DTW (i-1, j) means the transfer from the upper path, DTW (i, j-1) means the transfer from the left path, and DTW (i-1, j-1) means the transfer from the diagonal path;

[0151] The final dynamic time warping distance is calculated as DTW(n, m), which represents the minimum cumulative distance between the two sequences;

[0152] Assume that there are m individuals in a row, and the posture sequence of each individual is Q1, Q2, ..., Q m , the dynamic time warping distance between each pair of individuals is calculated using the following formula:

[0153] ;

[0154] where Q i =(q i1 ,q i2 ,…q in ) and Q j =(q j1 ,q j2 ,…q jn ) represent the posture sequences of individual i and individual j, d(q ik ,c jk ) represents the Euclidean distance between the pose vectors at time point k, and K is the length of the alignment path;

[0155] The average dynamic time warping distance between all pairs of individuals in a row is calculated to obtain the average dynamic time warping distance PDG, which is calculated as follows:

[0156] ;

[0157] Compare the average dynamic time warping distance PDG with the preset average dynamic time warping distance threshold:

[0158] If the PDG is less than the preset average dynamic time warping distance threshold, it means that the posture sequence similarity between individuals in the entire row is high and the dynamic consistency is good;

[0159] If the PDG is greater than or equal to the preset average dynamic time warping distance threshold, it means that the posture sequence similarity between individuals in the entire row is low and the dynamic consistency is poor;

[0160] The dynamic time warping algorithm can effectively quantify the similarity of individual posture sequences and evaluate the dynamic consistency of the formation. The dynamic time warping algorithm can not only handle offsets and distortions on the time axis and adapt to the differences in movement rhythms of different individuals, but also comprehensively evaluate the dynamic consistency of the entire row by calculating the dynamic time warping distance between individuals in the row, providing scientific quantitative results. This method is highly adaptable and can effectively deal with the situation of inconsistent individual movement rhythms in complex dynamic scenes, providing reliable support for dynamic consistency evaluation.

[0161] Embodiment 2: The technical solution of this embodiment of the present invention differs from that of Embodiment 1 in that:

[0162] like Figure 1 and Figure 3 As shown, step five: calculate the queue neatness coefficient by integrating alignment, posture consistency and dynamic consistency, and provide corresponding processing measures based on the calculation results to optimize the queue arrangement;

[0163] The specific process of calculating the queue neatness coefficient and providing feedback to optimize the queue arrangement in step 5 is as follows:

[0164] Obtain the average alignment deviation DQP, average Euclidean distance POJ, and average dynamic time warping distance PDG, and calculate the queue neatness coefficient LZX using the following formula:

[0165] ;

[0166] Among them, g1, g2 and g3 are preset proportional factor coefficients, g3>g2>g1>0, and the queue neatness coefficient LZX is compared with the preset queue neatness coefficient threshold:

[0167] If the queue neatness coefficient LZX is less than the preset queue neatness coefficient threshold, it indicates that the overall neatness of the queue is good;

[0168] If the queue neatness coefficient LZX is greater than or equal to the preset queue neatness coefficient threshold, it indicates that the overall neatness of the queue is poor;

[0169] When it is recognized that the overall order of the queue is good, corresponding treatment measures are provided to optimize the queue arrangement. The specific content of the treatment measures is as follows:

[0170] Maintain existing training methods: Continue using effective methods of precise alignment, uniform posture, and rhythm of movement;

[0171] Fine-tune details: Use laser rangefinders, motion capture equipment and tools to optimize small deviations in alignment, posture and rhythm;

[0172] When it is identified that the overall order of the queue is poor, corresponding treatment measures are provided to optimize the queue arrangement. The specific content of the treatment measures is as follows:

[0173] Analyze the root cause of the problem: Check for alignment, posture, and rhythm issues to identify the cause;

[0174] Targeted adjustments: Use laser lines or markings to realign; develop standard posture templates and use joint angle measurement tools to ensure consistency; use a metronome or music to unify the rhythm and break down complex movements into steps for training;

[0175] Strengthen basic training: Improve individual consistency through basic alignment, posture and rhythm training;

[0176] By comprehensively evaluating alignment, posture consistency, and dynamic consistency, the neatness of the formation is comprehensively evaluated, providing scientific quantitative results. Based on the neatness coefficient, optimization measures can be flexibly adjusted to ensure the accuracy and consistency of the formation. This method is highly adaptable and can meet the needs of different training stages, from fine-tuning details to strengthening basic training. Training methods can be flexibly adjusted, and a scientific feedback mechanism is provided through preset thresholds and proportional factors to help optimize formation arrangements and improve overall neatness.

[0177] The above are only preferred specific implementation methods of the present invention; however, the protection scope of the present invention is not limited thereto; any technician familiar with the technical field within the technical scope disclosed by the present invention; any equivalent replacement or change based on the technical solution and improved conception of the present invention shall be covered within the protection scope of the present invention.

Claims

1. A method for analyzing and identifying queue neatness based on surveillance image recognition, characterized in that: The following steps are involved: Step 1: Use a high-resolution surveillance camera to collect images of the queue in real time, and perform preprocessing operations on the collected images to optimize image quality; Step 2: Use YOLOv8 to detect individuals and their key parts in the queue, combine it with VoxelPose to estimate 3D poses, and evaluate the consistency between individuals by calculating the similarity of pose vectors; Step 3: Check row and column alignment by calculating the deviation between the individual center point and the average center point of the row, and use the 3D posture vector to calculate the similarity between individuals in the row to evaluate the overall alignment and posture consistency of the column; Step 4: Use the dynamic time warping algorithm to calculate the similarity of the posture sequence of each individual, and evaluate and quantify the dynamic consistency of each row in the queue; Step 5: Calculate the queue neatness coefficient based on the comprehensive alignment, posture consistency and dynamic consistency, and provide corresponding treatment measures based on the calculation results to optimize the queue arrangement.

2. The method for analyzing and identifying queue neatness based on surveillance image recognition according to claim 1, characterized in that: The specific process of evaluating the consistency between individuals in step 2 is as follows: YOLOv8 is a deep learning-based object detection algorithm that can detect multiple objects and their key parts in an image in real time. YOLOv8 can directly output the bounding box of each individual and the coordinates of the key parts through a trained model. The steps for training the YOLOv8 model are as follows: Collect an image dataset containing individuals in formation and their key parts, and annotate each image. The annotation content includes: The bounding box coordinates of each individual are (x min ,y min , x max ,y max ), where x min is the X-axis coordinate of the upper left corner of the bounding box, y min is the Y-axis coordinate of the upper left corner of the bounding box, x max is the X-axis coordinate of the lower right corner of the bounding box, y max is the Y-axis coordinate of the lower right corner of the bounding box; The key part coordinates of each individual are (x 关键部位 ,y 关键部位 ), where x 关键部位 is the X-axis coordinate of the center point of the key part, y 关键部位 Y-axis coordinate of the center point of the key part; Each labeled image data is converted into a corresponding set of feature vectors, and the feature vectors are used as the input of the machine learning model. The bounding box of each individual and the coordinates of the key parts corresponding to each labeled image data are used as the output of the machine learning model. The bounding box of each individual and the coordinates of the key parts are used as the prediction target, and the training goal is to minimize the sum of the prediction errors of all training data. The machine learning model is trained until the sum of the prediction errors reaches convergence and the training is stopped. The machine learning model that predicts the bounding box of each individual and the coordinates of the key parts is obtained.

3. The method for analyzing and identifying queue neatness based on surveillance image recognition according to claim 2, characterized in that: VoxelPose is a voxel-based 3D pose estimation algorithm that can recover and reconstruct the 3D joint coordinates of an individual from 2D images from multiple perspectives. The VoxelPose model training steps are as follows: Collect a multi-view image dataset containing individuals in formation and their 3D poses, and annotate each image. The annotation content includes: The three-dimensional node coordinates of each individual are: P m ={(x m1 ,y m1 ,z m1 ),(x m2 ,y m2 ,z m2 ),…,(x mn ,y mn ,z mn )}, where m is the mth individual, n is the number of key parts detected for the individual, (x mn ,y mn ,z mn ) is the coordinate of the nth key part of the mth individual, x mn is the coordinate of the key part on the X axis, y mn is the coordinate of the key part on the Y axis, z mn is the coordinate of the key parts on the Z axis; Each labeled image data is converted into a corresponding set of feature vectors, and the feature vectors are used as the input of the machine learning model. The three-dimensional joint point coordinates of each individual corresponding to each labeled image data are used as the output of the machine learning model. The three-dimensional joint point coordinates of each individual are used as the prediction target, and minimizing the sum of the prediction errors of all training data is used as the training target. The machine learning model is trained until the sum of the prediction errors reaches convergence and the training is stopped. The machine learning model that predicts the three-dimensional joint point coordinates of each individual is obtained.

4. The method for analyzing and identifying queue regularity based on surveillance image recognition according to claim 3, characterized in that: For each individual, its three-dimensional node coordinates are represented as a posture vector, which is expressed as follows: V m =[x m1 ,y m1 ,z m1 ,x m2 ,y m2 ,z m2 ,…,x mn ,y mn ,z mn ], where m is the mth individual, n is the number of joints, V m is a vector of length 3n; The Euclidean distance OJD between two individual pose vectors is calculated using the following formula: ; where v mk and v jk Represents vector v respectively m and v j The kth component of ; Compare the Euclidean distance OJD with the preset Euclidean distance threshold: If the OJD is less than the preset Euclidean distance threshold, it indicates that the postures of the two individuals are very similar; If OJD is greater than or equal to the preset Euclidean distance threshold, it indicates that the posture difference between the two individuals is large.

5. The method for analyzing and identifying queue neatness based on surveillance image recognition according to claim 1, characterized in that: The specific process of evaluating the overall alignment and posture consistency of the formation in step 3 is as follows: The steps to calculate the deviation between the individual center point and the row average center point are as follows: In the image, each individual will be detected as a bounding box. The coordinates of the upper left corner and lower right corner of the bounding box can be used to calculate the center point of the individual. Assume that the coordinates of the upper left corner of the bounding box of individual m are , the coordinates of the lower right corner are , the center coordinates of individual m are calculated by the following formula: ; in and Respectively represent the horizontal and vertical coordinates of the center point of individual m in the image; Assuming there are s individuals in a row, the average center coordinate of the row can be obtained by taking the average of the center coordinates of all individuals. The specific calculation formula is as follows: ; where x avg and y avg Respectively represent the horizontal and vertical coordinates of the average center point of the row.

6. The method for analyzing and identifying queue regularity based on surveillance image recognition according to claim 5, characterized in that: The deviation of each individual's center point from the row mean center point is calculated using the following formula: ; where d m represents the deviation of the center point of individual m from the row average center point; The sum of the deviations between the center points of all individuals in a row and the average center point of the row is divided by the number of individuals s to obtain the average alignment deviation DQP. The calculation formula is as follows: ; Compare the alignment mean deviation DQP with the preset alignment mean deviation threshold: If DQP is less than the preset alignment average deviation threshold, it indicates that the row and column alignment is good; If the DQP is greater than or equal to the preset alignment average deviation threshold, it indicates that the row and column alignment is poor.

7. The method for analyzing and identifying queue regularity based on surveillance image recognition according to claim 6, characterized in that: The steps to calculate the similarity between individuals in a row using 3D posture vectors are as follows: In 3D pose estimation, the pose of each individual is represented by the 3D coordinates of multiple joint points. Assume that the pose of individual m consists of n joint points, and the coordinates of each joint point are (x mj ,y mj ,z mj ), where j represents the index of the joint point, and the three-dimensional posture vector of individual m is expressed as follows: V m =[x m1 ,y m1 ,z m1 ,x m2 ,y m2 ,z m2 ,…,x mn ,y mn ,z mn ]; Get the Euclidean distances between all pairs of individuals in a row, and average the Euclidean distances between all pairs of individuals in a row to get the average Euclidean distance POJ. The calculation formula is as follows: ; If the POJ value is close to 0, it indicates that the posture consistency among individuals in the entire row is high; If the POJ value is far from 0, it indicates that the posture consistency among individuals in the entire row is low.

8. The method for analyzing and identifying queue regularity based on surveillance image recognition according to claim 7, characterized in that: The specific process of evaluating and quantifying the dynamic consistency of each row in the queue in step 4 is as follows: The Dynamic Time Warping algorithm is used to compare the similarity between two time series. Its core idea is to find the optimal alignment path between the two time series through dynamic programming, so that the offset and distortion of the two series on the time axis are minimized. The specific steps are as follows: Assume that there are two individual posture sequences, namely Q=(q1,q2,…,q n ) and C=(c1,c2,…,c m ), where q i and c j Represent the posture vector of the individual at time points i and j respectively; Calculate the Euclidean distance d(q between two posture vectors i ,c j ), construct an n×m distance matrix D, where D(i,j)=d(q i ,c j ), represents the distance between the posture vectors at time points i and j; Define a cumulative distance matrix DTW, where DTW(i,j) represents the minimum cumulative distance from the starting point (1,1) to (i,j); Initialize DTW(1,1)=D(1,1); The recursive formula is: DTW(i,j)=D(i,j)+min(DTW(i-1,j),DTW(i,j-1),DTW(i-1,j-1)); Among them, DTW (i-1, j) means the transfer from the upper path, DTW (i, j-1) means the transfer from the left path, and DTW (i-1, j-1) means the transfer from the diagonal path; The final dynamic time warping distance calculated is DTW(n, m), which represents the minimum cumulative distance between two sequences.

9. The method for analyzing and identifying queue neatness based on surveillance image recognition according to claim 8, characterized in that: Assume that there are m individuals in a row, and the posture sequence of each individual is Q1, Q2, ..., Q m , the dynamic time warping distance between each pair of individuals is calculated using the following formula: ; where Q i =(q i1 ,q i2 ,…q in ) and Q j =(q j1 ,q j2 ,…q jn ) represent the posture sequences of individual i and individual j, d(q ik ,c jk ) represents the Euclidean distance between the pose vectors at time point k, and K is the length of the alignment path; The average dynamic time warping distance between all pairs of individuals in a row is calculated to obtain the average dynamic time warping distance PDG, which is calculated as follows: ; Compare the average dynamic time warping distance PDG with the preset average dynamic time warping distance threshold: If the PDG is less than the preset average dynamic time warping distance threshold, it means that the posture sequence similarity between individuals in the entire row is high and the dynamic consistency is good; If the PDG is greater than or equal to the preset average dynamic time warping distance threshold, it means that the posture sequence similarity between individuals in the entire row is low and the dynamic consistency is poor.

10. The method for analyzing and identifying queue neatness based on surveillance image recognition according to claim 9, characterized in that: The specific process of step 5 of calculating the queue neatness coefficient and providing feedback to optimize the queue arrangement is as follows: Obtain the average alignment deviation DQP, average Euclidean distance POJ, and average dynamic time warping distance PDG, and calculate the queue neatness coefficient LZX using the following formula: ; Among them, g1, g2 and g3 are preset proportional factor coefficients, g3>g2>g1>0, and the queue neatness coefficient LZX is compared with the preset queue neatness coefficient threshold: If the queue neatness coefficient LZX is less than the preset queue neatness coefficient threshold, it indicates that the overall neatness of the queue is good; If the queue neatness coefficient LZX is greater than or equal to the preset queue neatness coefficient threshold, it indicates that the overall neatness of the queue is poor; When it is recognized that the overall order of the queue is good, corresponding processing measures are provided to optimize the queue arrangement; When it is identified that the overall orderliness of the queue is poor, corresponding processing measures are provided to optimize the queue arrangement.

Citation Information

Patent Citations

  • Tooth uniformity identification method and device, equipment and storage medium

    CN114445329A

  • Group action consistency detection method and system based on stacked hourglass network

    CN115019395A

  • Queue uniformity detection method and device, electronic device and storage medium

    CN116189227A