Real-time dance synchronous evaluation method and system based on attention mechanism
Through the real-time dance synchronization evaluation method based on attention mechanism, combined with multi-scale space-time attention mechanism and dynamic graph convolution, the insufficient capture of dance action space and time dependence in the existing technology is solved, and efficient and personalized Synchronization evaluation and feedback are highly adaptable and suitable for complex group dance scenes.
Patent Information
- Application Number
- CN202411073545.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-11-15
AI Technical Summary
The existing technology is difficult to capture the dependence between the complex spatial and temporal dimensions of dance movements at the same time, and cannot adapt to the dynamically changing interaction modes in group dances. It has high computational complexity, and it is difficult to achieve real-time evaluation and feedback. It lacks personalized long-term improvement suggestions, and is correct. The high difficulty and fast-changing dance movements are not robust enough.
The real-time dance synchronization evaluation method based on attention mechanism is adopted, through multi-view video acquisition and preprocessing, the key points of the human body are detected, and the timing attention network is constructed. Combined with multi-scale space-time attention mechanism and dynamic graph convolution, the synchronization score is calculated. And generate personalized long-term improvement suggestions through the reinforcement learning framework to achieve continuous optimization of the system.
Achieved a 95% synchronization evaluation accuracy, the system delay was reduced to 25ms, the computing efficiency was greatly improved, the model was lightweight, and the personalized guidance accuracy rate reached 92%. It has a robustness to complex actions, and is highly adaptable. It is suitable for Large-scale group dance scene.
Smart Images

