Video classification method, device, electronic device and computer readable storage medium

By identifying external and internal features of the video frame, combined with the comprehensive confidence of the target detection frame, the problem of low recall rate and low accuracy rate of video car classification in the existing technology is solved, and higher classification accuracy and recall are achieved. Rate.

CN114648713BActive Publication Date: 2024-10-29BEIJING DONGCHEZU TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011509800.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-18
Publication Date
2024-10-29
Estimated Expiration
2040-12-18

AI Technical Summary

Technical Problem

Existing video car classification technology has a low recall rate in car video samples and cannot effectively handle car interior content. Moreover, a single frame of video may contain multiple vehicles, causing recognition errors and reducing accuracy.

Method used

By obtaining multiple frames of the video and classifying them into object external and internal frames, combining the external and internal features of the object for identification, and using the comprehensive confidence of the target detection frame for classification, accuracy is ensured.

Benefits of technology

It improves the recall rate and accuracy of video classification, reduces errors caused by misidentification of single frames, and enhances the robustness of video classification results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114648713B_ABST
    Figure CN114648713B_ABST
Patent Text Reader

Abstract

The disclosed embodiments disclose a video classification method, device, electronic device and computer-readable storage medium. The video classification method includes: obtaining multiple video frames of a video to be classified; classifying the multiple video frames to obtain a first category of the multiple video frames, wherein the first category includes video frames outside the object and video frames inside the object; identifying the object according to the video frames outside the object to obtain a first classification vector of the video frames outside the object; identifying the object according to the video frames inside the object to obtain a first classification vector of the video frames inside the object; and determining the classification result of the video to be classified according to the first classification vector. The above method solves the technical problem of low recall rate of video classification by combining video frames outside the object and video frames inside the object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of video classification, and in particular to a video classification method, device, electronic device and computer-readable storage medium. Background Art

[0002] In recent years, with the rapid development of mobile Internet, the short video industry has risen rapidly. Due to its fast transmission speed, low production threshold and strong social attributes, it has been favored by a large number of users and creators. In order to recommend relevant content to users more accurately, each video needs to be labeled with categories. For example, in car videos, the car series described in the video needs to be labeled. For the classification of car series in user generated content (UGC) scenarios, the existing technical solution is to extract video frames, use the detection model to extract the target area with the largest area in the picture, and return the vehicle series type of the target area.

[0003] For the problem of car model recognition in multi-label videos, the existing technical solutions have the following main shortcomings: 1. Car video samples include a lot of introductions to car interiors, and the existing solutions only identify them based on the appearance of the car, so the overall recall rate is not high; 2. Sometimes there are multiple cars in a single-frame video, and the existing solutions only return the target result with the largest area, which may result in misjudgment; 3. The final result is only related to a single frame. If a single frame is recognized incorrectly, the accuracy will be greatly reduced. Summary of the invention

[0004] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0005] In order to solve the above technical problems, the embodiments of the present disclosure propose the following technical solutions.

[0006] In a first aspect, an embodiment of the present disclosure provides a video classification method, including:

[0007] Obtain multiple video frames of the video to be classified;

[0008] Classifying the plurality of video frames to obtain a first category of the plurality of video frames, wherein the first category includes object-external video frames and object-internal video frames;

[0009] Identify the object according to the external video frame of the object to obtain a first classification vector of the external video frame of the object;

[0010] Identify the object according to the internal video frame of the object to obtain a first classification vector of the internal video frame of the object;

[0011] A classification result of the video to be classified is determined according to the first classification vector.

[0012] In a second aspect, an embodiment of the present disclosure provides a video classification device, including:

[0013] A video frame acquisition module, used to acquire multiple video frames of the video to be classified;

[0014] A first classification module, configured to classify the plurality of video frames to obtain a first category of the plurality of video frames, wherein the first category includes object-external video frames and object-internal video frames;

[0015] An external first classification vector acquisition module, used for identifying the object according to the external video frame of the object to obtain a first classification vector of the external video frame of the object;

[0016] An internal first classification vector acquisition module, used for identifying the object according to the internal video frame of the object to obtain a first classification vector of the internal video frame of the object;

[0017] A classification result determination module is used to determine the classification result of the video to be classified according to the first classification vector.

[0018] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor; and

[0019] A memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any of the methods described in the first aspect above.

[0020] In a fourth aspect, an embodiment of the present disclosure provides a non-transitory computer-readable storage medium, characterized in that the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute any of the methods described in the first aspect.

[0021] The disclosed embodiments disclose a video classification method, device, electronic device and computer-readable storage medium. The video classification method includes: obtaining multiple video frames of a video to be classified; classifying the multiple video frames to obtain a first category of the multiple video frames, wherein the first category includes video frames outside the object and video frames inside the object; identifying the object according to the video frames outside the object to obtain a first classification vector of the video frames outside the object; identifying the object according to the video frames inside the object to obtain a first classification vector of the video frames inside the object; and determining the classification result of the video to be classified according to the first classification vector. The above method solves the technical problem of low recall rate of video classification by combining video frames outside the object and video frames inside the object.

[0022] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following preferred embodiments are specifically cited and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0024] Figure 1 A schematic diagram of a flow chart of a video classification method provided in an embodiment of the present disclosure;

[0025] Figure 2 A further flowchart of the video classification method provided by the embodiment of the present disclosure;

[0026] Figure 3 A further flowchart of the video classification method provided by the embodiment of the present disclosure;

[0027] Figure 4 A further flowchart of the video classification method provided by the embodiment of the present disclosure;

[0028] Figure 5 A further flow chart of the video classification method provided in the embodiment of the present disclosure

[0029] Figure 6 A further flowchart of the video classification method provided by the embodiment of the present disclosure;

