Zero-shot video classification method, apparatus and computer storage medium

By acquiring video streams and classification corpora for preprocessing and multimodal large language model verification, and combining logical expressions to output binary classification results of video streams, this approach solves the problems of fine-grained semantic distinction and high computational overhead in video classification methods in open scenarios, achieving real-time performance and accuracy for high-frequency video streams.

CN123182103APending Publication Date: 2026-11-27ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611340617.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-31
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing video classification methods in open scenarios suffer from insufficient fine-grained semantic discrimination capabilities, high computational overhead, and poor real-time performance, making it difficult to meet the real-time requirements of high-frequency video streams.

Method used

By acquiring video streams and classification corpora, candidate target images are obtained through preprocessing and verified using a multimodal large language model. The binary classification results of the video stream are output by combining pre-configured logical expressions, and zero-shot classification screening and verification confidence fusion processing are adopted.

Benefits of technology

Without significantly increasing computational overhead, it improves the accuracy and robustness of video classification, making it suitable for real-time applications of high-frequency video streams.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123182103A_ABST
    Figure CN123182103A_ABST
Patent Text Reader

Abstract

The application provides a zero-shot video classification method and device and a computer storage medium. The zero-shot video classification method comprises the following steps: obtaining a video stream and a classification corpus set, wherein the classification corpus set comprises at least one positive classification corpus and / or at least one negative classification corpus; pre-processing a target in the video stream to obtain at least one candidate target image; performing zero-shot classification screening on each candidate target image according to the classification corpus set; when the candidate target image meets a preset trigger condition, inputting the candidate target image into a multi-modal large language model for verification to obtain a verification confidence; and performing fusion processing on the result of the zero-shot classification screening, the verification confidence and a pre-configured logical expression to output a binary classification result of the video stream. Through the zero-shot video classification method, the accuracy and robustness of the video classification result can be improved without significantly increasing the computing overhead.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer vision processing, and in particular to a zero-shot video classification method, a zero-shot video classification device, and a computer storage medium. Background Technology

[0002] In the field of video content understanding and intelligent analysis, video classification technology is a crucial means to achieve efficient management and accurate distribution of massive amounts of video data. This technology analyzes visual semantic information in video streams, mapping video content to a predefined category space, thus significantly impacting the effectiveness of subsequent applications such as intelligent retrieval, content moderation, and security alerts. In this process, the rationality of classification decisions highly depends on the accurate extraction and discrimination of target semantic features in video frames. Therefore, accurate target representation and category determination mechanisms are fundamental prerequisites for ensuring the quality of the final classification.

[0003] Currently, video classification methods for open scenarios mainly rely on zero-shot classification techniques based on multimodal contrastive learning and end-to-end classification architectures based on pre-trained models. While zero-shot video classification methods based on multimodal contrastive learning can identify new categories by leveraging joint visual-linguistic representations, they often suffer from insufficient fine-grained semantic discrimination capabilities when faced with complex semantic queries involving multiple attribute constraints, multi-subject logical relationships, or blurred category boundaries, making it difficult to accurately identify easily confused target categories. On the other hand, while end-to-end classification architectures based on pre-trained models perform well in scenarios with fixed categories, their performance is highly dependent on large-scale labeled data. When facing fragmented and long-tailed classification requirements, data needs to be collected and models trained again for each new category, resulting in long development cycles, high customization costs, and large computational overhead for frame-by-frame inference, making it difficult to meet the real-time requirements of high-frequency video streams.

[0004] Therefore, there is an urgent need for a video classification scheme that can balance computational efficiency and classification accuracy in order to improve the accuracy and real-time performance of video content recognition in open scenarios. Summary of the Invention

[0005] To address the aforementioned technical problems, this application provides a zero-shot video classification method, a zero-shot video classification device, and a computer storage medium.

[0006] To address the aforementioned technical problems, this application provides a zero-shot video classification method, which includes: The system acquires a video stream and a classification corpus, the classification corpus including at least one positive classification corpus and / or at least one negative classification corpus; preprocesses the targets in the video stream to obtain at least one candidate target image; performs zero-shot classification screening on each candidate target image according to the classification corpus; when a candidate target image meets a preset trigger condition, inputs the candidate target image into a multimodal large language model for verification to obtain a verification confidence level; performs fusion processing based on the results of the zero-shot classification screening, the verification confidence level, and a pre-configured logical expression to output the binary classification result of the video stream.

[0007] The step of preprocessing the target in the video stream to obtain at least one candidate target image includes: detecting the target in the video stream according to a preset general detection model, and / or a preset special detection model, and / or a preset zero-shot detection model, to obtain at least one candidate target image containing the target.

[0008] The method further includes, after obtaining at least one candidate target image, tracking at least one target in the candidate target image in subsequent video frames of the current video frame corresponding to the candidate target image according to a preset target tracking algorithm, to obtain a candidate image set of the target in multiple consecutive frames; and selecting candidate images that meet preset screening conditions from the candidate image set as candidate target images.

[0009] The classification corpus includes at least one positive classification corpus or at least one negative classification corpus; the zero-shot classification screening of each candidate target image based on the classification corpus includes: calculating the feature similarity between the candidate target image and the classification corpus based on the text feature vector of the classification corpus and the image feature vector of the candidate target image; and performing zero-shot classification screening of the candidate target image based on the feature similarity.

[0010] The classification corpus includes at least one positive classification corpus and at least one negative classification corpus. The step of calculating the feature similarity between the candidate target image and the classification corpus based on the text feature vector of the classification corpus and the image feature vector of the candidate target image includes: calculating the positive feature similarity between the candidate target image and the positive classification corpus based on the text feature vector of the positive classification corpus and the image feature vector of the candidate target image; calculating the negative feature similarity between the candidate target image and the negative classification corpus based on the text feature vector of the negative classification corpus and the image feature vector of the candidate target image; and the step of performing zero-shot classification screening of the candidate target image based on the feature similarity includes: performing zero-shot classification screening of the candidate target image based on the positive and negative feature similarities.

[0011] The preset triggering conditions include at least one of the following: the positive feature similarity is greater than a first threshold, the difference between the positive feature similarity and the negative feature similarity is greater than a second threshold, and the negative feature similarity is not greater than a third threshold.

[0012] The zero-shot video classification method further includes: generating classification screening verification text based on the positive classification corpus; and inputting the candidate target image into a multimodal large language model for verification to obtain verification confidence, which includes: inputting the classification screening verification text and the candidate target image into the multimodal large language model for verification to obtain a first predicted probability that the candidate target image matches the classification screening verification text and a second predicted probability that the candidate target image does not match the classification screening verification text; and determining the verification confidence of the candidate target image matching the classification screening verification text based on the ratio between the first predicted probability and the sum of the predicted probabilities, wherein the sum of the predicted probabilities represents the sum of the first predicted probability and the second predicted probability.

[0013] The classification and screening verification text contains several different attribute features. The step of inputting the candidate target image into a multimodal large language model for verification to obtain verification confidence includes: splitting the classification and screening verification text into several verification sub-texts, where each verification sub-text corresponds to an attribute feature; inputting the verification sub-texts and the candidate target image into the multimodal large language model for verification to obtain a third predicted probability that the candidate target image matches the verification sub-text and a fourth predicted probability that the candidate target image does not match the verification sub-text; determining the verification confidence of the candidate target image matching the verification sub-text based on the ratio between the third predicted probability and the sum of the predicted probabilities, where the sum of the predicted probabilities represents the sum of the third predicted probability and the fourth predicted probability; and determining the verification confidence of the candidate target image matching the classification and screening verification text based on the verification confidence of the candidate target image matching each verification sub-text.

[0014] To address the aforementioned technical problems, this application also provides a zero-shot video classification apparatus, which includes a memory and a processor coupled to the memory; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the zero-shot video classification method as described above.

[0015] To address the aforementioned technical problems, this application also provides a computer storage medium storing a computer program, which, when executed by a processor, implements the steps in the zero-shot video classification method described above.

[0016] Compared with existing technologies, the beneficial effects of this application are as follows: By using zero-shot classification screening, the semantic correlation between candidate target images and the classification corpus is determined, enabling subsequent verification processing by the multimodal large language model to focus on key candidate targets that meet preset trigger conditions. This allows for a focus on allocating computational resources and reduces the computational overhead caused by irrelevant or low-confidence targets participating in subsequent verification. Furthermore, by determining the preset trigger conditions, candidate targets requiring in-depth verification are identified, i.e., those with semantic ambiguity or high confidence but requiring further confirmation in the zero-shot classification screening results. When a candidate target image meets the trigger conditions, the multimodal large language model is further invoked for verification, quantifying the matching confidence between the candidate target and the classification corpus, and outputting the verification confidence score accordingly. Finally, the zero-shot classification screening results and the verification confidence score are fused using a pre-configured logical expression to output the binary classification result of the video stream. This process provides a hierarchical processing mechanism for complex situations in open scenarios where video target semantics are ambiguous, category boundaries are unclear, or the mapping between visual features and category labels is uncertain. It can provide technical support for the accuracy and robustness of video classification results without significantly increasing computational overhead, and is suitable for high-frequency video stream application scenarios with certain real-time requirements. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein: Figure 1 This is a flowchart illustrating an embodiment of the zero-shot video classification method provided in this application; Figure 2 This is a flowchart illustrating another embodiment of the zero-shot video classification method provided in this application; Figure 3 This is a schematic diagram of the structure of an embodiment of the zero-sample video classification device provided in this application; Figure 4 This is a schematic diagram of the structure of an embodiment of the computer storage medium provided in this application. Detailed Implementation

