Real-time action detection method based on multi-scale feature fusion attention

By dividing the frame set of video clips and extracting key frame optical flow information, combined with the multi-scale feature fusion attention module, the problem of computation time and storage space of existing action detection methods is solved, and clearer motion information acquisition and storage space are achieved. Noise avoidance reduces computational cost.

CN115131710BActive Publication Date: 2024-09-03FUZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210785189.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-05
Publication Date
2024-09-03
Estimated Expiration
2042-07-05

AI Technical Summary

Technical Problem

Existing action detection methods have problems in terms of computational time and storage space, and they ignore multi-scale temporal dependence, causing noise fragments to affect motion feature representation.

Method used

By dividing and randomly sorting the frame set of video clips, key frame optical flow information is extracted, input into ResNext101 and Darknet network for feature extraction, multi-scale feature fusion attention module and channel attention are used for feature fusion, and finally obtained through classification and regression. Predict the results.

Benefits of technology

It effectively increases data diversity, clearly obtains motion information, avoids the generation of noisy data, saves calculation and storage space, and reduces the computational cost of multi-scale feature fusion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115131710B
    Figure CN115131710B
Patent Text Reader

Abstract

The present invention relates to a real-time action detection method based on multi-scale feature fusion attention. First, the video clips of the data set are divided into frame sets, and data enhancement is performed on them through random sorting operations. Secondly, the key frames of the input video clips are extracted, and the optical flow information of the obtained key frames is extracted. The obtained video clips, key frames and key frame optical flows are respectively input into the ResNext101 and Darknet networks for feature extraction, and the features are enhanced through the multi-scale feature fusion attention module. The spliced ​​spatiotemporal features are further fused with the spatiotemporal features through channel attention. Finally, the category bounding box and confidence are obtained through classification and regression, and the prediction results are obtained through NMS (non-maximum suppression).
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of pattern recognition and computer vision, and in particular to a real-time action detection method based on multi-scale feature fusion attention. Background Art

[0002] With the development of science and technology, motion detection has been a hot research topic in recent years. In the fields of unmanned driving, security monitoring, transportation, human-computer interaction systems, etc., the application of real-time motion detection is becoming more and more widespread. Most of the most advanced motion detection methods currently use a dual-stream architecture. However, the optical flow information has problems such as time-consuming calculation and large storage space consumption. In addition, as the amplitude of the video motion changes, the optical flow information of the entire video will inevitably contain noise fragments, which will also affect the final motion feature representation. Secondly, most methods extract segment-level or frame-level features through 2D / 3D networks, and only consider temporal dependencies from a single scale (i.e., short-term or long-term), ignoring multi-scale temporal dependencies. And directly splicing the temporal features extracted by the deep network with the spatial features, ignoring the fact that the data sources of the temporal features and spatial features are different, and the correlation between the elements in the features is also different. Summary of the invention

[0003] In view of this, the purpose of the present invention is to propose a real-time action detection method based on multi-scale feature fusion attention, which can effectively identify student behavior. The method first divides the video clips of the data set into frame sets, and performs data enhancement on them through random sorting operations. Secondly, the key frames of the input video clips are extracted, and the optical flow information of the obtained key frames is extracted. The obtained video clips, key frames, and key frame optical flows are respectively input into the ResNext101 and Darknet networks for feature extraction, and the features are enhanced through the multi-scale feature fusion attention module. The spliced ​​spatiotemporal features are further fused with the spatiotemporal features through channel attention. Finally, the category bounding box and confidence are obtained through classification and regression, and the prediction results are obtained after NMS (non-maximum suppression).

[0004] The present invention specifically adopts the following technical solutions:

[0005] A real-time action detection method based on multi-scale feature fusion attention, characterized in that it includes the following steps:

[0006] Step S1: divide the video clips of the data set into frame sets, and perform data enhancement on them through random sorting operations; and extract key frames from the video clips, and extract optical flow information from the key frames;

[0007] Step S2: Input the obtained video clips into the ResNext101 network to extract temporal features, and compress them, and input the key frames and the optical flow information of the key frames into the Darknet network to extract spatial features and motion features;

[0008] Step S3: Obtain multi-scale features by stacking motion attention modules with different expansion rates;

[0009] Step S4: splicing spatiotemporal features through channel attention to further fuse spatiotemporal features;