[0030] Figure 7 A further flowchart of the video classification method provided by the embodiment of the present disclosure;

[0031] Figure 8 A schematic diagram of an application scenario of the video classification method provided by an embodiment of the present disclosure;

[0032] Fig. 9 A schematic diagram of the structure of an embodiment of a video classification device provided in an embodiment of the present disclosure;

[0033] Fig.10 It is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0034] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0035] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0036] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0037] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0038] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0039] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0040] Figure 1This is a flow chart of an embodiment of a video classification method provided by an embodiment of the present disclosure. The video classification method provided by this embodiment can be executed by a video classification device. The video classification device can be implemented as software, or as a combination of software and hardware. The video classification device can be integrated in a device in a video classification system, such as a video classification server or a video classification terminal device. Figure 1 As shown, the method comprises the following steps:

[0041] Step S101, obtaining multiple video frames of a video to be classified;

[0042] The video to be classified may be any type of video. The classification is the type of the object to be classified in the video to be classified. For example, if the classification is the type of car series, the classification means that the video to be classified includes the car series, or the content of the video to be classified is related to the car series.

[0043] It can be understood that the video to be classified can be read from a preset location, or received through a preset interface, such as reading the video to be classified from a preset storage location or network location, or receiving the video to be classified uploaded by the user through a human-computer interaction interface, etc., which will not be repeated here.

[0044] Optionally, the step of obtaining a plurality of video frames of the video to be classified includes: extracting frames of the video to be classified according to a frame extraction frequency to obtain the plurality of video frames. Exemplarily, the video to be classified is extracted at a frequency of 2fps (Frame per Second) to obtain a video frame sequence I={I 1 ,I 2 ,……,I n}, where n represents the number of video frames.

[0045] Optionally, in order to facilitate the subsequent identification of objects in the video frame, this step may also include preprocessing the video frame. Exemplarily, in this step, the video frame is normalized to a length and width of M and N, respectively, to facilitate subsequent processing. It can be understood that the preprocessing may include any preprocessing method, which will not be repeated here.

[0046] Return to attachment Figure 1 , the video classification method further includes, step S102, classifying the multiple video frames to obtain a first category of the multiple video frames, wherein the first category includes object external video frames and object internal video frames;

[0047] The first category is to classify the video frames into object external video frames including external features of the object and object internal video frames including internal features of the object. Exemplarily, if the object is a car, in this step, the extracted video frames are divided into car exterior video frames and car interior video frames, wherein since the car center console in the car interior can more accurately reflect the model of a car, the car interior video frames can further include car center console video frames.

[0048] In order to prevent misidentification caused by a large proportion of non-target objects when multiple objects appear in the video frame, optional, such as Figure 2 As shown, the step S102 further includes:

[0049] Step S201, performing target detection on the video frame to obtain at least one target detection frame;

[0050] Step S202, calculating the comprehensive confidence of the target detection frame according to the confidence of the target detection frame, the distance between the target detection frame and the center point of the video frame, and the proportion of the area of ​​the target detection frame in the video frame;

[0051] Step S203: taking the category corresponding to the target detection frame with the largest comprehensive confidence as the first category of the video frame.

[0052] Wherein, the step S201 can be performed by a pre-trained target detection model. Wherein, the target detection model is used to detect two categories of video frames, namely, the outside of the object and the inside of the object. Specifically, if the detection result of a certain video frame is empty, it means that the frame does not include an object, so the frame is discarded. When the detection result of a certain frame is not empty, the target detection model outputs at least one target detection frame. Exemplarily, the output of the target detection model is expressed as: B = {B 1 ,B 2 ,......,B m}, where m represents the number of target detection frames obtained in the frame. The kth target detection frame is defined as B k =[x k ,y k ,w k ,h k ,c k ,s k ], where x k and k Respectively represent the horizontal and vertical coordinates of the upper left corner of the target detection box, w k and h k Respectively represent the width and height of the target detection box, c k represents the first category, s k Represents the confidence of the target detection box.

[0053] Furthermore, in step S202, the comprehensive confidence is calculated using the following formula (1):

[0054] S k =s k *d k *a k (1)

[0055] Among them, d k ∈(0,1] represents the position score of the target detection frame. The closer the center point of the target detection frame is to the center point of the video frame, the higher the score. For example, the d k Calculated according to the following formula (2):

[0056] d k =max(|x k +w k / 2-N / 2|,|y k +h k / 2-M / 2|) (2)

[0057] Among them, a k ∈(0,1] represents the area ratio of the target detection box in the video frame. For example, the a k Calculated according to the following formula (3):

[0058] a k =w k *h k / (M*N) (3)

[0059] In step S202, the comprehensive confidence of each target detection box output by the model is calculated to obtain at least one comprehensive confidence.

[0060] In step S203, the at least one comprehensive confidence is sorted according to size, and the category corresponding to the target detection frame with the largest comprehensive confidence is used as the first category of the video frame.

[0061] In the above steps S201-S203, by adding the position score and area ratio during target detection, the target detection frame with a larger area near the middle of the video frame has a larger weight, so that when multiple target detection frames are detected, the video frame can be classified more accurately.

[0062] Return to attachment Figure 1The video classification method also includes: step S103, identifying the object according to the external video frame of the object to obtain a first classification vector of the external video frame of the object; step S104, identifying the object according to the internal video frame of the object to obtain a first classification vector of the internal video frame of the object.

[0063] Optionally, in step S103, the video frame classified as an object external video frame in step S102 is input into a pre-trained object external classification model, and the object external classification model is used to classify the video frame through the object external video frame, such as classifying the appearance video frame through the appearance video frame of a car to obtain the car model corresponding to the video frame.