[0018] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, the specific embodiments of this application will be described in detail below with reference to the accompanying drawings. It is to be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, it should be noted that, for ease of description, only the parts relevant to this application are shown in the accompanying drawings, not all structures. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0019] The terms “first,” “second,” etc. (if applicable) in this application are used to distinguish different objects, not to describe a particular order. Furthermore, the terms “comprising” and “featured,” and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus.

[0020] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0021] The zero-shot video classification method of this application is applied to a zero-shot video classification device, which can be a server, a terminal device, or a system in which the server and terminal device cooperate with each other. Accordingly, the various parts of the zero-shot video classification device, such as each unit, subunit, module, and submodule, can all be set in the server, all in the terminal device, or separately in the server and the terminal device.

[0022] Furthermore, the aforementioned server can be either hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server is software, it can be implemented as multiple software programs or software modules, such as software or software modules used to provide distributed server functionality, or as a single software program or software module; no specific limitations are made here.

[0023] Please refer to the details. Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the zero-sample video classification method provided in this application.

[0024] like Figure 1 As shown, the specific steps are as follows: Step S11: Obtain the video stream and the classification corpus set, wherein the classification corpus set includes at least one positive classification corpus and / or at least one negative classification corpus.

[0025] In this embodiment of the application, the video stream can be acquired through real-time capture by a camera, reception via a network transmission interface, or reading from a local storage medium, and this application does not impose specific limitations on this.

[0026] It should be noted that the ultimate goal of this application embodiment is to determine whether the target in the video stream belongs to a preset category, and to output a binary classification result indicating whether the target belongs to the preset category or not.

[0027] For example, in a security monitoring scenario, the binary classification result represents whether the target in the video stream meets the alarm conditions. That is, when the target meets the alarm conditions, it indicates that the target belongs to a preset category, and when the target does not meet the alarm conditions, it indicates that the target does not belong to a preset category.

[0028] Furthermore, the preset category includes at least one attribute feature, that is, the preset category is defined by at least one attribute feature.

[0029] For example, if the preset categories are "meeting alarm conditions" and "not meeting alarm conditions", and the alarm condition is "the number of people on the truck exceeds 3", then the attribute characteristics corresponding to the preset category are "truck" and "the number of people exceeds 3". The target is determined to belong to the preset category only if the target in the video stream has both of these attribute characteristics. If either attribute characteristic is not met, no alarm will be triggered.

[0030] In practical applications, preset categories and their included attribute features can be flexibly defined according to specific needs.

[0031] In this embodiment of the application, to achieve video classification in zero-shot scenarios, a classification corpus is first constructed based on the attribute features included in a preset category. That is, the classification corpus is a collection of attribute description texts used to describe the attribute features required for a target to belong to a preset category.

[0032] The classification corpus includes at least one positive classification corpus and / or at least one negative classification corpus.

[0033] Specifically, the positive classification corpus consists of semantic text describing the attribute features that a target should possess when it belongs to the preset category. For example, if the attribute features corresponding to the preset category are "truck" and "carrying more than 3 people", then text related to "truck" and "carrying more than 3 people" can be used as positive classification corpus.

[0034] The negative classification corpus consists of semantic text describing the attribute features that should be excluded when the target does not belong to the preset category. For example, if the attribute features corresponding to the preset category are "truck" and "more than 3 people", then text related to "non-truck" or "no more than 3 people" can be used as negative classification corpus to exclude targets that are trucks but have no more than 3 people, as well as other types of non-truck vehicles.

[0035] In some embodiments, the semantic boundaries of the preset category can be defined from both positive and negative directions by simultaneously setting positive and negative classification corpora. The target is determined to belong to the preset category only when it possesses all the attribute features described by the positive classification corpora but does not possess all the attribute features described by the negative classification corpora.

[0036] In this embodiment of the application, the classification corpus can be flexibly configured and updated according to actual business needs. When the preset category changes, only the corresponding classification corpus needs to be added, deleted or modified, without retraining the model, thereby quickly responding to fragmented and long-tail business needs.

[0037] Step S12: Preprocess the target in the video stream to obtain at least one candidate target image.

[0038] In this embodiment of the application, the preprocessing is used to extract image regions containing targets from video frames of the video stream, and to use the image regions as candidate target images for subsequent zero-shot classification screening.

[0039] The candidate target image may be an image patch containing the complete target or an image region containing local features of the target; this application does not make any specific limitation in this regard.

[0040] The target is the object in the video stream to be categorized, and its selection depends on the actual application scenario. For example, in a security monitoring scenario, the target can be a person, vehicle, or object; in an industrial production scenario, the target can be a product or equipment component; and in a traffic management scenario, the target can be a motor vehicle, a non-motor vehicle, or a pedestrian.

[0041] Furthermore, the selection of the target can also depend on the attribute features corresponding to the preset category. For example, when the attribute features corresponding to the preset category are "truck" and "carrying more than 3 people", "truck" can be selected as the target to be extracted from the video stream, that is, the vehicle is used as the target for preprocessing, and the vehicle image region is extracted as the candidate target image.

[0042] This application does not limit the selection of the target, as long as the selected target meets the needs of the application scenario and can be presented in the video stream visually.

[0043] In some embodiments, preprocessing the target in the video stream to obtain at least one candidate target image includes: detecting the target in the video stream according to a preset general detection model, and / or a preset special detection model, and / or a preset zero-sample detection model, to obtain at least one candidate target image containing the target.

[0044] In this embodiment, the three preprocessing methods are not mutually exclusive, but can be flexibly selected and combined according to the specific needs of the actual application scenario.

[0045] For example, in scenarios with ample computing resources and high recall requirements, multiple methods can be used simultaneously to acquire as many candidate target images as possible; in scenarios with limited computing resources and high real-time requirements, one method with lower computational overhead can be selected to reduce latency.

[0046] For example, in actual deployment, the preprocessing method can be dynamically adjusted according to different time periods and different scenarios. For instance, a preset general detection model can be used for rapid detection during the day, while switching to zero-sample detection at night or when lighting conditions are poor can compensate for the shortcomings of the general detector under specific conditions.

[0047] Regardless of which method or combination of the above methods are used, as long as at least one candidate target image containing the target can be obtained, this application does not limit the specific preprocessing implementation method and combination strategy.

[0048] In this embodiment, for the first preprocessing method, the preset general detection model is a general object detection model pre-trained on a large-scale general dataset, which can detect a variety of common categories including people, motor vehicles, and non-motor vehicles.

[0049] By using the preset general detection model to detect the input video frame, a set of detection results for the current video frame can be obtained.

[0050] Specifically, the detection result set includes at least one detected target, as well as the bounding box coordinates, category label, and detection confidence of the target.

[0051] Wherein, the bounding box coordinates are used to indicate the position of the target in the current video frame, the category label is used to indicate the category to which the target belongs, and the detection confidence is used to characterize the reliability of the target belonging to the category label.

[0052] Furthermore, by cropping the image region corresponding to the bounding box, a candidate target image containing the target can be obtained.

[0053] In this embodiment, for the second preprocessing method, the preset dedicated detection model is a dedicated detection model pre-trained for a specific business scenario, used to identify whether a specific type of target exists in the video frame, and output a determination result of whether the target exists.

[0054] Unlike the first preprocessing method, which uses a pre-set general detection model to detect multiple common categories, the second preprocessing method uses a custom-trained dedicated detection model that focuses on identifying one or more specific categories of targets, making it more business-specific.

[0055] For example, in security monitoring scenarios, the preset dedicated detection model can be an intelligent early warning algorithm used to identify dangerous objects such as fireworks, fighting, and area intrusion; in industrial quality inspection scenarios, the preset dedicated detection model can be a defect detection algorithm used to identify defects such as scratches, dirt, and deformation on product surfaces; in traffic management scenarios, the preset dedicated detection model can be a violation detection algorithm used to identify violations such as driving against traffic, illegal parking, and driving over the lines.

[0056] This embodiment does not limit the specific application scenarios and functional types of the preset dedicated detection model, as long as it can detect the input video frame and output the image region containing the target.

[0057] The preset dedicated detection model is used to perform inference calculations on the input video frame to obtain the classification result of the current video frame. If the classification result indicates that the target exists, the image region containing the target and its corresponding classification confidence score are output, and the image region is used as the candidate target image.

[0058] The second preprocessing method in this embodiment is directly geared towards specific business scenarios. It can provide an image region containing the target when the algorithm determines that the target exists. It is suitable for situations where a professional classification algorithm has been customized and trained for specific business needs, and has high detection accuracy and business relevance.

[0059] In this embodiment, the application scenario for the third preprocessing method can be to detect targets in the video stream based on a custom semantic description when the preset general detection algorithm and the preset special detection algorithm are not configured; or it can be to detect targets in the video stream based on a custom semantic description when the preset general detection algorithm and the preset special detection algorithm cannot detect the corresponding targets or the detection accuracy is insufficient.

[0060] The custom semantic description is a text corpus configured according to actual detection needs, namely the target detection corpus, which is used to describe the attribute features of the detected target.

[0061] Unlike the two preprocessing methods mentioned above, this method does not rely on any pre-trained detection model or custom training model. It can achieve object detection based solely on the user-configured text corpus, which has strong flexibility and scalability. It is especially suitable for scenarios where the target category changes frequently or where it is difficult to obtain training data in advance.

[0062] Specifically, the text corpus configured according to the actual detection requirements is used as the target detection corpus and input together with the input image into the zero-shot detection model based on the visual language pre-trained model. The image region that matches the target detection corpus is located in the input image, and the image region is output as the candidate target image.

