Video platform logo detection method, system and device based on combinatorial learning
By combining learning technology and combining target detection and text recognition models, the problem of poor performance of existing technologies in video platform logo detection is solved, achieving more efficient detection performance and wider applications.
Patent Information
- Application Number
- CN202210102952.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-27
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2042-01-27
AI Technical Summary
The existing technology has poor performance in detecting video platform logos, and methods based on a single target detection model are difficult to effectively handle complex video platform logos, resulting in a large number of misjudgments and missed determinations.
Using a method based on combinatorial learning, the target detection model and the text recognition model are used for combinatorial learning to establish a video platform logo detection system, including the construction of the video platform logo data set, the establishment of the icon detection model, icon detection and text recognition, using the combinatorial learning detection algorithm Combine results to improve detection accuracy.
It significantly improves the automatic detection performance of video platform logos, reduces false positives and missed detections, is suitable for more complex video platform logo detection tasks, and extends to other combined target detection tasks containing icons and text information.
Smart Images

Figure CN114663868B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision target detection, and in particular to a video platform logo detection method, system and device based on combinatorial learning. Background Art
[0002] Detecting video platform logos in a large number of images or videos on the Internet plays an important role in corresponding classification recommendations and copyright protection. The number of videos circulated on the Internet is huge, and it is difficult to achieve through manual detection. In recent years, object detection technology based on machine learning has developed rapidly and has been widely used. Therefore, the use of machine learning methods can efficiently and quickly detect objects in videos.
[0003] Video platform logos often consist of two parts: the platform icon and the platform text (see Figure 1 ). Since a single platform has a variety of icon styles, and the structure and changes of the text part are more complex, the detection results of directly applying mainstream object detection technology are poor, and there are a lot of misjudgments and missed judgments.
[0004] Prior art 1 proposes a logo detection method that is easy to quickly iterate and update, including building and training a logo detection model until convergence to obtain feature 1, which is used to predict the logo position in an unknown image; building and training an image classification network model until convergence to obtain feature 2, which is used to predict the logo class. This method adopts a two-step strategy of first positioning and then recognition.
[0005] Prior art 2 proposes a logo image recognition method and system based on machine learning. The purpose of this invention is to solve the manpower loss of logo retrieval and use machine learning methods to process a huge number of images with many graphics to be detected.
[0006] The above logo detection methods are all based on a single target detection model, which is not suitable for more complex detection targets such as video platform logos, and have poor results in video platform logo detection. At the same time, the target detection methods based on the above methods are relatively backward. Summary of the invention
[0007] The purpose of the present invention is to provide a video platform logo detection method, system and device based on combinatorial learning to solve the above problems.
[0008] To achieve the above object, the present invention adopts the following technical solutions:
[0009] The video platform logo detection method based on combinatorial learning includes the following steps:
[0010] Step 1: Take social media data as the object, obtain pictures and videos containing video platform logos, build a video platform logo dataset, extract frames from the obtained videos, mark the icon position and category corresponding to the logo in each picture / video frame, and obtain a video platform logo dataset;
[0011] Step 2: Icon detection model establishment: For the training data in the video platform logo dataset, the target detection algorithm is used as the icon detection model, and the trained model is denoted as Det;
[0012] Step 3, icon detection: Use the trained icon detection model Det, input the image or video frame I, and output the icon's location, category, and confidence score information;
[0013] Step 4, text recognition: Use optical character recognition technology as a text detection model, denoted as Text, input a picture or video frame I, and output the location and content information of the text;
[0014] Step 5, video platform logo detection: Use the combined learning detection algorithm to merge the results of steps 3 and 4, merge the results obtained by the icon detection model and the OCR model, and obtain the complete video platform logo detection results. The final output result set is denoted as H.
[0015] Furthermore, the icon refers to the portion without the logo text.
[0016] Furthermore, in step 3, icon detection, the image or video frame I is input into the icon detection model Det, and the result is recorded as:
[0017] B,C,S=Det(I)
[0018] Among them, B, C are ordered sets, representing the position and classification set of the detected icons; for each b i ∈B,b i =(x, y, w, h), indicating the position of the icon, (x, y, w, h) represent the coordinates of the upper left corner and the width and height of the position respectively; for each c i ∈C,c i ∈{1,…,N}, N represents the total number of icon categories; for each s i ∈S,c i ∈(0,1), indicating that the icon belongs to c i Confidence score of .
[0019] Furthermore, in step 4 text recognition, the picture or video frame I is input into the text recognition model Text, and the result is recorded as:
[0020] P,T=Text(I)
[0021] Among them, P and T are ordered sets, representing the detected text position and text content. P is similar to B. For each p i ∈P,p i =(x, y, w, h), indicating the position of the text; for each t i ∈T,t i Represents the content of the text.
[0022] Furthermore, in step 5, when merging, unreliable icon detection results are filtered out and results with low confidence scores are recycled.
[0023] Furthermore, step 5 is to detect the video platform logo. The specific steps are as follows:
[0024] (1) For each icon detection result b i ,c i ,s i , based on icon range b i Expand the text search range Q, using c i Find the text set T that needs to be matched by this category * ;in:
[0025] b i =(x,y,w,h)
[0026] Q=(x,y,kw,kh)
[0027] T * =Map(c i )
[0028] Map is a dictionary structure, which is a set of texts corresponding to each category; k is used to control the size of the expanded area;
[0029] (2) Find the appropriate text t in the search range Q i ; Search in P, T one by one, for each p i ,t i , when it satisfies p i falls within the Q range, and t i ∈T * When b i ,c i ,s i The icon detection result is reliable, otherwise it is an unreliable icon detection result;
[0030] (3) b i ,p i The frames are merged to obtain the area of the entire video platform logo, and the merged result is recorded as r i :
[0031] b i =(x 1 ,y 1 ,w 1 ,h 1 )
[0032] p i =(x 2 ,y 2 ,w 2 ,h 2 )
[0033] r i =(min(x 1 ,x 2 ),min(y 1 ,y 2 ),
[0034] w 1 +w 2 -|x 1 -x 2 |,h 1 +h 2 -|y 1 -y 2 |)
[0035] r i and c i The final result is composed of the positions and categories of the video platform logos, which are added to the final set H. For each h i ∈H,h i =(r i ,c i ).
[0036] Furthermore, the video platform logo detection system based on combinatorial learning includes:
[0037] The video platform logo dataset construction module is used to obtain pictures and videos containing video platform logos from social media data, construct a video platform logo dataset, extract frames from the obtained videos, mark the icon position and category corresponding to the logo in each picture / video frame, and obtain a video platform logo dataset;
[0038] The icon detection model building module is used to use the target detection algorithm as the icon detection model for the training data in the video platform logo dataset. The trained model is denoted as Det.
[0039] The icon detection module is used to use the trained icon detection model Det, input the image or video frame I, and output the icon's location, category, and confidence score information;
[0040] The text recognition module is used to use optical character recognition technology as a text detection model, denoted as Text, input a picture or video frame I, and output the location and content information of the text;
[0041] The video platform logo detection module is used to combine the icon detection and text recognition results using a combined learning detection algorithm to obtain a complete video platform logo detection result.
[0042] Furthermore, a computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of a video platform logo detection method based on combinatorial learning when executing the computer program.
[0043] Compared with the prior art, the present invention has the following technical effects:
[0044] The present invention improves the automatic detection of video platform logos in pictures and videos by combining the target detection model and the text detection and recognition (OCR) model for learning. First, an icon detection model is trained, and for the input picture or video frame, the model is used to detect the icons therein; then, the text detection and recognition (OCR) model is used to identify the text position and text content in the input picture or video frame; finally, the combined learning algorithm designed by the present invention is used to combine the icon and text detection results to obtain the final logo detection result. The present invention uses a combined detection strategy, which greatly improves the logo detection performance of the video platform, and has obvious advantages over other current logo detection methods.
[0045] Compared with the traditional method of treating logo detection as just a target detection task, the present invention uses a combined detection method, which is more effective in detecting logos on more complex video platforms, which makes the present invention more applicable in this scenario.
[0046] In addition to being applied to video platform logo detection, the present invention is applicable to almost all combined target detection tasks containing icon and text information. These similar tasks can all use combined detection algorithms, making the invention more widely applicable. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 This is an example of video platform logo detection.
[0048] Figure 2 This is a flow chart of the video platform logo detection method based on combinatorial learning.
[0049] Figure 3 It is the flow chart of the combined detection algorithm.
[0050] Figure 4 It is an implementation diagram of the logo recognition result of the present invention. DETAILED DESCRIPTION
[0051] The following is a detailed description of the embodiments of the present invention in conjunction with the accompanying drawings and embodiments. It should be noted that the embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the embodiments of the present invention can be combined with each other in the absence of conflict.
[0052] The specific implementation process of the present invention includes data set construction, icon detection model establishment, icon detection, text recognition and logo combination detection. Figure 2 It is a flow chart of the present invention.
[0053] 1. Construction process of video platform logo dataset
[0054] Taking social media data as the object, we obtain pictures and videos containing the logos of mainstream video platforms, extract frames from the obtained videos, annotate the icon position and category corresponding to the logo in each picture / video frame (the icon refers to the part without the logo text), organize the annotated results and training data, and save them in a json file according to the COCO annotation format. Finally, we get a dataset containing the logos of 13 mainstream video platforms, including Douyin, Kuaishou, Tencent Video, and Phoenix Video.
[0055] 2. Icon detection model building process
[0056] For the training data in the video platform logo dataset, FasterRCNN is used as the icon detection model, and the model is trained using the labeled data. The trained model is denoted as Det.
[0057] 3. Icon detection process
[0058] Using the trained icon detection model Det, the image or video frame I is input into the icon detection model Det, and the result is recorded as:
[0059] B, C, S = Det(I)
[0060] Among them, B and C are ordered sets, representing the position and classification set of the detected icons. i ∈B,b i =(x, y, w, h), indicating the position of the icon, (x, y, w, h) represent the coordinates of the upper left corner and the width and height of the position respectively. i ∈C, c i ∈{1,...,N}, where N represents the total number of icon categories. i∈S,c i ∈(0, 1), indicating the confidence score that the icon belongs to ci.
[0061] 4. Text Recognition Process
[0062] An open source and well-trained optical character recognition model (OCR) is used as a text detection model, denoted as Text. The image or video frame I is input into the text recognition model Text, and the result is recorded as:
[0063] P, T = Text(I)
[0064] Among them, P and T are ordered sets, representing the detected text position and text content. P is similar to B. For each p i ∈P,p i =(x, y, w, h), indicating the position of the text. i ∈T,t i Represents the content of the text.
[0065] 5. Logo combination detection process
[0066] The combined learning detection algorithm is used to merge the results obtained by the icon detection model and the OCR model. While obtaining the complete video platform logo detection results, some unreliable icon detection results are filtered out and some results with low confidence scores are recovered. The specific steps are:
[0067] (1) For each icon detection result b i , c i ,s i , based on the icon range b i Expand the text search range Q, using c i Find the text set T that needs to be matched by this category * .in:
[0068] b i =(x, y, w, h)
[0069] Q = (x, y, kw, kh)
[0070] T * =Map(c i )
[0071] Map is a dictionary structure, which is a set of texts corresponding to each category. k is used to control the size of the expanded area.
[0072] (2) Find the appropriate text t in the search range Q i . Search in P and T one by one, for each p i , t i, when it satisfies p i falls within the Q range, and t i ∈T * When b i , c i ,s i The icon detection result is reliable.
[0073] (3) b i , p i The frames are merged to obtain the area of the entire video platform logo, and the merged result is recorded as r i :
[0074] b i =(x 1 ,y 1 , w 1 ,h 1 )
[0075] p i =(x 2 ,y 2 , w 2 ,h 2 )
[0076] r i =(min(x 1 , x 2 ), min(y 1 ,y 2 ),
[0077] w 1 +w 2 -|x 1 -x 2 |,h 1 +h 2 -|y 1 -y 2 |)
[0078] r i and c i The final result is composed of the positions and categories of the video platform logos, which are added to the final set H. For each h i ∈H,h i =(r i , c i ).
[0079] Figure 4 An embodiment of the identification process of the present invention is shown.
[0080] In yet another embodiment of the present invention, a video platform logo detection system based on combinatorial learning is provided, which can be used to implement the above-mentioned video platform logo detection method based on combinatorial learning. Specifically, the video platform logo detection system based on combinatorial learning includes:
[0081] The video platform logo dataset construction module is used to obtain pictures and videos containing video platform logos from social media data, construct a video platform logo dataset, extract frames from the obtained videos, mark the icon position and category corresponding to the logo in each picture / video frame, and obtain a video platform logo dataset;
[0082] The icon detection model building module is used to use the target detection algorithm as the icon detection model for the training data in the video platform logo dataset. The trained model is denoted as Det.
[0083] The icon detection module is used to use the trained icon detection model Det, input the image or video frame I, and output the icon's location, category, and confidence score information;
[0084] The text recognition module is used to use optical character recognition technology as a text detection model, denoted as Text, input a picture or video frame I, and output the location and content information of the text;
[0085] The video platform logo detection module is used to combine the icon detection and text recognition results using a combined learning detection algorithm to obtain a complete video platform logo detection result.
[0086] In another embodiment of the present invention, a computer device is provided, the computer device including a processor and a memory, the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc., which are the computing core and control core of the terminal, which are suitable for implementing one or more instructions, and are specifically suitable for loading and executing one or more instructions in a computer storage medium to implement the corresponding method flow or corresponding function; the processor described in the embodiment of the present invention can be used for the operation of the video platform logo detection method based on combinatorial learning.
Claims
1. A video platform logo detection method based on combinatorial learning, characterized in that: The following steps are involved: Step 1: Take social media data as the object, obtain pictures and videos containing video platform logos, build a video platform logo dataset, extract frames from the obtained videos, mark the icon position and category corresponding to the logo in each picture / video frame, and obtain a video platform logo dataset; Step 2: Icon detection model establishment: For the training data in the video platform logo dataset, the target detection algorithm is used as the icon detection model, and the trained model is denoted as Det; Step 3, icon detection: Use the trained icon detection model Det, input the image or video frame I, and output the icon's location, category, and confidence score information; Step 4, text recognition: Use optical character recognition technology as a text detection model, denoted as Text, input a picture or video frame I, and output the location and content information of the text; Step 5, video platform logo detection: Use the combined learning detection algorithm to merge the results of step 3 and step 4, merge the results obtained by the icon detection model and the OCR model, and obtain the complete video platform logo detection result. The final output result set is recorded as H; In step 5, when merging, unreliable icon detection results are filtered out and results with low confidence scores are recycled; Step 5: Video platform logo detection. The specific steps are as follows: (1) For each icon detection result b i ,c i ,s i , based on icon range b i Expand the text search range Q, using c i Find the text set T that needs to be matched by this category * ;in: b i =(x,y,w,h) Q=(x,y,kw,kh) T * =Map(c i ) Map is a dictionary structure, which is a set of texts corresponding to each category; k is used to control the size of the expanded area; (2) Find the appropriate text t in the search range Q i ; Search in P, T one by one, for each p i ,t i , when it satisfies p i falls within the Q range, and t i ∈T * When b i ,c i ,s i The icon detection result is reliable, otherwise it is an unreliable icon detection result; (3) b i ,p i The frames are merged to obtain the area of the entire video platform logo, and the merged result is recorded as r i : b i =(x1,y1,w1,h1) p i =(x2,y2,w2,h2) r i =(min(x1,x2),min(y1,y2), w1+w2-|x1-x2|,h1+h2-|y1-y2|) r i and c i The final result is composed of the positions and categories of the video platform logos, which are added to the final set H. For each h i ∈H,h i =(r i ,c i ).
2. The video platform logo detection method based on combinatorial learning according to claim 1 is characterized in that: The icon refers to the part without the logo text.
3. The video platform logo detection method based on combinatorial learning according to claim 1, characterized in that: In step 3, icon detection, the image or video frame I is input into the icon detection model Det, and the result is recorded as: B,C,S=Det(I) Among them, B, C are ordered sets, representing the position and classification set of the detected icons; for each b i ∈B,b i =(x, y, w, h), indicating the position of the icon, (x, y, w, h) represent the coordinates of the upper left corner and the width and height of the position respectively; for each c i ∈C,c i ∈{1,…,N}, N represents the total number of icon categories; for each s i ∈S,c i ∈(0,1), indicating that the icon belongs to c i Confidence score of .
4. The video platform logo detection method based on combinatorial learning according to claim 1, characterized in that: In step 4, in text recognition, the image or video frame I is input into the text recognition model Text, and the result is recorded as: P,T=Text(I) Among them, P and T are ordered sets, representing the detected text position and text content. P is similar to B. For each p i ∈P,p i =(x, y, w, h), indicating the position of the text; for each t i ∈T,t i Represents the content of the text.
5. The video platform logo detection system based on combinatorial learning is characterized by: include: The video platform logo dataset construction module is used to obtain pictures and videos containing video platform logos from social media data, construct a video platform logo dataset, extract frames from the obtained videos, mark the icon position and category corresponding to the logo in each picture / video frame, and obtain a video platform logo dataset; The icon detection model building module is used to use the target detection algorithm as the icon detection model for the training data in the video platform logo dataset. The trained model is denoted as Det. The icon detection module is used to use the trained icon detection model Det, input the image or video frame I, and output the icon's location, category, and confidence score information; The text recognition module is used to use optical character recognition technology as a text detection model, denoted as Text, input a picture or video frame I, and output the location and content information of the text; The video platform logo detection module is used to combine the icon detection and text recognition results using a combined learning detection algorithm to obtain a complete video platform logo detection result; When merging, unreliable icon detection results are filtered out and results with low confidence scores are recycled; Video platform logo detection, the specific steps are: (1) For each icon detection result b i ,c i ,s i , based on icon range b i Expand the text search range Q, using c i Find the text set T that needs to be matched by this category * ;in: b i =(x,y,w,h) Q=(x,y,kw,kh) T * =Map(c i ) Map is a dictionary structure, which is a set of texts corresponding to each category; k is used to control the size of the expanded area; (2) Find the appropriate text t in the search range Q i ; Search in P, T one by one, for each p i ,t i , when it satisfies p i falls within the Q range, and t i ∈T * When b i ,c i ,s i The icon detection result is reliable, otherwise it is an unreliable icon detection result; (3) b i ,p i The frames are merged to obtain the area of the entire video platform logo, and the merged result is recorded as r i : b i =(x1,y1,w1,h1) p i =(x2,y2,w2,h2) r i =(min(x1,x2),min(y1,y2), w1+w2-|x1-x2|,h1+h2-|y1-y2|) r i and c i The final result is composed of the positions and categories of the video platform logos, which are added to the final set H. For each h i ∈H,h i =(r i ,c i ).
6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the video platform logo detection method based on combinatorial learning as described in any one of claims 1 to 4 are implemented.
