WO2023035896A1 - 视频的识别方法、装置、可读介质和电子设备 - Google Patents

视频的识别方法、装置、可读介质和电子设备 Download PDF

Info

Publication number
WO2023035896A1
WO2023035896A1 PCT/CN2022/113280 CN2022113280W WO2023035896A1 WO 2023035896 A1 WO2023035896 A1 WO 2023035896A1 CN 2022113280 W CN2022113280 W CN 2022113280W WO 2023035896 A1 WO2023035896 A1 WO 2023035896A1
Authority
WO
WIPO (PCT)
Prior art keywords
video
training
encoder
target
recognition model
Prior art date
Application number
PCT/CN2022/113280
Other languages
English (en)
French (fr)
Inventor
佘琪
张�林
王长虎
Original Assignee
北京有竹居网络技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京有竹居网络技术有限公司 filed Critical 北京有竹居网络技术有限公司
Publication of WO2023035896A1 publication Critical patent/WO2023035896A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent

Definitions

  • the present disclosure relates to the technical field of image processing, and in particular, to a video recognition method, device, readable medium and electronic equipment.
  • the present disclosure provides a video recognition method, the method comprising:
  • the recognition result is used to characterize the category of the video to be processed;
  • the recognition model includes an encoder and a projection layer;
  • the encoder is pre-trained according to multiple pre-projection layers and the first number of pre-training videos, each of the pre-projection layers corresponds to a time sequence range, and the pre-projection layer is used to extract the pre-training video The characteristics of the video frame in the corresponding timing range;
  • the projection layer is trained according to the pre-trained encoder and a second number of training videos, the second number is smaller than the first number, and the first sample video does not have an indicator for indicating The category label for the category.
  • the present disclosure provides a video recognition device, the device comprising:
  • the preprocessing module is used to preprocess the acquired video to be processed to obtain the target video
  • a recognition module configured to input the target video into a pre-trained recognition model to obtain a recognition result output by the recognition model, the recognition result being used to characterize the category of the video to be processed;
  • the recognition model includes an encoder and the projection layer;
  • the encoder is pre-trained according to multiple pre-projection layers and the first number of pre-training videos, each of the pre-projection layers corresponds to a time sequence range, and the pre-projection layer is used to extract the pre-training video The characteristics of the video frame in the corresponding timing range;
  • the projection layer is trained according to the pre-trained encoder and a second number of training videos, the second number is smaller than the first number, and the first sample video does not have an indicator for indicating The category label for the category.
  • the present disclosure provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processing device, the steps of the method described in the first aspect of the present disclosure are implemented.
  • an electronic device including:
  • a processing device configured to execute the computer program in the storage device to implement the steps of the method described in the first aspect of the present disclosure.
  • the present disclosure first preprocesses the obtained video to be processed to obtain the target video, and then inputs the target video into the pre-trained recognition model to obtain the output of the recognition model, which is used to represent the category of the video to be processed recognition results.
  • the recognition model includes an encoder and a projection layer, and the encoder obtains pre-training according to multiple pre-projection layers and the first number of pre-training videos without category labels, and each pre-projection layer corresponds to a time sequence range, which is used for Extract the features of the video frames in the corresponding time sequence range in the pre-training video.
  • the recognition model is trained based on the pre-trained encoder and the second number of training videos.
  • the encoder included in the recognition model in this disclosure is pre-trained through a self-supervised method and with the help of a pre-projection layer that can extract features of video frames in multiple time series ranges, so as to improve the representation ability and generalization ability of the encoder, thereby improving recognition The recognition accuracy of the model.
  • Fig. 1 is a flow chart of a video recognition method shown according to an exemplary embodiment
  • Fig. 2 is a flow chart showing another video recognition method according to an exemplary embodiment
  • Fig. 3 is a flow chart showing a pre-training encoder according to an exemplary embodiment
  • Fig. 4 is a structural diagram of an encoder and a pre-projection layer according to an exemplary embodiment
  • Fig. 5 is a flowchart of another pre-training encoder according to an exemplary embodiment
  • Fig. 6 is a flow chart showing a training recognition model according to an exemplary embodiment
  • Fig. 7 is a flow chart showing another training recognition model according to an exemplary embodiment
  • Fig. 8 is a structural diagram of a recognition model according to an exemplary embodiment
  • Fig. 9 is a flow chart showing another training recognition model according to an exemplary embodiment.
  • Fig. 10 is a block diagram of a video recognition device according to an exemplary embodiment
  • Fig. 11 is a block diagram of another video recognition device according to an exemplary embodiment
  • Fig. 12 is a block diagram of an electronic device according to an exemplary embodiment.
  • the term “comprise” and its variations are open-ended, ie “including but not limited to”.
  • the term “based on” is “based at least in part on”.
  • the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one further embodiment”; the term “some embodiments” means “at least some embodiments.” Relevant definitions of other terms will be given in the description below.
  • Fig. 1 is a flow chart of a video recognition method shown according to an exemplary embodiment. As shown in Fig. 1, the method includes the following steps:
  • Step 101 preprocessing the acquired video to be processed to obtain a target video.
  • the video to be processed may be obtained, and the video to be processed may be a video stored locally, or a video obtained from a server through a network.
  • the video to be processed needs to be preprocessed to obtain a preprocessed target video.
  • the preprocessing may include two steps: cleaning and sampling. Cleaning the video to be processed can be understood as performing noise reduction, cropping, etc. on the video to be processed, and can also remove the differences between adjacent video frames in the video to be processed. Large video frames.
  • Sampling the video to be processed one way is to extract multiple video frames from the video to be processed according to the preset time interval to form the target video, and the other way is to extract a specified number of frames from the video to be processed according to the specified number video frames to form the target video.
  • the video to be processed can be cleaned first, and then 16 video frames are extracted from the cleaned video, and the target video is composed according to the timing of each video frame in the video to be processed, that is, the target video includes 16 video frames.
  • Step 102 input the target video into the pre-trained recognition model to obtain the recognition result output by the recognition model, and the recognition result is used to represent the category of the video to be processed.
  • the recognition model consists of encoder and projection layers.
  • the encoder is pre-trained according to multiple pre-projection layers and the first number of pre-training videos, each pre-projection layer corresponds to a timing range, and the pre-projection layer is used to extract the corresponding timing range in the pre-training video Features of the video frames within.
  • the recognition model is obtained according to a pre-trained encoder and a second number of training videos, the second number is smaller than the first number, and the pre-training videos do not have category labels for indicating categories.
  • a recognition model may be pre-trained to recognize video categories, and the categories may be action categories, content categories, weather categories, security categories, etc., which are not specifically limited in the present disclosure.
  • the recognition model includes an encoder and a projection layer.
  • the encoder is used to encode the video
  • the projection layer is used to project the encoding result into a feature vector used to characterize the video.
  • the video is recognized according to the feature vector.
  • the target video can be input into the recognition model, and the output of the recognition model is the recognition result used to characterize the category of the video to be processed.
  • the encoder in the recognition model is pre-trained on multiple pre-projection layers and a first number of pre-trained videos without class labels.
  • the recognition model is trained according to a pre-trained encoder and a second number of training videos, wherein the second number is much smaller than the first number, for example, the second number is 100, and the first number is 5000.
  • a large number of pre-training videos without category labels and multiple pre-projection layers can be used to pre-train the encoder, where each pre-projection layer corresponds to a time sequence range, using
  • the timing range corresponding to each pre-projection layer is different, and the combination of multiple timing ranges corresponding to multiple pre-projection layers is the complete timing range of the pre-training video scope. That is, each pre-projection layer is used to extract features of video frames at different positions in the pre-training video.
  • the pre-training video includes 16 video frames, and there are two pre-projection layers.
  • the timing range corresponding to one pre-projection layer can be from frame 0 to frame 7, and the corresponding extraction is frame 0 to frame 7 in the pre-training video. 7 frame features.
  • the timing range corresponding to the other pre-projection layer can be the 8th frame to the 15th frame, and the features extracted are the 8th frame to the 15th frame in the pre-training video.
  • the pre-training video includes 16 video frames, and there are four pre-projection layers.
  • the timing range corresponding to the first pre-projection layer can be from frame 0 to frame 3, and the corresponding extraction is the 0th frame in the pre-training video. Frame to frame 3 features.
  • the timing range corresponding to the second pre-projection layer can be from the 4th frame to the 7th frame, and the corresponding extracted features are the 4th to 7th frame in the pre-training video.
  • the timing range corresponding to the third pre-projection layer can be from the 8th frame to the 11th frame, and the corresponding extraction is the feature of the 8th frame to the 11th frame in the pre-training video.
  • the timing range corresponding to the fourth pre-projection layer can be the 12th frame to the 15th frame, and the features extracted are the 12th frame to the 15th frame in the pre-training video.
  • any pre-training video can be scrambled in different orders to obtain two scrambled videos, and then the two scrambled videos are input to the encoder respectively, and the encoding
  • the device encodes the two scrambled videos, and then inputs the encoding results into multiple pre-projection layers, and each pre-projection layer extracts the features of the video frames in the corresponding time sequence range.
  • use the self-supervised method English: Self-supervised learning
  • Self-supervised learning to adjust the parameters in the encoder and multiple pre-projection layers by comparing the characteristics of the video frames of the two scrambled videos in various time series ranges, so as to achieve The purpose of pre-training the encoder.
  • the features of the video frames in the temporal range corresponding to multiple pre-projection layers are combined, so that the encoder can learn the representation of the video in the temporal sequence, which can effectively improve the representation ability and generality of the encoder. ability.
  • videos without category labels are easy to obtain, a large number of videos in various fields can be selected as pre-training videos, which further improves the representation ability and generalization ability of the encoder.
  • the recognition model may be trained according to the pre-trained encoder and a second number of training videos, wherein the training videos may be a small number of videos with class labels.
  • any training video can be input into a pre-trained encoder for encoding, and then the encoding result can be input into a projection layer, which can project the encoding result into a feature vector that can represent the training video, and then according to the feature vector
  • the vector predicts the category of the training video, and finally the predicted category of the training video can be compared with the category label of the training video to adjust the projection layer and/or the encoder, so as to achieve the purpose of training the recognition model.
  • the recognition accuracy of the recognition model Due to the high representation ability and generalization ability of the pre-trained encoder, the recognition accuracy of the recognition model has also been improved. Fine-tuning), also improves the efficiency of recognition model training.
  • the present disclosure first preprocesses the acquired video to be processed to obtain the target video, and then inputs the target video into the pre-trained recognition model to obtain the output of the recognition model, which is used to represent the category of the video to be processed recognition results.
  • the recognition model includes an encoder and a projection layer, and the encoder obtains pre-training according to multiple pre-projection layers and the first number of pre-training videos without category labels, and each pre-projection layer corresponds to a time sequence range, which is used for Extract the features of the video frames in the corresponding time sequence range in the pre-training video.
  • the recognition model is trained based on the pre-trained encoder and the second number of training videos.
  • the encoder included in the recognition model in this disclosure is pre-trained through a self-supervised method and with the help of a pre-projection layer capable of extracting features of video frames in multiple time series ranges, so as to improve the representation ability and generalization ability of the encoder, thereby improving recognition The recognition accuracy of the model.
  • Fig. 2 is a flowchart of another video recognition method shown according to an exemplary embodiment. As shown in Fig. 2, the implementation of step 102 may include:
  • Step 1021 Encode the target video through an encoder to obtain an encoding vector corresponding to the target video.
  • Step 1022 Project the coding vector into a video vector through the projection layer, the dimension of the video vector is the same as the number of the categories to be selected, and the category of the video to be processed belongs to the category to be selected.
  • Step 1023 determine the recognition result according to the video vector.
  • the specific process of identifying the target video may first input the target video into an encoder, and the encoder encodes the target video, and the output of the encoder is the encoding vector corresponding to the target video. Afterwards, the encoding vector is input into the projection layer, and the projection layer projects the encoding vector into a video vector representing the target video (that is, the output of the projection layer).
  • the projection layer can be understood as a linear layer or a fully connected layer.
  • the dimension of the video vector (which can also be understood as the output dimension of the projection layer) is the same as the number of categories to be selected, which can be understood as the number of categories that the video to be processed may be identified as, which can be determined according to specific needs .
  • the categories to be selected can be: smooth road conditions, uphill road conditions, and downhill road conditions, a total of 3 types.
  • the categories to be selected can be: safety, third-level danger, second-level danger, and first-level danger, a total of 4 types.
  • the Softmax layer can be used to process the video vector to obtain the matching probabilities of the target video and various candidate categories. Finally, the candidate category with the highest matching probability can be used as the category of the video to be processed, that is, the recognition result.
  • Fig. 3 is a flow chart showing a pre-training encoder according to an exemplary embodiment. As shown in Fig. 3, the encoder is obtained through pre-training in the following manner:
  • Step 201 preprocessing the first number of pre-training videos to obtain a target pre-training video corresponding to each pre-training video.
  • step 202 two adjustment sequences are randomly generated, and for each target pre-training video, the target pre-training video is adjusted according to the two adjustment sequences to obtain a first video and a second video corresponding to the target pre-training video.
  • Step 203 input the first video into the encoder, and input the output of the encoder into a plurality of pre-projection layers, so as to obtain the time sequence range corresponding to the pre-projection layer in the first video extracted by each pre-projection layer Features of a video frame.
  • Step 204 input the second video into the encoder, and input the output of the encoder into a plurality of pre-projection layers, so as to obtain the time sequence range corresponding to the pre-projection layer in the second video extracted by each pre-projection layer Features of a video frame.
  • Step 205 according to the features of the video frames in the multiple timing ranges in the first video and the features of the video frames in the multiple timing ranges in the second video, pre-train the encoder and the multiple pre-projection layers.
  • the first number of pre-training videos without category labels can be pre-collected, and then each pre-training video is pre-processed to obtain the target pre-training video corresponding to each pre-training video.
  • the training video is to obtain the first number of target pre-training videos.
  • the manner of preprocessing the pre-training video may be the same as the manner of preprocessing the video to be processed in step 101, which will not be repeated here.
  • multiple pre-projection layers can be established, and the input end of each pre-projection layer is connected to the output end of the encoder, as shown in FIG. 4 .
  • the pre-projection layer can be understood as a linear layer or a fully connected layer.
  • the input dimension of each pre-projection layer is the output dimension of the encoder, and the output dimensions of each pre-projection layer may be the same or different, which is not specifically limited in the present disclosure.
  • the target pre-training video includes 16 video frames, and there are two pre-projection layers.
  • the timing range corresponding to one pre-projection layer can be frame 0 to frame 7, and the timing range corresponding to the other pre-projection layer can be frame 8. frame to frame 15.
  • One adjustment sequence can be: from frame 0 to frame 15 (that is, the original sequence), another adjustment sequence can be from frame 8 to frame 15, and then from frame 0 to frame 7 (that is, the target preview
  • the second half of the training video is swapped with the first half). Then the first video is from frame 0 to frame 15, the second video is from frame 8 to frame 15, and then from frame 0 to frame 7.
  • the timing range corresponding to the first pre-projection layer can be from frame 0 to frame 3, and the timing range corresponding to the second pre-projection layer can be from frame 4 to frame 7.
  • the timing range corresponding to the third pre-projection layer may be the 8th frame to the 11th frame
  • the timing range corresponding to the fourth pre-projection layer may be the 12th frame to the 15th frame.
  • One adjustment order can be from frame 0 to frame 15 (that is, the original order)
  • another adjustment order can be from frame 4 to frame 7, then from frame 0 to frame 3, and then from frame 12 frame to frame 15, and then from frame 8 to frame 11.
  • the first video is from frame 0 to frame 15
  • the second video is from frame 4 to frame 7, then from frame 0 to frame 3, then from frame 12 to frame 15, and then From frame 8 to frame 11.
  • the first video and the second video can be input into the encoder respectively, and the output of the encoder can be input into multiple pre-projection layers to obtain the timing corresponding to the pre-projection layer extracted by each pre-projection layer in the first video Features of the video frames within the range, and features of the video frames within the time sequence range corresponding to the pre-projection layer in the second video.
  • the encoder and the multiple pre-projection layers are pre-trained according to the features of the video frames in the multiple temporal ranges in the first video and the features of the video frames in the multiple temporal ranges in the second video.
  • a self-supervised method can be used to determine the loss function, and with the goal of reducing the loss function, the backpropagation algorithm can be used to modify the parameters of the encoder and neurons in multiple pre-projection layers.
  • the parameters of the neurons can be, for example, neurons The weight (English: Weight) and bias (English: Bias). Repeat the above steps until the loss function satisfies the preset condition, for example, the loss function is smaller than the preset loss threshold, and the pre-training of the encoder is completed.
  • Fig. 5 is a flow chart of another pre-training encoder shown according to an exemplary embodiment. As shown in Fig. 5, step 205 may be implemented through the following steps:
  • Step 2051 for each time series range, determine the positive similarity and negative similarity of the time series range according to two adjustment orders, the positive similarity is the feature of the video frame in the time series range in the first video, which is different from that in the second video The similarity of features of video frames within the target timing range. In both adjustment sequences, this timing range corresponds to the target timing range.
  • Step 2052 determine the loss corresponding to the time series range; the loss corresponding to the time series range is negatively correlated with the positive similarity of the time series range, and positively correlated with the negative similarity of the time series range relevant.
  • Step 2053 determine the comprehensive loss according to the loss corresponding to each time series range.
  • Step 2054 aiming at reducing the comprehensive loss, pre-training the encoder and multiple pre-projection layers using the backpropagation algorithm.
  • the specific manner of pre-training the encoder and multiple pre-projection layers may first determine the loss corresponding to each timing range, and then determine the comprehensive loss according to the loss corresponding to each timing range. For example, the losses corresponding to each time series range may be averaged, or weighted and summed, as the comprehensive loss. Finally, with the goal of reducing the overall loss, the encoder and multiple pre-projection layers are pre-trained using the back-propagation algorithm. Specifically, the loss corresponding to each time series range can be determined according to the positive similarity and negative similarity of the time series range, the loss corresponding to the time series range is negatively correlated with the positive similarity of the time series range, and negatively related to the negative similarity positively correlated.
  • the positive similarity can be understood as the feature of the video frame in the timing range in the first video
  • the negative similarity includes two types: one is The similarity between the features of the video frames in the timing range in the first video and the features of the video frames in the timing range other than the timing range in the first video, and the other type is in the timing range in the first video
  • the target timing range is a timing range corresponding to the timing range in the two adjustment sequences.
  • the first video is from frame 0 to frame 15
  • the second video is from frame 8 to frame 15, and then from frame 0 to frame 7.
  • frames 0 to 7 in the first video correspond to frames 8 to 15 in the second video (that is, frames 0 to 7 in the target pre-training video)
  • frames 1 to 7 in the first video Frames 8 to 15 correspond to frames 0 to 7 in the second video (that is, frames 8 to 15 in the target pre-training video).
  • the first video is from frame 0 to frame 15
  • the second video is from frame 4 to frame 7, then from frame 0 to frame 3, then from frame 12 to frame 15, and then From frame 8 to frame 11.
  • frames 0 to 3 in the first video correspond to frames 4 to 7 in the second video (that is, frames 0 to 3 in the target pre-training video)
  • frames in the first video The 12th frame to the 15th frame correspond to the 8th frame to the 11th frame in the second video (that is, the 12th frame to the 15th frame in the target pre-training video), and so on.
  • the loss corresponding to the time series range can be determined by Formula 1:
  • L i represents the loss corresponding to the i-th timing range
  • M represents the number of pre-projection layers (that is, the number of timing ranges).
  • p i represents the feature of the video frame in the i-th timing range in the first video
  • q i+ represents the feature of the video frame in the target timing range corresponding to the i-th timing range in the second video
  • p j represents the feature in the first video
  • q k represents the feature of the video frame in the kth timing range in the second video.
  • sim represents the similarity
  • sim(p i ,q i+ ) represents the positive similarity of the i-th time series range
  • sim(p i ,p j ) and sim(p i ,q k ) represent two kinds of Negative similarity, that is, sim(p i , p j ) represents the characteristics of the video frame in the i-th timing range in the first video, and the video frame in the other timing range in the first video except the i-th timing range
  • the similarity of the feature, sim(p i ,q k ) represents the feature of the video frame in the i-th timing range in the first video, and in the second video, except for the target timing range corresponding to the i-th timing range
  • Fig. 6 is a flowchart showing a training recognition model according to an exemplary embodiment. As shown in Fig. 6, the recognition model is obtained by training in the following manner:
  • Step 301 preprocessing the second number of training videos to obtain a target training video corresponding to each training video.
  • Step 302 input each target training video into the recognition model, and train the recognition model according to the output of the recognition model and the category label of the training video corresponding to the target training video.
  • a second number of training videos may be collected in advance, and each training video has a category label. Then preprocessing is performed on each training video to obtain a target training video corresponding to each training video, that is, to obtain a second number of target training videos.
  • the manner of preprocessing the training video may be the same as the manner of preprocessing the video to be processed in step 101, which will not be repeated here.
  • each target training video can be input into the recognition model, and the recognition model can be trained according to the output of the recognition model and the category label of the training video corresponding to the target training video.
  • the loss function can be determined according to the output of the recognition model and the category label of the training video corresponding to the target training video, and with the goal of reducing the loss function, the backpropagation algorithm is used to correct the parameters of the neurons in the recognition model, neurons
  • the parameters of can be, for example, the weights and biases of neurons.
  • Fig. 7 is a flow chart showing another training recognition model according to an exemplary embodiment. As shown in Fig. 7, step 302 may include:
  • Step 3021 input the target training video into the pre-trained encoder, so as to obtain the training encoding vector corresponding to the target training video output by the pre-trained encoder.
  • Step 3022 input the training encoding vector into the projection layer to obtain the training video vector output by the projection layer.
  • Step 3023 input the training video vector into the classification layer of the recognition model to obtain the training recognition result output by the classification layer, and use the training recognition result as the output of the recognition model.
  • Step 3024 Train the projection layer and/or the encoder according to the training recognition result and the category label of the training video corresponding to the target training video.
  • the structure of the recognition model can be shown in FIG. 8 , which includes a pre-trained encoder, a projection layer and a classification layer, wherein the projection layer can be understood as a linear layer or a fully connected layer.
  • the input dimension of the projection layer is the output dimension of the encoder, and the output dimension of the projection layer may be determined according to the number of categories that the video to be processed may be identified as.
  • the classification layer can be understood as a Softmax layer.
  • a specific way of training the recognition model is to first input any target training video into a pre-trained encoder to obtain a training encoding vector corresponding to the target training video output by the pre-trained encoder.
  • the training encoding vector into the projection layer to obtain the training video vector output by the projection layer
  • the training video vector into the classification layer of the recognition model to obtain the training recognition result output by the classification layer, and use the training recognition result as the recognition
  • the output of the model can determine the matching probabilities between the target training video and multiple candidate categories according to the training video vector, and then use the candidate category with the highest matching probability as the recognition result.
  • the projection layer and/or the encoder can be trained according to the training recognition result and the category label of the training video corresponding to the target training video.
  • the matching probabilities of the target training video determined by the classification layer and various candidate categories can be compared with the category labels of the training videos corresponding to the target training video to modify the projection layer and/or the neural network in the encoder.
  • the parameters of the neuron may be, for example, the weight and bias of the neuron. It should be noted that, in one way, when training the recognition model, only the parameters of the neurons in the projection layer can be corrected, so that after a small amount of adjustment (also can be understood as fine-tuning), the well-trained neurons can be quickly obtained. Identify the model. In another implementation manner, when training the recognition model, the parameters of the neurons in the projection layer and the encoder can also be corrected at the same time, which can further improve the recognition accuracy of the recognition model. In yet another implementation, when training the recognition model, only the parameters of the neurons in the encoder can be corrected. The present disclosure does not specifically limit this.
  • Fig. 9 is a flow chart showing another training recognition model according to an exemplary embodiment. As shown in Fig. 9, the recognition model is also obtained through training in the following manner:
  • Step 303 Determine the output dimension of the projection layer according to the number of candidate categories, so that the dimension of the training video vector output by the projection layer is the same as the number of candidate categories.
  • the category of the video to be processed belongs to the category to be selected.
  • the output dimension of the projection layer can be determined according to the number of candidate categories that the video to be processed may be recognized as, so that the dimension of the training video vector output by the projection layer is the same as that of the candidate category same amount. That is to say, the output dimension of the projection layer can be determined according to the specific task that the recognition model needs to complete.
  • the video to be processed is the road condition video collected by the vehicle, which is used to judge the slope of the road.
  • the categories to be selected can be: smooth road conditions, uphill road conditions, and downhill road conditions, a total of 3 types. Then the output dimension of the projection layer can be 3.
  • the video to be processed is the surveillance video collected by the security system, which is used to judge whether there is a dangerous situation.
  • the categories to be selected can be: safety, third-level danger, second-level danger, and first-level danger.
  • the output dimension of the projection layer can be 4. In this way, after pre-training the encoder with a large number of pre-training videos without category labels, when training the recognition model, you can select projection layers with different output dimensions according to specific needs, and use a small number of training videos.
  • a recognition model capable of recognizing multiple categories to be selected is obtained through training.
  • the present disclosure first preprocesses the acquired video to be processed to obtain the target video, and then inputs the target video into the pre-trained recognition model to obtain the output of the recognition model, which is used to represent the category of the video to be processed recognition results.
  • the recognition model includes an encoder and a projection layer, and the encoder obtains pre-training according to multiple pre-projection layers and the first number of pre-training videos without category labels, and each pre-projection layer corresponds to a time sequence range, which is used for Extract the features of the video frames in the corresponding time sequence range in the pre-training video.
  • the recognition model is trained based on the pre-trained encoder and the second number of training videos.
  • the encoder included in the recognition model in this disclosure is pre-trained through a self-supervised method and with the help of a pre-projection layer that can extract features of video frames in multiple time series ranges, so as to improve the representation ability and generalization ability of the encoder, thereby improving recognition The recognition accuracy of the model.
  • Fig. 10 is a block diagram of a video recognition device according to an exemplary embodiment. As shown in Fig. 10, the device 400 includes:
  • the preprocessing module 401 is configured to preprocess the acquired video to be processed to obtain a target video.
  • the recognition module 402 is configured to input the target video into a pre-trained recognition model to obtain a recognition result output by the recognition model, and the recognition result is used to represent the category of the video to be processed.
  • the recognition model consists of encoder and projection layers.
  • the encoder is pre-trained according to multiple pre-projection layers and the first number of pre-training videos, each pre-projection layer corresponds to a timing range, and the pre-projection layer is used to extract the corresponding timing range in the pre-training video Features of the video frames within.
  • the recognition model is obtained according to a pre-trained encoder and a second number of training videos, the second number is smaller than the first number, and the pre-training videos do not have category labels for indicating categories.
  • Fig. 11 is a block diagram of another video recognition device according to an exemplary embodiment.
  • the recognition module 402 may include:
  • the encoding sub-module 4021 is configured to encode the target video through an encoder to obtain an encoding vector corresponding to the target video.
  • the projection sub-module 4022 is configured to project the encoding vector into a video vector through the projection layer, the dimension of the video vector is the same as the number of the categories to be selected, and the category of the video to be processed belongs to the category to be selected.
  • the identification sub-module 4023 is configured to determine the identification result according to the video vector.
  • the encoder can be obtained through pre-training as follows:
  • Step A preprocessing the first number of pre-training videos to obtain a target pre-training video corresponding to each pre-training video.
  • step B two adjustment sequences are randomly generated, and for each target pre-training video, the target pre-training video is adjusted according to the two adjustment sequences to obtain a first video and a second video corresponding to the target pre-training video.
  • Step C input the first video into the encoder, and input the output of the encoder into multiple pre-projection layers, so as to obtain the time sequence range corresponding to the pre-projection layer in the first video extracted by each pre-projection layer Features of a video frame.
  • Step D input the second video into the encoder, and input the output of the encoder into a plurality of pre-projection layers, so as to obtain the time sequence range corresponding to the pre-projection layer in the second video extracted by each pre-projection layer Features of a video frame.
  • Step E pre-training an encoder and multiple pre-projection layers according to the features of the video frames in the multiple timing ranges in the first video and the features of the video frames in the multiple timing ranges in the second video.
  • step E can be implemented through the following steps:
  • Step E1 for each time series range, determine the positive similarity and negative similarity of the time series range according to two adjustment orders, the positive similarity is the feature of the video frame in the time series range in the first video, which is different from that in the second video The similarity of features of video frames within the target timing range. In both adjustment sequences, this timing range corresponds to the target timing range.
  • Step E2 according to the positive similarity and negative similarity of the time series range, determine the loss corresponding to the time series range; the loss corresponding to the time series range is negatively correlated with the positive similarity of the time series range, and positively correlated with the negative similarity of the time series range relevant.
  • Step E3 determining the comprehensive loss according to the loss corresponding to each time series range.
  • Step E4 with the goal of reducing the overall loss, pre-train the encoder and multiple pre-projection layers using the back-propagation algorithm.
  • the recognition model may be obtained through training as follows:
  • Step F preprocessing the second number of training videos to obtain a target training video corresponding to each training video.
  • Step G input each target training video into the recognition model, and train the recognition model according to the output of the recognition model and the category label of the training video corresponding to the target training video.
  • step G may include:
  • Step G1 inputting the target training video into a pre-trained encoder to obtain a training encoding vector corresponding to the target training video output by the pre-trained encoder.
  • Step G2 input the training encoding vector into the projection layer to obtain the training video vector output by the projection layer.
  • Step G3 input the training video vector into the classification layer of the recognition model to obtain the training recognition result output by the classification layer, and use the training recognition result as the output of the recognition model.
  • Step G4 training the projection layer and/or the encoder according to the training recognition result and the category label of the training video corresponding to the target training video.
  • the recognition model is also obtained through training in the following manner:
  • Step H Determine the output dimension of the projection layer according to the number of categories to be selected, so that the dimension of the training video vector output by the projection layer is the same as the number of categories to be selected.
  • the category of the video to be processed belongs to the category to be selected.
  • the present disclosure first preprocesses the acquired video to be processed to obtain the target video, and then inputs the target video into the pre-trained recognition model to obtain the output of the recognition model, which is used to represent the category of the video to be processed recognition results.
  • the recognition model includes an encoder and a projection layer, and the encoder obtains pre-training according to multiple pre-projection layers and the first number of pre-training videos without category labels, and each pre-projection layer corresponds to a time sequence range, which is used for Extract the features of the video frames in the corresponding time sequence range in the pre-training video.
  • the recognition model is trained based on the pre-trained encoder and the second number of training videos.
  • the encoder included in the recognition model in this disclosure is pre-trained through a self-supervised method and with the help of a pre-projection layer that can extract features of video frames in multiple time series ranges, so as to improve the representation ability and generalization ability of the encoder, thereby improving recognition The recognition accuracy of the model.
  • FIG. 12 shows a schematic structural diagram of an electronic device (that is, the execution subject of the above-mentioned video recognition method, which may be a terminal device or a server) 500 suitable for implementing an embodiment of the present disclosure.
  • the terminal equipment in the embodiment of the present disclosure may include but not limited to such as mobile phone, notebook computer, digital broadcast receiver, PDA (personal digital assistant), PAD (tablet computer), PMP (portable multimedia player), vehicle terminal (such as mobile terminals such as car navigation terminals) and fixed terminals such as digital TVs, desktop computers and the like.
  • the electronic device shown in FIG. 12 is only an example, and should not limit the functions and application scope of the embodiments of the present disclosure.
  • an electronic device 500 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 501, which may be randomly accessed according to a program stored in a read-only memory (ROM) 502 or loaded from a storage device 508.
  • a processing device such as a central processing unit, a graphics processing unit, etc.
  • RAM read-only memory
  • various appropriate actions and processes are executed by programs in the memory (RAM) 503 .
  • RAM 503 In the RAM 503, various programs and data necessary for the operation of the electronic device 500 are also stored.
  • the processing device 501, ROM 502, and RAM 503 are connected to each other through a bus 504.
  • An input/output (I/O) interface 505 is also connected to the bus 504 .
  • the following devices can be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speaker, vibration an output device 507 such as a computer; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509.
  • the communication means 509 may allow the electronic device 500 to perform wireless or wired communication with other devices to exchange data. While FIG. 12 shows electronic device 500 having various means, it is to be understood that implementing or having all of the means shown is not a requirement. More or fewer means may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product, which includes a computer program carried on a non-transitory computer readable medium, where the computer program includes program code for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from a network via communication means 509, or from storage means 508, or from ROM 502.
  • the processing device 501 When the computer program is executed by the processing device 501, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
  • the above-mentioned computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two.
  • a computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the above. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted by any appropriate medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
  • the terminal device and the server can communicate with any currently known or future-developed network protocols such as HTTP (HyperText Transfer Protocol, Hypertext Transfer Protocol), and can communicate with digital data in any form or medium
  • HTTP HyperText Transfer Protocol
  • the communication eg, communication network
  • Examples of communication networks include local area networks ("LANs”), wide area networks ("WANs”), internetworks (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network of.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device, or may exist independently without being incorporated into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: pre-processes the acquired video to be processed to obtain the target video;
  • the target video is input into a pre-trained recognition model to obtain the recognition result output by the recognition model, and the recognition result is used to characterize the category of the video to be processed;
  • the recognition model includes an encoder and a projection layer; the encoding
  • the device is obtained by pre-training according to multiple pre-projection layers and the first number of pre-training videos, each of the pre-projection layers corresponds to a timing range, and the pre-projection layer is used to extract the corresponding timing in the pre-training video
  • the projection layer is obtained according to the pre-trained encoder and a second number of training videos, the second number is smaller than the first number, and the first
  • the sample video does not have a category label to indicate a category
  • Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, or combinations thereof, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and Includes conventional procedural programming languages - such as "C" or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
  • the remote computer may be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (for example, using an Internet service provider to connected via the Internet).
  • LAN local area network
  • WAN wide area network
  • Internet service provider for example, using an Internet service provider to connected via the Internet.
  • each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.
  • modules involved in the embodiments described in the present disclosure may be implemented by software or by hardware. Wherein, the name of the module does not constitute a limitation of the module itself under certain circumstances, for example, the preprocessing module may also be described as "a module for preprocessing the video to be processed".
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • ASSPs Application Specific Standard Products
  • SOCs System on Chips
  • CPLD Complex Programmable Logical device
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device.
  • a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • a machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • magnetic storage or any suitable combination of the foregoing.
  • Example 1 provides a video recognition method, including: preprocessing the acquired video to be processed to obtain a target video; inputting the target video into a pre-trained recognition model, to obtain the recognition result output by the recognition model, the recognition result is used to characterize the category of the video to be processed;
  • the recognition model includes an encoder and a projection layer;
  • the encoder is based on a plurality of pre-projection layers And the first number of pre-training videos, obtained by pre-training, each of the pre-projection layers corresponds to a timing range, and the pre-projection layer is used to extract the features of the video frames in the corresponding timing range in the pre-training video;
  • the projection layer is trained according to the pre-trained encoder and a second number of training videos, the second number is smaller than the first number, and the first sample video does not have an indicator for indicating The category label for the category.
  • Example 2 provides the method of Example 1.
  • the inputting the target video into the pre-trained recognition model to obtain the recognition result output by the recognition model includes: through the The encoder encodes the target video to obtain a coding vector corresponding to the target video; projects the coding vector into a video vector through the projection layer, and the dimension of the video vector is the same as the number of categories to be selected , the category of the video to be processed belongs to the category to be selected; and the recognition result is determined according to the video vector.
  • Example 3 provides the method of Example 1, and the encoder is obtained by pre-training in the following manner: preprocessing the first number of pre-training videos to obtain each A target pre-training video corresponding to each of the pre-training videos; randomly generate two adjustment sequences, and for each target pre-training video, adjust the target pre-training video according to the two adjustment sequences to obtain the target pre-training video
  • the first video and the second video corresponding to the training video input the first video into the encoder, and input the output of the encoder into a plurality of the pre-projection layers to obtain each of the pre-projection Layer extraction, in the first video, the feature of the video frame in the timing range corresponding to the pre-projection layer;
  • the second video is input to the encoder, and the output of the encoder is input to multiple
  • the pre-projection layer is to obtain the characteristics of the video frames within the time sequence range corresponding to the pre-projection layer in the second video extracted by each of the pre-projection layers; according to multiple time sequences
  • Example 4 provides the method of Example 3, according to the features of the video frames in the multiple timing ranges in the first video, and the multiple timing ranges in the second video
  • Example 5 provides the method of Example 1, the recognition model is obtained by training in the following manner: preprocessing the second number of training videos to obtain each of the The target training video corresponding to the training video; each of the target training videos is input into the recognition model, and according to the output of the recognition model and the category label of the training video corresponding to the target training video, train the recognition Model.
  • Example 6 provides the method of Example 5, inputting each of the target training videos into the recognition model, and corresponding to the target training video according to the output of the recognition model
  • the category label of the training video, training the recognition model includes: inputting the target training video into the pre-trained encoder, so as to obtain the output of the pre-trained encoder, the target training video corresponds to The training encoding vector; input the training encoding vector into the projection layer to obtain the training video vector output by the projection layer; input the training video vector into the classification layer of the recognition model to obtain the classification layer The output training recognition result, and the training recognition result as the output of the recognition model; according to the training recognition result and the category label of the training video corresponding to the target training video, train the projection layer, and/ or the encoder.
  • Example 7 provides the method of Example 6, and the recognition model is also obtained through training in the following manner: according to the number of categories to be selected, the output dimension of the projection layer is determined, so that The dimension of the training video vector output by the projection layer is the same as the number of the candidate categories; the category of the video to be processed belongs to the candidate categories.
  • Example 8 provides a video recognition device, including: a preprocessing module, configured to preprocess the acquired video to be processed to obtain a target video; a recognition module configured to Inputting the target video into a pre-trained recognition model to obtain a recognition result output by the recognition model, the recognition result is used to characterize the category of the video to be processed;
  • the recognition model includes an encoder and a projection layer;
  • the encoder is pre-trained according to multiple pre-projection layers and the first number of pre-training videos, each of the pre-projection layers corresponds to a time sequence range, and the pre-projection layer is used to extract the pre-training video
  • the characteristics of the video frames in the corresponding timing range; the projection layer is obtained according to the pre-trained encoder and a second number of training videos, and the second number is less than the first number, so
  • the first sample video does not have a category label indicating a category.
  • Example 9 provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processing device, the steps of the methods described in Example 1 to Example 7 are implemented.
  • Example 10 provides an electronic device, including: a storage device, on which a computer program is stored; a processing device, configured to execute the computer program in the storage device, to Implement the steps of the method described in Example 1 to Example 7.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Biophysics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)

