Hand-drawn spiral line classification method based on Transform multi-modal algorithm
Through a multi-modal algorithm based on Transformer, combined with paper sketchpads and marker pens to collect data, the tremor and turn spacing features of hand-drawn spirals are extracted and fused, which solves the limitations of feature fusion in the classification of hand-drawn spirals in the existing technology and achieves Provide efficient and accurate classification results.
Patent Information
- Application Number
- CN202410815048.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-06-24
Smart Images

Figure CN118628826A
Abstract
Description
Technical Field
[0001] The invention belongs to the field of computer science and artificial intelligence technology, and in particular relates to a hand-drawn spiral classification method based on a Transformer multimodal algorithm. Background Art
[0002] First of all, with the rapid development of artificial intelligence technology, deep learning technology has experienced explosive growth in various fields. The two main application areas of deep learning technology are CV-Computer Vision and NLP-Natural Language Processing. In the field of CV, the application and improvement of CNN-Convolutional Neural Networks is the cornerstone of many outstanding algorithms. The main reason is that convolution operations can effectively capture complex features in images. However, convolution operations also have some "innate deficiencies". For example, the output of convolution operations only considers the influence of the current input without considering the influence of inputs at other times. Therefore, it is "incapable" for some signals in the form of sequences. This problem is particularly prominent in NLP, because the input of NLP is often a signal in the form of a sequence, such as a sentence or an article. In this signal, the relative position relationship of words or clauses is very important. Interchanging the positions of words may lead to completely different meanings. In addition, the long-distance features in the sentence are also very critical for understanding semantics. In order to solve the above problems, RNN-Recurrent Neural Network was introduced into the field of NLP. In addition, based on the original RNN model, LSTM (Long Short-Term Memory) and GRU (Gated Recurrent Unit) alleviated the gradient vanishing problem in the time dimension by adding intermediate state information, achieving good results and becoming the standard model of RNN. In the RNN model, all network parameters at each time point are shared. This structural feature of the model is like a "double-edged sword". On the one hand, it brings its superior performance in the field of NLP, and on the other hand, it also seriously hinders the development of the RNN model. Because the calculation of RNN at each moment must be based on the calculation completed at the previous moment, such a sequence dependency relationship is destined to make RNN difficult to accelerate through large-scale parallel computing. Although there are efficiency issues, RNN is still the most effective model for NLP. The most advanced achievements in various sub-fields of NLP are almost all occupied by RNN until the emergence of the Transformer model in 2017.
[0003] Secondly, multimodal technology has become a hot topic in the field of artificial intelligence in recent years, especially after the remarkable progress of deep learning technology. The purpose of this section is to provide a more comprehensive background of multimodal technology, including its development history, key challenges, technical methods, and practical applications in different application fields. The development of multimodal technology can be traced back to the early explorations in fields such as computer vision, natural language processing, and speech recognition, when researchers tried to make computers understand and process different forms of human information. In the early 21st century, with the rise of machine learning, especially deep learning technology, multimodal learning began to develop rapidly. Deep learning provides the ability to effectively process large-scale data sets and learn complex data representations, providing impetus for the advancement of multimodal technology. In the past decade, with the availability of large-scale data sets and the significant improvement of computing power, the research on multimodal learning has made remarkable progress. In particular, the introduction of the Transformer model provides a powerful framework for processing data of different modalities, promoting the development of cross-modal representation learning and modality fusion methods.
[0004] The great success of Transformer in the field of NLP has quickly attracted the attention of scholars in the field of CV. The first model to apply the Transformer model to visual tasks was the Vit image classification model proposed in 2020.
[0005] With the widespread application of Transformer in the field of deep learning, many Transformer-based multimodal models have also been proposed by researchers. Data of different modalities have different characteristics and distributions. How to design effective methods to fuse these heterogeneous data is a key challenge. And the purpose of processing data of different modalities through joint learning is to discover shared representations between different modalities.
[0006] Existing multimodal Transformer technology solutions reflect the advanced capabilities of deep learning in processing and integrating different types of data (such as text, images, sounds, etc.). These technology solutions are usually designed to understand and generate content containing multimodal information, support cross-modal retrieval, automatic description generation, and improve human-computer interaction experience. ViLBERT (Visual and Language BERT) is a multimodal model designed for vision and language tasks. It processes image and text inputs independently through a two-stream structure, and then learns cross-modal representations through a shared Transformer layer. ViLBERT provides an effective framework for modeling the relationship between vision and language and is widely used in tasks such as image annotation and visual question answering. LXMERT is designed to solve visual question answering and visual reasoning tasks. By jointly pre-training image and text representations on large-scale datasets, it can understand complex visual content and natural language queries. The LXMERT model includes three Transformer encoders for images, questions, and cross-modal, supporting efficient multimodal information processing. Although CLIP mainly trains image and text representations jointly through large-scale contrastive learning, it adopts a simple but powerful method to understand the relationship between images and text. By performing contrastive learning across modalities, CLIP can handle a wide range of visual tasks with little or no task-specific data adaptation. VisualBERT is a method that applies BERT to multimodal data by embedding image features into text sequences and processing the fused information with a single Transformer model. This approach demonstrates how pre-trained language models can be applied to multimodal tasks such as visual question answering and image description through fine-tuning. These multimodal Transformer technology solutions have different focuses and demonstrate the ability to integrate and process multimodal data in different application scenarios. As research continues to advance, we can expect that more innovative multimodal processing methods will be proposed to cope with more complex and challenging AI tasks.
[0007] However, the current spiral classification methods based on multimodal fusion have significant limitations. There are currently two mainstream methods: obtaining the multimodal information of the artist (pen tip pressure, drawing speed, hand-drawn spirals, etc.) through auxiliary equipment and collecting multimodal information by drawing spirals on templates. Obtaining the artist's multimodal information through auxiliary equipment usually requires the use of high-cost auxiliary equipment, such as tablets, to capture details such as speed and pen tip pressure during the drawing process, which not only increases the dependence on professional operators, but also greatly increases the implementation cost. In addition, the current hand-drawn note collection schemes mostly require drawing in accordance with specific auxiliary templates. This fixed mode not only limits the artist's freedom, but also makes it difficult to accurately capture the artist's actual hand tremor. More importantly, although the tremor information and turn spacing information of the spiral are crucial for classification, there is currently a lack of a multimodal network specifically for spiral feature extraction, and most studies have failed to fully pay attention to the simultaneous importance of these two features. For example, general Transformer networks, such as ViT, can focus on the tremor characteristics of spirals through input images, but often ignore the spacing characteristics between the turns of the spirals. Summary of the invention
[0008] In view of this, the present invention proposes a hand-drawn spiral classification method based on Transformer multimodal algorithm, comprising the following steps:
[0009] S10, using a paper drawing board and a signature pen as data collection equipment, after obtaining the subject's hand-drawn spiral coil, it is transferred to the computer for processing;
[0010] S20, converting the collected spiral images into binary images of uniform size and removing noise;
[0011] S30, extracting the tremor feature and turn spacing feature through the multimodal spiral classification Transformer network;
[0012] S40, after encoding different features of the same image, the data of each modality is fused through the hierarchical fusion strategy of the multimodal spiral classification Transformer network;
[0013] S50, further optimizes the fusion through the cross-modal attention mechanism;
[0014] S60, outputting the evaluation grade of the spiral drawn by the subject through the decoder and the MLP head.
[0015] Preferably, the S30 includes:
[0016] S31, saving the image tremor feature as a tremor feature matrix through a tremor extraction encoder;
[0017] S32, converting the turn spacing features of the image into a time series with significant differences through a turn spacing feature extraction encoder.
[0018] Preferably, the S40 includes converting the input image into two modalities through a cross-modal Transformer encoder, which can process feature vectors from different modalities; the cross-modal encoder adopts a cross-modal attention mechanism based on the Transformer architecture, so that the model can consider the information of tremor and turn spacing at the same time when calculating self-attention; primary fusion is achieved at a low level of the encoder, and turn spacing and image tremor features are directly mixed at the feature level through weighted splicing, and a cross-modal attention mechanism is adopted in the middle layer of the encoder, so that each modality can adjust its representation according to the contextual information of another modality, and more complex fusion operations are performed at a high level of the encoder, including in-depth learning of the relationship between modalities and a dynamic weight adjustment mechanism to ensure that the model fully considers all relevant information before finally outputting the rating result.
[0019] Preferably, the S50 includes a Transformer-based cross-modal enhanced attention mechanism for processing and integrating the binary image modality of tremor information and the time series modality of turn spacing information; the mechanism is based on the self-attention and position encoding functions of the Transformer, and learns the fine-grained features of the binary image and the time series respectively through modality-specific encoder branches; in the feature learning process, a cross-modal interaction module is added, which includes a multi-head attention mechanism to capture and amplify the associations in the binary image and time series data. This module dynamically adjusts the contribution of each modality in the feature fusion process by calculating the mutual attention scores between different modalities.
[0020] Preferably, the S31 comprises the following steps:
[0021] S311, processing the hand-drawn spiral image by binarization;
[0022] S312, the processed image is divided into several small pieces through the embedding layer, each small piece contains a part of the spiral image and carries tremor information, and the weight corresponding to the area with dense tremor exceeds that of the area with smooth or no spiral line, so as to pay more attention to these key areas during the model training process;
[0023] S313, each image block is converted into a one-dimensional vector, and in order to maintain the spatial order information of the sequence elements, position coding is introduced to embed the weight matrix corresponding to each image block into the corresponding one-dimensional vector. By equipping each image block with a position coding, the model can parse the specific location of each part in the entire spiral line, thereby identifying the tremor characteristics;
[0024] S314, the image block is sent to the Transformer encoder layer after combining the position encoding, including the self-attention mechanism and the feedforward neural network, so that the model learns the relationship between the blocks in different areas of the image.
[0025] Preferably, the S32 comprises the following steps:
[0026] S321, preprocessing the input hand-drawn spiral image using an image processing algorithm, including edge detection and morphological operations, to highlight the spiral and remove noise;
[0027] S322, using an image skeletonization method to determine the coordinates of the center point of the helix and perform turn spacing measurement;
[0028] S323, for a hand-drawn spiral, with the center of the spiral as the origin, rays are emitted to 12 angles of 30°, 60°, 90°, 120°, 150°, 180°, 210°, 240°, 270°, 300°, 330°, and 360° around, the rays intersect each layer of the spiral, the length of the line segment between each ray and the focus of each layer of the spiral is saved, and the turn spacing information at different angles is stored as a time series;
[0029] S324, using a turn spacing feature extraction encoder to encode the spatial distribution characteristics of the turn spacing, and reducing the dimension through a pooling layer to extract features.
[0030] Beneficial effects: The present invention aims at the existing problems of the multimodal Transformer fusion model, and proposes a method for extracting different modal information in an image and performing multimodal fusion. This method can not only be used in the fusion application of the tremor feature and the turn spacing feature of the spiral line, but also make cutting-edge explorations for the research of multimodal data fusion. In addition, the feature extraction algorithm proposed in the invention can also be applied to scenes such as handwriting recognition and human motion behavior recognition.
[0031] The present invention provides a systematic solution for researchers and professionals in similar fields through its unique cross-modal hierarchical fusion Transformer model, refined tremor feature extraction algorithm, and innovative turn spacing measurement method. The combination of these technologies not only optimizes the processing flow of multimodal data, but also improves the accuracy and efficiency of hand-drawn spiral classification. By disclosing the technical details and methodology of the present invention, we aim to promote the sharing of knowledge in this field, encourage peers to conduct in-depth research and development, and further promote the advancement of related science and technology. The disclosure of the present invention can provide like-minded researchers with the necessary technical foundation and inspiration so that they can innovate and expand on this basis, thereby realizing wider applications in multidisciplinary fields such as bioinformatics and artificial intelligence.
[0032] Also includes at least:
[0033] (1) Aiming at the complexity of multimodal data processing, a cross-modal hierarchical fusion Transformer model combining time series and image modalities is proposed. The model adopts an innovative cross-modal attention mechanism to achieve weighted concatenation of feature vectors at different neural network levels, thereby effectively fusing tremor and turn spacing information. The present invention can perform fusion operations of different complexities at lower, middle and higher network levels, especially a mechanism for dynamic weight adjustment of cross-modal data;
[0034] (2) Aiming at the limitations in tremor feature analysis, the present invention proposes an advanced tremor feature extraction encoder suitable for processing images with severe tremor or inter-layer crossing of spiral lines. The algorithm not only extracts the severity and density information of the tremor, but also converts this information into a weighted matrix to emphasize the importance of key areas in model training. The present invention proposes a tremor feature extraction method combining position encoding and image block processing, and the application of the weighted matrix generated by this method in the model;
[0035] (3) The present invention designs an algorithm for accurately measuring the turn spacing of a hand-drawn spiral. The center point coordinates are determined by preprocessing and skeletonization, and then the information of different angle spacings is captured by multi-angle ray measurement. The present invention uses a multi-angle ray measurement method based on the center of the spiral as the reference, as well as an encoding and pooling strategy for the measured turn spacing time series data;
[0036] (4) The present invention proposes a Transformer-based cross-modal enhanced attention mechanism for processing and integrating the tremor and turn spacing information of binary image modalities and time series modalities. The mechanism is based on multi-head attention and accurately captures and amplifies the subtle associations in binary image and time series data. The present invention combines self-attention and position encoding functions to realize an attention mechanism for fine-grained feature learning and cross-modal interaction, especially the application of this mechanism in feature fusion and model training. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 This is a flowchart of the steps of a hand-drawn spiral classification method based on the Transformer multimodal algorithm according to an embodiment of the present invention;
[0038] Figure 2 A schematic diagram of a multimodal spiral line classification Transformer network of a hand-drawn spiral line classification method based on a Transformer multimodal algorithm according to an embodiment of the present invention;
[0039] Figure 3 This is a flowchart of tremor feature extraction of a hand-drawn spiral classification method based on a Transformer multimodal algorithm according to an embodiment of the present invention;
[0040] Figure 4 This is a flow chart of spiral turn spacing feature extraction of a hand-drawn spiral classification method based on the Transformer multimodal algorithm in an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0042] On the contrary, the present invention covers any substitution, modification, equivalent method and scheme made on the essence and scope of the present invention as defined by the claims. Further, in order to make the public have a better understanding of the present invention, some specific details are described in detail in the detailed description of the present invention below. Those skilled in the art can fully understand the present invention without the description of these details.
[0043] See also Figure 1 To achieve the above purpose, the technical solution of the present invention is as follows:
[0044] A hand-drawn spiral classification method based on Transformer multimodal algorithm includes the following steps:
[0045] S10, using a paper drawing board and a signature pen as data collection equipment, after obtaining the subject's hand-drawn spiral coil, it is transferred to the computer for processing;
[0046] S20, converting the collected spiral images into binary images of uniform size and removing noise;
[0047] S30, extracting the tremor feature and turn spacing feature through the multimodal spiral classification Transformer network;
[0048] S40, after encoding different features of the same image, the data of each modality is fused through the hierarchical fusion strategy of the multimodal spiral classification Transformer network;
[0049] S50, further optimizes the fusion through the cross-modal attention mechanism;
[0050] S60, outputting the evaluation grade of the spiral line drawn by the subject through the decoder and MLP head (multi-layer classification perceptron).
[0051] S30 includes:
[0052] S31, saving the image tremor feature as a tremor feature matrix through a tremor extraction encoder;
[0053] S32, converting the turn spacing features of the image into a time series with significant differences through a turn spacing feature extraction encoder.
[0054] S40 proposed a Transformer model for cross-modal layered fusion. The main principle of this model can be found in Figure 2 As shown. For the data after the input image is converted into two modalities, the present invention designs a cross-modal Transformer encoder, which can process feature vectors from different modalities (time series and images). Based on the Transformer architecture, the cross-modal encoder adopts a cross-modal attention mechanism so that the model can consider the information of tremor and turn spacing at the same time when calculating self-attention. Primary fusion is achieved at the lower level of the encoder, and the turn spacing and image tremor features are directly mixed by weighted splicing at the feature level. The cross-modal attention mechanism is adopted in the middle layer of the encoder, so that each modality can adjust its representation according to the contextual information of the other modality. More complex fusion operations are performed at the high level of the encoder, including in-depth learning of the relationship between modalities and a dynamic weight adjustment mechanism to ensure that the model fully considers all relevant information before finally outputting the rating results.
[0055] S50 proposed a Transformer-based cross-modal enhanced attention mechanism, which is specially designed to process and integrate the binary image modality of tremor information and the time series modality of turn spacing information. The mechanism is based on the powerful self-attention and position encoding capabilities of the Transformer, and learns fine-grained features of binary images and time series separately through modality-specific encoder branches. During the feature learning process, an innovative cross-modal interaction module is introduced, which contains a multi-head attention mechanism that can capture and amplify the subtle associations in binary images and time series data. This module dynamically adjusts the contribution of each modality in the feature fusion process by calculating the mutual attention scores between different modalities.
[0056] Ultimately, this enhanced attention layer significantly improves the accuracy and efficiency of the fusion of binary images and time series data, and improves the classification of different tremor levels of hand-drawn spirals. By understanding and fusing the information of the two modalities at different levels, our mechanism not only fully exploits the potential of the Transformer architecture, but also sets a new standard for cross-modal feature extraction. The precise modality fusion of this method is crucial to the accuracy of the results.
[0057] See also Figure 3 , the input image is divided into 9 small blocks of the same size, each of which has a corresponding position encoding information denoted by x1-x9, and a corresponding tremor weight matrix denoted by w1-w9, S31 includes the following steps:
[0058] S311, processing the hand-drawn spiral image by binarization;
[0059] S312, the processed image is divided into several small pieces through the embedding layer, each small piece contains a part of the spiral image and carries tremor information, and the weight corresponding to the area with dense tremor exceeds that of the area with smooth or no spiral line, so as to pay more attention to these key areas during the model training process;
[0060] S313, each image block is converted into a one-dimensional vector, and in order to maintain the spatial order information of the sequence elements, position coding is introduced to embed the weight matrix corresponding to each image block into the corresponding one-dimensional vector. By equipping each image block with a position coding, the model can parse the specific location of each part in the entire spiral line, thereby identifying the tremor characteristics;
[0061] S314, the image block is sent to the Transformer encoder layer after combining the position encoding, including the self-attention mechanism and the feedforward neural network, so that the model learns the relationship between the blocks in different areas of the image.
[0062] One of the key technical points in the present invention is to design a multi-modal spiral classification transformer to extract tremor feature algorithms. In traditional tremor feature analysis methods, they are often limited to the recognition of specific areas or simple patterns, which often does not work well when processing complex or severe tremor images. For example, the traditional method of using polar coordinates to expand the Archimedean spiral can show the tremor characteristics of the spiral, but when faced with severe tremor or cross-layer intersection of the spiral, its effect is greatly reduced.
[0063] In order to overcome the limitations of the prior art, the present invention proposes an advanced tremor feature extraction encoder. First, by binarizing the hand-drawn spiral image, the present method not only highlights the tremor features, but also retains the overall information of the image. Through this preprocessing step, the image is significantly enhanced to highlight its tremor properties while maintaining its global visual structure. Subsequently, the processed image is divided into multiple small pieces (36 pieces in this embodiment) through an embedding layer, each of which contains a part of the spiral image and carries specific tremor information. This segmentation technique enables the network to effectively identify tremor features at global and local locations. The present invention extracts the severity and density of the tremor in each image patch through a sophisticated algorithm, and converts this information into a weight matrix with significant differences. This ensures that the weights corresponding to the areas with dense tremors far exceed those of the areas with flatter or no spirals, so that more attention is paid to these key areas during the model training process.
[0064] Each image patch is converted into a one-dimensional vector, and position encoding is introduced to maintain the spatial order information of the sequence elements. In the network, position encoding plays a vital role, which ensures the coherence of the spatial relationship between image patches. More importantly, the weight matrix corresponding to each image patch is embedded into the corresponding one-dimensional vector. By equipping each image patch with a position encoding, the model can accurately resolve the specific location of each part in the entire spiral, thereby more accurately identifying the tremor characteristics.
[0065] This encoding method that combines image patches, position information and tremor feature matrices provides a clear way to easily capture tremor characteristics across the entire image. In this framework, areas with severe tremor receive extra attention during model training due to higher weights, thereby optimizing the identification and analysis of tremor features. The image patches are fed into a series of Transformer encoder layers after combining the position encoding. These layers include self-attention mechanisms and feed-forward neural networks, which allow the model to learn the complex relationships between patches in different regions of the image.
[0066] See also Figure 4 , S32 comprises the following steps:
[0067] S321, preprocessing the input hand-drawn spiral image using an image processing algorithm, including edge detection and morphological operations, to highlight the spiral and remove noise;
[0068] S322, using an image skeletonization method to determine the coordinates of the center point of the helix and perform turn spacing measurement;
[0069] S323, for a hand-drawn spiral, with the center of the spiral as the origin, rays are emitted to 12 angles of 30°, 60°, 90°, 120°, 150°, 180°, 210°, 240°, 270°, 300°, 330°, and 360° around, the rays intersect each layer of the spiral, the length of the line segment between each ray and the focus of each layer of the spiral is saved, and the turn spacing information at different angles is stored as a time series;
[0070] S324, using a turn spacing feature extraction encoder to encode the spatial distribution characteristics of the turn spacing, and reducing the dimension through a pooling layer to extract features.
[0071] The invention discloses a multi-modal spiral classification transformer algorithm for extracting turn spacing features. In order to accurately capture and analyze the turn spacing changes in hand-drawn spirals, the invention first uses image processing algorithms, such as edge detection and morphological operations, to pre-process the input hand-drawn spiral image, highlight the spiral and remove noise. Then, the image skeletonization method is used to determine the center point coordinates of the spiral in order to perform accurate turn spacing measurement. For hand-drawn spirals, the spacing at different angles contains important information. Therefore, the present invention takes the center position of the spiral as the origin and emits rays at 12 angles of 30°, 60°, 90°, 120°, 150°, 180°, 210°, 240°, 270°, 300°, 330°, and 360° around it. The rays will intersect with each layer of the spiral, and the length of the line segment between each ray and the focus of each layer of the spiral is saved, and the turn spacing information at different angles is stored as a time series; then the turn spacing feature extraction encoder proposed in the present invention is used to encode the spatial distribution characteristics of these turn spacings, and the dimension is reduced through the pooling layer to extract the most critical features.
[0072] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A hand-drawn spiral classification method based on Transformer multimodal algorithm, It is characterized in that The following steps are involved: S10, using a paper drawing board and a signature pen as data collection equipment, after obtaining the subject's hand-drawn spiral coil, it was transferred to the computer for processing; S20, converting the collected spiral images into binary images of uniform size and removing noise; S30, extracting the tremor feature and turn spacing feature through the multimodal spiral classification Transformer network; S40, after encoding different features of the same image, the data of each modality is fused through the hierarchical fusion strategy of the multimodal spiral classification Transformer network; S50, further optimizes the fusion through the cross-modal attention mechanism; S60, outputting the evaluation grade of the spiral drawn by the subject through the decoder and the MLP head.
2. According to claim 1, the hand-drawn spiral classification method based on the Transformer multimodal algorithm, It is characterized in that The S30 includes: S31, saving the image tremor feature as a tremor feature matrix through a tremor extraction encoder; S32, converting the turn spacing features of the image into a time series with significant differences through a turn spacing feature extraction encoder.
3. The hand-drawn spiral classification method based on the Transformer multimodal algorithm according to claim 1, It is characterized in that The S40 includes converting the input image into two modalities through a cross-modal Transformer encoder, which can process feature vectors from different modalities; the cross-modal encoder adopts a cross-modal attention mechanism based on the Transformer architecture, so that the model can consider the information of tremor and turn spacing at the same time when calculating self-attention; realizing primary fusion at a low level of the encoder, directly mixing turn spacing and image tremor features at the feature level through weighted splicing, adopting a cross-modal attention mechanism in the middle layer of the encoder, so that each modality can adjust its representation according to the contextual information of another modality, and performing more complex fusion operations at a high level of the encoder, including in-depth learning of the relationship between modalities and a dynamic weight adjustment mechanism, to ensure that the model fully considers all relevant information before finally outputting the rating result.
4. The hand-drawn spiral classification method based on the Transformer multimodal algorithm according to claim 1, It is characterized in that The S50 includes a Transformer-based cross-modal enhanced attention mechanism for processing and integrating the binary image modality of tremor information and the time series modality of turn spacing information; the mechanism is based on the self-attention and position encoding functions of the Transformer, and learns fine-grained features of the binary image and the time series respectively through modality-specific encoder branches; During the feature learning process, a cross-modal interaction module is added, which includes a multi-head attention mechanism to capture and amplify the associations between binary images and time series data. This module dynamically adjusts the contribution of each modality in the feature fusion process by calculating the mutual attention scores between different modalities.
5. The hand-drawn spiral classification method based on Transformer multimodal algorithm according to claim 2, It is characterized in that The S31 comprises the following steps: S311, processing the hand-drawn spiral image by binarization; S312, the processed image is divided into several small pieces through the embedding layer, each small piece contains a part of the spiral image and carries tremor information, and the weight corresponding to the area with dense tremor exceeds that of the area with smooth or no spiral line, so as to pay more attention to these key areas during the model training process; S313, each image block is converted into a one-dimensional vector, and in order to maintain the spatial order information of the sequence elements, position coding is introduced to embed the weight matrix corresponding to each image block into the corresponding one-dimensional vector. By equipping each image block with a position coding, the model can parse the specific location of each part in the entire spiral line, thereby identifying the tremor characteristics; S314, the image block is sent to the Transformer encoder layer after combining the position encoding, including the self-attention mechanism and the feedforward neural network, so that the model learns the relationship between the blocks in different areas of the image.
6. The hand-drawn spiral classification method based on the Transformer multimodal algorithm according to claim 2, It is characterized in that The S32 comprises the following steps: S321, preprocessing the input hand-drawn spiral image using an image processing algorithm, including edge detection and morphological operations, to highlight the spiral and remove noise; S322, using an image skeletonization method to determine the coordinates of the center point of the helix and perform turn spacing measurement; S323, for a hand-drawn spiral, with the center of the spiral as the origin, rays are emitted to 12 angles of 30°, 60°, 90°, 120°, 150°, 180°, 210°, 240°, 270°, 300°, 330°, and 360° around, the rays intersect each layer of the spiral, the length of the line segment between each ray and the focus of each layer of the spiral is saved, and the turn spacing information at different angles is stored as a time series; S324, using a turn spacing feature extraction encoder to encode the spatial distribution characteristics of the turn spacing, and reducing the dimension through a pooling layer to extract features.
Citation Information
Patent Citations
Method for grinding spiral line excircle
CN102922379A
Static handwritten image and dynamic multi-sensor fusion signal-based tremor symptom evaluation model and device thereof
CN116386865A
Hand tremor recognition system based on improved MobileViT
CN117152514A
