Small sample class incremental video action recognition method and device

By using a pre-trained contrastive language-visual large model and a progressive knowledge distillation method, spatiotemporal information from videos is extracted, which solves the problems of recognition accuracy and forgetting in incremental learning with few samples in video action recognition and improves the model's generalization ability.

CN120561744BActive Publication Date: 2025-12-12ZHEJIANG LAB
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511049383.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-29
Publication Date
2025-12-12
Estimated Expiration
2045-07-29

AI Technical Summary

Technical Problem

Existing technologies struggle to achieve incremental learning of small sample classes in video action recognition, especially when the environment and data are dynamically evolving. This leads to decreased recognition accuracy when learning new categories and the problem of forgetting old categories.

Method used

A pre-trained contrastive language-visual big model is used to extract spatiotemporal information from videos through visual soft cues and temporal soft cues. The temporal encoder is trained by combining linear fusion and progressive knowledge distillation loss functions to improve the model’s accuracy in recognizing new categories and reduce forgetting of old categories.

Benefits of technology

It significantly improves the recognition accuracy of new action categories, alleviates the catastrophic forgetting phenomenon of the model on old action categories, and achieves efficient video action recognition capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120561744B_ABST
    Figure CN120561744B_ABST
Patent Text Reader

Abstract

The application discloses a small sample class incremental video action recognition method and device, and belongs to the field of computer vision, the method comprises the following steps: for each video, by adopting visual soft prompt and time sequence soft prompt, video features of fusing space-time information are acquired, video features with prior knowledge are acquired at the same time, and the two kinds of video features are fused to acquire final video features; secondly, a text prototype of a class is extracted; finally, the similarity between the above-mentioned video features and the text prototype is calculated, and the input video is predicted as the class with the maximum similarity. The application can effectively capture the space-time features of the input video, improve the recognition accuracy of the video action, and the method is simple and flexible, which significantly improves the prediction accuracy of the new class, and can effectively alleviate the catastrophic forgetting phenomenon of the model on the old class.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of computer vision, and particularly relates to a small sample class incremental video action recognition method and device. BACKGROUND

[0002] In recent years, deep neural networks have shown excellent performance in various computer vision and machine learning tasks, especially when large-scale labeled datasets are used for training. However, due to the long-tail distribution and Zipf's law, it is often difficult to obtain a large amount of supervised data in advance in real-world scenarios, and new classes may emerge dynamically over time. For example, in an intelligent shelf monitoring system, only common commodity classes (such as beverages, snacks, and daily necessities) can be identified initially, and as time goes on, new commodities (such as limited taste beverages and seasonal commodities) will be introduced by merchants. For these new commodities, the system needs to learn quickly using only a small number of pictures, while maintaining the recognition accuracy of the original commodities. This requires the model to continuously learn new classes with only a small number of labeled samples while maintaining the recognition ability of the learned classes, i.e., small sample class incremental learning.

[0003] Small sample class incremental learning usually consists of a base task and multiple consecutive incremental tasks. In the base task, each class has a large number of labeled training samples to build an initial model, while in the incremental task, each class only has a few labeled samples to continuously train the model. When learning each task, the model can only use the training data in the current task for training, and after each task learning is completed, the model needs to be tested on all seen classes. For this problem, the academic community has conducted in-depth research from multiple angles, such as constructing a feature space that can adapt to incremental tasks in advance, dynamically expanding the model architecture for incremental tasks, and stabilizing the feature topology space. In recent years, compared to language-visual large models, due to the use of massive image-text data for pre-training, they have shown excellent zero-shot learning ability in multiple downstream tasks such as image segmentation and video understanding. Considering their strong knowledge transfer and generalization ability, the academic community is trying to apply contrastive language-visual large models to solve small sample class incremental learning and has achieved amazing performance.

[0004] However, the above research mainly focuses on the image field, and pays insufficient attention to the more challenging video action recognition problem. Unlike the static image task, video action recognition is more susceptible to environmental and dynamic data evolution, causing the small sample class increment problem, which is particularly prominent in the fields of security monitoring, medical health, and human-computer interaction. For example, a popular video website can upload 500 hours of video data covering various categories every minute, and it is crucial to develop a video action recognition model that can efficiently learn from continuous data without repeated training. In the era of large models, how to use contrastive language-visual large models to solve the small sample class increment video action recognition problem in a parameter-efficient manner is a difficult problem that needs to be solved urgently. SUMMARY

[0005] The present application aims to overcome the shortcomings of the prior art and provide a small sample class incremental video action recognition method and device.