[0010] Step S5: The category bounding box and confidence are obtained through the classification and regression network, and the bounding box with the highest probability is finally obtained as the prediction result after non-maximum suppression (NMS).

[0011] Furthermore, step S1 specifically includes the following steps:

[0012] Step S11: uniformly sample the video segments of the dataset at intervals of p frames, and divide the sampled video segments into n frames of equal length, that is, S = {s1, s2, ..., s n}, each frame set s fi It consists of a sequence of video frames of equal length;

[0013] Step S12: For the frame set {s1, s2, ..., s n} are randomly sorted to form a new video segment S' = {s'1, s'2, ..., s' n}, to achieve the effect of data enhancement for use in the training process;

[0014] Step S13: Divide the input video clip into three parts: the beginning, the middle, and the end, and randomly extract a frame from each part as a key frame to briefly represent the video action;

[0015] Step S14: Use the RAFT model to extract optical flow information from the key frames.

[0016] Furthermore, step S2 specifically includes the following steps:

[0017] Step S21: Input the acquired video clip into the 3D backbone network ResNext101 network to extract the temporal features M∈R C ×T×H×W , where T is the number of input frames, H and W are the height and width of the input image, and C is the number of output channels;

[0018] Step S22: Input the key frame into the 2D backbone network Darknet network to extract spatial features K∈R C'×H×W ;

[0019] Step S23: Input the key frame optical flow information extracted by the RAFT model into the 2D backbone network Darknet network to extract motion features O∈R C”×H×W ;

[0020] Step S24: To match the output feature map of the 2D backbone network, the depth dimension of the ResNext101 output feature M is reduced to 1, thereby compressing the output volume to [C×H×W], and obtaining the compressed feature M'∈R C×H×W .

[0021] Furthermore, step S3 specifically includes the following steps:

[0022] Step S31: The three extracted features K, O, and M' are respectively passed through two projection layers to generate a feature map of 512 channels; the projection layer uses a 1×1 convolution layer to reduce the channel dimension and a 3×3 convolution layer to refine the semantic context;

[0023] Step S32: stacking motion attention modules with different dilation rates to generate output features K', O', M'' with multiple receptive fields to cover all scales of objects;

[0024] The structure of the motion attention module is expressed as:

[0025] X out =X attn *X res +X in

[0026] X attn =F attn (APool(X in ),θ,Ω)

[0027] X res =F(X in ;θ,Ω)

[0028] In the formula, F(·) represents the residual function, APool(·) represents the average pooling layer, θ and Ω represent the structure of the convolutional layer respectively; APool(·) is used to perform a non-complete compression operation, and then the attention channel X is attn *X res The output is upsampled to match channel X in Output.

[0029] Furthermore, step S4 specifically includes the following steps:

[0030] Step S41: Concatenate features K', O', M' to obtain feature A∈R (C+C'+C”)×H×W ;

[0031] Step S42: Input feature A into two convolutional layers to generate a new feature map B∈R C×H×W ; Then transform the feature map B into C×N size to get F∈R C×N , where N = H × W;

[0032] Step S43: F∈R C×N Instead of transposing F T ∈R N×C Multiply and calculate the feature correlation between channels to generate the matrix G∈R C×C ;

[0033] Step S44: Input the matrix into the Softmax layer to generate the channel attention map Q∈R C×C ;

[0034] Step S45: Perform matrix multiplication on the channel attention map Q and the feature F, and transform the result back to the three-dimensional space with the same shape as the feature map B to obtain the feature F'∈R C×H×W ;

[0035] Step S46: Combine the tensor F' with the original input feature map B through a summation operation to obtain the output C∈R C×H×W :

[0036] C=δ·F'+B

[0037] Where δ is a training parameter.

[0038] Furthermore, step S5 specifically includes the following steps:

[0039] Step S51: The fused features are passed through a 1×1 kernel convolutional layer to generate an output channel of size [(5×(NumCls+5))×H×W], where (NumCls+5) includes NumCls class action scores cls, 4 coordinates [bx, by, bw, bh] and a confidence score Conf;

[0040] Step S52: Select 5 prior anchors on the data set using the k-means clustering algorithm;

[0041] Step S53: Based on the initial anchor box, the bounding box position and confidence are regressed through Sigmod, the bounding box loss is calculated through CIOU loss, and the confidence loss is calculated through binary cross entropy loss. The CIOU loss calculation formula is as follows:

