Facial pain expression analysis method and system based on time-space information

The spatiotemporal features of the facial pain expression video are extracted through the serial intersection of the sliding window and the Transformer model, which solves the objectivity and accuracy problems of facial pain assessment in the existing technology and improves the accuracy and data utilization of pain assessment.

WO2024197967A1PCT designated stage expired Publication Date: 2024-10-03SHENZHEN INST OF ADVANCED TECH CHINESE ACAD OF SCI

Patent Information

Application Number
PCT/CN2023/086134
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-28
Filing Date
2023-04-04
Publication Date
2024-10-03

AI Technical Summary

Technical Problem

Existing facial pain assessment methods rely on manual assessment, lack objectivity, and fail to fully consider the dynamic changes and spatiotemporal characteristics of facial expressions, resulting in insufficient feature information extraction, low pain assessment accuracy, and low data set utilization.

Method used

A sliding window is used to sample the facial expression video, and the discrete cosine transform and sawtooth scan enhancement are combined to extract detailed features. The temporal features and spatial features are extracted in a series intersection manner in the Transformer model to fuse spatiotemporal information.

Benefits of technology

It improves the feature information extraction of facial pain expression videos, enhances the accuracy of pain assessment and the utilization of data sets, realizes end-to-end information processing and detection, and is suitable for complex clinical application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023086134_03102024_PF_FP_ABST
    Figure CN2023086134_03102024_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present invention are a facial pain expression analysis method and system based on time-space information. A facial expression video is sampled by using a sliding window so as to obtain a plurality of segments of sampled videos, so that the utilization rate of a data set can be improved; discrete cosine transform is performed on video frames, and sawtooth scanning is used for enhancement to obtain detail feature enhancement maps, so that detail information can be enhanced; then all the video frames of each segment of sampled video and the corresponding detail feature enhancement maps are combined, and then are respectively inputted into a Transformer model, time features and space features are extracted by using a series cross mode in the Transformer model and are fused, and finally a pain analysis result is obtained according to a pain level corresponding to each segment of sampled video. Feature information of a facial expression video can be fully extracted, and the accuracy of pain evaluation is high.
Need to check novelty before this filing date? Find Prior Art

Description

A method and system for analyzing facial pain expression based on spatiotemporal information Technical Field

[0001] The present invention relates to the technical field of pain assessment, and in particular to a method and system for analyzing facial pain expressions based on spatiotemporal information. Background Art

[0002] Internationally, pain assessment is performed manually by specially trained medical professionals familiar with various monitoring indicators. These results rely heavily on individual knowledge and experience, and are influenced by subjective factors such as emotions, failing to fully and objectively reflect the patient's pain level. Therefore, developing a facial expression pain analysis method to provide clinically accurate and objective pain assessments is crucial, enabling medical professionals to implement timely and appropriate analgesic measures.

[0003] Current pain assessment methods often analyze facial expression images to determine pain levels. These methods fail to consider that facial expressions are dynamic processes, possessing both temporal and spatial sequence information. Consequently, feature extraction is insufficient, resulting in low accuracy in pain assessment. Furthermore, current video segmentation methods simply divide the video into segments, increasing the number of segments and generating multiple videos. This inherently does not improve the overall dataset size or utilization.

[0004] Summary of the Invention

[0005] The main purpose of the present invention is to provide a facial pain expression analysis method, system, intelligent terminal and storage medium based on spatiotemporal information, which can solve the current problems of insufficient feature information extraction, low accuracy of pain assessment and low data set utilization.

[0006] In order to achieve the above object, the present invention provides a method for analyzing facial pain expression based on spatiotemporal information in a first aspect, the method comprising:

[0007] Get facial expression videos;

[0008] Sampling the facial expression video using a sliding window to obtain a plurality of sampled videos;

[0009] Performing discrete cosine transform on each video frame of each sampled video to obtain a frequency domain matrix corresponding to each video frame; enhancing the frequency domain matrix using zigzag scanning and then performing inverse discrete cosine transform to obtain a detail feature enhancement map corresponding to each video frame;

[0010] All video frames and corresponding detail feature enhancement maps of each sampled video are combined and input into the Transformer model respectively, and temporal features and spatial features are extracted in a serial cross-link manner in the Transformer model to obtain the pain level corresponding to each sampled video;

[0011] The pain analysis results are obtained and output according to the pain levels corresponding to all sampled videos.

[0012] Optionally, the facial expression video is sampled using a sliding window to obtain a plurality of sampled videos, including:

[0013] Initializing a sliding window according to a preset starting frame position, a total number of sampled frames, and an interval frame number of the first sampled video; sampling video frames of the facial expression video within the sliding window according to the interval frame number to obtain the first sampled video;

[0014] Set the next sampled video segment as the target video segment;

[0015] Sliding the sliding window according to a moving step;

[0016] When the total number of sampling frames and the interval frame number preset in the target video segment are different from the total number of sampling frames and the interval frame number preset in the previous sampling video segment, the sliding window is updated according to the total number of sampling frames and the interval frame number preset in the target video segment;

[0017] Sampling video frames of the facial expression video in a sliding window according to a preset interval frame number of the target video segment to obtain the target video segment;

[0018] Return and set the next sampled video segment as the target video segment to obtain the next sampled video segment until all sampled video segments are obtained.

[0019] Optionally, the enhancing the frequency domain matrix by using zigzag scanning includes:

[0020] A sawtooth scanning method is adopted, starting from the lower right corner of the frequency domain matrix, and the frequency domain frequency characteristic information is obtained in sequence. If the serial number of the current scanning position is an even number, the frequency domain frequency characteristic information of the previous position is used to replace the frequency domain frequency characteristic information of the current scanning position.

[0021] Optionally, a discrete cosine transform is performed on the video frame to obtain a frequency domain matrix corresponding to the video frame, including:

[0022] Based on a preset image block size, dividing the video frame into a plurality of image blocks;

