Deep learning video micro-motion amplification method embedded with dual attention mechanism

By introducing encoder and amplifier networks with embedded coordinate attention and self-attention mechanisms into the video magnification method, the problems of video frame distortion and artifacts when the magnification factor is large in the prior art are solved, and efficient and accurate magnification of small motions is achieved.

CN116828189BActive Publication Date: 2026-11-20HANGZHOU NORMAL UNIVERSITY +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310710867.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-15
Publication Date
2026-11-20
Estimated Expiration
2043-06-15

AI Technical Summary

Technical Problem

Existing video motion magnification methods are prone to causing distortion of video frame brightness, color and texture when the magnification factor is large, resulting in artifacts and noise. They also require a large amount of computation or rely on manually selecting filters, making it difficult to effectively magnify minute movements.

Method used

An encoder network with an embedded coordinate attention mechanism is used to enhance feature extraction, capture the long-range dependencies and location information of moving targets, and combine it with an amplifier network with a self-attention mechanism to capture global contextual information of shape difference features between consecutive frames, thereby reducing video frame artifacts and noise.

Benefits of technology

It effectively reduces brightness, color, and texture distortion during video magnification, reduces artifacts and noise, and improves the magnification effect of subtle movements, especially maintaining video details and texture features even at high magnification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116828189B_ABST
    Figure CN116828189B_ABST
Patent Text Reader

Abstract

The present application relates to a deep learning video micro-motion magnification method embedded with double attention mechanism, which adds a coordinate attention mechanism in the encoder part of the deep network, introduces position information into the channel attention feature map, captures the long-range dependency relationship and accurate position information of the moving target, and is complementarily used for texture feature extraction, enhances the texture feature representation of the moving object, thereby effectively reducing the distortion of brightness, color and texture of the magnified video; meanwhile, a self-attention mechanism is embedded in the magnifier part, which captures the global context information of the shape difference features of the front and rear frames, effectively reduces the problems such as video frame artifact, noise and detail contour deformation. Test results show that the present application has good performance in the subjective vision and objective evaluation of the video after motion magnification processing, and reduces the ringing artifact and blur of the magnified video frame.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of micro-motion amplification technology, and relates to a deep learning method for amplifying micro-motion in videos that embeds a dual attention mechanism. Background Technology

[0002] Due to the limitations of vision, it is difficult for the human eye to perceive minute movements. Video motion magnification technology allows people to perceive minute movements invisible to the naked eye. It can be applied not only to engineering monitoring such as pattern matching and edge detection, but also to a wide range of fields such as micro-expression recognition, video forgery detection, construction, and non-contact heart rate measurement in medicine.

[0003] Existing video motion magnification methods are mainly divided into three categories:

[0004] 1) Lagrange magnification: This type of method tracks the motion trajectory of feature points, divides the motion of each feature point into different motion layers, and then manually selects a motion layer for magnification. The idea is easy to understand, but this method has a large computational load and high time complexity.

[0005] 2) Euler Magnification: This type of method treats each pixel in the video as an independent time-series signal, uses a bandpass filter to separate the frequency domain signal of interest, and then amplifies it. While this method amplifies subtle motion well, it relies too heavily on manually selected filters, and the resulting image is prone to artifacts and noise.

[0006] 3) Learning-based amplification: This type of method uses deep learning for end-to-end motion amplification without the need for manual filter selection. It works well when the amplification factor and motion state are small, but when the amplification factor is large, it can lead to distortion of video frame brightness, color, and texture. Summary of the Invention

[0007] This invention incorporates positional information into the channel attention feature map based on a coordinate attention mechanism. This captures the long-range dependencies and precise positional information of moving targets, and complementarily applies them to texture feature extraction, enhancing the representation of texture features of moving objects. First, video A is input into an encoder network embedded with a coordinate attention mechanism to enhance feature extraction. Then, the obtained feature map is passed through an amplifier network embedded with a self-attention mechanism to capture global contextual information about shape differences between consecutive frames, effectively reducing video frame artifacts, noise, and detail contour distortion. Finally, the obtained feature map is input into the decoder network structure for decoding, ultimately yielding the magnified video result B.