[0063] The zero-shot target detector includes a visual encoder and a text encoder. The visual encoder is used to extract the image feature vector of each image region of the input image, and the text encoder is used to extract the text feature vector of the target detection corpus.

[0064] Furthermore, by calculating the feature similarity between the image feature vector of each image region and the text feature vector, the feature similarity is used as the target detection confidence of that region. By setting a detection confidence threshold, image regions with feature similarity greater than the threshold are selected, and the candidate target images are obtained by cropping the image regions.

[0065] The feature similarity can be calculated using cosine similarity, Euclidean distance, or other similarity measures, and this application does not impose any specific limitations on this.

[0066] In this embodiment, the input image can be each video frame in the video stream, or a candidate target image obtained through the first preprocessing method and / or the second method. When the input image is each video frame in the video stream, this method can independently perform zero-shot target detection, directly locating the target region matching the target detection corpus from the original video frame, thereby obtaining a candidate target image. When the input image is a candidate target image obtained through the first preprocessing method and / or the second preprocessing method, this method can further perform zero-shot screening and verification on the initially detected target regions to eliminate candidate target images that do not match the target detection corpus, thereby improving the accuracy of the candidate target images.

[0067] In some embodiments, after obtaining at least one candidate target image, the method further includes: tracking at least one target in the candidate target image in subsequent video frames of the current video frame corresponding to the candidate target image according to a preset target tracking algorithm to obtain a candidate image set of the target in multiple consecutive frames; and selecting candidate images that meet preset screening conditions from the candidate image set as candidate target images.

[0068] In this embodiment, after obtaining candidate target images through any one or more of the above preprocessing methods, the detection results of the same target in multiple consecutive frames in the video stream can be further tracked and filtered to improve the quality of the candidate target images.

[0069] Specifically, according to a preset target tracking algorithm, at least one target in the candidate target image is tracked in subsequent video frames of the current video frame corresponding to the candidate target image, thereby obtaining a candidate image set of the target in multiple consecutive frames. That is, if multiple targets exist simultaneously in the video stream, the preset target tracking algorithm can continuously track each target separately, associate the detection results of the same target in different frames through data association, and assign a unique tracking identifier to each target, thereby realizing multi-target tracking and obtaining a candidate image set of each target in multiple consecutive frames.

[0070] Target tracking allows for the acquisition of multiple candidate images of the same target across consecutive frames in a video stream, providing richer temporal information for subsequent classification and selection.

[0071] Further, candidate images that meet preset screening conditions are selected from the candidate image set as candidate target images. The preset screening conditions may include at least one of the following: image clarity greater than a preset clarity threshold, the target's area proportion in the image is within a preset range, the offset distance between the target and the image center is within a preset range, and the integrity of the target's pose meets preset requirements.

[0072] Through the above screening, candidate images with poor quality or excessive positional deviation can be eliminated, ensuring that the images entering the subsequent zero-shot classification screening have high recognizability and representativeness.

[0073] After the target tracking and filtering process described above, the detection results of multiple frames of the same target can be summarized into the candidate target image with the best quality. This effectively avoids the decline in the quality of the candidate target image caused by poor detection quality of a single frame, such as target occlusion, motion blur, or poor pose, thereby improving the accuracy and stability of subsequent classification and filtering.

[0074] It is worth noting that the aforementioned target tracking and filtering processes are optional, not mandatory. In practical applications, the decision to perform these processes can be flexibly made based on specific scenario requirements and computational resources. For example, in scenarios involving processing single-frame images or where computational resources are limited, the candidate target images obtained in the preprocessing stage can be directly used as input for subsequent classification and filtering, eliminating the need for target tracking and filtering. This application does not impose specific limitations on whether or not to perform target tracking and filtering processes.

[0075] Step S13: Perform zero-shot classification screening on each candidate target image according to the classification corpus.

[0076] In this embodiment of the application, the candidate target image obtained through step S12 may contain a large number of targets that are not actually of interest in the current application scenario. In particular, when the preset category contains multiple attribute features, the category determination logic is relatively complex, or the application scenario itself is a zero-sample scenario where all target categories cannot be predicted, the image region captured in the preprocessing stage can often only guarantee that it "contains a certain target", but cannot guarantee that the target meets all the attribute conditions of the preset category.

[0077] For example, if the preset category is "meeting alarm conditions", and the alarm condition is "a person wearing a reflective vest, carrying a walkie-talkie and wearing a police uniform", then the preset category is defined by four attribute features: "person", "wearing a reflective vest", "carrying a walkie-talkie" and "wearing a police uniform".

[0078] The candidate target images obtained in step S12 may only contain "people," such as capturing an image of a passerby who is not wearing a reflective vest, carrying a walkie-talkie, or wearing a police uniform, clearly not meeting all the attribute conditions of the preset category. It may also capture images of people wearing reflective vests but not carrying walkie-talkies or wearing police uniforms, people carrying walkie-talkies but not wearing reflective vests or wearing police uniforms, people wearing police uniforms but not wearing reflective vests or carrying walkie-talkies, and people who possess any two of these attribute characteristics but lack the others—a large number of targets that possess the attribute characteristics but do not yet meet all the alarm conditions. Although these candidate target images all contain the target "people," not every one of them meets the alarm conditions.

[0079] If all candidate target images are directly judged, the judgment results will lack reliability due to the large number of interfering targets that are irrelevant or only partially related to the alarm conditions captured in the preprocessing stage. This will easily lead to false alarms or missed alarms, seriously affecting the accuracy and stability of the alarm. At the same time, if a multimodal large language model with high computational cost is directly used to perform deep verification on all candidate target images one by one without screening, although the accuracy of the judgment can be improved to some extent, it will bring huge computational costs and latency, making it difficult to meet the real-time requirements of high-frequency video streams.

[0080] Therefore, it is necessary to adopt a screening mechanism with low computational overhead after preprocessing and before deep verification to quickly screen candidate target images to preliminarily determine whether each candidate target image may meet the alarm conditions, thereby minimizing the number of candidate target images that need to enter deep verification while ensuring the accuracy of subsequent verification.

[0081] Based on this, in step S13 of this embodiment, zero-shot classification screening is performed on each candidate target image according to the classification corpus obtained in step S11. The zero-shot classification screening is used to preliminarily determine whether each candidate target image meets the alarm conditions, so as to quickly screen a large number of candidate target images with low computational overhead, and to remove candidate target images that clearly do not meet the alarm conditions in advance, thereby improving the accuracy and processing efficiency of subsequent discrimination.

[0082] The zero-shot classification screening is implemented based on a pre-trained visual language model, which includes a visual encoder and a text encoder. The visual encoder is used to extract image feature vectors of candidate target images, and the text encoder is used to extract text feature vectors of text.

[0083] If the candidate target image originates from the third preprocessing method in step S12, namely, obtained through the zero-shot detection model, then since both the zero-shot detection model and the zero-shot classification screening are based on the same visual language model architecture, the candidate target image has already had its image feature vector extracted by the visual encoder of the zero-shot detection model during the preprocessing stage, and this image feature vector is consistent with the image feature vector required by the zero-shot classification screening in the feature space. Therefore, the zero-shot classification screening can directly reuse this image feature vector without repeating feature extraction on the same candidate target image, thereby further reducing computational overhead.

[0084] In some embodiments, the classification corpus includes at least one positive classification corpus or at least one negative classification corpus; the zero-shot classification screening of each candidate target image based on the classification corpus includes: calculating the feature similarity between the candidate target image and the classification corpus based on the text feature vector of the classification corpus and the image feature vector of the candidate target image; and performing zero-shot classification screening of the candidate target image based on the feature similarity.

[0085] In this embodiment, the zero-shot classification screening is implemented based on a pre-trained visual language model, which includes a visual encoder and a text encoder. The visual encoder is used to extract image feature vectors from images, and the text encoder is used to extract text feature vectors from text. By calculating the feature similarity between the image feature vectors of candidate target images and the text feature vectors of the classification corpus, it can be preliminarily determined whether the candidate target images meet the alarm conditions defined by the preset category.

[0086] The text feature vector is obtained by inputting each category corpus from the classification corpus obtained in step S11 into the text encoder. Since the classification corpus has been configured in step S11, its text feature vector can be pre-calculated and cached before step S13 is executed, eliminating the need for repeated extraction each time candidate target images are screened, thereby further reducing computational overhead.

[0087] The image feature vector is obtained by inputting the candidate target image into the visual encoder. If the candidate target image comes from the third preprocessing method in step S12, i.e., obtained through the zero-shot detection model, then since the zero-shot detection model and the zero-shot classification screening are both based on the same visual language model architecture, the candidate target image has already had its image feature vector extracted by the visual encoder in the preprocessing stage, and this image feature vector is consistent with the image feature vector required by the zero-shot classification screening in the feature space. Therefore, this image feature vector can be directly reused without repeated extraction.

[0088] After obtaining the text feature vector and the image feature vector, the feature similarity between the candidate target image and the classification corpus is calculated. The feature similarity can be obtained by calculating the cosine similarity between the image feature vector and the text feature vector, or it can be calculated by Euclidean distance, dot product, etc. This application does not make a specific limitation in this regard.

[0089] Furthermore, when the classification corpus includes at least one positive classification corpus, the feature similarity characterizes the degree of matching between the candidate target image and the preset category. A higher feature similarity indicates a greater likelihood that the target contained in the candidate target image possesses the attribute features described by the positive classification corpus, i.e., the target is more likely to belong to the preset category; conversely, a lower feature similarity indicates a lower likelihood that the target belongs to the preset category.