[0006] To achieve the above-mentioned purpose, the technical scheme adopted by the present application is as follows: in a first aspect, a small sample class incremental video action recognition method is provided, comprising the following steps:

[0007] Pre-training a contrastive language-image pre-training large model, vectorizing each frame in the video into a video frame feature vector, inputting the pre-trained picture encoder, averaging the outputs of all frames to obtain the prior video feature; constructing a visual soft prompt vector, concatenating the video frame feature vector (the visual soft prompt vector as the prefix prompt), inputting the pre-trained picture encoder to obtain the video frame feature, constructing a time sequence soft prompt vector, and concatenating the video frame features of all frames in the video in time sequence (the time sequence soft prompt vector as the prefix prompt) to obtain the video feature vector, inputting the randomly initialized time sequence encoder to obtain the video feature; linearly fusing the video feature and the prior video feature;

[0008] Obtaining all class text prototypes through the pre-trained text encoder (inputting the text label of the video class into the text encoder to extract the text prototype of the class), calculating the cross-entropy loss of the probability distribution of the similarity between the linearly fused video feature and each class text prototype and the real label of the video, and the knowledge distillation loss of the linearly fused video feature and the prior video feature, and weighting and adding them as the loss function, freezing the parameters of the picture encoder and the text encoder, and training the visual soft prompt vector, the time sequence soft prompt vector, and the time sequence encoder;

[0009] When identifying the to-be-tested video, the probability distribution of the similarity between the linearly fused video feature and each class text prototype is calculated, and the class label corresponding to the maximum probability value is selected.

[0010] Further, the time sequence encoder is constructed based on a transformer structure.

[0011] Further, the visual soft prompt vector and the time sequence soft prompt vector are both composed of a plurality of soft prompt tokens, and the soft prompt tokens are randomly initialized.

[0012] Further, the video feature and the prior video feature are linearly fused, and the weight of the video feature is set to decrease with the increase of the learning task.

[0013] The linearly fused video feature is:

[0014] ;

[0015] wherein, is the video feature, is the prior video feature, is the fusion coefficient of the current i-th learning task, , , denotes the total number of learning tasks, , denotes a hyperparameter.

[0016] Further, the probability distribution of the similarity between the linearly fused video feature and each category text prototype is obtained by the following steps: calculating the cosine similarity between the linearly fused video feature and each category text prototype, and converting the cosine similarity into a probability distribution through a Softmax function.

[0017] Further, the knowledge distillation loss of the linearly fused video feature and the prior video feature is obtained by the following steps: projecting the linearly fused video feature into the prior video feature space and performing residual connection to obtain a residual connected video feature, and calculating the Euclidean distance between the prior video feature and the residual connected video feature as the knowledge distillation loss.

[0018] Further, the vectorization of each frame in the video into a video frame feature vector includes: dividing each frame in the video into a plurality of picture blocks in a fixed method, and each picture block is represented as a feature vector, and the feature vectors are sequentially spliced to obtain a video frame feature vector.

[0019] In a second aspect, the present application provides a small sample class incremental video action recognition device, comprising a memory and one or more processors, the memory is coupled with the processor;Wherein, the memory is used for storing program data, and the processor is used for executing program data to realize the small sample class incremental video action recognition method of the first aspect.

[0020] Thirdly, the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the small sample incremental video action recognition method described in the first aspect.

[0021] The beneficial effects of this invention are as follows: By employing visual soft cues and temporal soft cues, this invention can effectively extract spatiotemporal information from videos. Based on this, it further integrates prior features from a contrastive language-visual large model, thereby improving the generalization ability of the contrastive language-visual large model in downstream video action recognition tasks. By adopting a progressive knowledge distillation method related to the learning task, it can effectively avoid performance loss of the model on old action categories. The implementation method of this invention is simple and flexible, significantly improving the recognition accuracy of new action categories, while effectively mitigating the catastrophic forgetting phenomenon of the model on old categories. Attached Figure Description

[0022] Figure 1 This is a flowchart illustrating the small-sample incremental video action recognition method of the present invention.

[0023] Figure 2 This is a structural block diagram of the small sample incremental video action recognition device of the present invention;

[0024] Figure 3 This is a schematic diagram illustrating different learning tasks in the base class stage and the incremental stage of the present invention;

[0025] Figure 4 This is a schematic diagram of the sample input processing and progressive knowledge distillation process of the present invention. Detailed Implementation

[0026] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0027] It should be noted that, unless otherwise specified, the features in the following embodiments and implementation methods can be combined with each other.