[0008] This invention includes the following steps:

[0009] Step 1. Read the video to be processed, denoted as Video A;

[0010] Step 2. Input video A into an encoder with an embedded coordinate attention mechanism, introduce position information into the channel attention feature map, capture the long-range dependencies and precise position information of the moving target, and use them complementaryly for texture feature extraction, enhance the texture feature representation of the moving object, and reduce the distortion of brightness, color and texture in the magnified video frame;

[0011] The encoder with embedded coordinate attention mechanism is specifically as follows:

[0012] In the encoder texture feature extraction section, a coordinate attention (CA) mechanism module is integrated. Position information is embedded into channel attention to capture the long-range dependencies and precise position information of moving targets, which are then complementaryly used for texture feature extraction, enhancing the texture feature representation of moving objects. The CA module flow is as follows: Input texture features... After performing AP pooling twice simultaneously, C fusion is performed, followed by CB convolution, then BN normalization, then CB convolution and Sigmoid activation twice simultaneously, and finally Re to readjust the attention weights.

[0013] To better separate texture and shape features, the perturbed frame will have the same texture features as the perturbed frame. and real magnified frames It also utilizes an encoder for feature extraction, including its shape features. and texture features The loss function is used to calculate the final output shape features. and texture features , ;

[0014] Texture features Shape characteristics ;

[0015] in , These represent the previous frame of input, respectively. The next frame Interference frames Realistically enlarged frames ; , These represent the texture features extracted from the previous frame, the next frame, the interference frame, and the real magnified frame image, respectively. This represents the features extracted after passing through two convolutional blocks and three residual blocks. This represents the texture feature output after downsampling through one convolutional block and two residual blocks; This represents the texture space selective attention map generated after the coordinate attention mechanism; This represents the shape features after passing through one convolutional block and two residual blocks.

[0016] Step 3. Input the feature map obtained in Step 2 into an amplifier with a self-attention mechanism to capture global contextual information of the shape difference features between consecutive frames, thereby reducing video frame artifacts, noise, and detail contour deformation.

[0017] Specifically, a self-attention mechanism module (SA) is embedded in the nonlinear amplifier. After extracting the shape feature differences, an amplification factor is added to weight them, and finally, the weights are superimposed with the shape features of the previous frame.

[0018] Magnified shape features ;

[0019] in This represents the output after the shape feature differences are processed by the convolution block; Represents a self-attention map; Indicates the magnification factor; This indicates the difference in shape characteristics amplified after passing through convolutional blocks and residual blocks, causing the amplification process to exhibit a nonlinear state.

[0020] Step 4. Input the feature map obtained in Step 3 into the decoder network structure for decoding, and finally obtain the magnified video result B.

[0021] This invention incorporates a dual attention mechanism in both the encoder and amplifier to address issues such as contour distortion, color loss, and artifacts that easily arise at excessive magnification. A coordinate attention mechanism is embedded into the encoder of a deep network, adding positional information to the channel attention feature map. Based on this, the long-range dependencies and accurate location of the moving target are obtained. By utilizing the complementary analysis of these two mechanisms, texture features are extracted, improving the ability to represent the texture features of moving objects and thus significantly reducing brightness, color, and texture distortion in video image frames. Simultaneously, a self-attention mechanism is added to the amplifier to obtain overall background information on the morphological differences between preceding and following frames, effectively reducing artifacts, noise, and edge distortion in the image. Experiments using videos captured in real-world environments show that, compared to existing technologies, this technique demonstrates better performance in both subjective observation and objective evaluation of motion-magnified videos. Attached Figure Description

[0022] Figure 1 This is an overall framework diagram of the present invention;

[0023] Figure 2 for Figure 1 Framework diagram of the coordinate attention mechanism module embedded in the encoder;

[0024] Figure 3for Figure 1 Framework diagram of the self-attention mechanism module embedded in the amplifier