[0090] By comparing the feature similarity with a preset positive threshold, if the feature similarity is greater than the preset positive threshold, the candidate target image is determined to be an image that may belong to a preset category. At this point, a classification result indicating that the candidate target image belongs to the preset category can be output, or the candidate target image can be input into a subsequent multimodal large language model for verification to further confirm whether it indeed belongs to the preset category. The specific processing method used can be flexibly determined according to the different requirements for classification accuracy and real-time performance in the actual application scenario; this application does not impose specific limitations here.

[0091] When the classification corpus includes at least one negative classification corpus, the feature similarity characterizes the degree of mismatch between the candidate target image and the preset category. A higher feature similarity indicates that the target is less likely to belong to the preset category; conversely, a lower feature similarity indicates that the target is more likely to belong to the preset category.

[0092] By comparing the feature similarity with a preset negative threshold, if the feature similarity is greater than the preset negative threshold, the candidate target image is determined to be an image that may not belong to a preset category. In this case, the classification result that the candidate target image does not belong to the preset category can be directly output without entering the subsequent verification process of the multimodal large language model. If the feature similarity is not greater than the preset negative threshold, the candidate target image is determined to be an image that may belong to the preset category. The classification result that the candidate target image belongs to the preset category can be output here, or it can be input into the subsequent multimodal large language model for verification to further confirm whether it does indeed belong to the preset category.

[0093] In some embodiments, when the preset category corresponds to multiple attribute features, that is, when the preset category is defined by multiple attribute features, the classification corpus includes several classification corpus subsets, wherein each classification corpus subset includes at least one positive classification corpus or at least one negative classification corpus, and each classification corpus subset corresponds to an attribute feature used to describe the semantic content of the attribute feature.

[0094] For example, when the preset category is "meeting alarm conditions", and the alarm conditions are "a person wearing a reflective vest, carrying a walkie-talkie, and wearing a police uniform", the classification corpus may contain four classification corpus subsets: the first classification corpus subset corresponds to the attribute feature "person", and includes the positive classification corpus "person"; the second classification corpus subset corresponds to the attribute feature "wearing a reflective vest", and includes the positive classification corpus "wearing a reflective vest"; the third classification corpus subset corresponds to the attribute feature "carrying a walkie-talkie", and includes the positive classification corpus "carrying a walkie-talkie"; the fourth classification corpus subset corresponds to the attribute feature "wearing a police uniform", and includes the positive classification corpus "wearing a police uniform".

[0095] Additionally, negative classification subsets can be set according to actual needs. For example, a negative classification subset corresponding to the attribute feature "not wearing a reflective vest" can be set, containing negative classification data such as "not wearing a reflective vest" or "not wearing reflective equipment," which is used to exclude candidate target images from the opposite direction. Each classification subset is independently responsible for the discrimination of one attribute feature, and the subsets do not affect each other. Finally, a comprehensive judgment is achieved through the logical combination of the discrimination results of each subset.

[0096] Specifically, for each subset of the classification corpus, the feature similarity between the candidate target image and each category of the classification corpus in the subset is calculated, and aggregation is performed according to the aggregation strategy corresponding to the subset of the classification corpus to obtain the subset similarity between the candidate target image and the subset of the classification corpus.

[0097] The aggregation strategy can be taking the maximum value, taking the average value, or taking a weighted sum, etc., and this application does not specifically limit it. Taking the aggregation strategy of taking the maximum value as an example, the subset similarity corresponding to a subset of a certain category of corpus is the maximum value of the feature similarity of all category corpora in that subset.

[0098] After obtaining the subset similarity corresponding to each subset of the classification corpus, the subset similarity is compared with its corresponding preset threshold to determine whether the candidate target image has the attribute features described by the subset of the classification corpus.

[0099] When the classification corpus subset contains positive classification corpus, the candidate target image is determined to be an image that may belong to the preset category if and only if the candidate target image possesses all the attribute features described by the subset; if the candidate target image does not possess any of the attribute features, the candidate target image is determined to be an image that may not belong to the preset category.

[0100] When the classification corpus subset contains negative classification corpus, the candidate target image is determined to be an image that may belong to the preset category if and only if the candidate target image does not possess all the exclusionary attribute features described by the subset; if the candidate target image possesses any of the exclusionary attribute features, the candidate target image is determined to be an image that may not belong to the preset category.

[0101] In some embodiments, the classification corpus includes at least one positive classification corpus and at least one negative classification corpus; calculating the feature similarity between the candidate target image and the classification corpus based on the text feature vector of the classification corpus and the image feature vector of the candidate target image includes: calculating the positive feature similarity between the candidate target image and the positive classification corpus based on the text feature vector of the positive classification corpus and the image feature vector of the candidate target image; calculating the negative feature similarity between the candidate target image and the negative classification corpus based on the text feature vector of the negative classification corpus and the image feature vector of the candidate target image; performing zero-shot classification screening on the candidate target image based on the feature similarity includes: performing zero-shot classification screening on the candidate target image based on the positive feature similarity and the negative feature similarity.

[0102] In this embodiment, when the classification corpus includes at least one positive classification corpus and at least one negative classification corpus, the positive feature similarity between the candidate target image and each positive classification corpus, and the negative feature similarity between the candidate target image and each negative classification corpus are calculated first.

[0103] The negative classification corpus can be derived from various sources, such as being directly configured according to actual business needs to describe the attribute features that should be excluded when the target does not belong to the preset category; being automatically or semi-automatically generated based on false alarm samples collected during actual deployment; or being directly configured based on interfering targets in actual scenarios that are easily confused with the preset category.

[0104] Specifically, for each positive classification corpus in the classification corpus, the feature similarity between the image feature vector of the candidate target image and the text feature vector of the positive classification corpus is calculated to obtain several positive feature similarities for each positive classification corpus corresponding to the candidate target image; for each negative classification corpus in the classification corpus, the feature similarity between the image feature vector of the candidate target image and the text feature vector of the negative classification corpus is calculated to obtain several negative feature similarities for each negative classification corpus corresponding to the candidate target image.

[0105] After obtaining the positive and negative feature similarities, the positive and negative feature similarities can be aggregated to obtain aggregated positive and negative feature similarities.

[0106] The aggregation process can employ methods such as taking the maximum value, taking the average value, or taking a weighted sum, and this application does not impose specific limitations on these methods. For example, taking the maximum value aggregation as an example, the positive feature similarity after aggregation is the maximum value among the feature similarities of all positively classified corpora corresponding to the candidate target image, and the negative feature similarity after aggregation is the maximum value among the feature similarities of all negatively classified corpora corresponding to the candidate target image.

[0107] After obtaining the aggregated positive feature similarity and the aggregated negative feature similarity, the candidate target image can be subjected to zero-shot classification screening based on both to preliminarily determine whether the candidate target image belongs to the preset category. The classification screening can include the following four methods.

[0108] Method 1 involves comparing the aggregated positive feature similarity with the aggregated negative feature similarity. When the aggregated positive feature similarity is greater than the aggregated negative feature similarity, the candidate target image is determined to likely belong to the preset category; otherwise, the candidate target image is determined to likely not belong to the preset category.

[0109] Method two involves comparing the aggregated positive feature similarity with a preset positive threshold. When the aggregated positive feature similarity is greater than the preset positive threshold, the candidate target image is determined to likely belong to the preset category; otherwise, the candidate target image is determined to likely not belong to the preset category.

[0110] Method three involves comparing the aggregated negative feature similarity with a preset negative threshold. If the aggregated negative feature similarity is not greater than the preset negative threshold, the candidate target image is determined to likely belong to the preset category; otherwise, the candidate target image is determined to likely not belong to the preset category. This method is equivalent to absolute negative threshold filtering. When the similarity between the candidate target image and the negative classification corpus exceeds the preset negative threshold, it indicates that the target possesses exclusionary attribute features. In this case, it is directly determined not to belong to the preset category and will not proceed to the subsequent verification process.

[0111] Method four involves calculating the difference between the aggregated positive feature similarity and the aggregated negative feature similarity, and comparing this difference with a preset difference threshold. If the difference is greater than the preset difference threshold, the candidate target image is determined to likely belong to the preset category; otherwise, the candidate target image is determined to likely not belong to the preset category. This method introduces a relative margin threshold between positive and negative corpora to ensure that the similarity between the target image and the positive corpus is significantly higher than its similarity with the negative corpus, thereby improving the reliability of the determination.

[0112] After obtaining the screening and determination results of whether the candidate target image may belong to the preset category or not, when it is determined that it may belong to the preset category, the candidate target image can be retained, and it can be further determined according to the subsequent step S14 whether it meets the preset triggering conditions to decide whether to enter the multimodal large language model for deep verification; when it is determined that it may not belong to the preset category, the candidate target image is directly removed and will not enter the subsequent verification process.

[0113] By comprehensively calculating, aggregating, and comparing the similarity of the positive and negative features, a rapid initial screening of candidate target images can be achieved with low computational overhead. This jointly defines the semantic boundaries of the preset category from both positive and negative directions, effectively reducing the computational burden of subsequent verification stages, improving overall processing efficiency, and simultaneously reducing false positives and false negatives. After obtaining the judgment result of the zero-sample classification screening, step S14 can be taken to determine whether the candidate target image meets the preset triggering conditions.

[0114] Step S14: When the candidate target image meets the preset triggering conditions, the candidate target image is input into the multimodal large language model for verification to obtain the verification confidence level.

[0115] In this embodiment, the preset trigger condition is used to determine whether the candidate target image needs to be entered into a multimodal large language model for deep verification. By setting the trigger condition, the computationally expensive multimodal large language model can be avoided for all candidate target images, thus ensuring both classification accuracy and computational efficiency.