Abstract

本公开涉及一种视频的识别方法、装置、可读介质和电子设备,涉及图像处理技术领域,该方法包括:对获取到的待处理视频进行预处理,以得到目标视频,将目标视频输入预先训练的识别模型,以得到识别模型输出的识别结果,识别结果用于表征待处理视频的类别;识别模型包括编码器和投射层,编码器为根据多个预投射层和第一数量个预训练视频,预训练得到的,每个预投射层对应一个时序范围,该预投射层用于提取预训练视频中对应的时序范围内的视频帧的特征,投射层为根据经过预训练的编码器,和第二数量的训练视频训练得到的,第二数量小于第一数量,第一样本视频不具有用于指示类别的类别标签。本公开中能够提高识别模型的识别准确度。

Description

视频的识别方法、装置、可读介质和电子设备
相关申请的交叉引用
本申请基于申请号为202111052167.9、申请日为2021年09月08日,名称为“视频的识别方法、装置、可读介质和电子设备”的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本公开涉及图像处理技术领域,具体地,涉及一种视频的识别方法、装置、可读介质和电子设备。
背景技术
随着图像处理技术的不断发展,越来越多的业务领域开始借助视频识别来完成任务,例如利用视频来识别危险行为、利用视频来识别路况、障碍物等。通常情况下,在进行视频识别之前,需要预先采集海量具有标注的图像,以作为视频识别的参考基准。然而对图像进行标注需要投入大量人力物力,工作繁杂,效率低,难以实现,降低了视频识别的准确度。
发明内容
提供该发明内容部分以便以简要的形式介绍构思,这些构思将在后面的具体实施方式部分被详细描述。该发明内容部分并不旨在标识要求保护的技术方案的关键特征或必要特征,也不旨在用于限制所要求的保护的技术方案的范围。
第一方面,本公开提供一种视频的识别方法,所述方法包括:
对获取到的待处理视频进行预处理,以得到目标视频;
将所述目标视频输入预先训练的识别模型,以得到所述识别模型输出的识别结果,所述识别结果用于表征所述待处理视频的类别;所述识别模型包括编码器和投射层;
所述编码器为根据多个预投射层和第一数量个预训练视频,预训练得到的,每个所述预投射层对应一个时序范围,该预投射层用于提取所述预训练视频中对应的时序范围内的视频帧的特征;
所述投射层为根据经过预训练的所述编码器,和第二数量的训练视频训练得到的,所述第二数量小于所述第一数量,所述第一样本视频不具有用于指示类别的类别标签。
第二方面,本公开提供一种视频的识别装置,所述装置包括:
预处理模块,用于对获取到的待处理视频进行预处理,以得到目标视频;
识别模块,用于将所述目标视频输入预先训练的识别模型,以得到所述识别模型输出的识别结果,所述识别结果用于表征所述待处理视频的类别;所述识别模型包括编码器和投射层;
所述编码器为根据多个预投射层和第一数量个预训练视频,预训练得到的,每个所述预投射层对应一个时序范围,该预投射层用于提取所述预训练视频中对应的时序范围内的视频帧的特征;
所述投射层为根据经过预训练的所述编码器,和第二数量的训练视频训练得到的,所述第二数量小于所述第一数量,所述第一样本视频不具有用于指示类别的类别标签。
第三方面,本公开提供一种计算机可读介质,其上存储有计算机程序,该程序被处理装置执行时实现本公开第一方面所述方法的步骤。
第四方面,本公开提供一种电子设备,包括:
存储装置,其上存储有计算机程序;
处理装置,用于执行所述存储装置中的所述计算机程序,以实现本公开第一方面所述方法的步骤。
通过上述技术方案,本公开首先对获取到的待处理视频进行预处理,以得到目标视频,之后将目标视频输入预先训练的识别模型,以得到识别模型输出的,用于表征待处理视频的类别的识别结果。其中,识别模型包括编码器和投射层,编码器根据多个预投射层和第一数量个、不具有类别标签的预训练视频,预训练得到,每个预投射层对应一个时序范围,用于提取预训练视频中对应的时序范围内的视频帧的特征。识别模型根据经过预训练的编码器,和第二数量的训练视频训练得到。本公开中识别模型包括的编码器通过自监督方法,并借助能够提取多个时序范围内视频帧的特征的预投射层进行 预训练,以提高编码器的表征能力和泛化能力,从而提高识别模型的识别准确度。
本公开的其他特征和优点将在随后的具体实施方式部分予以详细说明。
附图说明
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。在附图中:
图1是根据一示例性实施例示出的一种视频的识别方法的流程图;
图2是根据一示例性实施例示出的另一种视频的识别方法的流程图;
图3是根据一示例性实施例示出的一种预训练编码器的流程图;
图4是根据一示例性实施例示出的编码器与预投射层的结构图;
图5是根据一示例性实施例示出的另一种预训练编码器的流程图;
图6是根据一示例性实施例示出的一种训练识别模型的流程图;
图7是根据一示例性实施例示出的另一种训练识别模型的流程图;
图8是根据一示例性实施例示出的一种识别模型的结构图;
图9是根据一示例性实施例示出的另一种训练识别模型的流程图;
图10是根据一示例性实施例示出的一种视频的识别装置的框图;
图11是根据一示例性实施例示出的另一种视频的识别装置的框图;
图12是根据一示例性实施例示出的一种电子设备的框图。
具体实施方式
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
图1是根据一示例性实施例示出的一种视频的识别方法的流程图,如图1所示,该方法包括以下步骤:
步骤101,对获取到的待处理视频进行预处理,以得到目标视频。
举例来说,首先可以获取待处理视频,待处理视频可以是存储在本地的视频,也可以是通过网络从服务器获取的视频。在对待处理视频进行识别之前,需要对待处理视频进行预处理,以得到预处理后的目标视频。具体的,预处理可以包括:清洗和采样两个步骤,对待处理视频进行清洗,可以理解为对待处理视频进行降噪、裁剪等处理,还可以去除待处理视频中与相邻的视频帧差别较大的视频帧。对待处理视频进行采样,一种方式是按照预设的时间间隔,从待处理视频中抽取多个视频帧,以组成目标视频,另一种方式是按照指定数量,从待处理视频中抽取指定数量的视频帧,以组成目标视频。例如,可以先对待处理视频进行清洗,然后从经过清洗后的视频中抽取16个视频帧,按照每个视频帧在待处理视频中的时序组成目标视频,即目标视频中包括16个视频帧。
步骤102,将目标视频输入预先训练的识别模型,以得到识别模型输出的识别结果,识别结果用于表征待处理视频的类别。识别模型包括编码器和投射层。
其中,编码器为根据多个预投射层和第一数量个预训练视频,预训练得到的,每个预投射层对应一个时序范围,该预投射层用于提取预训练视频中对应的时序范围内的视频帧的特征。
识别模型为根据经过预训练的编码器,和第二数量的训练视频训练得到的,第二数量小于第一数量,预训练视频不具有用于指示类别的类别标签。
示例的,可以预先训练一个识别模型,用于识别视频的类别,类别可以是动作类别、内容类别、天气类别、安全类别等,本公开对此不作具体限定。识别模型包括编码器和投射层,编码器用于对视频进行编码,投射层用于将编码结果投射为用于表征视频的特征向量,最后根据特征向量对视频进行识别。在得到目标视频之后,可以将目标视频输入识别模型,识别模型的输出即为,用于表征待处理视频的类别的识别结果。
识别模型中的编码器,是根据多个预投射层和第一数量个不具有类别标签的预训练视频,预训练得到的。识别模型是根据经过预训练的编码器,和第二数量的训练视频训练得到的,其中,第二数量远小于第一数量,例如,第二数量为100,第一数量为5000。也就是说在对识别模型进行训练之前,可以先利用大量的不具有类别标签的预训练视频,和多个预投射层来预训练编码器,其中,每个预投射层对应一个时序范围,用于提取预训练视频中对应的时序范围内的视频帧的特征,每个预投射层对应的时序范围不同,多个预投射层对应的多个时序范围组合起来,即为预训练视频完整的时序范围。也就是说,每个预投射层,用于提取预训练视频中不同位置的视频帧的特征。例如,预训练视频包括16个视频帧,预投射层有两个,一个预投射层对应的时序范围可以是第0帧到第7帧,对应提取的即为预训练视频中第0帧到第7帧的特征。另一个预投射层对应的时序范围可以是第8帧到第15帧,对应提取的即为预训练视频中第8帧到第15帧的特征。再比如,预训练视频包括16个视频帧,预投射层有四个,第一个预投射层对应的时序范围可以是第0帧到第3帧,对应提取的即为预训练视频中第0帧到第3帧的特征。第二个预投射层对应的时序范围可以是第4帧到第7帧,对应提取的即为预训练视频中第4帧到第7帧的特征。第三个预投射层对应的时序范围可以是第8帧到第11帧,对应提取的即为预训练视频中第8帧到第11帧的特征。第四个 预投射层对应的时序范围可以是第12帧到第15帧,对应提取的即为预训练视频中第12帧到第15帧的特征。
在对编码器进行预训练时,可以将任一个预训练视频按照不同的顺序进行打乱,以得到两个打乱后的视频,之后将两个打乱后的视频分别输入编码器,由编码器对两个打乱后的视频进行编码,然后将编码结果分别输入多个预投射层,每个预投射层提取对应的时序范围内的视频帧的特征。然后利用自监督方法(英文:Self-supervised learning),通过比较两个打乱后的视频在各个时序范围内的视频帧的特征,来调整编码器和多个预投射层中的参数,从而达到对编码器预训练的目的。由于在对编码器进行预训练时,结合了多个预投射层对应的时序范围内的视频帧的特征,使得编码器学习到视频在时序上的表征,能够有效提高编码器的表征能力和泛化能力。同时,由于不具有类别标签的视频很容易获得,可以选取各种领域海量的视频作为预训练视频,进一步提高了编码器的表征能力和泛化能力。
在完成对编码器的预训练之后,可以根据经过预训练的编码器,和第二数量的训练视频训练识别模型,其中,训练视频可以是少量的具有类别标签的视频。例如,可以将任一个训练视频输入经过预训练的编码器进行编码,然后将编码结果输入一个投射层,该投射层能够将编码结果投射为能够表征该训练视频的特征向量,之后再根据该特征向量预测该训练视频的类别,最后可以将预测的该训练视频的类别,与该训练视频的类别标签进行比较,来调整投射层,和/或编码器,从而达到训练识别模型的目的。由于经过预训练的编码器的表征能力和泛化能力高,因此识别模型的识别准确度也得到了提高,同时,通过少量的训练视频就可以快速训练好识别模型(可以理解为对识别模型进行微调),也提高了识别模型训练的效率。
综上所述,本公开首先对获取到的待处理视频进行预处理,以得到目标视频,之后将目标视频输入预先训练的识别模型,以得到识别模型输出的,用于表征待处理视频的类别的识别结果。其中,识别模型包括编码器和投射层,编码器根据多个预投射层和第一数量个、不具有类别标签的预训练视频,预训练得到,每个预投射层对应一个时序范围,用于提取预训练视频中对应的时序范围内的视频帧的特征。识别模型根据经过预训练的编码器,和第二数量的训练视频训练得到。本公开中识别模型包括的编码器通过自监督方法, 并借助能够提取多个时序范围内视频帧的特征的预投射层进行预训练,以提高编码器的表征能力和泛化能力,从而提高识别模型的识别准确度。
图2是根据一示例性实施例示出的另一种视频的识别方法的流程图,如图2所示,步骤102的实现方式可以包括:
步骤1021,通过编码器对目标视频进行编码,以得到目标视频对应的编码向量。
步骤1022,通过投射层将编码向量投射为视频向量,视频向量的维度,与待选类别的数量相同,待处理视频的类别属于待选类别。
步骤1023,根据视频向量确定识别结果。
举例来说,对目标视频进行识别的具体过程,可以先将目标视频输入编码器,由编码器对目标视频进行编码,编码器输出的即为目标视频对应的编码向量。之后,再将编码向量输入投射层,由投射层将编码向量投射为用于表征目标视频的视频向量(即投射层的输出),投射层可以理解为线性层或者全连接层。其中,视频向量的维度(也可以理解为投射层的输出维度),与待选类别的数量相同,待选类别可以理解为待处理视频可能被识别为的类别的数量,可以根据具体需求来确定。例如,待处理视频为车辆采集的路况视频,用于判断道路的坡度,那么待选类别可以为:平稳路况、上坡路况、下坡路况,共3种。再比如,待处理视频为安防系统采集的监控视频,用于判断有无危险情况,那么待选类别可以为:安全、三级危险、二级危险、一级危险,共4种。
在得到投射层输出的视频向量之后,可以利用Softmax层对视频向量进行处理,以得到目标视频与多种待选类别的匹配概率。最后,可以将匹配概率最高的待选类别,作为待处理视频的类别,即识别结果。
图3是根据一示例性实施例示出的一种预训练编码器的流程图,如图3所示,编码器是通过如下方式预训练获得的:
步骤201,对第一数量个预训练视频进行预处理,以得到每个预训练视频对应的目标预训练视频。
步骤202,随机生成两种调整顺序,并针对每个目标预训练视频,按照两种调整顺序调整该目标预训练视频,以得到该目标预训练视频对应的第一视频和第二视频。
步骤203,将第一视频输入编码器,并将编码器的输出,输入多个预投射层,以得到每个预投射层提取的,第一视频中,该预投射层对应的时序范围内的视频帧的特征。
步骤204,将第二视频输入编码器,并将编码器的输出,输入多个预投射层,以得到每个预投射层提取的,第二视频中,该预投射层对应的时序范围内的视频帧的特征。
步骤205,根据第一视频中多个时序范围内的视频帧的特征,和第二视频中多个时序范围内的视频帧的特征,预训练编码器和多个预投射层。
示例的,在对编码器进行预训练时,可以预先采集第一数量个不具有类别标签的预训练视频,然后对每个预训练视频进行预处理,以得到每个预训练视频对应的目标预训练视频,即得到第一数量个目标预训练视频。其中,对预训练视频进行预处理的方式可以和步骤101中对待处理视频进行预处理的方式相同,此处不再赘述。之后,可以建立多个预投射层,并将每个预投射层的输入端,与编码器的输出端连接,如图4所示。可以将预投射层理解为线性层或者全连接层。每个预投射层的输入维度即为编码器的输出维度,每个预投射层的输出维度可以相同,也可以不同,本公开对此不作具体限定。
之后可以随机生成两种不同的调整顺序,并针对任一个目标预训练视频,按照两种调整顺序进行调整,以得到该目标预训练视频对应的第一视频和第二视频。例如,目标预训练视频包括16个视频帧,预投射层有两个,一个预投射层对应的时序范围可以是第0帧到第7帧,另一个预投射层对应的时序范围可以是第8帧到第15帧。一种调整顺序可以是:从第0帧到第15帧(即原始顺序),另一种调整顺序可以是从第8帧到第15帧,再从第0帧到第7帧(即将目标预训练视频的后半部分与前半部分进行了交换)。那么第一视频即为从第0帧到第15帧,第二视频即为从第8帧到第15帧,再从第0帧到第7帧。
再比如,预投射层有四个,第一个预投射层对应的时序范围可以是第0帧到第3帧,第二个预投射层对应的时序范围可以是第4帧到第7帧,第三个预投射层对应的时序范围可以是第8帧到第11帧,第四个预投射层对应的时序范围可以是第12帧到第15帧。一种调整顺序可以是从第0帧到第15帧(即原始顺序),另一种调整顺序可以是从第4帧到第7帧,再从第0帧到第 3帧,再从第12帧到第15帧,再从第8帧到第11帧。那么第一视频即为从第0帧到第15帧,第二视频即为从第4帧到第7帧,再从第0帧到第3帧,再从第12帧到第15帧,再从第8帧到第11帧。
可以分别将第一视频和第二视频输入编码器,并将编码器的输出,输入多个预投射层,以得到每个预投射层提取的,第一视频中,该预投射层对应的时序范围内的视频帧的特征,和第二视频中,该预投射层对应的时序范围内的视频帧的特征。最后,根据第一视频中多个时序范围内的视频帧的特征,和第二视频中多个时序范围内的视频帧的特征,预训练编码器和多个预投射层。例如,可以利用自监督方法确定损失函数,并以降低损失函数为目标,利用反向传播算法来修正编码器和多个预投射层中的神经元的参数,神经元的参数例如可以是神经元的权重(英文:Weight)和偏置量(英文:Bias)。重复上述步骤,直至损失函数满足预设条件,例如损失函数小于预设的损失阈值,已到完成对编码器的预训练。
图5是根据一示例性实施例示出的另一种预训练编码器的流程图,如图5所示,步骤205可以通过以下步骤实现:
步骤2051,针对每个时序范围,根据两种调整顺序确定该时序范围的正相似度和负相似度,正相似度为第一视频中该时序范围内的视频帧的特征,与第二视频中目标时序范围内的视频帧的特征的相似度。在两种调整顺序中,该时序范围与目标时序范围对应。
步骤2052,根据该时序范围的正相似度和负相似度,确定该时序范围对应的损失;该时序范围对应的损失与该时序范围的正相似度负相关,与该时序范围的负相似度正相关。
步骤2053,根据每个时序范围对应的损失确定综合损失。
步骤2054,以降低综合损失为目标,利用反向传播算法预训练编码器和多个预投射层。
示例的,预训练编码器和多个预投射层的具体方式,可以先确定每个时序范围对应的损失,然后根据每个时序范围对应的损失确定综合损失。例如,可以将每个时序范围对应的损失求平均,或者加权求和,以作为综合损失。最后,以降低综合损失为目标,利用反向传播算法预训练编码器和多个预投射层。具体的,每个时序范围对应的损失可以根据该时序范围的正相似度和 负相似度来确定,该时序范围对应的损失与该时序范围的正相似度负相关,与该时序范围的负相似度正相关。
其中,正相似度可以理解为第一视频中该时序范围内的视频帧的特征,与第二视频中目标时序范围内的视频帧的特征的相似度,负相似度包括两类:一类是第一视频中该时序范围内的视频帧的特征,与第一视频中除该时序范围之外其他时序范围内的视频帧的特征的相似度,另一类是第一视频中该时序范围内的视频帧的特征,与第二视频中除目标时序范围之外其他时序范围内的视频帧的特征的相似度。
需要说明的是,目标时序范围,为两种调整顺序中,与该时序范围对应的时序范围。例如,第一视频为从第0帧到第15帧,第二视频为从第8帧到第15帧,再从第0帧到第7帧。那么第一视频中第0帧到第7帧,与第二视频中的第8帧到第15帧(即目标预训练视频中的第0帧到第7帧)对应,第一视频中的第8帧到第15帧,与第二视频中的第0帧到第7帧(即目标预训练视频中的第8帧到第15帧)对应。
再比如,第一视频为从第0帧到第15帧,第二视频为从第4帧到第7帧,再从第0帧到第3帧,再从第12帧到第15帧,再从第8帧到第11帧。那么第一视频中的第0帧到第3帧,与第二视频中的第4帧到第7帧(即目标预训练视频中的第0帧到第3帧)对应,第一视频中的第12帧到第15帧,与第二视频中的第8帧到第11帧(即目标预训练视频中的第12帧到第15帧)对应,以此类推。
在一种实现方式中,可以通过公式一来确定该时序范围对应的损失:
Figure PCTCN2022113280-appb-000001
其中,L i表示第i个时序范围对应的损失,M表示预投射层的数量(即时序范围的数量)。p i表示第一视频中第i个时序范围内的视频帧的特征,q i+表示第二视频中第i个时序范围对应的目标时序范围内的视频帧的特征,p j表示第一视频中第j个时序范围内的视频帧的特征,q k表示第二视频中第k个时序范围内的视频帧的特征。sim表示相似度,sim(p i,q i+)表示第i个时序范围的正相似度,sim(p i,p j)和sim(p i,q k)表示第i个时序范围的两种负相似度,即sim(p i,p j)表示第一视频中第i个时序范围内的视频帧的特征,与第一视频中 除第i个时序范围之外其他时序范围内的视频帧的特征的相似度,sim(p i,q k)表示第一视频中第i个时序范围内的视频帧的特征,与第二视频中,除第i个时序范围对应的目标时序范围之外其他时序范围内的视频帧的特征的相似度。
图6是根据一示例性实施例示出的一种训练识别模型的流程图,如图6所示,识别模型是通过如下方式训练获得的:
步骤301,对第二数量个训练视频进行预处理,以得到每个训练视频对应的目标训练视频。
步骤302,将每个目标训练视频输入识别模型,并根据识别模型的输出与该目标训练视频对应的训练视频的类别标签,训练识别模型。
举例来说,在对识别模型进行训练时,可以预先采集第二数量个训练视频,每个训练视频均具有类别标签。然后对每个训练视频进行预处理,以得到每个训练视频对应的目标训练视频,即得到第二数量个目标训练视频。其中,对训练视频进行预处理的方式可以和步骤101中对待处理视频进行预处理的方式相同,此处不再赘述。之后,可以将每个目标训练视频输入识别模型,并根据识别模型的输出与该目标训练视频对应的训练视频的类别标签,训练识别模型。例如,可以根据识别模型的输出与该目标训练视频对应的训练视频的类别标签确定损失函数,并以降低损失函数为目标,利用反向传播算法来修正识别模型中的神经元的参数,神经元的参数例如可以是神经元的权重和偏置量。重复上述步骤,直至损失函数满足预设条件,例如损失函数小于预设的损失阈值,已到完成对识别模型的训练。
图7是根据一示例性实施例示出的另一种训练识别模型的流程图,如图7所示,步骤302可以包括:
步骤3021,将该目标训练视频输入经过预训练的编码器,以得到经过预训练的编码器输出的,该目标训练视频对应的训练编码向量。
步骤3022,将训练编码向量输入投射层,以得到投射层输出的训练视频向量。
步骤3023,将训练视频向量输入识别模型的分类层,以得到分类层输出的训练识别结果,并将训练识别结果作为识别模型的输出。
步骤3024,根据训练识别结果和该目标训练视频对应的训练视频的类别标签,训练投射层,和/或编码器。
示例的,识别模型的结构可以如图8所示,其中包括经过预训练的编码器、投射层和分类层,其中,投射层可以理解为线性层或者全连接层。投射层的输入维度即为编码器的输出维度,投射层的输出维度可以根据待处理视频可能被识别为的类别的数量来确定。分类层可以理解为Softmax层。训练识别模型的具体方式,首先将任一个目标训练视频输入经过预训练的编码器,以得到经过预训练的编码器输出的,该目标训练视频对应的训练编码向量。之后,将训练编码向量输入投射层,以得到投射层输出的训练视频向量,最后,将训练视频向量输入识别模型的分类层,以得到分类层输出的训练识别结果,并将训练识别结果作为识别模型的输出。具体的,分类层可以根据训练视频向量,确定该目标训练视频与多种待选类别的匹配概率,然后将匹配概率最高的待选类别,作为识别结果。最后,可以根据训练识别结果和该目标训练视频对应的训练视频的类别标签,训练投射层,和/或编码器。例如,可以将分类层确定的该目标训练视频与多种待选类别的匹配概率,与该目标训练视频对应的训练视频的类别标签进行比较,以修正投射层,和/或编码器中的神经元的参数,神经元的参数例如可以是神经元的权重和偏置量。需要说明的是,在一种方式中,对识别模型进行训练时,可以只修正投射层中的神经元的参数,这样经过少量的调整(也可以理解为微调),就能够快速得到训练好的识别模型。在另一种实现方式中,对识别模型进行训练时,也可以同时修正投射层和编码器中的神经元的参数,能够进一步提高识别模型的识别准确度。在又一种实现方式中,对识别模型进行训练时,还可以只修正编码器中的神经元的参数。本公开对此不作具体限定。
图9是根据一示例性实施例示出的另一种训练识别模型的流程图,如图9所示,识别模型还通过如下方式训练获得的:
步骤303,根据待选类别的数量,确定投射层的输出维度,以使投射层输出的训练视频向量的维度与待选类别的数量相同。待处理视频的类别属于待选类别。
示例的,在对识别模型进行训练时,可以根据待处理视频可能被识别为的待选类别的数量,来确定投射层的输出维度,使得投射层输出的训练视频向量的维度与待选类别的数量相同。也就是说,可以根据识别模型具体需要完成的任务来确定投射层的输出维度。例如,待处理视频为车辆采集的路况 视频,用于判断道路的坡度,待选类别可以为:平稳路况、上坡路况、下坡路况,共3种。那么投射层的输出维度可以为3。再比如,待处理视频为安防系统采集的监控视频,用于判断有无危险情况,待选类别可以为:安全、三级危险、二级危险、一级危险,共4种。那么投射层的输出维度可以为4。这样,在利用海量不具有类别标签的预训练视频对编码器进行预训练后,对识别模型进行训练时,可以根据具体的需求,选择不同输出维度的投射层,并利用少量的训练视频即可训练得到能够识别多种待选类别的识别模型。
综上所述,本公开首先对获取到的待处理视频进行预处理,以得到目标视频,之后将目标视频输入预先训练的识别模型,以得到识别模型输出的,用于表征待处理视频的类别的识别结果。其中,识别模型包括编码器和投射层,编码器根据多个预投射层和第一数量个、不具有类别标签的预训练视频,预训练得到,每个预投射层对应一个时序范围,用于提取预训练视频中对应的时序范围内的视频帧的特征。识别模型根据经过预训练的编码器,和第二数量的训练视频训练得到。本公开中识别模型包括的编码器通过自监督方法,并借助能够提取多个时序范围内视频帧的特征的预投射层进行预训练,以提高编码器的表征能力和泛化能力,从而提高识别模型的识别准确度。
图10是根据一示例性实施例示出的一种视频的识别装置的框图,如图10所示,该装置400包括:
预处理模块401,用于对获取到的待处理视频进行预处理,以得到目标视频。
识别模块402,用于将目标视频输入预先训练的识别模型,以得到识别模型输出的识别结果,识别结果用于表征待处理视频的类别。识别模型包括编码器和投射层。
其中,编码器为根据多个预投射层和第一数量个预训练视频,预训练得到的,每个预投射层对应一个时序范围,该预投射层用于提取预训练视频中对应的时序范围内的视频帧的特征。
识别模型为根据经过预训练的编码器,和第二数量的训练视频训练得到的,第二数量小于第一数量,预训练视频不具有用于指示类别的类别标签。
图11是根据一示例性实施例示出的另一种视频的识别装置的框图,如图11所示,识别模块402可以包括:
编码子模块4021,用于通过编码器对目标视频进行编码,以得到目标视频对应的编码向量。
投射子模块4022,用于通过投射层将编码向量投射为视频向量,视频向量的维度,与待选类别的数量相同,待处理视频的类别属于待选类别。
识别子模块4023,用于根据视频向量确定识别结果。
在一种实现方式中,编码器可以是通过如下方式预训练获得的:
步骤A,对第一数量个预训练视频进行预处理,以得到每个预训练视频对应的目标预训练视频。
步骤B,随机生成两种调整顺序,并针对每个目标预训练视频,按照两种调整顺序调整该目标预训练视频,以得到该目标预训练视频对应的第一视频和第二视频。
步骤C,将第一视频输入编码器,并将编码器的输出,输入多个预投射层,以得到每个预投射层提取的,第一视频中,该预投射层对应的时序范围内的视频帧的特征。
步骤D,将第二视频输入编码器,并将编码器的输出,输入多个预投射层,以得到每个预投射层提取的,第二视频中,该预投射层对应的时序范围内的视频帧的特征。
步骤E,根据第一视频中多个时序范围内的视频帧的特征,和第二视频中多个时序范围内的视频帧的特征,预训练编码器和多个预投射层。
在另一种实现方式中,步骤E可以通过以下步骤实现:
步骤E1,针对每个时序范围,根据两种调整顺序确定该时序范围的正相似度和负相似度,正相似度为第一视频中该时序范围内的视频帧的特征,与第二视频中目标时序范围内的视频帧的特征的相似度。在两种调整顺序中,该时序范围与目标时序范围对应。
步骤E2,根据该时序范围的正相似度和负相似度,确定该时序范围对应的损失;该时序范围对应的损失与该时序范围的正相似度负相关,与该时序范围的负相似度正相关。
步骤E3,根据每个时序范围对应的损失确定综合损失。
步骤E4,以降低综合损失为目标,利用反向传播算法预训练编码器和多个预投射层。
在又一种实现方式中,识别模型可以是通过如下方式训练获得的:
步骤F,对第二数量个训练视频进行预处理,以得到每个训练视频对应的目标训练视频。
步骤G,将每个目标训练视频输入识别模型,并根据识别模型的输出与该目标训练视频对应的训练视频的类别标签,训练识别模型。
在又一种实现方式中,步骤G可以包括:
步骤G1,将该目标训练视频输入经过预训练的编码器,以得到经过预训练的编码器输出的,该目标训练视频对应的训练编码向量。
步骤G2,将训练编码向量输入投射层,以得到投射层输出的训练视频向量。
步骤G3,将训练视频向量输入识别模型的分类层,以得到分类层输出的训练识别结果,并将训练识别结果作为识别模型的输出。
步骤G4,根据训练识别结果和该目标训练视频对应的训练视频的类别标签,训练投射层,和/或编码器。
在又一种实现方式中,识别模型还通过如下方式训练获得的:
步骤H,根据待选类别的数量,确定投射层的输出维度,以使投射层输出的训练视频向量的维度与待选类别的数量相同。待处理视频的类别属于待选类别。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
综上所述,本公开首先对获取到的待处理视频进行预处理,以得到目标视频,之后将目标视频输入预先训练的识别模型,以得到识别模型输出的,用于表征待处理视频的类别的识别结果。其中,识别模型包括编码器和投射层,编码器根据多个预投射层和第一数量个、不具有类别标签的预训练视频,预训练得到,每个预投射层对应一个时序范围,用于提取预训练视频中对应的时序范围内的视频帧的特征。识别模型根据经过预训练的编码器,和第二数量的训练视频训练得到。本公开中识别模型包括的编码器通过自监督方法,并借助能够提取多个时序范围内视频帧的特征的预投射层进行预训练,以提高编码器的表征能力和泛化能力,从而提高识别模型的识别准确度。
下面参考图12,其示出了适于用来实现本公开实施例的电子设备(即上述视频的识别方法的执行主体,可以是终端设备,也可以是服务器)500的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图12示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图12所示,电子设备500可以包括处理装置(例如中央处理器、图形处理器等)501,其可以根据存储在只读存储器(ROM)502中的程序或者从存储装置508加载到随机访问存储器(RAM)503中的程序而执行各种适当的动作和处理。在RAM 503中,还存储有电子设备500操作所需的各种程序和数据。处理装置501、ROM 502以及RAM 503通过总线504彼此相连。输入/输出(I/O)接口505也连接至总线504。
通常,以下装置可以连接至I/O接口505:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置506;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置507;包括例如磁带、硬盘等的存储装置508;以及通信装置509。通信装置509可以允许电子设备500与其他设备进行无线或有线通信以交换数据。虽然图12示出了具有各种装置的电子设备500,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置509从网络上被下载和安装,或者从存储装置508被安装,或者从ROM 502被安装。在该计算机程序被处理装置501执行时,执行本公开实施例的方法中限定的上述功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系 统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
在一些实施方式中,终端设备、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:对获取到的待处理视频进行预处理,以得到目标视频;将所述目标视频输入预先训练的识别模型,以得到所述识别模型输出的识别结果,所述识别结果用于表征所述待处理视频的类别;所述识别模型包括编码器和投射层;所述编码器为根据多个预投射层和第一数量个预训练视频,预训练得到的,每个所述预投射层对应一个时序范围,该预投射层用于提取所述预训练视频中对应的时序范围内的视频帧的特征; 所述投射层为根据经过预训练的所述编码器,和第二数量的训练视频训练得到的,所述第二数量小于所述第一数量,所述第一样本视频不具有用于指示类别的类别标签。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言——诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)——连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的模块可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,模块的名称在某种情况下并不构成对该模块本身的限定,例如,预处理模块还可以被描述为“对待处理视频进行预处理的模块”。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
根据本公开的一个或多个实施例,示例1提供了一种视频的识别方法,包括:对获取到的待处理视频进行预处理,以得到目标视频;将所述目标视频输入预先训练的识别模型,以得到所述识别模型输出的识别结果,所述识别结果用于表征所述待处理视频的类别;所述识别模型包括编码器和投射层;所述编码器为根据多个预投射层和第一数量个预训练视频,预训练得到的,每个所述预投射层对应一个时序范围,该预投射层用于提取所述预训练视频中对应的时序范围内的视频帧的特征;所述投射层为根据经过预训练的所述编码器,和第二数量的训练视频训练得到的,所述第二数量小于所述第一数量,所述第一样本视频不具有用于指示类别的类别标签。
根据本公开的一个或多个实施例,示例2提供了示例1的方法,所述将所述目标视频输入预先训练的识别模型,以得到所述识别模型输出的识别结果,包括:通过所述编码器对所述目标视频进行编码,以得到所述目标视频对应的编码向量;通过所述投射层将所述编码向量投射为视频向量,所述视频向量的维度,与待选类别的数量相同,所述待处理视频的类别属于所述待选类别;根据所述视频向量确定所述识别结果。
根据本公开的一个或多个实施例,示例3提供了示例1的方法,所述编码器是通过如下方式预训练获得的:对第一数量个所述预训练视频进行预处理,以得到每个所述预训练视频对应的目标预训练视频;随机生成两种调整顺序,并针对每个所述目标预训练视频,按照两种所述调整顺序调整该目标预训练视频,以得到该目标预训练视频对应的第一视频和第二视频;将所述第一视频输入所述编码器,并将所述编码器的输出,输入多个所述预投射层, 以得到每个所述预投射层提取的,所述第一视频中,该预投射层对应的时序范围内的视频帧的特征;将所述第二视频输入所述编码器,并将所述编码器的输出,输入多个所述预投射层,以得到每个所述预投射层提取的,所述第二视频中,该预投射层对应的时序范围内的视频帧的特征;根据所述第一视频中多个时序范围内的视频帧的特征,和所述第二视频中多个时序范围内的视频帧的特征,预训练所述编码器和多个所述预投射层。
根据本公开的一个或多个实施例,示例4提供了示例3的方法,所述根据所述第一视频中多个时序范围内的视频帧的特征,和所述第二视频中多个时序范围内的视频帧的特征,预训练所述编码器和多个所述预投射层,包括:针对每个时序范围,根据两种所述调整顺序确定该时序范围的正相似度和负相似度,所述正相似度为所述第一视频中该时序范围内的视频帧的特征,与所述第二视频中目标时序范围内的视频帧的特征的相似度;在两种所述调整顺序中,该时序范围与所述目标时序范围对应;根据该时序范围的所述正相似度和所述负相似度,确定该时序范围对应的损失;该时序范围对应的损失与该时序范围的所述正相似度负相关,与该时序范围的所述负相似度正相关;根据每个时序范围对应的损失确定综合损失;以降低所述综合损失为目标,利用反向传播算法预训练所述编码器和多个所述预投射层。
根据本公开的一个或多个实施例,示例5提供了示例1的方法,所述识别模型是通过如下方式训练获得的:对第二数量个所述训练视频进行预处理,以得到每个所述训练视频对应的目标训练视频;将每个所述目标训练视频输入所述识别模型,并根据所述识别模型的输出与该目标训练视频对应的所述训练视频的类别标签,训练所述识别模型。
根据本公开的一个或多个实施例,示例6提供了示例5的方法,所述将每个所述目标训练视频输入所述识别模型,并根据所述识别模型的输出与该目标训练视频对应的所述训练视频的类别标签,训练所述识别模型,包括:将该目标训练视频输入经过预训练的所述编码器,以得到经过预训练的所述编码器输出的,该目标训练视频对应的训练编码向量;将所述训练编码向量输入所述投射层,以得到所述投射层输出的训练视频向量;将所述训练视频向量输入所述识别模型的分类层,以得到所述分类层输出的训练识别结果,并将所述训练识别结果作为所述识别模型的输出;根据所述训练识别结果和 该目标训练视频对应的所述训练视频的类别标签,训练所述投射层,和/或所述编码器。
根据本公开的一个或多个实施例,示例7提供了示例6的方法,所述识别模型还通过如下方式训练获得的:根据待选类别的数量,确定所述投射层的输出维度,以使所述投射层输出的所述训练视频向量的维度与所述待选类别的数量相同;所述待处理视频的类别属于所述待选类别。
根据本公开的一个或多个实施例,示例8提供了一种视频的识别装置,包括:预处理模块,用于对获取到的待处理视频进行预处理,以得到目标视频;识别模块,用于将所述目标视频输入预先训练的识别模型,以得到所述识别模型输出的识别结果,所述识别结果用于表征所述待处理视频的类别;所述识别模型包括编码器和投射层;所述编码器为根据多个预投射层和第一数量个预训练视频,预训练得到的,每个所述预投射层对应一个时序范围,该预投射层用于提取所述预训练视频中对应的时序范围内的视频帧的特征;所述投射层为根据经过预训练的所述编码器,和第二数量的训练视频训练得到的,所述第二数量小于所述第一数量,所述第一样本视频不具有用于指示类别的类别标签。
根据本公开的一个或多个实施例,示例9提供了一种计算机可读介质,其上存储有计算机程序,该程序被处理装置执行时实现示例1至示例7中所述方法的步骤。
根据本公开的一个或多个实施例,示例10提供了一种电子设备,包括:存储装置,其上存储有计算机程序;处理装置,用于执行所述存储装置中的所述计算机程序,以实现示例1至示例7中所述方法的步骤。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务 和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。