[0023] For each image block, discrete cosine transform is used to convert spatial domain image feature information into frequency domain frequency feature information to obtain frequency domain frequency feature information corresponding to each image block;

[0024] According to the position of the image block in the video frame, all frequency domain frequency feature information is combined to obtain the frequency domain matrix.

[0025] Optionally, all video frames of the sampled video and the corresponding detail feature enhancement maps are combined and input into the Transformer model, including:

[0026] Combining each video frame of the sampled video with the corresponding detail feature enhancement map and segmenting the image blocks according to a preset image block size to obtain an image block sequence;

[0027] The image block sequence is flattened, linearly projected, and positionally labeled before being input into the Transformer encoder.

[0028] Optionally, extracting temporal features and spatial features in a serial cross-connection manner in the Transformer model includes:

[0029] The spatial features extracted by all attention heads in the multi-head self-attention module are fused with the temporal features extracted by the previous network layer, and then input into the multi-layer perceptron and adopt residual connection to obtain the spatial features;

[0030] The temporal features extracted by all attention heads in the multi-head self-attention module are fused with the spatial features extracted by the previous network layer, and then input into the multi-layer perceptron and residual connection is used to obtain the temporal features.

[0031] Optionally, obtain temporal features or spatial features extracted by the attention heads in the multi-head self-attention module, including:

[0032] Perform a dot product operation on the query matrix and the keyword matrix to obtain a similarity weight used to characterize the correlation between feature elements;

[0033] According to the similarity weight and the numerical matrix, the temporal features or spatial features extracted from the attention head of the attention module are obtained.

[0034] A second aspect of the present invention provides a facial pain expression analysis system based on spatiotemporal information, wherein the system comprises:

[0035] A data acquisition module for acquiring facial expression videos;

[0036] A sliding window module is used to sample the facial expression video using a sliding window to obtain a plurality of sampled videos;

[0037] A detail feature enhancement map module is used to perform discrete cosine transform on each video frame of each sampled video to obtain a frequency domain matrix corresponding to each video frame; enhance the frequency domain matrix using zigzag scanning and then perform inverse discrete cosine transform to obtain a detail feature enhancement map corresponding to each video frame;

[0038] A pain level analysis module is used to combine all video frames and corresponding detail feature enhancement maps of each sampled video and input them into a Transformer model. In the Transformer model, temporal and spatial features are extracted in a serial and cross-linked manner to obtain the pain level corresponding to each sampled video;

[0039] The result module is used to obtain and output the pain analysis results based on the pain levels corresponding to all sampled videos.

[0040] A third aspect of the present invention provides an intelligent terminal, which includes a memory, a processor, and a facial pain expression analysis program based on spatiotemporal information stored in the memory and runnable on the processor. When the facial pain expression analysis program based on spatiotemporal information is executed by the processor, it implements any step of the facial pain expression analysis method based on spatiotemporal information.

[0041] A fourth aspect of the present invention provides a computer-readable storage medium, on which a facial pain expression analysis program based on spatiotemporal information is stored. When the facial pain expression analysis program based on spatiotemporal information is executed by a processor, any step of the facial pain expression analysis method based on spatiotemporal information is implemented.

[0042] As can be seen from the above, compared with the existing technology, the present invention uses a sliding window to sample facial expression videos to obtain several sampled videos, which can improve the utilization rate of the data set. The video frames are discrete cosine transformed and enhanced using zigzag scanning to obtain a detail feature enhancement map, which can enhance the detail information. Then, all video frames of each sampled video and the corresponding detail feature enhancement map are combined and input into the Transformer model. In the Transformer model, temporal features and spatial features are extracted and fused using a series cross-linking method. Finally, pain analysis results are obtained based on the pain level corresponding to each sampled video. The feature information of the facial expression video can be fully extracted, the pain assessment is highly accurate, and the sequence prediction has strong temporal characteristics. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0044] 1 is a schematic flow chart of a method for analyzing facial pain expression based on spatiotemporal information according to an embodiment of the present invention;

[0045] FIG2 is a schematic diagram of sliding window sampling according to the embodiment of FIG1 ;

[0046] FIG3 is a schematic diagram of a specific process of obtaining a frequency domain matrix corresponding to a video frame in step S300 of the embodiment of FIG1 ;

[0047] FIG4 is a schematic diagram of zigzag scanning enhancement according to the embodiment of FIG1 ;

[0048] FIG5 is a schematic diagram of the Transformer architecture of the embodiment of FIG1 ;

[0049] FIG6 is a schematic diagram of a specific process of extracting temporal features or spatial features in step S400 in the embodiment of FIG1 ;

[0050] FIG7 is a graph showing the pain level assessment obtained through the experiment;

[0051] 8 is a schematic structural diagram of a facial pain expression analysis system based on spatiotemporal information according to an embodiment of the present invention;

[0052] FIG9 is a block diagram of the internal structure of a smart terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0053] In the following description, specific details such as particular system structures and techniques are provided for purposes of illustration, not limitation, to facilitate a thorough understanding of the embodiments of the present invention. However, it will be apparent to those skilled in the art that the present invention may be practiced in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.

[0054] It will be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0055] It should also be understood that the terms used in the present specification are only for the purpose of describing particular embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0056] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0057] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0058] The following is a clear and complete description of the technical solutions in the embodiments of the present invention, in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0059] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0060] Scientifically relieving pain remains a challenge in clinical medicine. Accurate pain assessment is the first step in pain management and is essential throughout the entire pain treatment process. Scientific pain monitoring can help aphasic patients express the pain and discomfort caused by medical and surgical procedures in real time, enabling physicians to optimally manage the patient's next medication and medical procedures. Therefore, quantitative monitoring of pain severity is of paramount importance in healthcare.

[0061] Current research primarily focuses on image classification, but fails to consider that facial expressions are dynamic processes, possessing both temporal and spatial sequence information. This results in inadequate feature extraction and low accuracy in pain assessment. Furthermore, current video segmentation simply divides the video into segments, increasing the number of segments and generating multiple videos, without significantly increasing the overall dataset size or utilization.