[0042]

[0043]

[0044] In the formula, b, and b gtRepresents the center point of the two rectangular boxes, that is, the coordinates [bx,by], [x gt ,y gt ], ρ represents the Euclidean distance between two rectangular boxes, u represents the distance between the diagonals of the closure areas of the two rectangular boxes, and IOU is the ratio of the overlapping area of ​​the bounding boxes to the total area;

[0045] Step S54: Classify through the fully connected layer and the Softmax layer, and calculate the classification loss through the Focal Loss. The calculation formula is as follows:

[0046]

[0047] Among them, α and γ are both adjustable hyperparameters; cls gt is the model prediction, and its value is between 0 and 1;

[0048] Step S55: add the bounding box loss, confidence loss and classification loss as the total loss, and update the network parameters in reverse;

[0049] Step S56: select a confidence threshold, take out the boxes of each category with scores greater than a certain threshold and sort them, filter out the low-threshold prediction bounding boxes, use the box positions and scores to perform non-maximum suppression NMS, and finally obtain the bounding box with the highest probability as the prediction result;

[0050] The non-maximum suppression NMS is to sort the scores of all predicted bounding boxes, select the highest score and its corresponding box, traverse the remaining boxes, and delete the box if the IOU with the current highest score box is greater than a certain threshold; continue to select the one with the highest score from the unprocessed box and repeat the above process.

[0051] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the real-time action detection method based on multi-scale feature fusion attention as described above is implemented.

[0052] A computer-readable storage medium having a computer program stored thereon, characterized in that when the program is executed by a processor, the real-time action detection method based on multi-scale feature fusion attention as described above is implemented.

[0053] Compared with the prior art, the present invention and its preferred embodiment have the following beneficial effects:

[0054] By rearranging and splicing video clips according to the temporal dependencies between video clips, the diversity of data is increased while ensuring that the video semantic information and temporal dependencies are not destroyed.

[0055] Aiming at the difficult sample processing by introducing optical flow information for confusing actions in action detection, a keyframe-based optical flow information data input method is proposed to replace the traditional optical flow data input. The timing information between video frames is retained, and motion information is obtained through the changes between key frames and optical flow information. Compared with traditional data input, motion information can be obtained more clearly and the generation of noise data can be effectively avoided, saving the calculation amount and storage space of optical flow information.

[0056] Based on multi-scale feature fusion attention, the multi-scale motion features of targets of different scales are extracted and fused. Different from the traditional multi-scale feature fusion, the multi-scale feature attention module only uses the last layer of feature maps for multi-scale fusion, which reduces the computational cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments;

[0058] Figure 1 It is a schematic diagram of the process and working principle of an embodiment of the present invention. DETAILED DESCRIPTION

[0059] In order to make the features and advantages of this patent more obvious and easy to understand, the following embodiments are specifically described in detail as follows:

[0060] It should be noted that the following detailed descriptions are illustrative and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used in this specification have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.

[0061] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0062] like Figure 1 As shown, this embodiment provides a real-time action detection method based on multi-scale feature fusion attention, which specifically includes the following steps:

[0063] Step S1: Divide the video clips of the dataset into frame sets and perform data enhancement on them through random sorting operations. Then extract key frames from the video clips and extract the optical flow information of the key frames;

[0064] Step S2: Input the obtained video clips into the ResNext101 network to extract temporal features, and compress them, and input the key frames and the optical flow information of the key frames into the Darknet network to extract spatial features and motion features;

[0065] Step S3: Perform multi-scale feature fusion on the features through a multi-scale feature fusion attention module;

[0066] Step S4: splicing spatiotemporal features to further fuse spatiotemporal features through channel attention;

[0067] Step S5: Obtain the category bounding box and confidence through the classification and regression network, and finally obtain the bounding box with the highest probability as the prediction result after NMS (non-maximum suppression).

[0068] In this embodiment, step S1 specifically includes the following steps:

[0069] Step S11: uniformly sample the video segments of the dataset at intervals of p frames, and divide the sampled video segments into n frames of equal length, that is, S = {s1, s2, ..., s n}, each frame set s fi It consists of a sequence of video frames of equal length;