[0064] Optionally, in step S104, the video frames classified as internal object video frames in step S102 are input into a pre-trained internal object classification model, and the internal object classification model is used to classify the video frames through the internal object video frames, such as classifying the central control video frames through the central control video frames of a car to obtain the car series corresponding to the video frames.

[0065] It can be understood that, in order to increase the processing speed, the video frame input into the object external classification model or the object internal classification model may be an image within the target detection frame obtained in step S102.

[0066] Each first element in the first classification vector corresponds to a second category, and the value of the first element represents the confidence that the video frame belongs to the second category corresponding to the first element. Exemplarily, the first classification vector is a normalized one-dimensional vector output by the object external classification model or the object internal classification model, with V i represents the first classification vector of the i-th video frame, then:

[0067] V i = {V i1 ,V i2 ,......,V ic}

[0068] Where V ij is the first element in the first classification vector, j∈[1,c], where c represents the number of the second category, i.e. V ij represents the confidence that the i-th frame belongs to the j-th class; where V i1 +V i2 +......+V ic =1.

[0069] Through the above steps S103 and S104, the video frames outside the object and the video frames inside the object are respectively identified and classified to obtain the first classification vector. The identification of the video frames inside the object is added on the basis of the video frames outside the object, so that the overall recall rate of video classification is improved.

[0070] Return to attachment Figure 1 The video classification method further includes, step S105, determining a classification result of the video to be classified according to the first classification vector.

[0071] In step S103 and step S104, the video frames of the video to be classified are classified and identified to obtain at least one first classification vector. Usually, multiple first classification vectors are obtained. Then, in step S105, the classification result of the video to be classified is determined by combining the multiple first classification vectors, that is, the second category of the video to be classified.

[0072] Optional, such as Figure 3 As shown, the step S105 further includes:

[0073] Step S301, classifying the video frames corresponding to the first classification vector into at least one second category according to the first classification vector; wherein each second category corresponds to a set of video frames;

[0074] Step S302, calculating the confidence that the video to be classified is a second category corresponding to the video frame set according to the first classification vector of each video frame in the video frame set;

[0075] Step S303: determining a classification result of the video to be classified according to the confidence level of the second category.

[0076] For each object external video frame and object internal video frame obtained by step S102, a corresponding first classification vector can be obtained by step S103 or step S104, and the video frame can be classified into at least one second category by the classification vector, such as determining the second category of the video frame by the value of the largest first element in the first classification vector. In order to make the classification more accurate, a clustering threshold can be pre-set, and the video frame is classified according to the clustering threshold. Optionally, step S301 also includes:

[0077] Step S401, obtaining a clustering threshold;

[0078] Step S402, comparing the value of each first element in the first classification vector with the clustering threshold;

[0079] Step S403 : in response to the value of the first element being greater than the clustering threshold, classifying the video frame corresponding to the first classification vector into a second category corresponding to the first element.

[0080] Let the clustering threshold be th 1 , and th 1 ∈[0,1], the above steps S402 and S403 can be implemented by the following formula (4):

[0081]

[0082] Among them, C ij It is used to indicate whether the i-th frame belongs to the j-th category. Through the above steps S402 and S403, the video frames obtained in step S103 or step S104 are classified into one or more second categories. It can be understood that in the above steps, a certain frame may not belong to any second category. In this case, the video frame can be discarded.

[0083] Through the above steps, the video frames corresponding to each of the c second categories can be obtained, that is, each second category corresponds to a video frame set, and the video frame set includes the video frame outside the object and / or the video frame inside the object.

[0084] Return to attachment Figure 3 In step S302, the comprehensive first classification vector of each second category is first calculated. Optionally, the comprehensive first classification vector is calculated by adding the first classification vectors of each video frame in the video frame set corresponding to the second category and then normalizing them. Taking the second category as category 1 as an example, the comprehensive first classification vector is calculated by the following formula (5):

[0085]

[0086] Where A represents the set of video frames belonging to class l, V q represents the first classification vector of the qth frame, f(.) = Softmax(.); thus, the comprehensive first classification vector Vl_result can be obtained, where the value of the lth element in Vl_result is Vl_result l That is, the confidence that the video to be classified is the second category of category l.

[0087] The confidence of each second category can be calculated, and then in step S303, the second category corresponding to the largest confidence of the second category can be determined as the classification result of the video to be classified.

[0088] In order to reduce the amount of calculation, before step S302, the second category may be filtered. Optionally, the filtering may include filtering out the second category with fewer video frames. Optionally, a quantity threshold parameter th may be set. 2 , where th 2 ∈[0,1], from which we can get the quantity threshold: n*th 2 , filtering out the second categories corresponding to the video frame set whose number of video frames is less than the number threshold, and the remaining second categories participate in the subsequent steps of calculating the comprehensive first classification vector and determining the confidence of the second category. Thus, obviously incorrect second categories can be filtered out to reduce the amount of calculation when determining the confidence of the second category.

[0089] In step S303, since each second category participating in the calculation of the comprehensive first classification vector will obtain a corresponding Vl_result l , so in this step, all Vl_result can be compared l The size of Vl_result l The second category with the largest value is taken as the classification result of the video to be classified.

[0090] Optional, such as following all Vl_result l When the second category with the largest value is used as the classification result of the video to be classified, it is possible that all Vl_result l The value of is not large, and the classification result is inaccurate. Therefore, in order to ensure the accuracy of the final classification result, the step S303 further includes:

[0091] Get the classification threshold;

[0092] comparing the confidence of the second category to the classification threshold;

[0093] The second category whose confidence level is greater than the classification threshold is determined as the classification result of the video to be classified.

[0094] The classification threshold is a preset threshold th 3 , when Vl_result l >th 3 When the classification result of the video to be classified is determined to be class l, in order to prevent the video to be classified from being classified into multiple second categories, th 3 The value can be set to a larger value, such as 3 =0.8.