[0062] To address the above technical issues, the present invention provides a method for analyzing facial pain expressions based on spatiotemporal information. This method introduces a sliding window for video segmentation to improve dataset utilization, performs high-frequency data enhancement on video frames to enhance detail information, and uses a serial crossover method in the Transformer model to extract and fuse temporal and spatial features. This method can complete the fusion extraction of spatiotemporal features with an O(n) time complexity. This method achieves sufficient feature information extraction, high accuracy of pain assessment, and end-to-end information processing and detection, effectively addressing complex practical clinical application scenarios.

[0063] Exemplary Methods

[0064] The embodiment of the present invention provides a facial pain expression analysis method based on spatiotemporal information, which is used to assess pain based on facial expression videos. The method can be deployed on a hospital server or on various electronic devices such as mobile terminals and PCs. Specifically, as shown in Figure 1, the embodiment includes the following steps:

[0065] Step S100: Acquire facial expression video;

[0066] Specifically, facial expression video refers to video captured by capturing the face area. This can be pre-captured and saved video or real-time video captured by a camera. The source of facial expression video is not limited; it can be obtained from a hospital's video server or captured by a mobile device such as a cell phone. Facial expression video must be of a certain length to ensure that the required number of segments are captured during sampling.

[0067] Step S200: Sampling the facial expression video using a sliding window to obtain a plurality of sampled videos;

[0068] Conventional video segmentation simply segments facial expression videos, increasing the number of segments and obtaining multiple sampled videos. This does not inherently improve the data volume or utilization of the overall dataset. This invention uses a sliding window to segment facial expression videos, which not only expands the number of segments but also improves the utilization of each frame in the video to a certain extent, resulting in higher utilization of the overall dataset.

[0069] In this embodiment, when capturing the first sampled video segment, a sliding window is initialized based on the preset starting frame position, total number of sampled frames, and number of interval frames of the first sampled video segment. That is, the starting frame position is set as the starting position of the sliding window, and the length of the sliding window is calculated based on the total number of sampled frames and the number of interval frames. As shown in Figure 2, for example, if the total number of sampled frames is 9 and the number of interval frames is 4, the length of the sliding window contains at least (9-1)*4+1=33 frames. Then, video frames of the facial expression video are sampled within the sliding window based on the number of interval frames to obtain the first sampled video segment. Thereafter, the next sampled video segment is used as the target video segment (i.e., the sampled video segment to be obtained), and the sliding window is slid to the next starting position based on the preset moving step size (2 in Figure 2). Video frames of the facial expression video are sampled within the sliding window based on the number of interval frames to obtain the target video segment. The sliding window is then continued to slide to the next starting position and resampled until all sampled video segments are obtained.

[0070] In another embodiment, the total number of sampling frames of the next sampling video is different from the total number of sampling frames of the previous sampling video, or the interval frame number of the next sampling video is different from the interval frame number of the previous sampling video. At this time, the length of the sliding window of the next sampling video is different from the length of the sliding window of the previous sampling video. Therefore, after sliding the sliding window to the next starting position, it is necessary to update the length of the sliding window according to the preset total number of sampling frames and interval frame number of the target video segment, and then sample the video frames of the facial expression video according to the interval frame number within the sliding window to obtain the target video segment.

[0071] Assume that the total number of frames in the sampled video is n, that is, the total number of frames selected on the sliding window (whose length does not exceed the length of the facial expression video). Each time a complete sliding window stops on a facial expression video, the selected video frames will automatically form a sampled video F, F = {f1,f2,...,f n}; The position of the first frame of the sampled video is the starting frame position P begin , P begin = Position(f1), the distance between adjacent frames selected to form the sampled video is the interval frame number g between adjacent frames, g = | Position(f i+1 )-Position(f i )|, when the sliding window moves on the facial expression video, the number of frames between the starting frames of the two sampled video sequences obtained before and after is the step length s of each movement of the sliding window,

[0072] Figure 2 shows a 35-frame facial expression video V = {v1, v2, ..., v 35}, two video samples containing 9 frames each are collected through the sliding window. Among them, the narrow dotted box is the initial position of the sliding window. The starting position of the sliding window is Position(v1), and the interval between adjacent frames in the sliding window is g=4. The relevant parameters of the sliding window are as follows: the total number of sampled frames n=9, the sampled video F blue ={f1, f2,...,f9}={v1, v5, v9, v 13 , v 17 , v 21 , v 25 , v 29 , v 33}; Starting frame position P begin = Position(f1) = Position(v1), the interval frame number g between adjacent frames = |Position(f2)-Position(f1)| = |Position(v5)-Position(v1)| = 4. The wide dotted box is the sliding window after the above sliding window slides a distance of s = 2, and its starting position is Position(v3). The interval frame number between adjacent frames is the same as the previous sliding window, also g = 4. In this sliding window, a sample video F with a frame number of n = 9 can also be intercepted. yellow The parameters of the sliding window are as follows: total number of sampling frames n = 9, sampling video F yellow ={f1, f2,...,f9}={v3, v7, v 11 , v 15 , v 19 , v 23 , v 27 , v 31 , v 35}; Starting frame position P begin =Position(f1)=Position(v3), the number of interval frames g between adjacent frames=|Position(f2)-Position(f1)|=|Position(v7)-Position(v3)|=4.

[0073] When the parameters such as the total number of sampling frames and the number of interval frames used by the sliding window are different, the utilization rate of each frame in the video can be improved. Taking Figure 2 as an example, the interval frame number of the first sliding window is 4, and the sampled videos are v1, v5, v9, v 13 ,v 17 ,v 21 , assuming that the interval frame number of the second sliding window is 3 and the moving step of the sliding window is 2, the second sampling video is v3,v6,v9,v 12 ,v 15 ,v 18 ,v21 From the frame number of the sliding window, we can see that the video frames v9, v 21 It is sampled twice to improve the utilization of the data set.