Claims (10)

  1. 一种视频的识别方法,其特征在于,所述方法包括:
    对获取到的待处理视频进行预处理,以得到目标视频;
    将所述目标视频输入预先训练的识别模型,以得到所述识别模型输出的识别结果,所述识别结果用于表征所述待处理视频的类别;所述识别模型包括编码器和投射层;
    所述编码器为根据多个预投射层和第一数量个预训练视频,预训练得到的,每个所述预投射层对应一个时序范围,该预投射层用于提取所述预训练视频中对应的时序范围内的视频帧的特征;
    所述投射层为根据经过预训练的所述编码器,和第二数量的训练视频训练得到的,所述第二数量小于所述第一数量,所述第一样本视频不具有用于指示类别的类别标签。
  2. 根据权利要求1所述的方法,其特征在于,所述将所述目标视频输入预先训练的识别模型,以得到所述识别模型输出的识别结果,包括:
    通过所述编码器对所述目标视频进行编码,以得到所述目标视频对应的编码向量;
    通过所述投射层将所述编码向量投射为视频向量,所述视频向量的维度,与待选类别的数量相同,所述待处理视频的类别属于所述待选类别;
    根据所述视频向量确定所述识别结果。
  3. 根据权利要求1所述的方法,其特征在于,所述编码器是通过如下方式预训练获得的:
    对第一数量个所述预训练视频进行预处理,以得到每个所述预训练视频对应的目标预训练视频;
    随机生成两种调整顺序,并针对每个所述目标预训练视频,按照两种所述调整顺序调整该目标预训练视频,以得到该目标预训练视频对应的第一视频和第二视频;
    将所述第一视频输入所述编码器,并将所述编码器的输出,输入多个所述预投射层,以得到每个所述预投射层提取的,所述第一视频中,该预投射层对应的时序范围内的视频帧的特征;
    将所述第二视频输入所述编码器,并将所述编码器的输出,输入多个所述预投射层,以得到每个所述预投射层提取的,所述第二视频中,该预投射层对应的时序范围内的视频帧的特征;
    根据所述第一视频中多个时序范围内的视频帧的特征,和所述第二视频中多个时序范围内的视频帧的特征,预训练所述编码器和多个所述预投射层。
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述第一视频中多个时序范围内的视频帧的特征,和所述第二视频中多个时序范围内的视频帧的特征,预训练所述编码器和多个所述预投射层,包括:
    针对每个时序范围,根据两种所述调整顺序确定该时序范围的正相似度和负相似度,所述正相似度为所述第一视频中该时序范围内的视频帧的特征,与所述第二视频中目标时序范围内的视频帧的特征的相似度;在两种所述调整顺序中,该时序范围与所述目标时序范围对应;
    根据该时序范围的所述正相似度和所述负相似度,确定该时序范围对应的损失;该时序范围对应的损失与该时序范围的所述正相似度负相关,与该时序范围的所述负相似度正相关;
    根据每个时序范围对应的损失确定综合损失;
    以降低所述综合损失为目标,利用反向传播算法预训练所述编码器和多个所述预投射层。
  5. 根据权利要求1所述的方法,其特征在于,所述识别模型是通过如下方式训练获得的:
    对第二数量个所述训练视频进行预处理,以得到每个所述训练视频对应的目标训练视频;
    将每个所述目标训练视频输入所述识别模型,并根据所述识别模型的输出与该目标训练视频对应的所述训练视频的类别标签,训练所述识别模型。
  6. 根据权利要求5所述的方法,其特征在于,所述将每个所述目标训练视频输入所述识别模型,并根据所述识别模型的输出与该目标训练视频对应的所述训练视频的类别标签,训练所述识别模型,包括:
    将该目标训练视频输入经过预训练的所述编码器,以得到经过预训练的所述编码器输出的,该目标训练视频对应的训练编码向量;
    将所述训练编码向量输入所述投射层,以得到所述投射层输出的训练视频向量;
    将所述训练视频向量输入所述识别模型的分类层,以得到所述分类层输出的训练识别结果,并将所述训练识别结果作为所述识别模型的输出;
    根据所述训练识别结果和该目标训练视频对应的所述训练视频的类别标签,训练所述投射层,和/或所述编码器。
  7. 根据权利要求6所述的方法,其特征在于,所述识别模型还通过如下方式训练获得的:
    根据待选类别的数量,确定所述投射层的输出维度,以使所述投射层输出的所述训练视频向量的维度与所述待选类别的数量相同;所述待处理视频的类别属于所述待选类别。
  8. 一种视频的识别装置,其特征在于,所述装置包括:
    预处理模块,用于对获取到的待处理视频进行预处理,以得到目标视频;
    识别模块,用于将所述目标视频输入预先训练的识别模型,以得到所述识别模型输出的识别结果,所述识别结果用于表征所述待处理视频的类别;所述识别模型包括编码器和投射层;
    所述编码器为根据多个预投射层和第一数量个预训练视频,预训练得到的,每个所述预投射层对应一个时序范围,该预投射层用于提取所述预训练视频中对应的时序范围内的视频帧的特征;
    所述投射层为根据经过预训练的所述编码器,和第二数量的训练视频训练得到的,所述第二数量小于所述第一数量,所述第一样本视频不具有用于指示类别的类别标签。
  9. 一种计算机可读介质,其上存储有计算机程序,其特征在于,该程序被处理装置执行时实现权利要求1-7中任一项所述方法的步骤。
  10. 一种电子设备,其特征在于,包括:
    存储装置,其上存储有计算机程序;
    处理装置,用于执行所述存储装置中的所述计算机程序,以实现权利要求1-7中任一项所述方法的步骤。