[0095] Through the above steps S101-S105, in addition to the external features of the object, the internal features of the object are also added when classifying the video, so that the classification of the video including the inside and outside of the object is more accurate, which solves the technical problem of low recall rate caused by classifying the video only through the video frame outside the object, and also solves the problem of low accuracy caused by single-frame misidentification; in addition, when performing target recognition on a single frame, the position and area information of the target detection box are combined to reduce misjudgment.

[0096] Furthermore, in some scenarios, objects in some videos are clearly identified, which can accurately classify the video. For example, when identifying a car model, the car brand can be identified by the car logo or the specific model of the car brand can be identified by the logo on the rear of the car. Therefore, when the object logo is identified in a certain frame, the weight of the frame can be increased when calculating the above-mentioned first classification vector. Therefore, optionally, Figure 5 As shown, the video classification method also includes:

[0097] Step S501, identifying the identifier of the object according to the external video frame of the object to obtain the identifier confidence of the identifier of the object included in the external video frame of the object;

[0098] Step S502, calculating a weight value of the video frame outside the object according to the identification confidence;

[0099] At this time, the step S302 further includes:

[0100] Step S503, performing weighted calculation on the first classification vectors of the external video frames in the video frame set according to the weight values ​​of the external video frames to obtain a weighted first classification vector;

[0101] Step S504: Calculate the confidence that the video to be classified is a second category corresponding to the video frame set according to the weighted first classification vector.

[0102] In the step S501, the object external video frame can be input into a pre-trained object identification detection model to identify whether the object external video frame contains the object identification. The output result of the object identification detection model is similar to the output of the model in the above step S102, that is, one or more target detection frames are output, each target detection frame is represented by the vertical and horizontal coordinates of the upper left corner, the length and width values ​​of the target detection frame, the category and the confidence. In the present disclosure, since there is a separate process object external video frame for classification, in the step S501, it is only necessary to detect whether the object identification is included in the object external video frame, and it is not necessary to classify it. In this way, the identification confidence of multiple target detection frames can be compared to obtain the maximum identification confidence.

[0103] Optional, such as Figure 6 As shown, in step S502, calculating the weight value of the external video frame of the object according to the identification confidence includes:

[0104] Step S601, obtaining a weight threshold;

[0105] Step S602: when the identification confidence is greater than or equal to the weight threshold, a weight value of the external video frame of the object having a first weight value is calculated according to the weight threshold and the identification confidence;

[0106] Step S603: When the identification confidence is less than the weight threshold, a preset weight value is set as the weight value of the external video frame of the object; wherein the preset weight value is less than or equal to the first weight value.

[0107] Exemplarily, the weight threshold th is pre-set 4 , assuming that the logo confidence of the external video frame of the object obtained in step S502 is S_logo q , which represents the confidence of the identification of the object in the qth frame. The weight value of the video frame outside the object can be calculated by the following formula (6):

[0108]

[0109] In step S503, weighted calculation is performed on the first classification vector of the external video frame in the video frame set to obtain a weighted first classification vector. As described in the above embodiment, the weighted first classification vector of the video frame q in the video frame set A of category l is: q *V q .

[0110] In step S504, first, a comprehensive weighted first classification vector is obtained according to the weighted first classification vectors of all video frames in the set A. Exemplarily, the comprehensive weighted first classification vector is calculated by the following formula (7):

[0111]

[0112] The definition of the parameters is the same as in formula (5) and will not be repeated here. Therefore, the confidence of the second category of the final l category is: Vl_result l Afterwards, the process of determining the classification result of the video to be classified is described in step S105 and will not be repeated here.

[0113] In the above further embodiment, when calculating the comprehensive first classification vector, the video frames containing the object identification are weighted so that their weights become larger, and the frames with greater identification confidence have a higher weight w. q The larger the value of , the greater its proportion in calculating the comprehensive weighted first classification vector, thereby enhancing the robustness of the final classification result and making the classification more accurate.

[0114] In the above embodiments, the classification process is related to the features of the video frame; for videos uploaded by users, they usually include titles, and the titles often contain characters or keywords closely related to the content, so the classification results can also be enhanced by the titles of the videos to be classified. Figure 7 As shown, further, the video classification method also includes:

[0115] Step S701, obtaining the title of the video to be classified;

[0116] Step S702, calculating a first coefficient according to the title, wherein the value of the first coefficient is related to the number of times the name of the second category appears in the title;

[0117] At this time, the step S302 further includes:

[0118] Step S703, calculating a first confidence that the video to be classified is a second category corresponding to the video frame set according to the first classification vector of each video frame in the video frame set;

[0119] Step S704: Calculate the confidence that the video to be classified is the second category corresponding to the video frame set according to the first coefficient and the first confidence of the second category.

[0120] In step S702, the title of the video to be classified is subjected to operations such as word segmentation and keyword extraction to obtain characters or keywords that match the name of the second category, and the number of the characters or keywords can be any number. According to the number of characters or keywords that match the name of the second category, the first coefficient of the second category corresponding to the set of video frames is calculated. Optionally, the step S702 further includes: matching the title of the video to be classified with the second category to obtain the number of times the name of each second category appears in the title; calculating the first coefficient of each second category based on the number, wherein the first coefficient is inversely proportional to the number. Exemplarily, the first coefficient is calculated according to the following formula (8):

[0121] γ=2 / (e t +1) (8)

[0122] Where t represents the number of times the characters or keywords matching the name of the second category appear in the title. Where t≥0, and t is an integer. Where the larger the value of t, the smaller the value of γ.

[0123] In step S703, the first confidence of the second category is calculated. The first confidence of the second category may be the confidence of the second category calculated in step S302 or the confidence of the second category calculated in step S504. That is, the first confidence of the second category in step S703 includes Vl_result calculated by formula (5) or formula (7). l .