[0074] Step S300: performing discrete cosine transform on each video frame of each sampled video to obtain a frequency domain matrix corresponding to each video frame; enhancing the frequency domain matrix using zigzag scanning and then performing inverse discrete cosine transform to obtain a detail feature enhancement map corresponding to each video frame;

[0075] Specifically, to extract as many detailed features of facial expressions of pain as possible, it is necessary to effectively separate these details. While the distribution of image information in the spatial domain follows the structure of the image content and lacks regularity, the distribution of low-frequency and high-frequency information in frequency space does exhibit certain regularities, which facilitates the effective separation of these details. By drawing on the lossy image compression method of JPEG, the discrete cosine transform algorithm can be used to convert spatial image features into frequency features in the frequency domain.

[0076] In this embodiment, a frequency domain matrix corresponding to a video frame is obtained by performing discrete cosine transform on the video frame, as shown in FIG3 . The specific steps include:

[0077] Step S310: dividing the video frame into a plurality of image blocks based on a preset image block size;

[0078] Step S320: using discrete cosine transform for each image block to convert the spatial domain image feature information into frequency domain frequency feature information, thereby obtaining the frequency domain frequency feature information corresponding to each image block;

[0079] Step S330: According to the position of the image block in the video frame, all frequency domain frequency feature information is combined to obtain a frequency domain matrix.

[0080] Specifically, assuming that the size of the original video frame is M*N and the preset image block size is B*B, the original single video frame is cut into (M / B*N / B) small image blocks, and then a two-dimensional DCT (a discrete cosine transform algorithm) transformation is performed block by block to convert the spatial domain image feature information into frequency domain frequency feature information to obtain (M / B*N / B) blocks of DCT frequency domain data blocks; then, after the DCT frequency domain data blocks are arranged in sequence according to the spatial position relationship of the original image blocks, all the DCT frequency domain data blocks are assembled into a complete DCT frequency domain matrix. At this time, the size of the DCT frequency domain matrix is ​​consistent with the size of the original video frame.

[0081] Since facial expression videos are usually stored in RGB encoding format, that is, the specific pain expression image is represented by the three chromaticities of red, green and blue. However, the RGB method of expressing information through chromaticity ignores the key information of brightness. According to the pain degree measurement formula (PSPI standard formula), it can be known that the degree of pain expression can be quantified as the movement of eyebrows, cheeks, mouth, nose, etc., and the movement of such tiny facial units will involve the movement of facial muscles, which will also bring about the contrast of brightness and darkness in different areas at the same time, or the contrast of brightness and darkness in the same area at different times. Therefore, brightness is an indispensable amount of information for extracting facial pain expression features, and it is a very important quantitative indicator. Preferably, the RGB encoded video frame is converted to YC before performing discrete cosine transform on the video frame. b C r Encoding format.

[0082] YC b C r The relationship between the color model and the RGB color model can be quantified as a linear relationship. The specific formula is:

[0083] In computers, YC b C r The encoding format of RGB is the same as that of RGB, and both use 8-bit encoding to represent the information of the corresponding channel. However, the difference is that its value space is not the 256-level range of [0,255] of RGB. The value range of the brightness component Y is [16,235], and the value range of the chrominance component C is [16,235]. b and C r The value range is [16,240]. Therefore, if the calculated value of the luminance component Y exceeds 235, it will be truncated to 235; similarly, if the chrominance component C b and C r If the calculated value exceeds 240, it will be truncated to 240.

[0084] Considering that detail feature information is stored in high-frequency features, and that frequency-domain feature information increases in frequency along a diagonal line from the upper left corner to the lower right corner, a zigzag scan is employed. Starting from the lower right corner of the frequency-domain matrix, frequency-domain feature information is acquired sequentially. If the sequence number of the current scan position is even, the frequency-domain feature information at the previous scan position replaces the frequency-domain feature information at the current scan position. This means that a zigzag scan is performed starting from the lower right corner of the frequency-domain matrix, enhancing high-frequency features in the order in which they are scanned. The frequency-domain feature information at the 2i-th scan position (where i does not exceed half the number of pixels in the segmented image block) is replaced by the frequency-domain feature information at the previous scan position (2i-1). After a complete zigzag scan, two-dimensional frequency-domain data is obtained that has undergone overall high-frequency enhancement while maintaining the original distribution frequency. To facilitate understanding of the enhancement rule, please refer to FIG4 . According to the coloring order of the rightmost color bar in FIG4 , the high-frequency feature data of the previous position is overlaid on the frequency domain data of the next position according to the Zigzag scanning path.

[0085] The frequency domain matrix is ​​enhanced by zigzag scanning and then inverse discrete cosine transform is performed to obtain the detail feature enhancement map corresponding to each video frame.

[0086] Step S400: All video frames and corresponding detail feature enhancement maps of each sampled video are combined and input into the Transformer model respectively. Temporal features and spatial features are extracted in a serial and cross-linked manner in the Transformer model to obtain the pain level corresponding to each sampled video;

[0087] Specifically, the size of the video frame image is H*W*3, and the size of the detail feature enhancement map is H*W*1. For ease of processing, they are uniformly identified as image frame data with a single frame size of H*W*4. However, when actually inputting into the Transformer model, the interactive input of a frame of video frame image and a frame of detail feature enhancement map corresponding to the video frame image is still maintained, that is, the positions of the same source images are guaranteed to be adjacent. Therefore, the data input into the Transformer model is of size X∈R H×W×4×F video sequence.

[0088] Each sampled video is processed separately, and each video frame of the sampled video is combined with the corresponding detail feature enhancement map. The combined results of each sampled video are then input into the Transformer model respectively, and divided according to the preset image block size to obtain an image block sequence; the image block sequence is then flattened, linearly projected, and position markers are added before being input into the Transformer encoder for extracting temporal and spatial features.