[0070] Step S12: For the frame set {s1, s2, ..., s n} are randomly sorted to form a new video segment S' = {s'1, s'2, ..., s' n}, to achieve the effect of data enhancement for use in the training process;

[0071] Step S13: Divide the input video clip into three parts: the beginning, the middle, and the end, and randomly extract a frame from each part as a key frame to briefly represent the video action;

[0072] Step S14: extracting optical flow information from key frames using the RAFT model;

[0073] The RAFT model is an end-to-end deep neural network model for optical flow estimation. It has strong generalization ability and is highly efficient in terms of training speed, number of parameters, and inference time.

[0074] In this embodiment, step S2 specifically includes the following steps:

[0075] Step S21: Input the acquired video clip into the 3D backbone network ResNext101 network to extract the temporal features M∈R C ×T×H×W , where T is the number of input frames, H and W are the height and width of the input image, and C is the number of output channels;

[0076] Step S22: Input the key frame into the 2D backbone network Darknet network to extract spatial features K∈R C'×H×W ;

[0077] Step S23: Input the key frame optical flow information extracted by the RAFT model into the 2D backbone network Darknet network to extract motion features O∈R C”×H×W ;

[0078] Step S24: To match the output feature map of the 2D backbone network, the depth dimension of the ResNext101 output feature M is reduced to 1, thereby compressing the output volume to [C×H×W], and obtaining the compressed feature M'∈R C×H×W .

[0079] In this embodiment, step S3 specifically includes the following steps:

[0080] Step S31: The three extracted features K, O, and M' are respectively passed through two projection layers (a 1×1 convolution layer to reduce the channel dimension and a 3×3 convolution layer to refine the semantic context) to generate a feature map of 512 channels;

[0081] Step S32: Stack the moving attention modules with different dilation rates to generate output features K', O', M'' with multiple receptive fields, covering all scales of objects.

[0082] The motion attention module can be expressed as:

[0083] X out =X attn *X res +X in

[0084] X attn =F attn (APool(X in ),θ,Ω)

[0085] X res =F(X in ;θ,Ω)

[0086] In the formula, F(·) represents the residual function, APool(·) represents the average pooling layer, θ and Ω represent the structure of the convolutional layer. APool(·) is used to perform a non-complete compression operation, and then the attention channel X is attn *X res The output is upsampled to match channel X in Output:

[0087] In this embodiment, step S4 specifically includes the following steps:

[0088] Step S41: Concatenate features K', O', and M' to obtain concatenated feature A∈R (C+C'+C”)×H×W ;

[0089] Step S42: Input feature A into two convolutional layers to generate a new feature map B∈R C×H×W Then transform B into C×N size to get F∈R C×N , where N = H × W;

[0090] Step S43: F∈R C×N Instead of transposing F T ∈R N×C Multiply and calculate the feature correlation between channels to generate the matrix G∈R C×C ;

[0091] Step S44: Input the matrix into the Softmax layer to generate the channel attention map Q∈R C×C ;

[0092] Step S45: Perform matrix multiplication on the channel attention map Q and the feature F, and transform the result back to the three-dimensional space with the same shape as the feature map B to obtain the feature F'∈R C×H×W ;

[0093] Step S46: Combine the tensor F' with the original input feature map B through a summation operation to obtain the output C∈R C×H×W :

[0094] C=δ·F'+B

[0095] Where δ is a training parameter.

[0096] In this embodiment, step S5 specifically includes the following steps:

[0097] Step S51: The fused features are passed through a 1×1 kernel convolutional layer to generate an output channel of size [(5×(NumCls+5))×H×W], where (NumCls+5) includes NumCls class action scores cls, 4 coordinates [bx, by, bw, bh] and a confidence score Conf;

[0098] Step S52: Select 5 prior anchors on the data set using the k-means clustering algorithm;

[0099] Step S53: Based on the initial anchor box, the bounding box position and confidence are regressed through Sigmod, the bounding box loss is calculated through CIOU loss, and the confidence loss is calculated through binary cross entropy loss. The CIOU loss calculation formula is as follows:

[0100]

[0101]

[0102] In the formula, b, and b gt Represents the center point of the two rectangular boxes, that is, the coordinates [bx,by], [x gt ,y gt ], ρ represents the Euclidean distance between two rectangular boxes, u represents the distance between the diagonals of the closure areas of the two rectangular boxes, and IOU is the ratio of the overlapping area of ​​the bounding boxes to the total area.