[0124] In step S704, the confidence that the video to be classified is the second category corresponding to the video frame set is calculated based on the first coefficient and the first confidence of the second category. Optionally, the confidence of the second category is calculated by taking the index of the first coefficient and the first confidence of the second category. Exemplarily, according to: S_result l =V_result l γ Calculate the confidence of the second category of category l. Afterwards, the process of determining the classification result of the video to be classified is described in step S105, which will not be repeated here. The value γ of the first coefficient decreases as t increases, and since Vl_result l is a value less than 1, so V_result l γ The value of increases as γ decreases, that is, as t increases. That is, the more times characters or keywords matching the second category appear in the title, the higher the confidence of the corresponding second classification.

[0125] In the above optional embodiment, the classification result is influenced by the title, so that the classification result can be strengthened by the information contained in the title, so that the robustness of the final classification result is strengthened and the classification is more accurate.

[0126] Figure 8 This is an application scenario of the video classification method in the above embodiment. Figure 8 As shown, the application scenario is the classification of car models in videos, which classifies videos based on the appearance of the car and the car's central control video frame. Figure 8 As shown, first obtain video information, including the video and the title of the video; extract frames and preprocess the video, segment the title, count the number of times the name of each car series appears in it, and calculate the first coefficient; classify the preprocessed video frames into appearance frames and center control frames, input the appearance frames into the appearance recognition model for feature extraction and classification to obtain the first classification vector of the appearance frames, and input the center control frames into the center control recognition model for feature extraction and classification to obtain the first classification vector of the center control frames; at the same time, input the appearance frames into the car logo detection module for car logo detection, and output the car logo confidence of the appearance frame including the car logo; when calculating the video classification result, the car logo confidence, the first classification vector and the first coefficient are used as calculation factors to calculate the final classification result. In this application scenario, the features of the car appearance and the car center control in the video are combined, and the classification results are strengthened by the car logo features and the features in the title, which increases the recall rate and accuracy of video classification.

[0127] The disclosed embodiment discloses a video classification method, which includes: obtaining multiple video frames of a video to be classified; classifying the multiple video frames to obtain a first category of the multiple video frames, wherein the first category includes video frames outside the object and video frames inside the object; identifying the object according to the video frames outside the object to obtain a first classification vector of the video frames outside the object; identifying the object according to the video frames inside the object to obtain a first classification vector of the video frames inside the object; and determining the classification result of the video to be classified according to the first classification vector. The above method solves the technical problem of low recall rate of video classification by combining video frames outside the object and video frames inside the object.

[0128] In the above, although the various steps in the above method embodiment are described in the above order, those skilled in the art should be aware that the steps in the embodiments of the present disclosure are not necessarily executed in the above order, and they may also be executed in other orders such as reverse order, parallel order, and cross order. Moreover, on the basis of the above steps, those skilled in the art may also add other steps. These obvious variations or equivalent replacement methods should also be included in the protection scope of the present disclosure and will not be repeated here.

[0129] Fig. 9 The structure diagram of the video classification device embodiment provided by the present disclosure is as follows. Fig. 9 As shown, the device 900 includes: a video frame acquisition module 901, a first classification module 902, an external first classification vector acquisition module 903, an internal first classification vector acquisition module 904 and a classification result determination module 905.

[0130] in,

[0131] The video frame acquisition module 901 is used to acquire multiple video frames of the video to be classified;

[0132] A first classification module 902, configured to classify the plurality of video frames to obtain a first category of the plurality of video frames, wherein the first category includes object-external video frames and object-internal video frames;

[0133] An external first classification vector acquisition module 903 is used to identify the object according to the external video frame of the object to obtain a first classification vector of the external video frame of the object;

[0134] An internal first classification vector acquisition module 904 is used to identify the object according to the internal video frame of the object to obtain a first classification vector of the internal video frame of the object;

[0135] The classification result determination module 905 is used to determine the classification result of the video to be classified according to the first classification vector.

[0136] Furthermore, the first classification module 902 is further used for:

[0137] Performing target detection on the video frame to obtain at least one target detection frame;

[0138] Calculating the comprehensive confidence of the target frame according to the confidence of the target detection frame, the distance between the target detection frame and the center point of the video frame, and the proportion of the area of ​​the target detection frame in the video frame;

[0139] The category corresponding to the target detection frame with the largest comprehensive confidence is taken as the first category of the video frame.

[0140] Furthermore, each first element in the first classification vector corresponds to a second category, and the value of the first element represents the confidence that the video frame belongs to the second category corresponding to the first element.

[0141] Furthermore, the classification result determination module 905 is also used for:

[0142] Classifying the video frames corresponding to the first classification vector into at least one second category according to the first classification vector; wherein each second category corresponds to a set of video frames;

[0143] Calculating, according to the first classification vector of each video frame in the video frame set, the confidence that the video to be classified is a second category corresponding to the video frame set;

[0144] A classification result of the video to be classified is determined according to the confidence of the second category.

[0145] Furthermore, the classification result determination module 905 is also used for:

[0146] Get the clustering threshold;

[0147] Comparing the value of each first element in the first classification vector with the size of the clustering threshold;

[0148] In response to the value of the first element being greater than the clustering threshold, the video frame corresponding to the first classification vector is classified into a second category corresponding to the first element.

[0149] Furthermore, the video classification device also includes:

[0150] an identification confidence determination module, configured to identify the identification of the object according to the external video frame of the object to obtain the identification confidence of the identification of the object included in the external video frame of the object;

[0151] A weight calculation module, used for calculating the weight value of the external video frame of the object according to the identification confidence;

[0152] The classification result determination module 905 is further used for:

[0153] Performing weighted calculation on the first classification vector of the external video frame in the video frame set according to the weight value of the external video frame to obtain a weighted first classification vector;

[0154] The confidence that the video to be classified belongs to the second category corresponding to the video frame set is calculated according to the weighted first classification vector.

[0155] Furthermore, the weight calculation module is also used for:

[0156] Get the weight threshold;

[0157] When the identification confidence is greater than or equal to the weight threshold, calculating a weight value of the object external video frame as a first weight value according to the weight threshold and the identification confidence;

[0158] When the identification confidence is less than the weight threshold, a preset weight value is set as the weight value of the external video frame of the object; wherein the preset weight value is less than or equal to the first weight value.

[0159] Furthermore, the video classification device further includes:

[0160] A title acquisition module, used to acquire the title of the video to be classified;

[0161] A first coefficient calculation module, used for calculating a first coefficient according to the title, wherein the value of the first coefficient is related to the number of times the name of the second category appears in the title;

[0162] The classification result determination module 905 is further used for:

[0163] Calculating, according to the first classification vector of each video frame in the video frame set, a first confidence that the video to be classified is a second category corresponding to the video frame set;

[0164] The confidence that the video to be classified is the second category corresponding to the video frame set is calculated according to the first coefficient and the first confidence of the second category.

[0165] Furthermore, the first coefficient calculation module is also used for:

[0166] Matching the title of the video to be classified with the second category to obtain the number of times the name of each second category appears in the title;

[0167] A first coefficient of each second category is calculated according to the number of times, wherein the first coefficient is inversely proportional to the number of times.

[0168] Furthermore, the classification result determination module 905 is also used for:

[0169] Get the classification threshold;

[0170] comparing the confidence of the second category to the classification threshold;

[0171] The second category whose confidence level is greater than the classification threshold is determined as the classification result of the video to be classified.

[0172] Fig. 9 The device shown can perform Figure 1-Figure 8 For the method of the embodiment shown in the figure, the part not described in detail in this embodiment can be referred to Figure 1-Figure 8 The implementation process and technical effects of this technical solution refer to Figure 1-Figure 8 The description in the illustrated embodiment will not be repeated here.

[0173] Reference below Fig.10 , which shows a schematic diagram of the structure of an electronic device 1000 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.10 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0174] like Fig.10 As shown, the electronic device 1000 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the electronic device 1000 are also stored. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0175] Typically, the following devices may be connected to the I / O interface 1005: an input device 1006 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the electronic device 1000 to communicate with other devices wirelessly or by wire to exchange data. Although Fig.10 The electronic device 1000 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0176] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 1009, or installed from a storage device 1008, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0177] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0178] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0179] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0180] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the video classification method.

[0181] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0182] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0183] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.

[0184] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0185] In the context of the present disclosure, 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, device, or equipment. 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, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0186] According to one or more embodiments of the present disclosure, a video classification method is provided, comprising:

[0187] Obtain multiple video frames of the video to be classified;

[0188] Classifying the plurality of video frames to obtain a first category of the plurality of video frames, wherein the first category includes object-external video frames and object-internal video frames;

[0189] Identify the object according to the external video frame of the object to obtain a first classification vector of the external video frame of the object;

[0190] Identify the object according to the internal video frame of the object to obtain a first classification vector of the internal video frame of the object;

[0191] A classification result of the video to be classified is determined according to the first classification vector.

[0192] Further, classifying the multiple video frames to obtain the first category of the multiple video frames includes:

[0193] Performing target detection on the video frame to obtain at least one target detection frame;

[0194] Calculating the comprehensive confidence of the target frame according to the confidence of the target detection frame, the distance between the target detection frame and the center point of the video frame, and the proportion of the area of ​​the target detection frame in the video frame;

[0195] The category corresponding to the target detection frame with the largest comprehensive confidence is taken as the first category of the video frame.

[0196] Furthermore, each first element in the first classification vector corresponds to a second category, and the value of the first element represents the confidence that the video frame belongs to the second category corresponding to the first element.

[0197] Further, determining the classification result of the video to be classified according to the first classification vector includes:

[0198] Classifying the video frames corresponding to the first classification vector into at least one second category according to the first classification vector; wherein each second category corresponds to a set of video frames;

[0199] Calculating, according to the first classification vector of each video frame in the video frame set, the confidence that the video to be classified is a second category corresponding to the video frame set;

[0200] A classification result of the video to be classified is determined according to the confidence of the second category.

[0201] Further, classifying the video frame corresponding to the first classification vector into at least one second category according to the first classification vector includes:

[0202] Get the clustering threshold;

[0203] Comparing the value of each first element in the first classification vector with the size of the clustering threshold;

[0204] In response to the value of the first element being greater than the clustering threshold, the video frame corresponding to the first classification vector is classified into a second category corresponding to the first element.

[0205] Furthermore, the method further comprises:

[0206] Identifying the identifier of the object according to the external video frame of the object to obtain an identifier confidence of the identifier of the object included in the external video frame of the object;

[0207] Calculating a weight value of the external video frame of the object according to the identification confidence;

[0208] The calculating, according to the first classification vector of each video frame in the video frame set, the confidence that the video to be classified is a second category corresponding to the video frame set, comprises:

[0209] Performing weighted calculation on the first classification vector of the external video frame in the video frame set according to the weight value of the external video frame to obtain a weighted first classification vector;

[0210] The confidence that the video to be classified belongs to the second category corresponding to the video frame set is calculated according to the weighted first classification vector.

[0211] Further, the calculating the weight value of the video frame outside the object according to the identification confidence level includes:

[0212] Get the weight threshold;

[0213] When the identification confidence is greater than or equal to the weight threshold, calculating a weight value of the object external video frame as a first weight value according to the weight threshold and the identification confidence;