[0089] Specifically, the size of the combined video frame and detail feature enhancement map of the sampled video is X∈R H×W×4×F , it is divided into image blocks according to the preset image block size (P*P), and N image block sequences of size P*P*4*F can be obtained. Preferably, the image block size P is the same as the image block size B used when performing discrete cosine transform on the video frame in step S300. N is the number of image block sequences after cutting, that is, N = (H*W) / P 2 .

[0090] Since the standard Transformer model is often used to process long sequence one-dimensional data, it is necessary to flatten the image block sequence of the input size P*P*4*F to obtain one-dimensional tensor data. Among them, p represents the position identifier on the two-dimensional plane, and its value range is [1,N]; t represents the frame-level index of the one-dimensional tensor, and its value range is [1,F]. After this module, the N*P*P*4*F image block sequence is flattened to N*4*P 2 Sequence tensor data.

[0091] Because a simple flattening operation makes the flattened one-dimensional tensor too long, if the size of the cut image block is 10*10, the dimension of the flattened tensor data is 1*4*10*10, or 1*400. In the Transformer model, all network layers use a constant latent tensor dimension d. Therefore, by adding a parameter-trainable linear mapping layer to the Transformer model, the dimension of the one-dimensional tensor is mapped to a specified embedding dimension d. This is called the embedding of the image block representation sequence, similar to word vectors in natural language processing.

[0092] Considering that different features in two-dimensional image data convey different information when located at different positions, the Transformer model cannot recognize positional information in the transformed one-dimensional tensor input and has difficulty understanding the positional relationship between input sequences. Therefore, it is necessary to add positional identifiers to the input one-dimensional tensor information, such as the vector carrying numbers in Figure 5.

[0093] When training a Transformer model, in addition to adding location markers, a data label tensor is also required to facilitate comparison with the model's predictions, calculate loss, and optimize model training. Since the input video data consists of F frames, the label tensor should contain the labels corresponding to these F frames, i.e., the pain level of the facial expression. The label tensor is then padded to the specified embedding dimension d.

[0094] If traditional 3D convolutional neural networks are used for video prediction, a large amount of memory and computing resources are consumed, the number of parameters is huge, and the operation takes a long time, which makes it difficult to meet the real-time requirements of clinical practice. Therefore, the Transformer model is used. And the Transformer model of this embodiment is based on the Vision Transformer (visual self-attention model), and its encoder is also improved.

[0095] The Transformer encoder is the most critical structure in the entire model. It is composed of multiple identical encoder modules stacked repeatedly. That is, the output of the previous layer serves as the input of the next layer. It is passed through layers of encoder modules and finally input into the fully connected network layer for result prediction.

[0096] The encoder module primarily consists of alternating submodules: Multi-Headed Self-Attention (MSA) and Multi-Layer Perceptron (MLP). Each submodule first undergoes layer normalization (LN) to accelerate convergence and training speed. Residual connections are added after each submodule to prevent overfitting during training.

[0097] The multi-head self-attention module can simultaneously extract spatial and temporal information features. As shown in Figure 6, extracting temporal features or spatial features specifically includes the following steps:

[0098] Step S410: performing a dot product operation on the query matrix and the keyword matrix to obtain a similarity weight used to characterize the correlation between feature elements;

[0099] Step S420: Obtain the temporal features or spatial features extracted from the attention head of the self-attention module according to the similarity weight and the numerical matrix.

[0100] Specifically, when extracting spatial features, to better capture facial pain expression features and make the model more efficient, the self-attention mechanism is guided to extract pain feature information from the sampled video in the spatial dimension. When only the spatial dimension is considered, feature extraction is performed within the same frame. During model training, the self-attention module participates in the calculation of N+1 "query-key-value" pairs, consisting of N image block sequences and 1 separate data label block. When the model is in use, the self-attention module participates in the calculation of N "query-key-value" pairs, that is, N image block sequences.

[0101] When each self-attention module extracts spatial features, it first performs a dot product operation on the query matrix Q (Query) and the keyword matrix K (Key) to obtain the correlation between the target feature element and the remaining feature elements, that is, the similarity weight.

[0102] Then, the features in the value matrix V(Value) are selected according to the calculated similarity weights, thus completing the spatial feature extraction process of each attention head of the self-attention module. The specific formula is:

[0103] Spatial feature extraction only focuses on the spatial attention of a single frame, ignoring cross-frame dependencies, namely, temporal feature information. To this end, temporal features are jointly extracted from video blocks at the same position in each frame of the sampled video. As with considering only the spatial dimension, during model training, the self-attention module operates on F+1 query-key pairs, consisting of a sequence of image blocks at a specific position at F different times and a single data label block. When the model is used, the self-attention module operates on F query-key pairs, namely, a sequence of image blocks at a specific position at F different times.

[0104] When each self-attention module extracts temporal features, it first performs a dot product operation on the query matrix Q (Query) and the keyword matrix K (Key) to obtain the correlation between the target feature element and the remaining feature elements, that is, the similarity weight:

[0105] Then, the features in the numerical matrix V(Value) are selected according to the calculated similarity weights, thereby completing the spatial feature extraction process of each attention head of the self-attention module. The specific operation is shown in the following formula:

[0106] If two features are extracted in parallel in the same module, the time complexity will increase to O(n 2 ) level; if it is performed in series and crosswise, the time complexity remains at the O(n) level. Therefore, in order to make the model run quickly and keep the computational complexity of the model at a low level, this embodiment chooses to use series crosswise extraction of spatiotemporal features in the Transformer model as shown in the lower right corner of Figure 5. That is, the spatial features extracted by all the attention heads in the multi-head self-attention module are fused with the temporal features extracted by the previous network layer, and then input into the multi-layer perceptron and use residual connection to obtain spatial features; the temporal features extracted by all the attention heads in the multi-head self-attention module are fused with the spatial features extracted by the previous network layer, and then input into the multi-layer perceptron and use residual connection to obtain temporal features.