PCT/CN2022/113280 2021-09-08 2022-08-18 视频的识别方法、装置、可读介质和电子设备 WO2023035896A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111052167.9 2021-09-08
CN202111052167.9A CN113723344A (zh) 2021-09-08 2021-09-08 视频的识别方法、装置、可读介质和电子设备

Publications (1)

Publication Number Publication Date
WO2023035896A1 true WO2023035896A1 (zh) 2023-03-16

Family

ID=78682705

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/113280 WO2023035896A1 (zh) 2021-09-08 2022-08-18 视频的识别方法、装置、可读介质和电子设备

Country Status (2)

Country Link
CN (1) CN113723344A (zh)
WO (1) WO2023035896A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116229332A (zh) * 2023-05-06 2023-06-06 浪潮电子信息产业股份有限公司 一种视频预训练模型的训练方法、装置、设备及存储介质
CN117253196A (zh) * 2023-11-17 2023-12-19 本溪钢铁(集团)信息自动化有限责任公司 钢铁行业中基于视频的安全风险监控方法及装置

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113723344A (zh) * 2021-09-08 2021-11-30 北京有竹居网络技术有限公司 视频的识别方法、装置、可读介质和电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019242222A1 (zh) * 2018-06-21 2019-12-26 北京字节跳动网络技术有限公司 用于生成信息的方法和装置
CN111708913A (zh) * 2020-08-19 2020-09-25 腾讯科技(深圳)有限公司 一种标签生成方法、设备及计算机可读存储介质
CN111832516A (zh) * 2020-07-22 2020-10-27 西安电子科技大学 基于无监督视频表示学习的视频行为识别方法
CN113723344A (zh) * 2021-09-08 2021-11-30 北京有竹居网络技术有限公司 视频的识别方法、装置、可读介质和电子设备
CN113723341A (zh) * 2021-09-08 2021-11-30 北京有竹居网络技术有限公司 视频的识别方法、装置、可读介质和电子设备

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111401474B (zh) * 2020-04-13 2023-09-08 Oppo广东移动通信有限公司 视频分类模型的训练方法、装置、设备及存储介质
CN112000818B (zh) * 2020-07-10 2023-05-12 中国科学院信息工程研究所 一种面向文本和图像的跨媒体检索方法及电子装置
CN111814717B (zh) * 2020-07-17 2022-09-27 腾讯科技(深圳)有限公司 人脸识别方法、装置及电子设备
CN112488133B (zh) * 2020-12-18 2022-06-14 贵州大学 一种视频/图片-文本跨模态检索方法
CN112651449B (zh) * 2020-12-29 2023-08-01 北京百度网讯科技有限公司 确定视频的内容特征的方法、装置、电子设备及存储介质
CN113222983A (zh) * 2021-06-03 2021-08-06 北京有竹居网络技术有限公司 图像处理方法、装置、可读介质和电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019242222A1 (zh) * 2018-06-21 2019-12-26 北京字节跳动网络技术有限公司 用于生成信息的方法和装置
CN111832516A (zh) * 2020-07-22 2020-10-27 西安电子科技大学 基于无监督视频表示学习的视频行为识别方法
CN111708913A (zh) * 2020-08-19 2020-09-25 腾讯科技(深圳)有限公司 一种标签生成方法、设备及计算机可读存储介质
CN113723344A (zh) * 2021-09-08 2021-11-30 北京有竹居网络技术有限公司 视频的识别方法、装置、可读介质和电子设备
CN113723341A (zh) * 2021-09-08 2021-11-30 北京有竹居网络技术有限公司 视频的识别方法、装置、可读介质和电子设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ERICSSON: "MMCMH Proposed Way Forward", 3GPP DRAFT; S4-160408 MMCMH PROPOSED WAY FORWARD V3, 3RD GENERATION PARTNERSHIP PROJECT (3GPP), MOBILE COMPETENCE CENTRE ; 650, ROUTE DES LUCIOLES ; F-06921 SOPHIA-ANTIPOLIS CEDEX ; FRANCE, vol. SA WG4, no. Memphis, TN, USA; 20160418 - 20160422, 12 April 2016 (2016-04-12), Mobile Competence Centre ; 650, route des Lucioles ; F-06921 Sophia-Antipolis Cedex ; France , XP051087128 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116229332A (zh) * 2023-05-06 2023-06-06 浪潮电子信息产业股份有限公司 一种视频预训练模型的训练方法、装置、设备及存储介质
CN116229332B (zh) * 2023-05-06 2023-08-04 浪潮电子信息产业股份有限公司 一种视频预训练模型的训练方法、装置、设备及存储介质
CN117253196A (zh) * 2023-11-17 2023-12-19 本溪钢铁(集团)信息自动化有限责任公司 钢铁行业中基于视频的安全风险监控方法及装置
CN117253196B (zh) * 2023-11-17 2024-02-02 本溪钢铁(集团)信息自动化有限责任公司 钢铁行业中基于视频的安全风险监控方法及装置