[0116] In some embodiments, the preset triggering condition includes at least one of the following: the positive feature similarity is greater than a first threshold, the difference between the positive feature similarity and the negative feature similarity is greater than a second threshold, and the negative feature similarity is not greater than a third threshold.

[0117] In this embodiment, when the positive feature similarity is greater than a first threshold, it indicates that the candidate target image has a high degree of matching with the positive attribute features corresponding to the preset category. However, since the pre-trained visual language model may have insufficient ability to distinguish fine-grained semantics in zero-shot scenarios, a high similarity does not necessarily mean that the target actually belongs to the preset category. Therefore, it is necessary to perform deep verification through a multimodal large language model to confirm whether it actually meets all alarm conditions.

[0118] When the difference between the positive feature similarity and the negative feature similarity is greater than a second threshold, it indicates that the candidate target image matches the positive corpus significantly better than it matches the negative corpus, meaning that the target is semantically more likely to belong to the preset category. However, in real-world scenarios, when a target possesses both some positive and some negative attributes, this difference may be uncertain, requiring inference of complex semantic relationships using a multimodal large language model to make a more accurate judgment.

[0119] When the negative feature similarity is not greater than the third threshold, it indicates that the candidate target image has a low degree of matching with the negative classification corpus, meaning that the target does not possess obvious exclusionary attribute features. However, a low negative feature similarity does not necessarily mean that the target belongs to the preset category. It is still necessary to further confirm whether the target meets all the attribute conditions of the preset category through a multimodal large language model to avoid misjudgment due to low negative feature similarity.

[0120] In this embodiment, the above three triggering conditions can be used individually or in combination according to the needs of the actual application scenario. This application does not impose any specific limitations on this.

[0121] By setting the aforementioned triggering conditions, the multimodal large language model performs deep verification only on candidate target images that meet specific conditions. Specifically, it only performs deep verification on candidate target images that show a high matching tendency or semantic ambiguity in zero-shot classification screening, while obviously mismatched candidate target images are directly rejected and not included in the verification process. This mechanism effectively controls the calling frequency of the multimodal large language model while ensuring classification accuracy, reducing overall computational overhead and making it suitable for high-frequency video streaming applications with high real-time requirements.

[0122] When the candidate target image meets at least one of the above triggering conditions, the candidate target image is input into a multimodal large language model for verification.

[0123] In some embodiments, the zero-shot video classification method further includes: generating classification screening verification text based on the positive classification corpus; the step of inputting the candidate target image into a multimodal large language model for verification to obtain verification confidence includes: inputting the classification screening verification text and the candidate target image into the multimodal large language model for verification to obtain a first predicted probability that the candidate target image matches the classification screening verification text and a second predicted probability that the candidate target image does not match the classification screening verification text; determining the verification confidence of the candidate target image matching the classification screening verification text based on the ratio between the first predicted probability and the sum of the predicted probabilities, wherein the sum of the predicted probabilities represents the sum of the first predicted probability and the second predicted probability.

[0124] In this embodiment, the classification and verification text is a text prompt generated based on the positive classification corpus and used for verification by inputting into a multimodal large language model. The classification and verification text can be the positive classification corpus used directly as the verification text, or it can be a prompt text in the form of a question or instruction generated based on the positive classification corpus.

[0125] For example, if the positive classification corpus includes four attribute features: "wearing a reflective vest", "carrying a walkie-talkie", "wearing a police uniform", and "person", then the classification screening verification text can be "Please determine whether there is a person wearing a reflective vest, carrying a walkie-talkie, and wearing a police uniform in the image, and only answer 'yes' or 'no'", to ensure that the classification screening verification text retains the attribute features described by the positive classification corpus.

[0126] After the classification and screening verification text and the candidate target image are input together into the multimodal large language model, the multimodal large language model outputs a first prediction probability that the candidate target image matches the classification and screening verification text, and a second prediction probability that the candidate target image does not match the classification and screening verification text.

[0127] Wherein, both the first prediction probability and the second prediction probability are unnormalized log probabilities.

[0128] After obtaining the first predicted probability and the second predicted probability, the verification confidence level of the candidate target image matching the classification screening verification text is determined based on the ratio of the first predicted probability to the sum of the first predicted probability and the second predicted probability.

[0129] The higher the verification confidence level, the higher the probability that the candidate target image matches the classification screening verification text, that is, the more likely the target is to belong to the preset category; conversely, the lower the verification confidence level, the lower the probability of matching, that is, the less likely the target is to belong to the preset category.

[0130] The above method transforms the unnormalized log probability output by the multimodal large language model into a standardized verification confidence score. This verification confidence score integrates the multimodal large language model's understanding and reasoning of image content and verification text semantics, exhibiting higher discrimination accuracy compared to the initial screening results based on feature similarity in the zero-shot classification stage. It is particularly suitable for complex scenarios requiring fine-grained semantic discrimination.

[0131] In some embodiments, the classification and screening verification text includes several different attribute features; the step of inputting the candidate target image into a multimodal large language model for verification to obtain verification confidence includes: splitting the classification and screening verification text into several verification sub-texts, wherein each verification sub-text corresponds to an attribute feature; inputting the verification sub-texts and the candidate target image into the multimodal large language model for verification to obtain a third predicted probability that the candidate target image matches the verification sub-text and a fourth predicted probability that the candidate target image does not match the verification sub-text; determining the verification confidence of the candidate target image matching the verification sub-text based on the ratio between the third predicted probability and the sum of the predicted probabilities, wherein the sum of the predicted probabilities represents the sum of the third predicted probability and the fourth predicted probability; and determining the verification confidence of the candidate target image matching the classification and screening verification text based on the verification confidence of the candidate target image matching each verification sub-text.

[0132] In this embodiment, the classification and screening verification text contains several different attribute features, that is, the classification and screening verification text describes multiple attribute conditions that need to be met simultaneously. To reduce the reasoning complexity of a single verification and improve the accuracy of multi-attribute comprehensive discrimination, this embodiment adopts a verification text decomposition strategy based on a single attribute feature, decomposing the complex classification and screening verification text containing multiple attribute features into several independent verification sub-texts, wherein each verification sub-text corresponds to only one attribute feature, used to determine whether the candidate target image possesses that single attribute feature.

[0133] For example, if the classification and screening verification text is "Determine whether there is a person wearing a reflective vest, carrying a walkie-talkie, and wearing a police uniform in the image", this verification text corresponds to four discrimination conditions: "The target is a person", "The target is wearing a reflective vest", "The target is carrying a walkie-talkie", and "The target is wearing a police uniform". Among them, "The target is a person" is a prerequisite for subsequent attribute discrimination. It can be decomposed into three verification sub-texts: "Determine whether the person in the image is wearing a reflective vest", "Determine whether the person in the image is carrying a walkie-talkie", and "Determine whether the person in the image is wearing a police uniform".

[0134] Each verification subtext is judged based on only one attribute feature. The judgment logic is clear, which reduces the complexity of a single reasoning and allows the multimodal large language model to focus more on the judgment of a single attribute, avoiding reasoning confusion caused by the coupling of multiple attributes.

[0135] Each verification subtext and the candidate target image are input into a multimodal large language model for verification, to obtain a third prediction probability that the candidate target image matches each verification subtext and a fourth prediction probability that the candidate target image does not match each verification subtext.

[0136] The third prediction probability and the fourth prediction probability are both unnormalized log probabilities, corresponding to the unnormalized log probabilities of the multimodal large language model outputting "yes" and "no", respectively.

[0137] For each verification subtext, the subconfidence of the candidate target image matching the verification subtext is determined based on the ratio of the third predicted probability to the sum of the third predicted probability and the fourth predicted probability.

[0138] The higher the sub-confidence, the greater the likelihood that the candidate target image possesses the attribute features corresponding to the verification sub-text; conversely, the lower the confidence level, the less likely it is to possess the attribute features.

[0139] Therefore, after obtaining the sub-confidence score corresponding to each verification sub-text, each sub-confidence score is compared with a preset sub-confidence score threshold. When the sub-confidence score corresponding to a certain verification sub-text is greater than or equal to the preset sub-confidence score threshold, the candidate target image is determined to possess the attribute feature corresponding to that verification sub-text; otherwise, it is determined not to possess that attribute feature.

[0140] If the candidate target image is determined to possess the attribute features described by each verification sub-text in the classification and screening verification text, then the candidate target image is determined to match the classification and screening verification text, indicating that the candidate target image belongs to the preset category; if the candidate target image is determined not to possess the attribute features described by any verification sub-text in the classification and screening verification text, then the candidate target image is determined not to match the classification and screening verification text, indicating that the candidate target image does not belong to the preset category.

[0141] Therefore, when the classification and screening verification text contains several different attribute features, a verification confidence logical expression can be constructed to comprehensively determine the verification confidence of the candidate target image matching the classification and screening verification text based on the comparison results of the sub-confidence of each verification sub-text with the preset sub-confidence threshold.

[0142] Specifically, for each verification subtext, its corresponding sub-confidence is compared with a preset sub-confidence threshold. When the sub-confidence of a verification subtext is greater than or equal to the preset sub-confidence threshold, the verification subtext is determined to be true, indicating that the candidate target image possesses the attribute feature corresponding to the verification subtext; otherwise, it is false, indicating that the candidate target image does not possess the attribute feature.

[0143] Then, the judgment results of each verification sub-text are comprehensively calculated based on the verification confidence logical expression. The verification confidence logical expression uses a logical AND operation, that is, when the judgment results of all verification sub-texts are true, a first preset value is output, for example, a value of 1, as the verification confidence, indicating that the candidate target image completely matches the classification screening verification text and belongs to the preset category; when the judgment result of any verification sub-text is false, a second preset value is output, for example, a value of 0, as the verification confidence, indicating that the candidate target image does not match the classification screening verification text and does not belong to the preset category, wherein the first preset value is greater than the second preset value.