[0107] Specifically, in the multi-head attention module, multiple heads jointly perform self-attention feature extraction, so it is necessary to integrate the calculation results of all heads and combine the residual shortcut connection to obtain the intermediate results.

[0108] The integration formula for extracting spatial features is:

[0109] in It is the input of the previous module. Since the two features are cross-extracted, the input of the previous layer is the extracted time feature.

[0110] Then the output of the previous step is layer normalized, and the spatial features are obtained by combining the residual quick connection through an MLP structure as shown in Figure 5. The specific formula is:

[0111] The integration formula for extracting time features is:

[0112] in It is the input of the previous module. Since the two features are cross-extracted, the input of the previous layer is the extracted spatial features.

[0113] The output result is then layer normalized and passed through an MLP structure as shown in Figure 5, combined with the residual quick connection to obtain the result. The specific formula is:

[0114] Finally, the features output by the Transformer encoder module are input into a prediction output module composed of a multi-layer, fully connected network to obtain the pain level corresponding to each sampled video. During model training, the pain level obtained for each frame in the sampled video is compared with the label tensor corresponding to that frame to calculate the loss value for each frame. The loss value of the sampled video is then calculated based on the loss values ​​of all video frames. For example, the loss value of the sampled video is obtained by averaging the squared loss values ​​of all video frames. The Transformer model is trained and optimized based on the loss values ​​of the sampled videos.

[0115] Step S500: Obtain and output pain analysis results based on the pain levels corresponding to all sampled videos.

[0116] Specifically, after obtaining the pain level corresponding to each sampled video, the pain levels of all sampled videos are summed and averaged to obtain the pain level corresponding to the facial pain expression and output it. Optionally, a weighted average can be taken based on the weight of each sampled video to obtain the pain level corresponding to the facial pain expression; the pain levels corresponding to the facial pain expression can also be further processed to obtain the pain analysis result.

[0117] During model training, this example divided the 200 video sequences provided by the UNBC dataset into training, test, and validation sets in a ratio of 165:30:5. To verify the model's effectiveness, a 255-frame video sequence from the validation set was evaluated at both the 6-level and 16-level levels. Furthermore, to ensure a more granular and continuous representation of the pain intensity of facial expressions, the model's predictions were rounded to two decimal places, and the pain intensity assessment curve, shown in Figure 7, was then plotted.

[0118] Through experiments, after training and validation on publicly available datasets, the model was quantitatively evaluated based on the three model evaluation metrics mentioned above. For coarse-grained 6-level pain level monitoring, the accuracy (Acc) was 98.03%, the root mean square error (RMSE) was 0.16, the Pearson correlation coefficient (PCC) was 0.95, and the intra-class correlation (ICC) was 0.73. For fine-grained 16-level pain level monitoring, the accuracy (Acc) was 97.06%, the root mean square error (RMSE) was 0.56, the Pearson correlation coefficient (PCC) was 0.97, and the intra-class correlation (ICC) was 0.86.

[0119] The calculated data shows that the accuracy decreases slightly when performing finer-grained pain estimation. However, the Pearson coefficient and intraclass correlation of the 16-level pain assessment are both higher than those of the coarse-grained 6-level pain assessment. Therefore, it can be clearly seen that the fusion of time features helps in the sequential estimation of pain levels.

[0120] As mentioned above, by using the sliding window method to sample long videos into multiple short videos, data utilization is improved; discrete cosine transform is performed on each video frame, and high-frequency features are enhanced through zigzag scanning to enhance detailed feature information; and feature extraction is directed planning in the self-attention module of the Transformer model. The spatiotemporal features of each short video sequence are automatically extracted and feature fusion is performed under O(n) time complexity. It is possible to fully extract pain information features from facial expression videos, thereby accurately assessing pain levels.

[0121] Exemplary Systems

[0122] As shown in FIG8 , corresponding to the above-mentioned method for analyzing facial pain expression based on spatiotemporal information, an embodiment of the present invention further provides a system for analyzing facial pain expression based on spatiotemporal information, the system comprising:

[0123] Data acquisition module 600, for acquiring facial expression videos;

[0124] A sliding window module 610 is configured to sample the facial expression video using a sliding window to obtain a plurality of sampled videos;

[0125] The detail feature enhancement map module 620 is configured to perform a discrete cosine transform on each video frame of each sampled video to obtain a frequency domain matrix corresponding to each video frame; enhance the frequency domain matrix using a zigzag scan and then perform an inverse discrete cosine transform to obtain a detail feature enhancement map corresponding to each video frame;

[0126] The pain level analysis module 630 is configured to combine all video frames and corresponding detail feature enhancement maps of each sampled video and input them into a Transformer model, where temporal and spatial features are extracted in a serial and cross-linked manner to obtain the pain level corresponding to each sampled video;

[0127] The result module 640 is used to obtain and output the pain analysis results according to the pain levels corresponding to all sampled videos.

[0128] Specifically, in this embodiment, the specific functions of each module of the above-mentioned facial pain expression analysis system based on spatiotemporal information can refer to the corresponding description in the above-mentioned facial pain expression analysis method based on spatiotemporal information, and will not be repeated here.

[0129] Based on the above embodiments, the present invention also provides an intelligent terminal, whose principle block diagram can be shown in Figure 9. The above intelligent terminal includes a processor, a memory, a network interface and a display screen connected through a system bus. Among them, the processor of the intelligent terminal is used to provide computing and control capabilities. The memory of the intelligent terminal includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a facial pain expression analysis program based on spatiotemporal information. The internal memory provides an environment for the operation of the operating system and the facial pain expression analysis program based on spatiotemporal information in the non-volatile storage medium. The network interface of the intelligent terminal is used to communicate with an external terminal through a network connection. When the facial pain expression analysis program based on spatiotemporal information is executed by the processor, the steps of any one of the above-mentioned facial pain expression analysis methods based on spatiotemporal information are implemented. The display screen of the intelligent terminal can be a liquid crystal display or an electronic ink display.