[0028] like Figure 1 As shown in the figure, a few-sample incremental video action recognition method that integrates a pre-trained cross-modal large model and progressive knowledge distillation in an embodiment of the present invention mainly includes training a contrastive language image pre-trained large model in the base class stage, and performing N learning tasks in the incremental stage to train visual soft cues, temporal soft cues, and a temporal encoder. The specific steps are as follows:

[0029] (1) constructing a video feature extraction network to extract video features fused with space-time information and prior information; wherein the network comprises a visual soft prompt, a time sequence encoder, a time sequence soft prompt, and a pre-trained picture encoder. The step (1) comprises the following sub-steps:

[0030] (1.1) initializing the picture encoder and the text encoder using an open-source pre-trained contrastive language-image pre-training large model (CLIP model).

[0031] (1.2) constructing a time sequence encoder based on a transformer structure and randomly initializing the time sequence encoder.

[0032] (1.3) constructing a visual soft prompt vector, splicing the visual soft prompt vector with an input video frame to obtain a spliced feature vector, and inputting the spliced feature vector into the picture encoder to obtain corresponding frame features. The step (1.3) comprises:

[0033] (1.3.1) first, constructing a visual soft prompt vector and randomly initializing, wherein represents a real number set, represents that the visual soft prompt vector has soft prompt tokens, represents the vector length of each soft prompt token.

[0034] (1.3.2) secondly, the i-th video frame of a video is denoted as , wherein T represents that the input video has T frames in total, , denote the length and width of the video frame, the video frame is evenly divided into M picture blocks with a fixed size, and each picture block is represented as a feature vector with a length of , and the video frame is denoted as .

[0035] (1.3.3) then, the constructed visual soft prompt vector is spliced with the video frame feature vector to obtain a spliced feature vector .

[0036] (1.3.4) finally, the spliced feature vector is input into the picture encoder to obtain the frame features corresponding to the video frame , wherein represents the parameters of the picture encoder.

[0037] (1.4) Constructing a temporal soft cue vector, concatenating the temporal soft cue vector with the video frame features obtained in step (1.3) to obtain a concatenated feature vector, and inputting the concatenated feature vector into a temporal encoder to obtain video features that fuse spatial and temporal information. The step (1.4) comprises:

[0038] (1.4.1) First, a temporal soft cue vector is constructed and is randomly initialized, where indicates that the temporal soft vector has soft cue tokens, indicates the vector length of each soft cue token.

[0039] (1.4.2) Second, the temporal soft vector is concatenated with all frame features of the input video, indicates that the input video has frames, to obtain a concatenated feature vector (referred to as a video feature vector) .

[0040] (1.4.3) Finally, the concatenated feature vector is input into a temporal encoder to obtain video features that fuse temporal information .

[0041] (1.5) Inputting the video frame into the picture encoder constructed in (1.1) to obtain the corresponding frame feature, and averaging all frame features of the input video to obtain the corresponding prior video feature.

[0042] First, the feature of each frame of the input video is obtained. Specifically, the i-th video frame of the input video is denoted as , where , denote the length and width of the video frame, the video frame is evenly divided into M picture blocks with a fixed size, and each picture block is represented as a feature vector with a length of , the video frame is denoted as , and the video frame is input into the picture encoder to obtain the video frame feature . Second, all frame features of the video are averaged to obtain the prior video feature .

[0043] (1.6) Fusing the video features obtained in (1.4) and (1.5) to obtain the final video feature.

[0044] As Figure 3The video features obtained in (1.4) are fused with the prior video features obtained in (1.5) to obtain final video features

[0045]

[0046]

[0047] is the fusion coefficient of the current th learning task, indicates that there are learning tasks in total in the few-shot class-incremental video action recognition, represents a hyperparameter for controlling the degree of coefficient decay, represents another hyperparameter.

[0048] (2) Construct a text feature extraction network to extract text prototypes of video categories.

[0049] (3) Calculate the cosine similarity and its probability value between the video features obtained in step (1) and all category text prototypes obtained in step (2).

[0050] (4) Perform iterative training using the labeled training data of the current task, as shown in Figure 4 , the parameters of the image encoder and the text encoder are fixed during training, the cross-entropy loss function is calculated based on the probability value obtained in step (3), and the progressive knowledge distillation loss is calculated, and the sum of the cross-entropy loss function and the knowledge distillation loss is minimized. Adjust the parameters in the visual soft prompt, the temporal soft prompt, and the temporal encoder to obtain the trained visual soft prompt, the temporal soft prompt, and the temporal encoder. Step (4) includes the following sub-steps:

[0051] (4.1) First, calculate the similarity between the video features and the category text prototypes , and obtain the corresponding probability value, which is calculated as follows:

[0052]

[0053] where represents the text prototype corresponding to the cth category; indicates that there are categories in total; represents the predicted category label corresponding to the input video , and represents the probability value of the predicted category label being the category label c; ​​​​​​​denotes cosine similarity, denotes exponential function.

[0054] (4.2) Then, the cross-entropy loss of each training video is calculated, and the calculation formula is as follows:

[0055] ;

[0056] wherein, denotes the input video corresponding to the real label, taking 0 or 1.

[0057] (4.3) Secondly, the knowledge distillation between the video features and the prior video features is calculated. Specifically, the linearly fused video features are projected into the prior video features space, and a residual connection g is established with to obtain the residual connected video features, and then the distillation loss of and the residual connected video features is calculated.

[0058] The projection calculation mode is specifically as follows: wherein, and are the parameters of two fully connected layers, denotes the GELU activation function, denotes the residual coefficient. The distillation loss is calculated as: .

[0059] (4.4) Finally, the cross-entropy loss and the knowledge distillation loss are combined to obtain the final loss corresponding to the input video: wherein denotes the balance coefficient.

[0060] (5) Given a to-be-tested video, the visual soft prompt, the timing soft prompt and the timing encoder trained, and the picture encoder and the text encoder are used to repeat steps (1) to (3), the probability value between the to-be-tested video and all category labels is calculated, and the category label corresponding to the maximum probability value is selected as the final category label of the to-be-tested video.

[0061] The application also provides a computer readable storage medium, the storage medium stores a computer program, and the computer program can be used to execute the small sample class incremental video action recognition method provided by the application. Figure 1 The application also provides a computer readable storage medium, the storage medium stores a computer program, and the computer program can be used to execute the small sample class incremental video action recognition method provided by the application.

[0062] The application also provides a computer readable storage medium, the storage medium stores a computer program, and the computer program can be used to execute the small sample class incremental video action recognition method provided by the application. Figure 2 The application also provides a computer readable storage medium, the storage medium stores a computer program, and the computer program can be used to execute the small sample class incremental video action recognition method provided by the application. Figure 1The small sample class incremental video action recognition device schematic structure diagram of the method. As Figure 2 At the hardware level, the small sample class incremental video action recognition device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and can also include other hardware required by the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs to implement the above Figure 1 The method. Of course, in addition to the software implementation, the present application does not exclude other implementation manners such as logic devices or software and hardware combined manner, that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic device.

[0063] For a technical improvement, it can be clearly distinguished whether it is a hardware improvement (for example, improvement of circuit structure such as diode, transistor, switch, etc.) or a software improvement (improvement of method flow). However, with the development of technology, many improvements of method flow today can be regarded as direct improvement of hardware circuit structure. Designers almost all get the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of the method flow cannot be realized by the hardware entity module. For example, programmable logic device (Programmable Logic Device, PLD) is such an integrated circuit, whose logic function is determined by the user programming the device. The designer programs a digital system "integrated" on a PLD by himself, without asking the chip manufacturer to design and manufacture a special integrated circuit chip. Moreover, instead of manually making integrated circuit chips, such programming is now mostly realized by "logic compiler" software, which is similar to the software compiler used when developing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), and there are many kinds of HDL, and the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also be clear that only the method flow needs to be logically programmed and programmed into the integrated circuit by using the above-mentioned several hardware description languages, and the hardware circuit for realizing the logical method flow can be easily obtained.

[0064] The controller can be implemented in any suitable way, for example, the controller can take the form of a microprocessor or processor and a computer readable medium storing computer readable program code, such as software or firmware, executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller and an embedded microcontroller, examples of controllers include the following microcontrollers: ARC 625D, Atmel AT91 SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, the memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that, in addition to being implemented in pure computer readable program code, the controller can equally well be implemented to perform the same functions using logic gates, switches, application specific integrated circuits, programmable logic controllers and embedded microcontrollers, by logically programming the method steps. The controller can thus be considered a hardware component, and the means included therein for performing the various functions can be considered structures within the hardware component. Alternatively, or even in addition, the means for performing the various functions can be considered both software modules that implement the methods and structures within the hardware component.

[0065] The systems, apparatuses, modules or units illustrated by the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0066] Those skilled in the art will appreciate that embodiments of the present application can be provided as a method, a system or a computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer readable program code thereon for use by or in connection with an instruction execution system.