[0025] Figure 1 and Figure 2 In Chinese, "-" represents subtraction and "+" represents addition. " indicates multiplication, "Z" indicates amplification factor, "CB" indicates convolution block, "RB" indicates residual block, "↑" indicates upsampling, "C" indicates fusion, "CA" indicates coordinate attention mechanism module, "SA" indicates self-attention mechanism module, "AP" indicates pooling, "BN" indicates normalization, "S" indicates sigmoid activation, and "Re" indicates readjusting attention weights.

[0026] Figure 4 This is a comparison chart of experimental results for amplifying throat videos using different methods in the examples;

[0027] Figure 5 This is a comparison chart of experimental results showing different methods used to magnify infant videos in the examples;

[0028] Figure 6 This is a comparison chart of experimental results for local areas after different methods were used to magnify camera videos by different magnifications in the embodiments.

[0029] Figure 7 This is a comparison of experimental results of local areas after different methods were used to magnify wrist videos at different magnifications in the examples;

[0030] Figure 8 This is a slice comparison of the experimental results of magnifying an infant video 80 times using different methods in the examples;

[0031] Figure 9 This is a comparison of slices showing the experimental results of magnifying throat videos 80 times using different methods in the examples;

[0032] Figure 10 To compare the experimental results of using learning magnification and the method of this invention to magnify shadows and subway videos by 100 times;

[0033] Figure 11 This is a schematic diagram illustrating the partitioning of the global region, motion region, and background region in the embodiment. Detailed Implementation

[0034] The present invention will be further described below with reference to the accompanying drawings.

[0035] like Figure 1 As shown, the deep learning-based video micro-motion amplification method embedding a dual attention mechanism specifically includes the following steps:

[0036] Step 1. Read the video to be processed, denoted as Video A;

[0037] Step 2. Input video A into the encoder network part with embedded coordinate attention mechanism, introduce position information into the channel attention feature map, capture the long-range dependency and precise position information of moving targets, and use them complementaryly for texture feature extraction to enhance the texture feature representation of moving objects;

[0038] The encoder with embedded coordinate attention mechanism is specifically as follows:

[0039] The coordinate attention mechanism (CA) module is integrated into the texture feature extraction part of the encoder. Position information is embedded into the channel attention to capture the long-range dependencies and precise position information of the moving target, and is used complementaryly for texture feature extraction to enhance the texture feature representation of the moving object, thereby effectively reducing the distortion of brightness, color and texture in the magnified video frame.

[0040] like Figure 2 As shown, the CA module process is as follows: Input texture features After performing AP pooling twice simultaneously, C fusion is performed, followed by CB convolution, then BN normalization, then CB convolution and Sigmoid activation twice simultaneously, and finally Re to readjust the attention weights.

[0041] At the same time, in order to better separate texture features and shape features, the interfering frame will have the same texture features as the perturbed frame. and real magnified frames This encoder is also used for feature extraction. and The loss function is used to calculate the final output shape features. and texture features , ;

[0042] Texture features Shape characteristics ;

[0043] in , These represent the previous frame, the next frame, the interference frame, and the real magnified frame, respectively. , These represent the texture features extracted from the previous frame, the next frame, the interference frame, and the real magnified frame image, respectively. This represents the features extracted after passing through two convolutional blocks and three residual blocks. This represents the texture feature output after downsampling through one convolutional block and two residual blocks; This represents the texture space selective attention map generated after the coordinate attention mechanism; This represents the shape features after passing through one convolutional block and two residual blocks.

[0044] Step 3. Input the feature map obtained in Step 2 into the amplifier part with self-attention mechanism to capture the global context information of the shape difference features between the previous and next frames, effectively reducing video frame artifacts, noise and detail contour deformation.

[0045] To simulate the bandpass filter function in Euler amplification and simultaneously capture global contextual information about the shape differences between consecutive frames, the specific steps are as follows:

[0046] Embedded in a nonlinear amplifier, such as Figure 3 The self-attention mechanism module (SA) shown effectively reduces video frame artifacts, noise, and distortion of detail contours. After extracting the shape feature differences, a magnification factor is added to weight them, and finally, the weights are superimposed with the shape features of the previous frame.

[0047] Magnified shape features ;

[0048] in Indicating differences in shape characteristics The output after the convolution block; Represents a self-attention map; Indicates the magnification factor; This indicates the difference in shape characteristics amplified after passing through convolutional blocks and residual blocks, which can make the amplification process nonlinear.

[0049] Step 4. Input the feature map obtained in Step 3 into the decoder network structure for decoding, and finally obtain the magnified video result B.

[0050] To objectively test the method of the present invention, this embodiment selects multiple datasets of minute movements, such as infant videos, camera videos, wrist videos, and throat videos, and performs qualitative and quantitative comparisons on the magnified videos of minute movements. All videos were collected in real-world environments.

[0051] The experimental comparisons are as follows:

[0052] like Figure 4 and 5As shown, when the video of the throat and baby is magnified 100 times, Euler magnification, while amplifying the motion, also severely amplifies noise when generating the last frame of the video. Learning magnification leads to significant loss of crib edge information, texture details of the face and feet, and clavicle contour details. While self-encoding magnification improves upon learning magnification in preserving details of the baby's face, feet, and clavicle contour, the crib edge is still severely distorted. The method of this invention, compared to other existing methods, can better preserve the details of the baby's face, feet, and clavicle clavicle edge, while reducing the problem of clavicle edge contour distortion. It also achieves good magnification results even at higher magnification factors, effectively reducing video frame noise, detail contour distortion, and loss of color and texture details.

[0053] like Figure 6 and Figure 7 As shown, when the camera and wrist videos are magnified 30x, 50x, and 80x respectively, the learned magnification method reveals that the floor texture is blurred and background texture information is severely lost when the camera video is magnified, with the loss of detail becoming increasingly severe as the magnification factor increases. When the wrist video is magnified, varying degrees of indentation and deformation occur in localized areas of the arm. Compared to learned magnification, the method of this invention improves the background of the generated camera video image at higher magnification levels.

[0054] like Figure 8 and 9 As shown, when the video of the baby and throat is magnified 80 times, the Euler method amplifies noise while amplifying motion at a large magnification, resulting in severe ringing artifacts and blurring. Although learning magnification and autoencoder magnification reduce some blurring compared to Euler magnification, ringing artifacts still exist. The method of this invention, however, reduces ringing artifacts and blurring while better amplifying motion in the region of interest.

[0055] In this embodiment, supplementary experiments were conducted on videos featuring shadows and subway scenes:

[0056] like Figure 10 As shown, when magnified 100 times, the method of this invention improves the tree branch artifacts in shadow videos. When magnifying subway videos, due to the large motion amplitude of some video frames, some video frames are severely distorted after magnification, but the method of this invention still provides some improvement.

[0057] The most commonly used video quality assessment methods, PSNR and SSIM, were selected as the evaluation indicators for quantitative experiments. The PSNR and SSIM values ​​between the original video frames and the enlarged video frames were calculated.

[0058]

[0059]

[0060]

[0061] in These represent the original frame and the magnified frame, respectively; MSE represents the mean square error of the original frame and the magnified frame; PSNR represents the average peak signal-to-noise ratio, which is inversely proportional to MSE. The better the quality of the magnified video frame, the smaller the MSE and the larger the PSNR, indicating that the difference between the two images involved in the calculation is smaller. This represents the mean value of the corresponding frame. This represents the variance of the corresponding frame; The covariance between the original frame and the magnified frame is represented by SSIM; SSIM represents structural similarity, with a value between 0 and 1, and the closer it is to 1, the closer the original frame and the magnified video frame are.