[0130] Those skilled in the art will understand that the principle block diagram shown in Figure 9 is only a block diagram of a partial structure related to the solution of the present invention, and does not constitute a limitation on the smart terminal to which the solution of the present invention is applied. The specific smart terminal may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0131] In one embodiment, a smart terminal is provided. The smart terminal includes a memory, a processor, and a spatiotemporal information-based facial pain expression analysis program stored in the memory and executable on the processor. When the spatiotemporal information-based facial pain expression analysis program is executed by the processor, the following operating instructions are performed:

[0132] Get facial expression videos;

[0133] Sampling the facial expression video using a sliding window to obtain a plurality of sampled videos;

[0134] Performing discrete cosine transform on each video frame of each sampled video to obtain a frequency domain matrix corresponding to each video frame; enhancing the frequency domain matrix using zigzag scanning and then performing inverse discrete cosine transform to obtain a detail feature enhancement map corresponding to each video frame;

[0135] All video frames and corresponding detail feature enhancement maps of each sampled video are combined and input into the Transformer model respectively, and temporal features and spatial features are extracted in a serial cross-link manner in the Transformer model to obtain the pain level corresponding to each sampled video;

[0136] The pain analysis results are obtained and output according to the pain levels corresponding to all sampled videos.

[0137] Optionally, the facial expression video is sampled using a sliding window to obtain a plurality of sampled videos, including:

[0138] Initializing a sliding window according to a preset starting frame position, a total number of sampling frames, and an interval frame number of the first sampling video; sampling video frames of the facial expression video within the sliding window according to the interval frame number to obtain the first sampling video;

[0139] Set the next sampled video segment as the target video segment;

[0140] Sliding the sliding window according to a moving step;

[0141] When the total number of sampling frames and the interval frame number preset in the target video segment are different from the total number of sampling frames and the interval frame number preset in the previous sampling video segment, the sliding window is updated according to the total number of sampling frames and the interval frame number preset in the target video segment;

[0142] Sampling video frames of the facial expression video in a sliding window according to a preset interval frame number of the target video segment to obtain the target video segment;

[0143] Return and set the next sampled video segment as the target video segment to obtain the next sampled video segment until all sampled video segments are obtained.

[0144] Optionally, the enhancing the frequency domain matrix by using zigzag scanning includes:

[0145] A sawtooth scanning method is adopted, starting from the lower right corner of the frequency domain matrix, and the frequency domain frequency characteristic information is obtained in sequence. If the serial number of the current scanning position is an even number, the frequency domain frequency characteristic information of the previous position is used to replace the frequency domain frequency characteristic information of the current scanning position.

[0146] Optionally, a discrete cosine transform is performed on the video frame to obtain a frequency domain matrix corresponding to the video frame, including:

[0147] Based on a preset image block size, dividing the video frame into a plurality of image blocks;

[0148] For each image block, discrete cosine transform is used to convert spatial domain image feature information into frequency domain frequency feature information to obtain frequency domain frequency feature information corresponding to each image block;

[0149] According to the position of the image block in the video frame, all frequency domain frequency feature information is combined to obtain the frequency domain matrix.

[0150] Optionally, all video frames of the sampled video and the corresponding detail feature enhancement maps are combined and input into the Transformer model, including:

[0151] Combining each video frame of the sampled video with the corresponding detail feature enhancement map and segmenting the image blocks according to a preset image block size to obtain an image block sequence;

[0152] The image block sequence is flattened, linearly projected, and positionally labeled before being input into the Transformer encoder.

[0153] Optionally, extracting temporal features and spatial features in a serial cross-connection manner in the Transformer model includes:

[0154] The spatial features extracted by all attention heads in the multi-head self-attention module are fused with the temporal features extracted by the previous network layer, and then input into the multi-layer perceptron and adopt residual connection to obtain the spatial features;

[0155] The temporal features extracted by all attention heads in the multi-head self-attention module are fused with the spatial features extracted by the previous network layer, and then input into the multi-layer perceptron and residual connection is used to obtain the temporal features.

[0156] Optionally, obtain temporal features or spatial features extracted by the attention heads in the multi-head self-attention module, including:

[0157] Perform a dot product operation on the query matrix and the keyword matrix to obtain a similarity weight used to characterize the correlation between feature elements;

[0158] According to the similarity weight and the numerical matrix, the temporal features or spatial features extracted from the attention head of the attention module are obtained.

[0159] An embodiment of the present invention also provides a computer-readable storage medium, on which a facial pain expression analysis program based on spatiotemporal information is stored. When the facial pain expression analysis program based on spatiotemporal information is executed by a processor, the steps of any one of the facial pain expression analysis methods based on spatiotemporal information provided in an embodiment of the present invention are implemented.

[0160] It should be understood that the sequence numbers of the steps in the above embodiments do not imply a specific order of execution; the order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0161] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the above-mentioned device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0162] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0163] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0164] In the embodiments provided by the present invention, it should be understood that the disclosed apparatus / terminal device and method can be implemented in other ways. For example, the apparatus / terminal device embodiments described above are merely illustrative. For example, the division of the modules or units described above is merely a logical functional division. In actual implementation, other division methods may be used. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not implemented.

[0165] If the above-mentioned integrated modules / units are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, it can implement the steps of the above-mentioned various method embodiments. Among them, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code can be in source code form, object code form, executable file or some intermediate form. The above-mentioned computer-readable medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the above-mentioned computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.

[0166] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, it should be understood by those skilled in the art that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the scope of protection of the present invention.

Claims

1. A facial pain expression analysis method based on spatiotemporal information, characterized in that: The method comprises: Get facial expression videos; The facial expression video is sampled using a sliding window to obtain a plurality of sampled videos; Performing discrete cosine transform on each video frame of each sampled video to obtain a frequency domain matrix corresponding to each video frame; enhancing the frequency domain matrix by using sawtooth scanning and then performing inverse discrete cosine transform to obtain a detail feature enhancement map corresponding to each video frame; All video frames and corresponding detail feature enhancement maps of each sampled video are combined and input into a Transformer model respectively, and temporal features and spatial features are extracted in a serial cross-link manner in the Transformer model to obtain the pain level corresponding to each sampled video; The pain analysis results are obtained and output according to the pain levels corresponding to all sampled videos.