[0214] When the identification confidence is less than the weight threshold, a preset weight value is set as the weight value of the external video frame of the object; wherein the preset weight value is less than or equal to the first weight value.

[0215] Furthermore, the method further comprises:

[0216] Obtaining the title of the video to be classified;

[0217] Calculating a first coefficient according to the title, wherein the value of the first coefficient is related to the number of times the name of the second category appears in the title;

[0218] The calculating, according to the first classification vector of each video frame in the video frame set, the confidence that the video to be classified is a second category corresponding to the video frame set, comprises:

[0219] Calculating, according to the first classification vector of each video frame in the video frame set, a first confidence that the video to be classified is a second category corresponding to the video frame set;

[0220] The confidence that the video to be classified is the second category corresponding to the video frame set is calculated according to the first coefficient and the first confidence of the second category.

[0221] Further, the calculating the first coefficient according to the title includes:

[0222] Matching the title of the video to be classified with the second category to obtain the number of times the name of each second category appears in the title;

[0223] A first coefficient of each second category is calculated according to the number of times, wherein the first coefficient is inversely proportional to the number of times.

[0224] Further, determining the classification result of the video to be classified according to the confidence of the second category includes:

[0225] Get the classification threshold;

[0226] comparing the confidence of the second category to the classification threshold;

[0227] The second category whose confidence level is greater than the classification threshold is determined as the classification result of the video to be classified.

[0228] According to one or more embodiments of the present disclosure, a video classification device is provided, including:

[0229] A video frame acquisition module, used to acquire multiple video frames of the video to be classified;

[0230] A first classification module, configured to classify the plurality of video frames to obtain a first category of the plurality of video frames, wherein the first category includes object-external video frames and object-internal video frames;

[0231] An external first classification vector acquisition module, used for identifying the object according to the external video frame of the object to obtain a first classification vector of the external video frame of the object;

[0232] An internal first classification vector acquisition module, used for identifying the object according to the internal video frame of the object to obtain a first classification vector of the internal video frame of the object;

[0233] A classification result determination module is used to determine the classification result of the video to be classified according to the first classification vector.

[0234] Furthermore, the first classification module is also used for:

[0235] Performing target detection on the video frame to obtain at least one target detection frame;

[0236] Calculating the comprehensive confidence of the target frame according to the confidence of the target detection frame, the distance between the target detection frame and the center point of the video frame, and the proportion of the area of ​​the target detection frame in the video frame;

[0237] The category corresponding to the target detection frame with the largest comprehensive confidence is taken as the first category of the video frame.

[0238] Furthermore, each first element in the first classification vector corresponds to a second category, and the value of the first element represents the confidence that the video frame belongs to the second category corresponding to the first element.

[0239] Furthermore, the classification result determination module is also used to:

[0240] Classifying the video frames corresponding to the first classification vector into at least one second category according to the first classification vector; wherein each second category corresponds to a set of video frames;

[0241] Calculating, according to the first classification vector of each video frame in the video frame set, the confidence that the video to be classified is a second category corresponding to the video frame set;

[0242] A classification result of the video to be classified is determined according to the confidence of the second category.

[0243] Furthermore, the classification result determination module is also used to:

[0244] Get the clustering threshold;

[0245] Comparing the value of each first element in the first classification vector with the size of the clustering threshold;

[0246] In response to the value of the first element being greater than the clustering threshold, the video frame corresponding to the first classification vector is classified into a second category corresponding to the first element.

[0247] Furthermore, the video classification device also includes:

[0248] an identification confidence determination module, configured to identify the identification of the object according to the external video frame of the object to obtain the identification confidence of the identification of the object included in the external video frame of the object;

[0249] A weight calculation module, used for calculating the weight value of the external video frame of the object according to the identification confidence;

[0250] Wherein, the classification result determination module is also used for:

[0251] Performing weighted calculation on the first classification vector of the external video frame in the video frame set according to the weight value of the external video frame to obtain a weighted first classification vector;

[0252] The confidence that the video to be classified belongs to the second category corresponding to the video frame set is calculated according to the weighted first classification vector.

[0253] Furthermore, the weight calculation module is also used for:

[0254] Get the weight threshold;

[0255] When the identification confidence is greater than or equal to the weight threshold, calculating a weight value of the object external video frame as a first weight value according to the weight threshold and the identification confidence;

[0256] When the identification confidence is less than the weight threshold, a preset weight value is set as the weight value of the external video frame of the object; wherein the preset weight value is less than or equal to the first weight value.

[0257] Furthermore, the video classification device further includes:

[0258] A title acquisition module, used to acquire the title of the video to be classified;

[0259] A first coefficient calculation module, used for calculating a first coefficient according to the title, wherein the value of the first coefficient is related to the number of times the name of the second category appears in the title;

[0260] Wherein, the classification result determination module is also used for:

[0261] Calculating, according to the first classification vector of each video frame in the video frame set, a first confidence that the video to be classified is a second category corresponding to the video frame set;

[0262] The confidence that the video to be classified is the second category corresponding to the video frame set is calculated according to the first coefficient and the first confidence of the second category.

[0263] Furthermore, the first coefficient calculation module is also used for:

[0264] Matching the title of the video to be classified with the second category to obtain the number of times the name of each second category appears in the title;

[0265] A first coefficient of each second category is calculated according to the number of times, wherein the first coefficient is inversely proportional to the number of times.

[0266] Furthermore, the classification result determination module is also used to:

[0267] Get the classification threshold;

[0268] comparing the confidence of the second category to the classification threshold;

[0269] The second category whose confidence level is greater than the classification threshold is determined as the classification result of the video to be classified.

[0270] According to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any one of the video classification methods described in the first aspect above.

[0271] According to one or more embodiments of the present disclosure, a non-transitory computer-readable storage medium is provided, characterized in that the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute any of the video classification methods described in the first aspect.