[0062] However, this evaluation method is clearly mismatched with the nature of micro-motion amplification: the motion portion of the amplified video frame differs significantly from the original frame. Directly calculating the global PSNR and SSIM values ​​will simultaneously calculate the motion portion with significant differences, resulting in inaccurate and low calculated PSNR and SSIM values. Since the aforementioned metrics for the motion region are insufficient to reflect the performance of the amplification method, this embodiment calculates the following... Figure 11 The PSNR and SSIM values ​​of the three types of regions shown represent the global region, motion region, and background region of the magnified video frame and the original frame, respectively.

[0063] Table 1 shows the objective evaluation results of video quality at different magnifications:

[0064] Table 1

[0065]

[0066] As shown in Table 1, the PSNR and SSIM values ​​of the moving parts are lower than those of the global parts, while the PSNR and SSIM values ​​of the background parts are higher than those of the global parts. The higher the magnification, the lower the aforementioned performance indicators of the moving parts. Therefore, this invention will subsequently calculate the PSNR and SSIM values ​​of only the original frame and the magnified video frame of the background part (after removing the moving parts) (the evaluation of the moving parts mainly adopts the qualitative evaluation from the previous section).

[0067] Experiments were conducted on two existing standard videos of infants and throats, and the results are shown in Table 2:

[0068] Table 2

[0069]

[0070] Especially when magnified 20 times or more, the method of this invention is significantly better than the existing methods, and has better performance in subjective visual and objective evaluation of the video after motion magnification, reducing ringing artifacts and blurring of the magnified video frames.

Claims

1. A deep learning-based method for amplifying minute motions in videos, embedding a dual attention mechanism, characterized in that: Specifically, the steps include the following: Step 1. Read the video to be processed, denoted as Video A; Step 2. Input video A into an encoder with an embedded coordinate attention mechanism, introduce position information into the channel attention feature map, capture the long-range dependencies and precise position information of the moving target, and use them complementaryly for texture feature extraction, enhance the texture feature representation of the moving object, and reduce the distortion of brightness, color and texture in the magnified video frame; The encoder with embedded coordinate attention mechanism is specifically as follows: In the encoder texture feature extraction part, the coordinate attention mechanism module CA is integrated to embed position information into channel attention, capture the long-range dependencies and precise position information of moving targets, and use them complementaryly for texture feature extraction to enhance the texture feature representation of moving objects; The CA module process is as follows: Input texture features After performing AP pooling twice simultaneously, C fusion is performed, followed by CB convolution, then BN normalization, then CB convolution and Sigmoid activation twice simultaneously, and finally Re to readjust the attention weights. To better separate texture and shape features, the perturbed frame will have the same texture features as the perturbed frame. and real magnified frames It also utilizes an encoder for feature extraction, including its shape features. and texture features The loss function is used to calculate the final output shape features. and texture features , ; Texture features ; Shape features ; in , These represent the previous frame of input, respectively. The next frame Interference frames Realistically enlarged frames ; , These represent the texture features extracted from the previous frame, the next frame, the interference frame, and the real magnified frame image, respectively. This represents the features extracted after passing through two convolutional blocks and three residual blocks. This represents the texture feature output after downsampling through one convolutional block and two residual blocks; This represents the texture space selective attention map generated after the coordinate attention mechanism; This represents the shape features after passing through one convolutional block and two residual blocks; Step 3. Input the feature map obtained in Step 2 into an amplifier with a self-attention mechanism to capture global contextual information of the shape difference features between consecutive frames, thereby reducing video frame artifacts, noise, and detail contour distortion; specifically: A self-attention mechanism module (SA) is embedded in the nonlinear amplifier. After extracting the shape feature differences, an amplification factor is added to weight them and superimpose them. Finally, the weights are superimposed with the shape features of the previous frame. Magnified shape features ; in This represents the output after the shape feature differences are processed by the convolutional block; Represents a self-attention map; Indicates the magnification factor; This indicates the difference in shape features amplified after passing through convolutional blocks and residual blocks, causing the amplification process to exhibit a non-linear state; Step 4. Input the feature map obtained in Step 3 into the decoder network structure for decoding, and finally obtain the magnified video result B.