Also Published As

Publication number Publication date
CN113723344A (zh) 2021-11-30

Similar Documents

Publication Publication Date Title
WO2023035896A1 (zh) 视频的识别方法、装置、可读介质和电子设备
WO2023035877A1 (zh) 视频的识别方法、装置、可读介质和电子设备
WO2022252881A1 (zh) 图像处理方法、装置、可读介质和电子设备
WO2023273611A1 (zh) 语音识别模型的训练方法、语音识别方法、装置、介质及设备
CN109993100A (zh) 基于深层特征聚类的人脸表情识别的实现方法
CN113140012B (zh) 图像处理方法、装置、介质及电子设备
WO2023078070A1 (zh) 一种字符识别方法、装置、设备、介质及产品
WO2023030427A1 (zh) 生成模型的训练方法、息肉识别方法、装置、介质及设备
CN117131281B (zh) 舆情事件处理方法、装置、电子设备和计算机可读介质
CN114638973A (zh) 目标图像检测方法及图像检测模型训练方法
CN113033707B (zh) 视频分类方法、装置、可读介质及电子设备
Wang et al. Contrastive GNN-based traffic anomaly analysis against imbalanced dataset in IoT-based its
CN113052073B (zh) 一种基于元学习的少样本行为识别方法
CN118071428A (zh) 用于多模态监测数据的智能处理系统及方法
CN114463340A (zh) 一种边缘信息引导的敏捷型遥感图像语义分割方法
CN114299305A (zh) 聚合密集和注意力多尺度特征的显著性目标检测算法
CN117671450A (zh) 一种基于transformer的属地网络图像内容安全监管的DETR架构方法
WO2023016290A1 (zh) 视频分类方法、装置、可读介质和电子设备
EP4447006A1 (en) Font recognition method and apparatus, readable medium, and electronic device
CN116416645A (zh) 基于双分支Transformer网络的属性与图像跨模态行人再辨识方法及装置
CN116704433A (zh) 基于上下文感知关系预测编码的自监督群体行为识别方法
CN113986958B (zh) 文本信息的转换方法、装置、可读介质和电子设备
CN116311026A (zh) 基于多层级信息融合Transformer的教室场景身份识别方法
CN111898658B (zh) 图像分类方法、装置和电子设备
CN114220145A (zh) 人脸检测模型生成方法和装置、伪造人脸检测方法和装置

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22866369

Country of ref document: EP

Kind code of ref document: A1