[0067] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or blocks of the flowcharts can be implemented by computer program instructions. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or blocks of the flowcharts can be implemented by computer program instructions.

[0068] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or blocks of the flowcharts can be implemented by computer program instructions. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or blocks of the flowcharts can be implemented by computer program instructions.

[0069] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or blocks of the flowcharts can be implemented by computer program instructions. ​ one or more flowcharts and / or blocks in the flowcharts and / or blocks of the flowcharts can be implemented by computer program instructions.

[0070] In one typical configuration, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0071] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) about which the computing device can store data and program instructions. Typically, the memory is a computer-readable medium. The memory can also include non-volatile memory, such as read-only memory (ROM), electrically programmable read only memory (EPROM), or electrically erasable programmable memory (EEPROM) about which the computing device can store static data and instructions. It is important to note that the computer-readable medium can be referred to as a computer-readable storage medium, a tangible media, or non-transitory storage medium as the manner in which the computer-readable medium holds the instructions is not the concern of the inventive subject matter. The file servers can be remote from the computing device and / or can be remote from each other.

[0072] Computer-readable media includes permanent and non-permanent, movable and non-movable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carriers.

[0073] Those skilled in the art will appreciate that embodiments of the present application can be provided as methods, systems or computer program products. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can 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-ROMs, optical storage etc.) containing computer usable program code.

[0074] The present application can be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform particular tasks or implement particular abstract data types. The present application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including memory storage devices.

[0075] The above description is only some embodiments of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the scope of claims of the present application.

Claims

1. A method for incremental video action recognition with a small sample size, characterized in that, Includes the following steps: Pre-trained contrastive language image pre-trained large model; each frame in the video is vectorized into a video frame feature vector, which is input into a pre-trained image encoder, and the output of all frames is averaged to obtain prior video features; Visual soft cue vectors are constructed and concatenated with video frame feature vectors. These vectors are then input into a pre-trained image encoder to obtain video frame features. Temporal soft cue vectors are constructed and concatenated with the video frame features of all frames in the video in chronological order to obtain video feature vectors. These vectors are then input into a randomly initialized temporal encoder to obtain video features. The video features and prior video features are then linearly fused. All categories of text prototypes are obtained through a pre-trained text encoder. The probability distribution of similarity between the linearly fused video features and the text prototypes of each category is calculated, along with the cross-entropy loss of the video's corresponding real label and the knowledge distillation loss between the linearly fused video features and the prior video features. These are weighted and summed as the loss function. The parameters of the image encoder and the text encoder are frozen, and the visual soft cue vector, temporal soft cue vector, and temporal encoder are trained. The knowledge distillation loss between the linearly fused video features and the prior video features is obtained through the following steps: the linearly fused video features are projected onto the prior video feature space and residual connections are performed to obtain the residual connected video features. The Euclidean distance between the prior video features and the residual connected video features is calculated as the knowledge distillation loss. When identifying the video to be tested, the probability distribution of similarity between the linearly fused video features and the text prototypes of each category is calculated, and the category label corresponding to the highest probability value is selected.

2. The method according to claim 1, characterized in that, The timing encoder is constructed based on the transformer architecture.

3. The method according to claim 1, characterized in that, Both the visual soft cue vector and the temporal soft cue vector are composed of multiple soft cue tokens, which are randomly initialized.

4. The method according to claim 1, characterized in that, The step of vectorizing each frame in the video into a video frame feature vector includes: dividing each frame in the video into multiple image blocks according to a fixed method, with each image block representing a feature vector, and concatenating the feature vectors sequentially to obtain the video frame feature vector.

5. The method according to claim 1, characterized in that, The video features and prior video features are linearly fused, and the resulting video features are... for: ; in, For video features, For prior video features, For the current number The fusion coefficient of each learning task. , This indicates the total number of learning tasks. , It's a hyperparameter.

6. The method according to claim 1, characterized in that, The probability distribution of the similarity between the linearly fused video features and the text prototypes of each category is obtained through the following steps: calculating the cosine similarity between the linearly fused video features and the text prototypes of each category, and converting it into a probability distribution using the Softmax function.

7. A small-sample incremental video action recognition device, comprising a memory and one or more processors, characterized in that, The memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the small sample incremental video action recognition method according to any one of claims 1-6.

8. A computer-readable storage medium, characterized in that, It stores a program that, when executed by a processor, implements the small sample incremental video action recognition method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Video abnormal event detection method based on prompt learning and multi-scale time sequence fusion

    CN118918506A

  • Cross-language information sorting method and device based on semantic space clustering prompt, equipment and storage medium

    CN119166780A