Figure CN118968624A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence and computer vision technology, and in particular to a real-time dance synchronization evaluation method and system based on an attention mechanism. Background Art
[0002] With the continuous development of dance art and the increasing complexity of group dance performances, accurate evaluation and real-time feedback of dance synchronization are becoming more and more important. In recent years, the application of computer vision and artificial intelligence technology in this field has made significant progress, but there are still many challenges and limitations.
[0003] Traditional dance evaluation methods mainly rely on manual observation and subjective judgment, which is not only time-consuming and labor-intensive, but also difficult to ensure the consistency and objectivity of the evaluation. With the advancement of technology, some automatic evaluation systems based on computer vision have begun to emerge. Early systems mainly used simple image processing techniques and rule-based algorithms, such as edge detection and template matching, to identify and evaluate dancers' movements. These methods perform well when dealing with simple, fixed dance movements, but they are unable to cope with complex group dance scenes.
[0004] In recent years, the rise of deep learning technology has brought new opportunities for dance evaluation. Convolutional neural networks (CNNs) have been widely used in human pose estimation and action recognition tasks. However, CNN models mainly focus on spatial features and have difficulty in effectively capturing the temporal dependencies of dance movements. To address this problem, some researchers have begun to use recurrent neural networks (RNNs), especially long short-term memory networks (LSTMs), to model temporal information. Although LSTM has improved in handling long-term dependencies, it still has difficulty capturing complex spatiotemporal correlations, especially in large-scale group dance scenes.
[0005] Recently, graph neural networks (GNNs) have begun to emerge in dance analysis. Fixed-structure graph convolutional networks (GCNs) are used to model the spatial relationships between dancers. However, this approach assumes that the relationships between dancers are static and cannot adapt to the dynamically changing interaction patterns in group dance.
[0006] Although these technologies have made some progress in the field of dance assessment, existing methods still have the following key problems:
[0007] 1. It is difficult to effectively capture the complex dependencies in both spatial and temporal dimensions simultaneously, especially in large-scale group dance scenes.
[0008] 2. Unable to adapt to the dynamic interaction patterns between dancers, resulting in insufficient accuracy in evaluating complex choreography.
[0009] 3. The computational complexity is high, making it difficult to achieve true real-time evaluation and feedback.
[0010] 4. There is a lack of personalized long-term improvement suggestions, and it is impossible to provide dancers with targeted training guidance.
[0011] 5. It lacks robustness to difficult and rapidly changing dance movements, and the evaluation results are easily disturbed.
[0012] The LSTM-based method is a typical example. Although LSTM can handle long-term dependencies, it is mainly designed for single time series. In a group dance scene, the movements of multiple dancers need to be considered simultaneously, and the relative positions and interactions between dancers are constantly changing. It is difficult for LSTM to effectively model such complex multi-entity, multi-scale spatiotemporal relationships. In addition, the sequence processing nature of LSTM makes it difficult to parallelize, resulting in low computational efficiency when processing large-scale group dances and unable to meet the needs of real-time evaluation.
[0013] These problems severely limit the application of automatic dance evaluation systems in professional dance education, large-scale performances, and competitions. Therefore, new methods that can comprehensively address these problems are urgently needed to promote the development of dance art and improve the quality of group dance performances. Summary of the invention
[0014] The purpose of the present invention is to provide a real-time dance synchronization evaluation method and system based on an attention mechanism, aiming to solve the problems of inaccurate evaluation of large-scale group dance synchronization, insufficient real-time performance, and lack of personalized feedback in the prior art.
[0015] The present invention provides a real-time dance synchronization evaluation method based on an attention mechanism, comprising the following steps: obtaining a multi-perspective dance performance video; preprocessing the multi-perspective dance performance video to obtain a preprocessed video; detecting and tracking key points of the human body based on the preprocessed video to obtain a key point coordinate sequence; constructing and training a temporal attention network based on the key point coordinate sequence; calculating a synchronization score using the temporal attention network; generating real-time feedback information based on the synchronization score; storing the synchronization score and feedback information as historical data; analyzing the historical data and generating long-term improvement suggestions; feeding back the real-time feedback information and the long-term improvement suggestions to a user for guiding subsequent dance training; and updating the temporal attention network based on the user's subsequent training data to achieve continuous optimization.
[0016] Specifically, the pretreatment step includes:
[0017] The improved non-local mean filtering algorithm is used for denoising, where:
[0018]
[0019]
[0020] Where NL(x) is the pixel value after denoising, w(x, y) is the weight function, P(x) and P(y) are image blocks centered on x and y, and h is the filtering parameter;
[0021] Apply an adaptive white balance algorithm for color correction, where:
[0022]
[0023]
[0024]
[0025] Among them, R out , G out , B out is the corrected RGB channel value, R i n. G in , B in is the original RGB channel value, μ target is the target brightness, μ R , μ G , μ B is the average brightness of each channel;
[0026] A bicubic interpolation algorithm is applied to resize all videos to a uniform resolution.
[0027] Specifically, the human key point detection and tracking step adopts an improved CascadeNet model, including:
[0028] P=F(I;θ)
[0029] Among them, P is the predicted key point coordinates, I is the input image, θ is the model parameter, and F is the cascaded convolutional neural network;
[0030] Introducing spatiotemporal consistency constraints:
[0031]
[0032] Among them, P t and P t-1 are the key point coordinates of the current frame and the previous frame, and T is the affine transformation;
[0033] Apply an adaptive learning rate adjustment mechanism:
[0034]
[0035] Among them, η y is the learning rate at time t, η0 is the initial learning rate, T is the total number of iterations, and α and τ are hyperparameters.
[0036] Specifically, the temporal attention network includes a multi-scale spatiotemporal attention mechanism MS-STA and a dynamic graph convolution DGC, where:
[0037] The calculation process of the MS-STA is:
[0038]
[0039]
[0040]
[0041] in, and are spatial and temporal attention matrices respectively, 1 represents different scales, and are spatially adjacent features, and is the feature separated by k frames in time, ⊙ represents the Hadamard product, and σ is the activation function;
[0042] The calculation process of the DGC is:
[0043] G t =f θ (P t )
[0044]
[0045] Among them, G t is the dynamic graph structure at time t, f θ is the graph generating function, P t are the key point coordinates, To add a self-connected adjacency matrix, is the grayscale matrix, is the node feature of layer I, W l is the learnable weight matrix.
[0046] Specifically, the overall structure of the temporal attention network is: t =MS-STA(DGC(X t ))S t =MLP(H t ) Among them, H t is the final time series feature representation, S t is the synchronization score, and MLP is a multi-layer perceptron.
[0047] Specifically, the synchronization score calculation step includes:
[0048] Calculate individual synchronization scores:
[0049] S i =ω1·S spatial +ω2·S temporal +ω3·S rhythm
[0050] Among them, S spatial , S temporal , S rhythm are the spatial, temporal and rhythmic synchronization scores, respectively, and ω1, ω2 and ω3 are weights;
[0051] Calculate the group's overall synchronization score:
[0052]
[0053] Among them, N is the number of dancers, and β and γ are adjustment parameters.
[0054] Specifically, the real-time feedback generation step includes: based on the individual synchronization score S i , using the decision tree algorithm to generate individual improvement suggestions; based on the group's overall synchronization score S g , a fuzzy logic system is applied to generate an overall coordination evaluation.
[0055] Specifically, the historical data analysis step includes:
[0056] Applying the ARIMA model for time series analysis:
[0057]
[0058] Among them, X t is the observed value at time t, c is a constant term, and θ are model parameters, ε is the error term, p is the number of autoregressive terms, and q is the number of moving average terms;
[0059] The improved K-means++ algorithm is used for clustering analysis, and the objective function is:
[0060]
[0061] Where K is the number of clusters, x i is the data point, μ k is the center of the kth cluster, C k is the kth cluster, λ is the regularization parameter and R(C) is the regularization term.
[0062] Specifically, the generation of the long-term improvement suggestions is based on a reinforcement learning framework and includes the following steps:
[0063] Take the dancer's historical data as state s;
[0064] Take the optional training items as action a;
[0065] Use synchronization improvement as reward r;
[0066] Use Q-learning algorithm to optimize the training plan:
[0067] Q(s,a)←Q(s,a)+α[r+γmax_a′Q(s′,a′)-Q(s,a)]
[0068] Among them, Q(s, a) is the state action value function, α is the learning rate, γ is the discount factor, and s′ is the next state;
[0069] Select the best training plan based on the optimized Q value and generate personalized long-term improvement suggestions.
[0070] A real-time dance synchronization evaluation system based on an attention mechanism for implementing the method comprises:
[0071] Multi-view video acquisition module, used to obtain multi-view dance performance videos;
[0072] A video preprocessing module, used for preprocessing the multi-view dance performance video;
[0073] A human key point detection and tracking module, used for detecting and tracking human key points based on the preprocessed video;
[0074] Temporal Attention Network module, used to build and train the temporal attention network;
[0075] A synchronization score calculation module, used to calculate the synchronization score based on the temporal attention network;
[0076] A real-time feedback generation module, used to generate real-time feedback information according to the synchronization score;
[0077] A historical data storage module, used to store the synchronization score and feedback information;
[0078] A long-term improvement suggestion generation module, used for analyzing the historical data and generating long-term improvement suggestions;
[0079] A feedback display module is used to feed back the real-time feedback information and long-term improvement suggestions to the user;
[0080] A network update module is used to update the temporal attention network according to subsequent training data of the user.
[0081] The beneficial effects of the present invention are mainly reflected in the following aspects:
[0082] 1. High-precision evaluation: Through MS-STA and DGC, this method can simultaneously capture complex spatial and temporal dependencies and achieve a 95% synchronization evaluation accuracy, far exceeding existing methods.
[0083] 2. Real-time performance: The optimized network structure and efficient parallel computing implementation reduce system latency to 25ms, truly realizing real-time evaluation and feedback.
[0084] 3. Computational efficiency: The innovative algorithm design has greatly improved the computing efficiency. It only takes 3.5 seconds to process 1 minute of HD video, laying the foundation for large-scale applications.
[0085] 4. Lightweight model: Despite its powerful functions, the model size is only 15M, which is easy to deploy and update.
[0086] 5. Personalized Guidance: The integrated reinforcement learning framework is able to generate highly personalized long-term improvement suggestions with an accuracy rate of 92%, effectively promoting the continuous improvement of dancers.
[0087] 6. Robustness: The robustness to complex movements reached a correlation coefficient of 0.92, demonstrating the system’s excellent performance in handling difficult and rapidly changing dance movements.
[0088] 7. Adaptability: The dynamic graph structure enables the system to adaptively adjust to different dance styles and choreography, greatly expanding the scope of application.
[0089] 8. Scalability: The modular design makes the system easily expandable and can be easily adapted to new dance types or assessment criteria.
[0090] In summary, the present invention not only solves the key problems of the prior art, but also achieves significant breakthroughs in accuracy, efficiency and practicality, providing strong technical support for dance education, performing arts and competition judging, and is expected to promote innovation and development of the entire industry. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] Figure 1 It is the overall logic block diagram of the system of the present invention.
[0092] Figure 2 This is a logic block diagram of video preprocessing of the present invention.
[0093] Figure 3 This is a logic block diagram of the human body key point detection and tracking of the present invention.
[0094] Figure 4 This is a logic block diagram for constructing and training the temporal attention network of the present invention.
[0095] Figure 5 The figure is a logic block diagram of synchronization score calculation of the present invention.
[0096] Figure 6 Generate a logic block diagram for the real-time feedback of the present invention.
[0097] Figure 7 Generate a logic block diagram for the long-term improvement proposals of the present invention.
[0098] Figure 8 The logic block diagram is continuously optimized for the system of the present invention.
[0099] Fig. 9 The figure is a comparison of the dance synchronization evaluation heat maps of the present invention and comparative examples 1-3.
[0100] Fig.10 It is a complete dance synchronization timeline comparison diagram of the present invention and comparative examples 1-3. DETAILED DESCRIPTION
[0101] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation methods, structures, features and effects thereof are described in detail below in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0102] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0103] Please refer to Figure 1-10 To achieve the above object, the present invention provides a real-time dance synchronization evaluation method based on attention mechanism, comprising the following steps:
[0104] Step S1: Acquire a multi-view dance performance video.
[0105] In actual application scenarios, such as at a large dance competition or a professional dance troupe rehearsal, multiple high-speed cameras are first deployed to capture the full range of dance performances. Specifically, eight Sony RX0 II high-speed cameras are used, which can shoot at an ultra-high frame rate of 1000fps. These cameras are strategically placed at different positions and angles on the stage to ensure that the movement details of each dancer can be captured.
[0106] Step S2: pre-processing the multi-view dance performance video.
[0107] After obtaining the original video, a series of preprocessing operations are required to improve the accuracy of subsequent analysis. This step includes three main parts:
[0108] a) Denoising: Apply the improved non-local mean filtering algorithm for denoising. The core formula of the algorithm is as follows:
[0109]
[0110] in,
[0111]
[0112] In this formula, NL(x) represents the pixel value after denoising, w(x, y) is the weight function, P(x) and P(y) represent the image blocks centered at x and y respectively, and h is the filter parameter. The advantage of this algorithm is that it can effectively remove noise while preserving image details. In practice, the value of h is usually set between 10 and 15, which can achieve a good balance between denoising effect and detail preservation.
[0113] b) Color correction: Next, use the adaptive white balance algorithm to perform color correction. The algorithm is as follows:
[0114]
[0115]
[0116]
[0117] Here, R out , G out , B out Respectively represent the corrected red, green, and blue channel values, R in , G in , B in is the original RGB channel value, μ target is the target brightness (usually set to 128, the middle gray value), μ R , μ G , μ B are the average brightness of each channel. This method can effectively eliminate the color cast problem under different light sources and ensure the color consistency of images taken by different cameras.
[0118] c) Resolution normalization,Finally, all videos are adjusted to a uniform 4K resolution (3840x2160) using a bicubic interpolation algorithm. This step ensures consistency in subsequent processing while maintaining high image quality.
[0119] Step S3: Detect and track key points of the human body based on the preprocessed video to obtain a key point coordinate sequence.
[0120] In this step, the improved CascadeNet model is used to detect and track key points of the human body. The core formula of this model is:
[0121] P=F(I;θ)
[0122] Among them, P represents the predicted key point coordinates, I is the input image, θ is the model parameter, and F represents a cascaded convolutional neural network with 5 stages. Each stage outputs a more accurate key point location.
[0123] In order to improve the stability and accuracy of the model, spatiotemporal consistency constraints are introduced:
[0124]
[0125] Here, P t and P t-1 are the key point coordinates of the current frame and the previous frame respectively, and T represents the affine transformation. This constraint can effectively reduce the key point jump caused by occlusion or fast motion.
[0126] In addition, an adaptive learning rate adjustment mechanism is applied:
[0127]
[0128] η t is the learning rate at time t, η0 is the initial learning rate (usually set to 0.001), T is the total number of iterations, and α and τ are hyperparameters (α is usually set to 0.5 and τ is set to 1000). This mechanism can maintain a high learning rate in the early stage of training for rapid convergence, and reduce the learning rate in the later stage to fine-tune the model parameters.
[0129] Step S4: construct and train a temporal attention network based on the key point coordinate sequence.
[0130] This is the core innovative step of this method, which constructs a temporal attention network including multi-scale spatiotemporal attention mechanism (MS-STA) and dynamic graph convolution (DGC).
[0131] First, the calculation process of MS-STA is as follows:
[0132] First, the calculation process of MS-STA is as follows:
[0133]
[0134]
[0135]
[0136] here, and Represent the spatial and temporal attention matrices respectively, 1 represents different scales (usually 3 scales are used), and are spatially adjacent features, and is the feature of k frames apart in time (k is usually set to 5, 10, 15 to capture dependencies at different time scales), G represents the Hadamard product, and ρ is the activation function (using ReLU). This multi-scale design enables the network to focus on both local details and global structures, greatly improving the ability to understand complex dance movements.
[0137] Next, the calculation process of DGC is as follows:
[0138] G t =f θ (P t )
[0139]
[0140] Here, G t is the dynamic graph structure at time t, f θ is a learnable graph generation function (implemented using a 3-layer fully connected network), P t are the key point coordinates, is the adjacency matrix with self-connection added, is the degree matrix, is the node feature of layer l, W l is a learnable weight matrix. The innovation of DGC lies in its ability to dynamically adjust the graph structure according to the real-time positions of the dancers, which is crucial for capturing the complex interactions in group dance.
[0141] The structure of the entire network can be expressed as:
[0142] H t =MS-STA(DGC(X t ))
[0143] S t =MLP(H t )
[0144] Among them, H t is the final temporal feature representation, S t is the synchronization score, and MLP is a 3-layer multi-layer perceptron.
[0145] Step S5: Calculate the synchronization score using the temporal attention network.
[0146] In this step, first calculate the individual synchronization score:
[0147] Si =ω1·S spatial +ω2·S temporal +ω3·S rhythm
[0148] S spatial , S temporal , S rhythm denote the spatial, temporal and rhythmic synchronization scores respectively, and ω1, ω2 and ω3 are the corresponding weights (usually set to 0.4, 0.4 and 0.2, which can be adjusted according to the specific dance type).
[0149] Then, calculate the overall synchronization score of the group:
[0150]
[0151] Here, N is the number of dancers, and β and γ are tuning parameters (usually β = 1, γ = *.5). This formula not only takes into account the average performance but also pays special attention to the worst dancer (min(S i ) items) and overall consistency (std(S i )item).
[0152] Step S6: Generate real-time feedback information according to the synchronization score.
[0153] Based on individual synchronization score S i , using a decision tree algorithm to generate individual improvement recommendations. The depth of the decision tree is usually set to 3-5 layers to balance the specificity and generalization of the recommendations. For example, if S spatial A lower value might generate the suggestion “pay attention to keeping consistent spatial position with other dancers.”
[0154] For the group's overall synchronization score Sg, a fuzzy logic system was applied to generate an overall coordination evaluation. Five fuzzy sets ("excellent", "excellent", "good", "average", and "needs improvement") were defined, fuzzified using a trapezoidal membership function, and then defuzzified using the centroid method to obtain the final language evaluation.
[0155] Step S7: storing the synchronization score and feedback information as historical data.
[0156] Use a distributed database such as Apache Cassandra to store historical data to support large-scale, high-concurrency data writing and reading. The data model design uses wide column storage with dancer ID and timestamp as primary keys to ensure fast time series queries.
[0157] Step S8: Analyze the historical data and generate long-term improvement suggestions.
[0158] In this step, we first apply the ARIMA model for time series analysis:
[0159]
[0160] Among them, X t is the observed value at time t (such as synchronization score), c is a constant term, and θ are model parameters, ε is the error term, p is the number of autoregressive terms (usually 1-3), and q is the number of moving average terms (usually 1-2). Use AIC (Akaike Information Criterion) to select the best p and q values.
[0161] Next, the improved K-means++ algorithm is used for cluster analysis, and the objective function is:
[0162]
[0163] Here, K is the number of clusters (usually set to 3-5, representing different skill levels), x i is a data point (such as various indicators of dancers), μk is the center of the kth cluster, C k is the kth cluster, λ is the regularization parameter (usually set to 0.1-0.5), and R(C) is the regularization term (the variance of the cluster size is used as the regularization term to balance the size of each cluster). Finally, personalized long-term improvement recommendations are generated based on the reinforcement learning framework. Using the Q-learning algorithm:
[0164]
[0165] Among them, Q(s, a) is the state-action value function, α is the learning rate (usually set to 0.1 initially and decays over time), γ is the discount factor (usually set to 0.9), s is the state (historical performance and characteristics of the dancer), a is the action (optional training item), and r is the reward (improvement in synchronization). Use techniques such as experience replay and target network to improve the stability of learning.
[0166] Step S9: Feedback the real-time feedback information and long-term improvement suggestions to the user for guiding subsequent dance training.
[0167] A user-friendly mobile app interface was designed to present real-time feedback and long-term recommendations to users in the form of charts, text, and animations. Real-time feedback is updated every 5 seconds, and long-term recommendations are updated weekly. In addition, a virtual coach function is provided to demonstrate correct movements through 3D animations.
[0168] Step S10: Update the temporal attention network according to the user's subsequent training data to achieve continuous optimization.
[0169] Incremental learning is used to fine-tune the network every day using newly collected data. Specifically, the Adam optimizer is used, the learning rate is set to 1 / 10 of the original learning rate, and 5 epochs are trained each time. In order to prevent catastrophic forgetting, the elastic weight consolidation technique is also used to maintain the original knowledge by adding penalty terms for important parameters in the loss function.
[0170] This continuous optimization mechanism ensures that the system can adapt to the improvement of dancers' skills and changes in dance style, always maintaining optimal performance.
[0171] Next, the system implementation of the present invention is described in detail. Figure 2 The real-time dance synchronization evaluation system based on attention mechanism provided by the present invention mainly includes the following modules:
[0172] Multi-view video acquisition module 1, which consists of 8 Sony RX0 II high-speed cameras, each connected to a high-performance video capture card (such as AJAKONA 5). These capture cards are connected to a high-performance workstation (equipped with Intel Xeon W-3275 processor and NVIDIA Quadro RTX 8000 graphics card) via PCIe interface. A custom software was developed to synchronize the time code of these cameras to ensure perfect synchronization of multi-view videos.
[0173] Video preprocessing module 2, which runs on the above workstations, uses CUDA acceleration to achieve real-time video preprocessing. The denoising algorithm is implemented using the cuDNN library, and color correction and resolution unification use the GPU module of OpenCV. The preprocessed video stream is transmitted to the main server cluster via 10Gbps Ethernet.
[0174] Human key point detection and tracking module 3 uses a server equipped with 4 NVIDIA A100 GPUs to run the improved CascadeNet model. The model is implemented using the PyTorch framework and optimized with TensorRT to achieve maximum inference speed. NVIDIA's Multi-Instance GPU (MIG) technology is also used to divide each GPU into multiple instances to process key point detection tasks for multiple dancers in parallel.
[0175] The temporal attention network module 4, which is the core module of the system, runs on a server equipped with 8 NVIDIA A100 GPUs. The network is implemented using the PyTorch Lightning framework to simplify the distributed training process. The Horovod library is used to achieve efficient multi-GPU training. Data parallelism and model parallelism techniques are used simultaneously to make full use of GPU resources.
[0176] Synchronization score calculation module 5, this module runs on the same server, but uses the CPU for calculation. Intel's MKL (Mathematical Kernel Library) is used to accelerate matrix operations, greatly improving calculation efficiency.
[0177] Real-time feedback generation module 6, which uses the Flask framework to build a RESTful API and runs on a separate server. The decision tree algorithm is implemented using the scikit-learn library, while the fuzzy logic system uses the pyFuzzy library. In order to handle high concurrent requests, Gunicorn is used as the WSGI HTTP server and multiple worker processes are configured.
[0178] The historical data storage module 7 uses a 3-node Apache Cassandra cluster as the main data storage system. Each node is a high-performance server equipped with NVMe SSD to ensure fast data reading and writing. Redis is also used as a cache layer to further improve data access speed.
[0179] Long-term improvement proposal generation module 8, this module runs on a server equipped with NVIDIA T4 GPU. The ARIMA model is implemented using the statsmodels library, the K-means++ algorithm uses the scikit-learn library, and the reinforcement learning part is implemented using the Stable-Baselines3 library. The Dask framework is used for distributed computing to process large-scale historical data.
[0180] Feedback display module 9, a cross-platform mobile application (using the Flutter framework) and a web application (using React.js) were developed. These two applications maintain a real-time connection with the server through WebSocket to ensure instant updates of feedback information. 3D animations are rendered using the Unity engine and displayed in the browser through WebGL.
[0181] Network update module 10, this module uses Kubernetes to manage incremental learning tasks. Every morning, a CronJob triggers the incremental learning process. After learning is completed, the new model will be saved to shared storage (such as NFS) and then deployed to the production environment through rolling updates.
[0182] The entire system uses Istio service mesh for microservice management, Prometheus and Grafana for monitoring, and ELK stack (Elasticsearch, Logstash, Kibana) for log analysis. All servers are deployed in the same data center and interconnected through high-speed InfiniBand network to ensure low-latency data transmission.
[0183] The innovation of this system is that it combines advanced deep learning technology with large-scale distributed computing to achieve real-time and accurate evaluation of complex group dance scenes. Through continuous learning and optimization, the system can continuously adapt to new dance styles and techniques, providing a powerful technical support platform for dance education and performing arts.
[0184] In this embodiment of the present invention, 18 key points of the human body are defined, which fully cover the key parts in dance movements: top of the head; tip of the nose; left eye; right eye; left ear; right ear; left shoulder; right shoulder; left elbow; right elbow; left wrist; wrist; left hip; right hip; left knee; right knee; left ankle and right ankle.
[0185] The selection of these key points is based on the following considerations:
[0186] 1. Comprehensiveness: Covering the main joints of the body to ensure that various dance movements can be captured.
[0187] 2. Accuracy: Select anatomical landmarks that are easy to locate to improve detection accuracy.
[0188] 3. Expressiveness: These points can effectively express the core characteristics of dance movements.
[0189] After obtaining the coordinate sequence of these key points, our system dynamically focuses on key movements and key dancers through the following steps to accurately evaluate the overall coordination of large-scale dance performances:
[0190] 1. Key action recognition: Use sliding window technology to analyze key point trajectories in the time dimension. By calculating the changes in key point velocity and acceleration, the key frames of the action can be identified. For example, in ballet, the rapid rise and fall of the hip and ankle key points will be paid special attention to in the big jumps;
[0191] 2. Movement difficulty assessment: Based on the relative positions and movement trajectories of key points, a movement difficulty scoring system is established. For example, in modern dance, when multiple key points (such as wrists, ankles, and head) perform complex nonlinear movements at the same time, the system will mark this movement as a high-difficulty movement and give it a higher weight in subsequent evaluations.
[0192] 3. Key dancer identification: In a group dance, not all dancers have the same role. The system identifies key dancers by analyzing the position distribution and movement complexity of the dancers. Usually, the dancers who are in the center of the formation or perform the most complex movements are identified as key dancers. For example, in a four-person ballet performance, the dancer who performs 32 consecutive flips will be automatically identified as a key dancer by the system.
[0193] 4. Dynamic attention allocation: Based on the above recognition results, the multi-scale spatiotemporal attention mechanism (MS-STA) will dynamically adjust the attention to different dancers and movements. Specifically:
[0194] a) For key movements, the system will increase the attention weight of the corresponding time window. For example, in the "water sleeves" movement of Chinese classical dance, the system will pay special attention to the coordination of the key points of the wrist and elbow.
[0195] b) For key dancers, the system will assign higher attention weights in the spatial dimension. In large group dances, such as a square dance performance of 100 people, the system will prioritize ensuring the synchronization of movements between the lead dancers at the center of each small square.
[0196] 5. Multi-level synchronization evaluation, the system adopts a hierarchical approach to evaluate the synchronization of large-scale group dances:
[0197] a) Individual level: evaluates the coordination between key points of a single dancer. For example, in jazz dance, the system pays special attention to the coordination of arm and leg movements.
[0198] b) Group level: evaluate the synchronization between neighboring dancers. In square dance, the system will focus on comparing the timing and amplitude of movements between adjacent dancers.
[0199] c) Overall level: evaluates the overall synchronization of all dancers. For example, in a large opening performance, the system will analyze whether the movement wave effect of the entire dancer group is consistent.
[0200] 6. Spatiotemporal consistency constraints: In order to deal with the complex spatial relationships in large-scale group dances, spatiotemporal consistency constraints are introduced. Specifically, dynamic graph convolution (DGC) is used to model the relative position relationship between dancers and impose continuity constraints in the time dimension. This enables the system to effectively capture chain movements similar to the "domino" effect, which is very common in large group dances.
[0201] 7. Real-time feedback generation. Based on the above analysis, the system can generate multiple levels of feedback in real time:
[0202] a) Precise instructions to individual dancers, such as "raise your left hand 5 degrees to keep in line with the group."
[0203] b) Suggestions for team coordination, such as "the time difference between the back row and the front row should be shortened by 0.2 seconds."
[0204] c) Evaluation of the overall performance, such as "the overall synchronization rate is 95%, but the transition action at the 3rd minute needs more practice."
[0205] Through this multi-level, dynamic attention approach, the system is able to accurately evaluate large group dance performances involving hundreds of dancers while ensuring real-time performance. For example, in a large square dance competition involving 500 dancers, the system successfully identified 12 key dancers and 8 difficult action clips, and generated a detailed synchronization evaluation report within 3 seconds, providing valuable reference for on-site judges and coaches.
[0206] This method can be applied not only to traditional dance forms, but can also be easily adapted to emerging dance types. For example, in a street dance competition, the system can quickly identify innovative breakdance moves and evaluate the improvisational synchronization of other dancers, providing an objective evaluation standard for this highly improvised dance form.
[0207] Overall, by dynamically focusing on key movements and key dancers, combined with a multi-level evaluation approach and advanced deep learning technology, our system is able to accurately and in real time evaluate the overall coordination of large-scale dance performances, providing immediate and valuable feedback for dance choreography, rehearsals, and competitions.
[0208] In order to verify the superiority of the present invention, the applicant combines the embodiments of the present invention with comparative examples under different conditions and provides detailed test results and analysis.
[0209] Example 1 (present invention): Complete system using multi-scale spatiotemporal attention mechanism (MS-STA) and dynamic graph convolution (DGC)
[0210] Comparative Example 1: A system using only traditional convolutional neural network (CNN);
[0211] Comparative Example 2: A system using a long short-term memory network (LSTM) but without an attention mechanism;
[0212] Comparative Example 3: A system using a graph convolutional network (GCN) with a fixed graph structure;
[0213] Test indicators and detection methods:
[0214] 1. Synchronization evaluation accuracy: Professional dance judges scored 100 group dance performances, and used the judges’ scores as the true labels. The Pearson correlation coefficient between the system score and the true label was calculated.
[0215] 2. Real-time performance (latency): measures the average time from video input to generating ratings and feedback, in milliseconds (ms).
[0216] 3. Computational efficiency: The average time required to process 1 minute of HD video under the same hardware conditions, in seconds.
[0217] 4. Model size: the total number of model parameters, in M.
[0218] 5. Accuracy of personalized suggestions: Invite 50 dancers to train according to the system's suggestions for one month, and have professional judges evaluate their progress. The consistency between their actual progress and the system's predicted progress is calculated and expressed as a percentage.
[0219] 6. Robustness to complex movements: In 20 performances involving difficult and fast movements, the consistency between the system scores and the scores of professional judges was calculated and expressed as the Pearson correlation coefficient.
[0220] The test results are shown in the following table:
[0221] index Example 1 Comparative Example 1 Comparative Example 2 Comparative Example 3 Synchronization evaluation accuracy 0.95 0.78 0.83 0.87 Real-time performance (latency) 25ms 40ms 35ms 30ms Computational efficiency 3.5s 5.2s 4.8s 4.1s Model size 15M 22M 18M 17M Personalized suggestion accuracy 92% 75% 80% 84% Robustness to complex motions 0.92 0.70 0.76 0.81
[0222] According to the test results, Example 1 (the present invention) performs best in all indicators and is therefore identified as the best embodiment. Now let's analyze these results in depth as follows:
[0223] 1. Synchronization evaluation accuracy: The accuracy of the proposed method reaches 0.95, which is much higher than that of other comparison examples. This shows that the multi-scale spatiotemporal attention mechanism (MS-STA) can effectively capture the complex interactive relationship between dancers, while the dynamic graph convolution (DGC) successfully models the dynamic structure of the group dance.
[0224] 2. Real-time performance: The latency of the present invention is only 25ms, thanks to the optimized network structure and efficient parallel computing implementation. Low latency is essential for providing real-time feedback, allowing dancers to adjust their movements immediately.
[0225] 3. Computational efficiency: It only takes 3.5 seconds to process a 1-minute video, which shows the advantages of the present invention in processing large-scale data. Efficient computing enables the system to process multiple dance performances simultaneously, improving the overall throughput.
[0226] 4. Model size: Despite being more powerful, the model size of the present invention (15M) is the smallest, which means that the design is very efficient and is conducive to the deployment and updating of the model.
[0227] 5. Personalized suggestion accuracy: 92% accuracy demonstrates the superior performance of the invention in generating long-term improvement suggestions. This is mainly due to the reinforcement learning framework, which is able to develop personalized training plans based on the characteristics of each dancer.
[0228] 6. Robustness to complex actions: The correlation coefficient of 0.92 shows that the present invention performs well in handling difficult and fast actions. This is due to the multi-scale spatiotemporal attention mechanism, which can capture the action characteristics of different time scales.
[0229] The proposed method significantly outperforms the comparison method in all indicators, which fully demonstrates the effectiveness of the proposed multi-scale spatiotemporal attention mechanism (MS-STA) and dynamic graph convolution (DGC). In particular, the proposed method shows obvious advantages in processing complex actions and generating personalized suggestions.
[0230] These results show that the invention can not only accurately evaluate dance synchronization, but also provide efficient and real-time feedback in practical applications. The compactness and efficiency of the model make it easy to deploy in a variety of scenarios, from professional dance competitions to daily training.
[0231] Most importantly, the 92% accuracy rate of personalized recommendations shows that the system can not only evaluate current performance, but also effectively guide future training. This is of great significance to the development of dance education and performing arts, and can help dancers improve their skills faster and achieve continuous progress.
[0232] Please refer to Fig. 9 ,This heat map comparison intuitively shows the difference between the present invention and other comparison methods in dance synchronization assessment. The heat map of the present invention shows more red high synchronization points and is more evenly distributed, indicating that it can more accurately capture the synchronization of dance movements. In contrast, other methods have fewer hot spots and lighter colors, indicating that they are not as accurate as the present invention in identifying synchronized movements.
[0233] Please refer to Fig.10 This complete dance synchronization timeline comparison diagram shows in detail the performance of the present invention and the other three comparison methods in evaluating dance synchronization in a 150-second dance performance.
[0234] The key features and benefits in the figure are as follows:
[0235] 1. Overall performance: The present invention (red line) shows higher synchronization scores throughout the entire process, indicating that it can more accurately capture and evaluate the synchronization of dancers.
[0236] 2. Dynamic range: The curve of the present invention has greater fluctuations, which means that it can more sensitively reflect the subtle changes in dance movements, while the curves of other methods are relatively flat.
[0237] 3. Complex action processing: At the "complex action start" (60 seconds), the curve of the present invention shows obvious changes, while other methods react slowly or not obviously, which reflects the advantages of the present invention in processing complex actions.
[0238] 4. High-speed reaction: At the beginning of the "high-speed action sequence" (90 seconds), the curve of the present invention rises rapidly, showing a high sensitivity to rapid changes.
[0239] 5. Peak performance: At the "climax of the action" (120 seconds), the curve of the present invention reaches the highest point, accurately capturing the climax of the dance, while other methods are relatively weak in response at this critical moment.
[0240] 6. Recovery ability: After the climax, the curve of the present invention can adjust quickly to reflect the change of dance rhythm, demonstrating the rapid adaptability of the system.
[0241] 7. Stability: Although the curve of the present invention fluctuates greatly, the overall trend is smoother without abrupt jumps, indicating that its evaluation results are more stable and reliable.
[0242] 8. Resolution: The curves of the present invention show higher resolution throughout the process and can capture more details, while the curves of other methods are relatively blurred.
[0243] 9. Consistency: Throughout the 150-second performance, the present invention maintained a high score, demonstrating the ability to evaluate different types of movements consistently.
[0244] 10. Sensitivity: At each critical time point (such as the start of complex movements, high-speed movement sequences, and movement climaxes), the present invention exhibits faster and more obvious responses, reflecting its excellent sensitivity.
[0245] This timeline diagram clearly demonstrates the comprehensive advantages of the present invention in dance synchronization assessment. It can not only assess synchronization more accurately, but also keenly capture subtle changes and key moments in the dance process. This high-precision and high-sensitivity assessment capability is of great significance for professional dance training, competition scoring and quality control of large-scale performances.
[0246] In contrast, although other methods (CNN, LSTM and fixed GCN) can also reflect the changes in dance synchronization to a certain extent, their performance is obviously inferior to that of the present invention in terms of accuracy, sensitivity and adaptability. In particular, their limitations are more obvious when dealing with complex movements, rapid changes and climax parts.
[0247] This visualization result strongly supports the innovation and superiority of the present invention in the field of dance synchronization assessment and demonstrates its great potential in practical applications. It can not only provide more accurate tools for dance educators and judges, but also help dancers better understand and improve their performance.
[0248] In general, these test results fully demonstrate the innovation and practicality of the present invention in the field of dance synchronization assessment, and open up new directions for related research and applications.
[0249] It should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A real-time dance synchronization evaluation method based on attention mechanism, characterized in that: The following steps are involved: Get multi-view dance performance videos; Preprocessing the multi-view dance performance video to obtain a preprocessed video; Detect and track key points of the human body based on the preprocessed video to obtain a key point coordinate sequence; Constructing and training a temporal attention network based on the key point coordinate sequence; Calculating a synchronization score using the temporal attention network; generating real-time feedback information based on the synchronization score; storing the synchronization score and the feedback information as historical data; analyzing the historical data and generating long-term improvement suggestions; feeding back the real-time feedback information and the long-term improvement suggestions to the user for guiding subsequent dance training; The temporal attention network is updated according to the user's subsequent training data to achieve continuous optimization.
2. The method according to claim 1, characterized in that: The pre-processing step comprises: The improved non-local mean filtering algorithm is used for denoising, where: Where NL(x) is the pixel value after denoising, w(x,y) is the weight function, P(x) and P(y) are image blocks centered on x and y, and h is the filter parameter; Apply an adaptive white balance algorithm for color correction, where: Among them, R out , G out , B out is the corrected RGB channel value, R i n. G i n. B i n is the original RGB channel value, μ target is the target brightness, μ R ,μ G ,μ B is the average brightness of each channel; A bicubic interpolation algorithm is applied to resize all videos to a uniform resolution.
3. The method according to claim 1, characterized in that The human key point detection and tracking step adopts an improved CascadeNet model, including: P=F(I;θ) Among them, P is the predicted key point coordinates, I is the input image, θ is the model parameter, and F is the cascaded convolutional neural network; Introducing spatiotemporal consistency constraints: Among them, P t and P t-1 are the key point coordinates of the current frame and the previous frame, and T is the affine transformation; Apply an adaptive learning rate adjustment mechanism: Among them, η t is the learning rate at time t, η0 is the initial learning rate, T is the total number of iterations, and α and τ are hyperparameters.
4. The method according to claim 1, characterized in that: The temporal attention network includes a multi-scale spatiotemporal attention mechanism MS-STA and a dynamic graph convolution DGC, where: The calculation process of the MS-STA is: in, and are spatial and temporal attention matrices respectively, 1 represents different scales, and are spatially adjacent features, and is the feature separated by k frames in time, ⊙ represents the Hadamard product, and σ is the activation function; The calculation process of the DGC is: G t =f θ (P t ) Among them, G t is the dynamic graph structure at time t, f θ is the graph generating function, P t are the key point coordinates, To add a self-connected adjacency matrix, is the grayscale matrix, is the node feature of layer I, W l is the learnable weight matrix.
5. The method according to claim 4, characterized in that The overall structure of the temporal attention network is: t =MS-STA(DGC(X t ))S t =MLP(H t )in, H t is the final time series feature representation, S t is the synchronization score, and MLP is a multi-layer perceptron.
6. The method according to claim 1, characterized in that The synchronization score calculation step comprises: Calculate individual synchronization scores: S i =ω1·S spatial +ω2·S temporal +ω3S rhythm Among them, S spatial , S temporal , S rhythm are the spatial, temporal and rhythmic synchronization scores, respectively, and ω1, ω2 and ω3 are weights; Calculate the group's overall synchronization score: Among them, N is the number of dancers, and β and γ are adjustment parameters.
7. The method according to claim 1, characterized in that The real-time feedback generation step includes: based on the individual synchronization score S i ,Use decision tree algorithm to generate individual improvement suggestions; based on the group's overall synchronization score S g ,A fuzzy logic system is applied to generate an overall coordination evaluation.
8. The method according to claim 1, characterized in that: The historical data analysis step comprises: Applying the ARIMA model for time series analysis: Among them, X t is the observed value at time t, c is a constant term, and θ are model parameters, ε is the error term, p is the number of autoregressive terms, and q is the number of moving average terms; The improved K-means++ algorithm is used for clustering analysis, and the objective function is: Where K is the number of clusters, x i is the data point, μ k is the center of the kth cluster, C k is the kth cluster, λ is the regularization parameter and R(C) is the regularization term.
9. The method according to claim 1, characterized in that: The generation of the long-term improvement suggestions is based on a reinforcement learning framework and includes the following steps: Take the dancer's historical data as state s; Take the optional training items as action a; Use synchronization improvement as reward r; Use Q-learning algorithm to optimize the training plan: Q(s,a)←Q(s,a)+α[r+γmax_a'Q(s',a')-Q(s,a)] Among them, Q(s,a) is the state action value function, α is the learning rate, γ is the discount factor, and s' is the next state; Select the best training plan based on the optimized Q value and generate personalized long-term improvement suggestions.
10. A real-time dance synchronization evaluation system based on an attention mechanism that implements the method according to any one of claims 1 to 9, characterized in that: include: Multi-view video acquisition module, used to obtain multi-view dance performance videos; A video preprocessing module, used for preprocessing the multi-view dance performance video; A human key point detection and tracking module, used for detecting and tracking human key points based on the preprocessed video; Temporal Attention Network module, used to build and train the temporal attention network; A synchronization score calculation module, used to calculate the synchronization score based on the temporal attention network; A real-time feedback generation module, used to generate real-time feedback information according to the synchronization score; A historical data storage module, used to store the synchronization score and feedback information; A long-term improvement suggestion generation module, used for analyzing the historical data and generating long-term improvement suggestions; A feedback display module is used to feed back the real-time feedback information and long-term improvement suggestions to the user; A network update module is used to update the temporal attention network according to subsequent training data of the user.
Citation Information
Cited By
Motion feature extraction and quality evaluation model based on fuzzy logic
CN120412090A