[0272] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

Claims

1. A video classification method, characterized in that: include: Obtain multiple video frames of the video to be classified; Classifying the plurality of video frames to obtain a first category of the plurality of video frames, wherein the first category includes object-external video frames and object-internal video frames; The object is identified according to the external video frame of the object to obtain a first classification vector of the external video frame of the object; the external video frame of the object includes external features of the object; Identify the object according to the internal video frame of the object to obtain a first classification vector of the internal video frame of the object; the internal video frame of the object includes internal features of the object; The classification result of the video to be classified is determined according to the first classification vector; wherein the first classification vector includes a first classification vector of the video frame outside the object and a first classification vector of the video frame inside the object.

2. The video classification method according to claim 1, wherein the classifying the plurality of video frames to obtain the first category of the plurality of video frames comprises: Performing target detection on the video frame to obtain at least one target detection frame; Calculating the comprehensive confidence of the target detection frame according to the confidence of the target detection frame, the distance between the target detection frame and the center point of the video frame, and the proportion of the area of ​​the target detection frame in the video frame; The category corresponding to the target detection frame with the largest comprehensive confidence is taken as the first category of the video frame.

3. The video classification method as described in claim 1, wherein each first element in the first classification vector corresponds to a second category, and the value of the first element represents the confidence that the video frame belongs to the second category corresponding to the first element.

4. The video classification method according to claim 3, wherein determining the classification result of the video to be classified according to the first classification vector comprises: Classifying the video frames corresponding to the first classification vector into at least one second category according to the first classification vector; wherein each second category corresponds to a set of video frames; Calculating, according to the first classification vector of each video frame in the video frame set, the confidence that the video to be classified is a second category corresponding to the video frame set; A classification result of the video to be classified is determined according to the confidence of the second category.

5. The video classification method according to claim 4, wherein the step of classifying the video frame corresponding to the first classification vector into at least one second category according to the first classification vector comprises: Get the clustering threshold; Comparing the value of each first element in the first classification vector with the size of the clustering threshold; In response to the value of the first element being greater than the clustering threshold, the video frame corresponding to the first classification vector is classified into a second category corresponding to the first element.

6. The video classification method according to claim 4, characterized in that: The method further comprises: Identifying the identifier of the object according to the external video frame of the object to obtain an identifier confidence of the identifier of the object included in the external video frame of the object; Calculating a weight value of the external video frame of the object according to the identification confidence; The calculating, according to the first classification vector of each video frame in the video frame set, the confidence that the video to be classified is a second category corresponding to the video frame set, comprises: Performing weighted calculation on the first classification vector of the external video frame in the video frame set according to the weight value of the external video frame to obtain a weighted first classification vector; The confidence that the video to be classified belongs to the second category corresponding to the video frame set is calculated according to the weighted first classification vector.

7. The video classification method according to claim 6, characterized in that: The step of calculating the weight value of the video frame outside the object according to the identification confidence level includes: Get the weight threshold; When the identification confidence is greater than or equal to the weight threshold, calculating a weight value of the object external video frame as a first weight value according to the weight threshold and the identification confidence; When the identification confidence is less than the weight threshold, a preset weight value is set as the weight value of the external video frame of the object; wherein the preset weight value is less than or equal to the first weight value.

8. The video classification method according to claim 4, characterized in that: The method further comprises: Obtaining the title of the video to be classified; Calculating a first coefficient according to the title, wherein the value of the first coefficient is related to the number of times the name of the second category appears in the title; The calculating, according to the first classification vector of each video frame in the video frame set, the confidence that the video to be classified is a second category corresponding to the video frame set, comprises: Calculating, according to the first classification vector of each video frame in the video frame set, a first confidence that the video to be classified is a second category corresponding to the video frame set; The confidence that the video to be classified is the second category corresponding to the video frame set is calculated according to the first coefficient and the first confidence of the second category.

9. The video classification method according to claim 8, characterized in that: The calculating the first coefficient according to the title comprises: Matching the title of the video to be classified with the second category to obtain the number of times the name of each second category appears in the title; A first coefficient of each second category is calculated according to the number of times, wherein the first coefficient is inversely proportional to the number of times.

10. The video classification method according to any one of claims 4 to 9, characterized in that: Determining the classification result of the video to be classified according to the confidence of the second category includes: Get the classification threshold; comparing the confidence of the second category to the classification threshold; The second category whose confidence level is greater than the classification threshold is determined as the classification result of the video to be classified.

11. A video classification device, characterized in that: include: A video frame acquisition module, used to acquire multiple video frames of the video to be classified; A first classification module, configured to classify the plurality of video frames to obtain a first category of the plurality of video frames, wherein the first category includes object-external video frames and object-internal video frames; An external first classification vector acquisition module is used to identify the object according to the object external video frame to obtain a first classification vector of the object external video frame; the object external video frame includes the external features of the object; An internal first classification vector acquisition module is used to identify the object according to the internal video frame of the object to obtain a first classification vector of the internal video frame of the object; the internal video frame of the object includes the internal features of the object; A classification result determination module is used to determine the classification result of the video to be classified according to the first classification vector, wherein the first classification vector includes a first classification vector of the video frame outside the object and a first classification vector of the video frame inside the object.

12. An electronic device comprising: a memory for storing computer readable instructions; as well as A processor, configured to execute the computer-readable instructions, so that the processor implements the method according to any one of claims 1 to 10 when executed.

13. A non-transitory computer-readable storage medium for storing computer-readable instructions, which, when executed by a computer, causes the computer to perform the method of any one of claims 1 to 10.

Citation Information

Patent Citations

  • Identity authentication method and device based on face recognition

    CN110008673A

  • Video processing method and device

    CN112000842A