2. The facial pain expression analysis method based on spatiotemporal information as claimed in claim 1, characterized in that: The facial expression video is sampled using a sliding window to obtain a plurality of sampled videos, including: Initialize the sliding window according to the preset starting frame position, total number of sampling frames, and number of interval frames of the first sampling video; sample the video frames of the facial expression video in the sliding window according to the number of interval frames to obtain the first sampling video; Set the next sampled video segment as the target video segment; Sliding the sliding window according to a moving step length; When the total number of sampling frames and the number of interval frames preset in the target video segment are different from any one of the total number of sampling frames and the number of interval frames preset in the previous sampling video segment, the sliding window is updated according to the total number of sampling frames and the number of interval frames preset in the target video segment; Sampling video frames of the facial expression video in a sliding window according to a preset interval frame number of the target video segment to obtain the target video segment; Return and set the next sampled video segment as the target video segment to obtain the next sampled video segment until all the sampled videos are obtained.

3. The facial pain expression analysis method based on spatiotemporal information as claimed in claim 1, characterized in that: The step of enhancing the frequency domain matrix by using zigzag scanning includes: Using a sawtooth scanning method, scanning starts from the lower right corner of the frequency domain matrix to obtain frequency domain frequency feature information in sequence. If the sequence number of the current scanning position is an even number, the frequency domain frequency characteristic information of the previous position is used to replace the frequency domain frequency characteristic information of the current scanning position.

4. The facial pain expression analysis method based on spatiotemporal information as claimed in claim 1, characterized in that: Perform discrete cosine transform on the video frame to obtain the frequency domain matrix corresponding to the video frame, including: Based on a preset image block size, dividing the video frame into a plurality of image blocks; For each image block, discrete cosine transform is used to convert spatial domain image feature information into frequency domain frequency feature information to obtain frequency domain frequency feature information corresponding to each image block; According to the position of the image block in the video frame, all frequency domain frequency feature information is combined to obtain the frequency domain matrix.

5. The facial pain expression analysis method based on spatiotemporal information as claimed in claim 1, characterized in that: All video frames of the sampled video and the corresponding detail feature enhancement maps are combined and input into the Transformer model, including: Combining each video frame of the sampled video with the corresponding detail feature enhancement map and segmenting them according to a preset image block size to obtain an image block sequence; The image block sequence is flattened, linearly projected, and positionally labeled before being input into the Transformer encoder.

6. The facial pain expression analysis method based on spatiotemporal information as claimed in claim 1, characterized in that: The extracting of temporal features and spatial features in a serial crossover manner in the Transformer model includes: The spatial features extracted by all the attention heads in the multi-head self-attention module are fused with the temporal features extracted by the previous network layer, and then input into the multi-layer perceptron and a residual connection is used to obtain the spatial features; The temporal features extracted by all attention heads in the multi-head self-attention module are fused with the spatial features extracted by the previous network layer, and then input into the multi-layer perceptron and residual connection is adopted to obtain the temporal features.

7. The facial pain expression analysis method based on spatiotemporal information as claimed in claim 6, characterized in that: Obtain the temporal features or spatial features extracted by the attention heads in the multi-head self-attention module, including: Perform a dot product operation on the query matrix and the keyword matrix to obtain a similarity weight used to characterize the correlation between feature elements; According to the similarity weight and the numerical matrix, the temporal features or spatial features extracted by the attention head of the self-attention module are obtained. Conquest.

8. A facial pain expression analysis system based on spatiotemporal information, characterized in that: The system comprises: A data acquisition module, used to acquire facial expression videos; A sliding window module, used for sampling the facial expression video using a sliding window to obtain a plurality of sampled videos; A detail feature enhancement map module is used to perform discrete cosine transform on each video frame of each sampled video to obtain a frequency domain matrix corresponding to each video frame; enhance the frequency domain matrix using zigzag scanning and then perform inverse discrete cosine transform to obtain a detail feature enhancement map corresponding to each video frame; A pain level analysis module is used to combine all video frames and corresponding detail feature enhancement maps of each sampled video and input them into a Transformer model respectively, and extract temporal features and spatial features in a serial cross-linking manner in the Transformer model to obtain the pain level corresponding to each sampled video; The result module is used to obtain and output the pain analysis results according to the pain levels corresponding to all sampled videos.

9. Intelligent terminal, characterized in that: The intelligent terminal includes a memory, a processor, and a facial pain expression analysis program based on spatiotemporal information stored in the memory and executable on the processor. When the facial pain expression analysis program based on spatiotemporal information is executed by the processor, the steps of the facial pain expression analysis method based on spatiotemporal information as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a facial pain expression analysis program based on spatiotemporal information, and when the facial pain expression analysis program based on spatiotemporal information is executed by a processor, the steps of the facial pain expression analysis method based on spatiotemporal information as described in any one of claims 1-7 are implemented.

Citation Information

Patent Citations

  • Newborn painful expression recognition method based on deep neural network

    CN107392109A

  • Pain level evaluation method based on facial pain expression video

    CN110321827A

  • Pain intensity estimation method based on pace-time attention mechanism

    CN111210907A

  • Pain assessment method, system and equipment based on facial expression video and medium

    CN114943924A

  • Neonatal pain identificaiton from neonatal facial expressions

    US20210030354A1

Cited By

  • Video facial expression recognition method combining sliding window and decision fusion strategy design

    CN119360430A

  • Mental health evaluation system based on AI

    CN119867756A

  • Hospitalized neonatal pain assessment method and system based on limb movement characteristics

    CN120148116A

  • Pediatric pain assessment system

    CN120183715A

  • Intelligent control method and system for automatic textile equipment

    CN121033748A