[0144] In addition, the sub-confidence scores corresponding to each verification sub-text can be fused, for example, by taking the average, minimum or weighted sum of each sub-confidence score, and the fusion result can be used as the verification confidence score of the candidate target image matching the classification screening verification text. This application does not make specific limitations in this regard.

[0145] Taking the minimum value as an example, the verification confidence is high only when all sub-confidences are high, and the verification confidence is low when any sub-confidence is low. This is consistent with the logical requirement that "all attribute features must be satisfied", which can reduce the possibility of misjudgment due to the failure of a single attribute feature to a certain extent.

[0146] By employing the aforementioned single-attribute feature-based verification text decomposition strategy, the complex multi-attribute verification task can be broken down into multiple independent single-attribute verification subtasks. Each subtask only needs to determine whether a single attribute feature is present, reducing the complexity of a single inference iteration. This also allows the multimodal large language model to focus more on the discrimination of a single attribute, avoiding the attentional distractions and semantic confusion that can occur when processing multiple attribute features simultaneously in a single inference iteration, thereby improving the accuracy of the discrimination. Furthermore, when business requirements change, only the corresponding verification subtext needs to be added, deleted, or modified; there is no need to retrain the model, demonstrating good scalability and ease of deployment.

[0147] Step S15: Perform fusion processing based on the results of the zero-sample classification screening, the verification confidence level, and the pre-configured logical expression to output the binary classification result of the video stream.

[0148] In this embodiment of the application, the result of the zero-shot classification screening includes the feature similarity between the candidate target image and the classification corpus, such as the positive feature similarity and / or the negative feature similarity, and a first determination result obtained based on the feature similarity.

[0149] When the candidate target image is determined to possibly belong to the preset category in the zero-shot classification screening, the first determination result is yes; otherwise, it is no.

[0150] The verification confidence score is the confidence score obtained after performing deep verification on the candidate target image using a multimodal large language model in step S14, or it is the second judgment result obtained based on the comprehensive judgment of the sub-confidence scores of each verification sub-text.

[0151] When the candidate target image is determined to match the classification screening verification text in the multimodal large language model verification, the second determination result is yes; otherwise, it is no.

[0152] Similarly, other functional modules, such as a counting module, can be configured, and the output of each module can also be used as input for fusion processing.

[0153] The pre-configured logical expression is used to logically combine the various judgment results to generate the final category judgment result. The pre-configured logical expression includes at least one of the following: logical AND, logical OR, logical NOT, and counting operations.

[0154] The logical AND operation is used to represent a logical relationship that all conditions must be met. For example, when the zero-sample classification screening result is yes and the verification confidence result is yes, the candidate target image is finally determined to belong to the preset category.

[0155] The logical OR operation is used to represent a logical relationship in which any condition is met. For example, when the zero-sample classification screening result is yes or the verification confidence result is yes, the candidate target image is finally determined to belong to the preset category.

[0156] The logical NOT operation is used to represent the logical relationship of conditional negation. For example, when a negative classification corpus is used to perform zero-sample classification screening on candidate target images, if it is determined that the candidate target image has the exclusionary attribute features described by the negative classification corpus, the determination result is negated, which can be converted into a logical signal that "the candidate target image does not belong to the preset category".

[0157] The counting operation is used to represent the logical relationship that needs to meet a quantity threshold. For example, when the number of targets in an image region that are determined to have a certain attribute feature is greater than a preset quantity threshold, the counting condition is met. Specifically, the attribute discrimination judgment results of each target in a certain region can be obtained first. If the judgment result of a certain target is "yes", it means that the target has the attribute feature. Then, the number of targets in the region with the judgment result of "yes" is counted. When the count result is greater than the preset quantity threshold, the counting condition is determined to be met; otherwise, it is determined to be unmet.

[0158] The pre-configured logical expressions can be flexibly defined and adjusted by the user during the scheme orchestration phase. Taking a security monitoring scenario as an example, if the desired judgment logic is: when a target is detected, attribute discrimination passes, counting conditions are met, and the multimodal large language model verification passes, the candidate target image is ultimately determined to belong to the preset category, then the logical expression can be configured as a logical AND combination, meaning that all the above conditions must be met simultaneously to determine if it belongs to the preset category. If the desired judgment logic is: when attribute discrimination passes or the multimodal large language model verification passes, it can be determined if it belongs to the preset category, then the logical expression can be configured as a logical OR combination, meaning that meeting one of the above conditions is sufficient to determine if it belongs to the preset category.

[0159] Furthermore, the pre-configured logical expression can include combinations of multiple logical operators to address more complex business requirements. For example, the logical expression can be configured such that the final judgment result equals the combination of attribute discrimination passing and counting condition being satisfied, or equals direct verification passing by the multimodal large language model. That is, when both attribute discrimination and counting conditions are satisfied simultaneously, or when direct verification by the multimodal large language model is passed, the candidate target image is ultimately determined to belong to the preset category. This approach allows for flexible adjustment of logical combinations according to actual business needs, without modifying the model or algorithm; it can adapt to the judgment strategy requirements of different scenarios simply through configuration.

[0160] After obtaining the final fusion result, the binary classification result is used to indicate whether the target in the video stream belongs to the preset category. The binary classification result can be used to trigger subsequent business operations, such as triggering early warnings, alarms, recording, or statistics in security monitoring scenarios; triggering product sorting, defect marking, or quality statistics in industrial quality inspection scenarios; and triggering violation recording, vehicle interception, or traffic statistics in traffic management scenarios. This application does not limit the specific application of the binary classification result.

[0161] Through the above fusion process, the judgment results of each step can be combined flexibly according to the pre-configured logical expression, taking into account classification accuracy, recall rate and computational efficiency, to achieve accurate and efficient binary classification of video stream targets, while meeting the diverse judgment strategy requirements of different business scenarios.

[0162] Please continue reading. Figure 2 , Figure 2 This is a flowchart illustrating another embodiment of the zero-sample video classification method provided in this application.

[0163] To facilitate understanding of the zero-shot video classification method of this application, a security monitoring scenario will be used as an application scenario to further introduce the specific implementation of the zero-shot video classification method of this application.

[0164] In security monitoring scenarios, it is necessary to analyze and judge video streams in real time to determine whether the video stream triggers an alert, that is, to determine whether the video stream belongs to a preset category, which can be understood as "triggering an alert".

[0165] Depending on the specific monitoring service, corresponding attribute features can be set for the preset category. For example, in the monitoring service of a construction site, when five workers gather at a construction site and none of them are wearing safety helmets, an alarm is triggered. At this time, the attribute features corresponding to the preset category include "construction site", "workers" and "safety helmet".

[0166] This embodiment also uses this assumption as an example to further illustrate how to perform binary classification of video streams based on preset categories and their corresponding attribute features.

[0167] like Figure 2 As shown, the specific steps are as follows: Step S201: Obtain the video stream and the classification corpus.

[0168] In this step, the video stream can be acquired in real time through surveillance cameras deployed at the construction site. The classification corpus is a set of attribute description texts pre-constructed based on the attribute features included in the preset categories.

[0169] The preset category is "triggered warning". Since a warning will be triggered when five workers gather at a construction site and none of them are wearing safety helmets, the attribute characteristics corresponding to the preset category include "construction site", "workers" and "not wearing safety helmets".

[0170] The classification corpus constructed based on the above attribute features can contain only positive classification corpus, only negative classification corpus, or both positive and negative classification corpus.

[0171] The positive classification corpus should include semantic text describing the attributes that the target should possess, such as "construction site", "construction site", "work site", "worker", "construction personnel", "not wearing a safety helmet", and "not wearing a safety helmet". The negative classification corpus should include semantic text describing the attributes that the target should exclude, such as "basketball court", "road", "wearing a safety helmet", and "wearing a safety helmet".

[0172] It should be noted that the specific text content of the above-mentioned categorized corpus is only an example for illustration, and can be flexibly configured and adjusted according to specific business scenarios in actual applications.

[0173] Step S202: Preprocess the targets in the video stream based on a preset general detection model, and / or a preset special detection model, and / or a preset zero-sample detection model.

[0174] In this step, the preprocessing is used to extract image regions containing the target from the video frames of the video stream, and to use the image regions as candidate target images as input for subsequent zero-shot classification screening.

[0175] Based on the attribute features listed in step S201, "person," "person at the construction site," "person not wearing a safety helmet," "construction site," and "safety helmet" can be selected as targets requiring preprocessing. The selection of targets for preprocessing can be flexibly determined based on the complexity of the attribute features included in the preset categories, existing technical solutions, and actual business needs. Specifically, a preset general detection model can be used to detect "person," a preset dedicated detection model can be used to detect "person not wearing a safety helmet," or a preset zero-sample detection model can be used to detect "person at the construction site." This step can flexibly select one or more combinations of the above methods for preprocessing according to the actual application scenario.

[0176] In this embodiment, for ease of explanation, "a person not wearing a helmet" is used as the target for detection, and a preset dedicated detection model is used to obtain several candidate target images containing "a person not wearing a helmet". The specific implementation method for detecting targets in the video stream based on the preset dedicated detection model can be found in step S12, and will not be repeated here.

[0177] Step S203: Obtain candidate target images.

[0178] In this step, the candidate target image obtained in step S202 by detecting "people not wearing helmets" based on a preset dedicated detection model is used as input for subsequent zero-shot classification screening. That is, the candidate target image obtained in step S203 is the image region containing "people not wearing helmets" that was detected in step S202.