[0103] Step S54: Classify through the fully connected layer and the Softmax layer, and calculate the classification loss through the Focal Loss. The calculation formula is as follows:

[0104]

[0105] Among them, α and γ are both adjustable hyperparameters. gt It is the model prediction, and its value is between (0-1).

[0106] Step S55: add the bounding box loss, confidence loss and classification loss as the total loss, and update the network parameters in reverse;

[0107] Step S56: Select a confidence threshold, take out each category of boxes with scores greater than a certain threshold and sort them, filter out low-threshold predicted bounding boxes, use the box position and score to perform NMS (non-maximum suppression), and finally obtain the bounding box with the highest probability as the prediction result.

[0108] NMS (Non-Maximum Suppression) sorts the scores of all predicted bounding boxes, selects the highest score and its corresponding box, and traverses the remaining boxes. If the IOU with the current highest score box is greater than a certain threshold, the box is deleted. Select the highest score from the unprocessed box and repeat the above process.

[0109] In particular, the present invention is based on real-time action detection based on multi-scale feature fusion attention. By rearranging and splicing video clips, according to the time dependency between video clips, the diversity of data is increased while ensuring that the video semantic information and time dependency are not destroyed. In view of the introduction of optical flow information for difficult sample processing of easily confused actions in action detection, a key-frame-based optical flow information data input method is proposed to replace the traditional optical flow data input. The timing information between video frames is retained, and motion information is obtained through changes between key frames and optical flow information. Compared with traditional data input, motion information can be obtained more clearly and the generation of noise data can be effectively avoided, saving the calculation amount and storage space of optical flow information. The present invention is based on multi-scale feature fusion attention, and multi-scale motion features of targets of different scales are extracted to fuse the multi-scale features. Unlike traditional multi-scale feature fusion, the multi-scale feature attention module of the present invention only uses the last layer of feature maps for multi-scale fusion, reducing the cost of calculation.

[0110] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0111] The present invention is described with reference to flowcharts of methods, devices (apparatus), and computer program products according to embodiments of the present invention. It should be understood that each process in the flowchart, as well as the combination of processes in the flowchart, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A device that specifies functions in a process or multiple processes.

[0112] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple functions specified in a flowchart.

[0113] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 The steps of a specified function in a process or multiple processes.

[0114] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.

[0115] This patent is not limited to the above-mentioned optimal implementation mode. Anyone can derive other forms of real-time action detection methods based on multi-scale feature fusion attention under the inspiration of this patent. All equal changes and modifications made according to the scope of the patent application of the present invention should be covered by this patent.

Claims