[0179] Step S204: Perform zero-shot classification screening of candidate target images based on attribute discrimination model or false alarm filtering model.

[0180] In this step, both the attribute discrimination model and the false positive filtering model are implemented based on a pre-trained visual language model, which includes a visual encoder and a text encoder. The visual encoder is used to extract image feature vectors of candidate target images, and the text encoder is used to extract text feature vectors of the classification corpus.

[0181] The attribute discrimination model is used to discriminate the attribute features of the candidate target image based on the positive classification corpus in the classification corpus, and the false alarm filtering model is used to exclude false alarm targets from the candidate target image based on the positive and negative classification corpus in the classification corpus.

[0182] In this embodiment, the attribute discrimination model and the false alarm filtering model can run independently or in sequence, and this application does not make specific limitations on this.

[0183] In this embodiment, since the preset category corresponds to multiple attribute features, the classification corpus is divided into three positive classification corpus subsets and three negative classification subsets.

[0184] The positive classification corpus in the first positive classification subset contains semantics such as "construction site", "construction site", and "work site", corresponding to the attribute feature "construction site"; the positive classification corpus in the second positive classification subset contains semantics such as "worker" and "construction personnel", corresponding to the attribute feature "worker"; the positive classification corpus in the third positive classification subset contains semantics such as "not wearing a safety helmet" and "not wearing a safety helmet", corresponding to the attribute feature "not wearing a safety helmet".

[0185] The negative classification corpus in the first negative classification subset contains semantics such as "construction site" and "stopped work area", which are used to exclude images of construction sites under construction; the negative classification corpus in the second negative classification subset contains semantics such as "non-construction workers", "passersby", and "spectators", which are used to exclude images of non-workers; the negative classification corpus in the third negative classification subset contains semantics such as "wearing a safety helmet" and "wearing a safety helmet", which are used to exclude images of people wearing safety helmets.

[0186] Furthermore, since the candidate target image obtained after steps S202 and S203 contains an image of "a person not wearing a safety helmet", this step will further refine the attribute feature discrimination and false alarm elimination of the candidate target image based on the attribute discrimination model and the false alarm filtering model.

[0187] In the attribute discrimination model, for each candidate target image obtained in step S203, its feature similarity with each positive classification corpus subset is calculated and aggregated to obtain the similarity of each positive subset. Specifically, the feature similarity between the candidate target image and the first positive classification corpus subset is calculated to obtain the first positive subset similarity, which represents the probability that the target is at a construction site; the feature similarity between the candidate target image and the second positive classification corpus subset is calculated to obtain the second positive subset similarity, which represents the probability that the target is a worker; the feature similarity between the candidate target image and the third positive classification corpus subset is calculated to obtain the third positive subset similarity, which represents the probability that the target is not wearing a safety helmet.

[0188] After obtaining the similarity of each subset, the similarity of each subset is compared with its corresponding preset threshold, and the final attribute discrimination result is obtained based on the corresponding logical expression.

[0189] In this step, if the first positive subset similarity of a candidate target image is greater than the first preset threshold, the second positive subset similarity is greater than the second preset threshold, and the third positive subset similarity is greater than the third preset threshold, then the candidate target image is determined to have passed the screening of the attribute discrimination model, that is, the target is located at a construction site, is a worker, and is not wearing a safety helmet.

[0190] In the false alarm filtering model, for candidate target images initially identified by the attribute discrimination model, the feature similarity between the image and each negative classification corpus subset is calculated and aggregated to obtain the similarity of each negative subset. Specifically, the feature similarity between the candidate target image and the first negative classification corpus subset is calculated to obtain the first negative subset similarity, which represents the probability that the target is located in a work stoppage or a stopped work area; the feature similarity between the candidate target image and the second negative classification corpus subset is calculated to obtain the second negative subset similarity, which represents the probability that the target is not a construction worker; the feature similarity between the candidate target image and the third negative classification corpus subset is calculated to obtain the third negative subset similarity, which represents the probability that the target is wearing a safety helmet.

[0191] In the false positive filtering model, the feature similarity between each candidate target image and each positive classification corpus subset is also calculated. The calculation method is the same as that of the attribute discrimination model, and will not be repeated here.

[0192] Then, the positive subset similarity is compared with the corresponding negative subset similarity. When the difference between the positive subset similarity and the negative subset similarity is greater than the preset difference threshold, it indicates that the candidate target image matches the positive attribute features significantly better than it matches the negative exclusion features. That is, the target is more likely to belong to the preset category rather than a false positive target.

[0193] Specifically, the differences between the three positive subsets and their corresponding negative subsets are compared. When the difference between the similarity of the first positive subset and the similarity of the first negative subset is greater than a first preset difference threshold, it indicates that the target is significantly more likely to be at a construction site than at a site where construction has stopped. When the difference between the similarity of the second positive subset and the similarity of the second negative subset is greater than a second preset difference threshold, it indicates that the target is significantly more likely to be a worker than a non-construction worker. When the difference between the similarity of the third positive subset and the similarity of the third negative subset is greater than a third preset difference threshold, it indicates that the target is significantly more likely to be not wearing a safety helmet than to be wearing one.

[0194] When all three difference conditions are met, the candidate target image is determined to have passed the false alarm filtering model, meaning the target may belong to the preset category. If any difference condition is not met, i.e., the discriminatory power between the positive subset similarity and the corresponding negative subset similarity of the candidate target image is insufficient, or the negative subset similarity is higher than the positive subset similarity, then the candidate target image may be a false alarm target.

[0195] In this step, the candidate target image is selected to be input into the false alarm filtering model, and the corresponding attribute discrimination result is output to further verify whether the candidate target image truly belongs to the preset category, rather than an interference target that is semantically similar to the preset category but should actually be excluded.

[0196] Step S205: Obtain the attribute discrimination result.

[0197] In this step, the attribute discrimination result output by the false alarm filtering model described in step S204 is used to obtain the attribute discrimination result corresponding to each candidate target image. Based on the attribute discrimination result, the process proceeds to step S206 to determine whether it is necessary to verify the discrimination result based on the multimodal large language model.

[0198] Step S206: Is the preset trigger condition met? In this step, the preset trigger condition is used to determine whether the candidate target image needs to be entered into the multimodal large language model for deep verification. By setting the trigger condition, the computationally expensive multimodal large language model can be avoided for all candidate target images, thus ensuring both classification accuracy and computational efficiency.

[0199] Specifically, when a candidate target image is determined to possess all the attribute features corresponding to the preset category, a deep verification of the attribute discrimination result in step S205 is required to further confirm whether the candidate target image meets all the conditions of the preset category. For example, in step S204, the attribute discrimination model and the false alarm filtering model have preliminarily determined, based on feature similarity, that the candidate target image is located at a construction site, represents a worker, and is not wearing a safety helmet. However, the pre-trained visual language model may have biases in understanding semantic concepts such as "under construction" or "worker" in zero-sample scenarios, or its discrimination accuracy for local details in the image, such as whether a safety helmet is worn, may be limited. In this case, by using a multimodal large language model to perform a deeper semantic understanding and reasoning of the image content, the preliminary judgment result can be reconfirmed to reduce the possibility of misjudgment.

[0200] Therefore, in this step, the preset triggering conditions are that the difference between the similarity of the first positive subset and the similarity of the first negative subset is greater than the first preset difference threshold, the difference between the similarity of the second positive subset and the similarity of the second negative subset is greater than the second preset difference threshold, and the difference between the similarity of the third positive subset and the similarity of the third negative subset is greater than the third preset difference threshold.

[0201] Therefore, when the attribute discrimination result meets the preset triggering conditions, it indicates that the candidate target image shows a relatively significant degree of distinction between positive attribute features and negative exclusion features, that is, the target is more likely to belong to the preset category rather than a false alarm target. However, this judgment is still based on the feature similarity calculation of the visual language model, and there may be insufficient semantic understanding. At this time, it is necessary to proceed to step S207 to perform deep verification through a multimodal large language model to further confirm whether the target does indeed meet all the conditions of the preset category.

[0202] When the attribute discrimination result does not meet the preset triggering condition, it indicates that the candidate target image lacks sufficient discriminative power between positive attribute features and negative exclusion features, meaning that the target may not belong to the preset category, or its confidence in belonging to the preset category is low. In this case, there is no need to perform deep verification using a multimodal large language model; the final discrimination result can be obtained directly based on the pre-configured logical expression. The binary classification result indicating that the target does not belong to the preset category is output, and the candidate target image is removed without further processing. Simultaneously, the process returns to step S201 to continue real-time analysis and discrimination of subsequent video frames, continuously monitoring whether new targets that may belong to the preset category appear in the video stream.

[0203] Step S207: Verify based on a multimodal large language model.

[0204] In this step, when the candidate target image meets the preset triggering condition in step S206, it is input into the multimodal large language model for deep verification.

[0205] First, classification screening verification text is generated based on the positive and negative classification corpora constructed in step S201. In this embodiment, the classification screening verification text can be configured as "Please determine whether the image meets the conditions: it is located at a construction site, whether the person is a worker and whether they are not wearing a safety helmet, answer only 'yes' or 'no'", or the above question can be split into multiple verification sub-texts for separate verification.

[0206] Then, the classified verification text and the candidate target image are input together into a multimodal large language model to obtain the verification confidence score. The specific method for obtaining the verification confidence score can be found in step S14, and will not be repeated here.

[0207] Step S208: Obtain the discrimination result based on the pre-configured logical expression.