1. A real-time action detection method based on multi-scale feature fusion attention, Features: The following steps are involved: Step S1: divide the video clips of the data set into frame sets, and perform data enhancement on them through random sorting operations; and extract key frames from the video clips, and extract optical flow information from the key frames; Step S2: Input the obtained video clips into the ResNext101 network to extract temporal features, and compress them, and input the key frames and the optical flow information of the key frames into the Darknet network to extract spatial features and motion features; Step S3: Obtain multi-scale features by stacking motion attention modules with different expansion rates; Step S4: splicing spatiotemporal features through channel attention to further fuse spatiotemporal features; Step S5: Obtain the category bounding box and confidence through the classification and regression network, and finally obtain the bounding box with the highest probability as the prediction result after non-maximum suppression NMS; Step S2 specifically includes the following steps: Step S21: Input the acquired video clip into the 3D backbone network ResNext101 network to extract the temporal features M∈R C ×T×H×W , where T is the number of input frames, H and W are the height and width of the input image, and C is the number of output channels; Step S22: Input the key frame into the 2D backbone network Darknet network to extract spatial features K∈R C'×H×W ; Step S23: Input the key frame optical flow information extracted by the RAFT model into the 2D backbone network Darknet network to extract motion features O∈R C”×H×W ; Step S24: To match the output feature map of the 2D backbone network, the depth dimension of the ResNext101 output feature M is reduced to 1, thereby compressing the output volume to [C×H×W], and obtaining the compressed feature M'∈R C×H×W ; Step S3 specifically includes the following steps: Step S31: The three extracted features K, O, and M' are respectively passed through two projection layers to generate a feature map of 512 channels; the projection layer uses a 1×1 convolution layer to reduce the channel dimension and a 3×3 convolution layer to refine the semantic context; Step S32: stacking motion attention modules with different dilation rates to generate output features K', O', M'' with multiple receptive fields to cover all scales of objects; The structure of the motion attention module is expressed as: X out =X attn *X res +X in X attn =F attn (A Pool(X in );θ,Ω) X res =F(X in ;θ,Ω) In the formula, F(·) represents the residual function, APool(·) represents the average pooling layer, θ and Ω represent the structure of the convolutional layer respectively; APool(·) is used to perform a non-complete compression operation, and then the attention channel X is attn *X res The output is upsampled to match channel X in Output: Step S4 specifically includes the following steps: Step S41: Concatenate features K', O', M' to obtain feature A∈R (C+C'+C”)×H×W ; Step S42: Input feature A into two convolutional layers to generate a new feature map B∈R C×H×W ; Then transform the feature map B into C×N size to get F∈R C×N , where N = H × W; Step S43: F∈R C×N Instead of transposing F T ∈R N×C Multiply and calculate the feature correlation between channels to generate the matrix G∈R C×C ; Step S44: Input the matrix into the Softmax layer to generate the channel attention map Q∈R C×C ; Step S45: Perform matrix multiplication on the channel attention map Q and the feature F, and transform the result back to the three-dimensional space with the same shape as the feature map B to obtain the feature F'∈R C×H×W ; Step S46: Combine the feature F' with the original input feature map B through a summation operation to obtain the output Z∈R C×H×W : Z=δ·F'+B Where δ is a training parameter.

2. The real-time action detection method based on multi-scale feature fusion attention according to claim 1, Features: Step S1 specifically includes the following steps: Step S11: uniformly sample the video segments of the data set at intervals of p frames, and divide the sampled video segments into n frames of equal length, that is, S = {s 1 ,s 2 ,…,s n }, each frame set s fi It consists of a sequence of video frames of equal length; Step S12: Frame set {s 1 ,s 2 ,…,s n } are randomly sorted to form a new video segment S' = {s' 1 ,s' 2 ,…,s' n }, to achieve the effect of data enhancement for use in the training process; Step S13: Divide the input video clip into three parts: the beginning, the middle, and the end, and randomly extract a frame from each part as a key frame to briefly represent the video action; Step S14: Use the RAFT model to extract optical flow information from the key frames.

3. The real-time action detection method based on multi-scale feature fusion attention according to claim 1, Features: Step S5 specifically includes the following steps: Step S51: The fused features are passed through a 1×1 kernel convolutional layer to generate an output channel of size [(5×(NumCls+5))×H×W], where (NumCls+5) includes NumCls class action scores cls, 4 coordinates [bx, by, bw, bh] and a confidence score Conf; Step S52: Select 5 prior anchors on the data set using the k-means clustering algorithm; Step S53: Based on the initial anchor box, the bounding box position and confidence are regressed through Sigmod, the bounding box loss is calculated through CIOU loss, and the confidence loss is calculated through binary cross entropy loss. The CIOU loss calculation formula is as follows: In the formula, b, and b gt Represents the center point of the two rectangular boxes, that is, the coordinates [bx,by], [x gt ,y gt ], ρ represents the Euclidean distance between two rectangular boxes, u represents the distance between the diagonals of the closure areas of the two rectangular boxes, and IOU is the ratio of the overlapping area of ​​the bounding boxes to the total area; Step S54: Classify through the fully connected layer and the Softmax layer, and calculate the classification loss through the Focal Loss. The calculation formula is as follows: Among them, α and γ are both adjustable hyperparameters; cls gt is the model prediction, and its value is between 0 and 1; Step S55: add the bounding box loss, confidence loss and classification loss as the total loss, and update the network parameters in reverse; Step S56: select a confidence threshold, take out the boxes of each category with scores greater than a certain threshold and sort them, filter out the low-threshold prediction bounding boxes, use the box positions and scores to perform non-maximum suppression NMS, and finally obtain the bounding box with the highest probability as the prediction result; The non-maximum suppression NMS is to sort the scores of all predicted bounding boxes, select the highest score and its corresponding box, traverse the remaining boxes, and delete the box if the IOU with the current highest score box is greater than a certain threshold; continue to select the one with the highest score from the unprocessed box and repeat the above process.