[0208] In this step, the attribute discrimination result obtained in step S205, the verification confidence level obtained in step S207, and the pre-configured logical expression are fused together to output the binary classification result of the video stream.

[0209] Specifically, the pre-configured logical expression is used to combine the attribute discrimination result with the verification confidence level to generate the final category determination result.

[0210] Since an alert is triggered when five workers gather at a construction site and none of them are wearing safety helmets, it is also necessary to determine whether the number of people in each candidate target image is greater than or equal to five.

[0211] Therefore, in this step, the logical expression is configured as a logical AND combination. The candidate target image is determined to belong to the preset category only when the attribute discrimination result is passed, the verification confidence is greater than the preset confidence threshold, and the number of target people in each candidate target image is greater than or equal to five; otherwise, it is determined not to belong to the preset category.

[0212] Step S209: Does the video stream belong to a preset category? In this step, based on the fusion processing result of step S208, it is determined whether the video stream belongs to the preset category.

[0213] Specifically, if the candidate target image is determined to belong to the preset category, it indicates that the video stream belongs to the preset category, that is, there is a situation in the construction area where "five people are gathered and none of them are wearing safety helmets", then proceed to step S210 and trigger the warning operation.

[0214] If it is determined that the candidate target image does not belong to the preset category, it means that the video stream does not belong to the preset category, that is, the construction area does not meet the condition that five people are gathered and none of them are wearing safety helmets. Then, return to step S201, continue to preprocess and analyze the subsequent video frames, and continuously monitor whether new targets that may belong to the preset category appear in the video stream.

[0215] Step S210: Issue an early warning.

[0216] In this step, when the video stream is determined to belong to the preset category, a corresponding early warning operation is triggered. The early warning operation may include, but is not limited to: pushing an early warning message to the monitoring center, marking the early warning target on the monitoring screen, issuing audible and visual alarm signals, linking with relevant equipment such as a broadcast system, or recording early warning event logs. This application does not limit the specific implementation method of the early warning operation.

[0217] It is understood that the examples described above in this embodiment are merely for illustrating the specific implementation of the technical solution of this application and should not be construed as limiting the application scenarios of this application in any way. In practical applications, the preset categories and their corresponding attribute features can be flexibly configured according to the specific needs of different business scenarios. For example, in a traffic management scenario, it can be configured as "trucks carrying more than 3 people," and in an industrial quality inspection scenario, it can be configured as "products with scratches on the surface," etc. The core of this application lies in achieving rapid response to various video classification needs through the flexible combination and configuration of attribute features, without the need to retrain the model for each scenario.

[0218] The embodiments described above in this application acquire video streams and classification corpora, preprocess the targets in the video streams to obtain candidate target images, and then perform zero-shot classification screening of the candidate target images based on the classification corpora, thus realizing a fast initial screening mechanism with low computational overhead. On this basis, when the candidate target images meet the preset triggering conditions, deep verification is further performed through a multimodal large language model to obtain verification confidence, effectively utilizing the powerful semantic understanding and reasoning capabilities of the large model. Finally, the zero-shot classification screening results and verification confidence are fused through a pre-configured logical expression to output the binary classification results of the video stream. Through the four-level modular architecture of the target preprocessing module, zero-shot classification screening module, multimodal large language model verification module, and logical expression fusion module, each module can be flexibly enabled, disabled, or replaced according to actual business needs. This significantly reduces the calling frequency of large models and the overall computational overhead while ensuring classification accuracy. It can balance the real-time requirements of high-frequency video streams and fine-grained classification accuracy in complex scenarios. At the same time, through the flexible configuration of the classification corpus, the preset categories and their attribute features can be defined or adjusted simply by adding, deleting, or modifying the corresponding classification corpus, without retraining the model. This enables a rapid response to fragmented and long-tail business needs and has good scalability and ease of deployment.

[0219] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0220] To implement the aforementioned zero-shot video classification method, this application also proposes a zero-shot video classification device, for details please refer to [link / reference needed]. Figure 3 , Figure 3 This is a schematic diagram of an embodiment of the zero-sample video classification device provided in this application.

[0221] The zero-sample video classification device 400 of this embodiment includes a processor 41, a memory 42, an input / output device 43, and a bus 44.

[0222] The processor 41, memory 42, and input / output device 43 are connected to the bus 44. The memory 42 stores program data, and the processor 41 is used to execute the program data to implement the zero-sample video classification method described in the above embodiments.

[0223] In this embodiment, processor 41 can also be referred to as a CPU (Central Processing Unit). Processor 41 may be an integrated circuit chip with signal processing capabilities. Processor 41 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor, or processor 41 can be any conventional processor.

[0224] This application also provides a computer storage medium; please refer to the following: Figure 4 , Figure 4 This is a schematic diagram of a computer storage medium according to an embodiment of the present application. The computer storage medium 600 stores a computer program 61, which, when executed by a processor, is used to implement the zero-sample video classification method of the above embodiment.

[0225] When the embodiments of this application are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0226] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A zero-shot video classification method, characterized in that, The zero-shot video classification method includes: Acquire a video stream and a classification corpus, wherein the classification corpus includes at least one positive classification corpus and / or at least one negative classification corpus; The targets in the video stream are preprocessed to obtain at least one candidate target image; Each candidate target image is subjected to zero-shot classification screening based on the classification corpus; When the candidate target image meets the preset triggering conditions, the candidate target image is input into a multimodal large language model for verification to obtain the verification confidence level. The video stream is fused based on the results of the zero-sample classification screening, the verification confidence level, and the pre-configured logical expression to output the binary classification result.

2. The zero-shot video classification method according to claim 1, characterized in that, The step of preprocessing the target in the video stream to obtain at least one candidate target image includes: detecting the target in the video stream according to a preset general detection model, and / or a preset special detection model, and / or a preset zero-shot detection model, to obtain at least one candidate target image containing the target.

3. The zero-shot video classification method according to claim 2, characterized in that, After obtaining at least one candidate target image, the process further includes: According to a preset target tracking algorithm, at least one target in the candidate target image is tracked in subsequent video frames of the current video frame corresponding to the candidate target image, so as to obtain a set of candidate images of the target in multiple consecutive frames; Candidate images that meet preset screening conditions are selected from the candidate image set as candidate target images.

4. The zero-shot video classification method according to claim 1, characterized in that, The classification corpus includes at least one positive classification corpus or at least one negative classification corpus; The step of performing zero-shot classification screening on each candidate target image based on the classification corpus includes: Based on the text feature vector of the classification corpus and the image feature vector of the candidate target image, the feature similarity between the candidate target image and the classification corpus is calculated. The candidate target images are screened using zero-shot classification based on the feature similarity.

5. The zero-shot video classification method according to claim 1, characterized in that, The classification corpus includes at least one positive classification corpus and at least one negative classification corpus; the step of calculating the feature similarity between the candidate target image and the classification corpus based on the text feature vector of the classification corpus and the image feature vector of the candidate target image includes: Based on the text feature vector of the positive classification corpus and the image feature vector of the candidate target image, calculate the positive feature similarity between the candidate target image and the positive classification corpus set; Based on the text feature vector of the negative classification corpus and the image feature vector of the candidate target image, the negative feature similarity between the candidate target image and the negative classification corpus is calculated. The step of performing zero-shot classification screening of the candidate target images based on the feature similarity includes: The candidate target images are screened using zero-shot classification based on the positive feature similarity and the negative feature similarity.

6. The zero-shot video classification method according to claim 5, characterized in that, The preset triggering conditions include at least one of the following: the positive feature similarity is greater than a first threshold, the difference between the positive feature similarity and the negative feature similarity is greater than a second threshold, and the negative feature similarity is not greater than a third threshold.

7. The zero-shot video classification method according to claim 1, characterized in that, The zero-shot video classification method further includes: generating classification screening verification text based on the positive classification corpus; The step of inputting the candidate target image into a multimodal large language model for verification and obtaining verification confidence includes: The classification screening verification text and the candidate target image are input into a multimodal large language model for verification to obtain a first prediction probability that the candidate target image matches the classification screening verification text and a second prediction probability that the candidate target image does not match the classification screening verification text. The verification confidence level of the candidate target image matching the classification screening verification text is determined based on the ratio between the first predicted probability and the sum of the predicted probabilities, wherein the sum of the predicted probabilities represents the sum of the first predicted probability and the second predicted probability.

8. The zero-shot video classification method according to claim 7, characterized in that, The classification and screening verification text contains several different attribute features; The step of inputting the candidate target image into a multimodal large language model for verification and obtaining verification confidence includes: The classification and screening verification text is split into several verification sub-texts, wherein each verification sub-text corresponds to an attribute feature; The verification subtext and the candidate target image are input into a multimodal large language model for verification to obtain a third prediction probability that the candidate target image matches the verification subtext and a fourth prediction probability that the candidate target image does not match the verification subtext. The verification confidence level of the candidate target image matching the verification subtext is determined based on the ratio between the third predicted probability and the sum of the predicted probabilities, wherein the sum of the predicted probabilities represents the sum of the third predicted probability and the fourth predicted probability; The verification confidence level of the candidate target image matching the verification text is determined based on the verification confidence level of the candidate target image matching each verification subtext.

9. A zero-shot video classification device, characterized in that, The zero-shot video classification device includes a memory and a processor, wherein the memory is coupled to the processor; The memory is used to store program data, and the processor is used to execute the program data to implement the zero-shot video classification method according to any one of claims 1 to 8.

10. A computer storage medium, characterized in that, The computer storage medium stores a computer program, which, when executed by a processor, implements the steps of the zero-shot video classification method as described in any one of claims 1 to 8.