Automobile video high-quality cover identification system
Through the car video high-quality cover recognition system, the yolo-v5 model and data enhancement algorithm are used, combined with three-element detection and low-quality filtering technology, to solve the neglect of the composition and layout of image elements in the existing technology, and achieve high-quality video covers Automatic identification and filtering improve user experience and retention rate.
Patent Information
- Application Number
- CN202410741055.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2024-10-01
AI Technical Summary
When existing automotive multimedia websites identify high-quality video covers, they lack consideration for the composition and layout of image elements, especially the effective combination of the three elements of cars, people, and text. This makes it difficult to automatically screen out high-quality images of beautiful women, affecting the user experience. and click-through rate.
A high-quality car video cover recognition system is used. Through data set preparation and processing, the yolo-v5 model is used for object detection and text detection. The three-element detection model is trained with a data enhancement algorithm to screen out high-quality covers containing people, cars and text. High-quality cover and low-quality element filtering to ensure the effective combination of image elements and overall composition beauty.
It realizes automatic and batch processing of high-quality video cover recognition and filtering, improves user experience and client retention rate, saves manual resources, is innovative and flexible, and is suitable for automotive multimedia websites.
Smart Images

Figure CN118736458A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of cover recognition systems, and in particular relates to a high-quality cover recognition system for automobile videos. Background Art
[0002] With the development of the Internet, automotive multimedia websites provide users with a channel to quickly obtain effective information. Users and editors are uploading a large amount of video information every day. How automotive multimedia websites can accurately locate and identify high-quality videos has received increasing attention.
[0003] In addition to eye-catching titles, high-quality videos must also have attractive cover images. Cover images make it easier for users to quickly understand important information about the video, thereby increasing user click-through rates and retention rates. High-quality cover images not only have a single element of a car, but also need to include factors such as people and text titles of introductions. In addition, it also involves the issue of how to filter low-quality cover images, such as those with black edges or blurs. Most websites now evaluate the overall quality of images and select high-quality images without considering the composition and layout of the image elements. Especially for car editing websites, the effective combination of the three elements of cars, people, and text is the key to a high-quality cover. In particular, text can summarize the theme information of the video, and high-quality character elements can also bring visual impact and increase the beauty of the entire image. With millions of videos, it is particularly important to get rid of manual work and intelligently select high-quality images of beautiful women, so it needs to be improved. Summary of the invention
[0004] The purpose of the present invention is to provide a high-quality cover recognition system for automobile videos to solve the problems raised in the above-mentioned background technology.
[0005] In order to achieve the above-mentioned purpose, the present invention provides the following technical solution: a high-quality cover recognition system for automobile videos, the specific steps are as follows:
[0006] Step 1: Dataset preparation
[0007] Collect video cover dataset D = [I1, I2, ..., I n ], where I i Represents the cover image of a certain video, collects the public text detection dataset T = [T1, T2, ..., T p ], where each image is manually annotated with the location information of the text box, denoted as boxT = [boxT1, boxT2, …, boxT p ], where boxT i Defines the coordinate points of the upper left corner and lower right corner of the box;
[0008] Step 2: Dataset D processing
[0009] The dataset D is fed into the YOLO-V5 model trained on the public dataset COCO for object detection and recognition. Taking image I1 as an example, the detection box, score and category information of 80 types of targets are obtained, which are recorded as box = [b1, b2, …, b m ], score=[s1,s2,…,s m ]、class=[c1,c2,…,c m ], filter the score s i >0.5 and category c i ∈[person, car] detection box, and finally obtain the new target detection box and category information as boxN=[b1,b2,…,b t ]、class=[c1,c2,…,c t ], and so on, repeating the above process for all images in the dataset D, we can get the pre-annotated elements "person" and "car" D of all images res =[(boxN1,class1),(boxN2,class2),…(boxN n ,class n )], where (boxN i ,class i ) represents I i The corresponding preprocessing result, which may be empty or not;
[0010] Step 3: Processing of text dataset T
[0011] Similarly, perform the steps in step 2 for all images in dataset T to obtain the boxes and category information of the pre-annotated elements "person" and "car" in dataset T, denoted as T res =[(boxN1,class1),(boxN2,class2),…(boxN p ,class p )], where (boxN i ,class i ) represents the image T i Preprocessing result, this result may be empty or not;
[0012] Step 4: Train the initial text detection model
[0013] The public text detection dataset T and its corresponding boxT are divided into a training set Tr and a validation set Tv, and sent to the neural network yolo-v5 for text detection model training to obtain the initial version of the text detection model Mt;
[0014] Step 5: Pre-label the “text” boxes of dataset D
[0015] The data set D = [I1, I2, ..., I n ] is sent to the model Mt in step 4 for text detection. Taking I1 as an example, the position and score of the text detection box in image I1 are obtained, which is recorded as bt = [bt1, bt2, ..., bt q ]、score=[st1,st2,…,st q ], select the score st i >0.5, the text detection position corresponding to the final image I1 is recorded as boxT = [b1, b2, ..., b o ]; and so on, the above process is performed on all images of dataset D to obtain the text box position corresponding to dataset D, which is recorded as:
[0016] D t-res =[(boxT1,class),(boxN2,class),…(boxT n ,class)]
[0017] The class category is "text";
[0018] Step 6: Merge pre-labeled datasets
[0019] The result D of the dataset D in step 2 res and the result D in step 5 t-res By merging, we can get the location boxes of the three elements of "person", "car" and "text" corresponding to each image in the dataset D and the categories corresponding to the boxes, which are recorded as:
[0020] D gt =[(boxF1,cls1),(boxF2,cls2),…(boxF n ,cls n )]
[0021] Where boxF i Corresponding to a series of annotation boxes, cls i Category information corresponding to each box;
[0022] Similarly, the result T of “person” and “car” pre-labeled in step 3 of the dataset T res Merge it with the annotated "text" box result boxT in step 1 to obtain the position boxes of the three elements "person", "car" and "text" pre-annotated in the dataset T and their corresponding category information, recorded as:
[0023] T gt =[(boxF1,cls1),(boxF2,cls2),…(boxF p ,cls p )]
[0024] Merge the datasets D and T to obtain the final dataset F = [I1, I2, …, I m ], where m = p + n, and its corresponding three-element position frame and category (see Appendix Figure 2 As shown), recorded as:
[0025] F gt =[(boxF1,cls1),(boxF2,cls2),…(boxF m ,cls m )]
[0026] Step 7: Three-element detection model training
[0027] The data set F is divided into the training set F according to the ratio of 8:2. tr and validation set F tv ;
[0028] In the training phase, the yolo-v5 framework is used as the basic model, and the data enhancement algorithm is introduced to process the data, and it is continuously iterated until the optimal model M is obtained. F ;
[0029] In the testing phase, the image is sent to M F , output the box and score of each element;
[0030] Step 8: Three-element detection
[0031] Send the image I to be identified into the model M in step seven F , get the detection box, score and category of the three elements, record I res =[(b1,s1,c1),(b2,s2,c2),…(b z ,s z ,c z )], its b i represents the detection box, s i is the score of the corresponding box, c i For categories;
[0032] ①Retain i >0.5, get the new result I res_n =[(b1,s1,c1),(b2,s2,c2),…(b t ,s t ,c t )];
[0033] ②Category merging: (c1,c2,…,c t) Perform category deduplication and obtain category set C. If "person", "car" and "text" are all in set C, then image I contains three elements and proceed to the next step; otherwise, image I does not meet the three-element condition and is assigned a low-quality image, ending;
[0034] Step 9: Filter out low-quality text
[0035] There are three types of low-quality text in the cover image. The first is watermark text; the second is text on the car body, clothing, etc.; the third is too small text, which is not the video title related text added by the editor later (the low-quality text filtering flowchart is as attached in the manual). Figure 3 As shown), replace I in step eight res_n The box is split according to the three-element category, where the "text" set is recorded as sumT = [b1, b2..., b k ], the set of “people” is recorded as sumP=[b1,b2…,b j ], the “car” set is recorded as sumC=[b1,b2…,b e ], assuming that the length and width of the image I to be identified in step eight are h and w respectively;
[0036] ① Watermark text filtering: Take the first box b1 in sumT = [(x min ,y min ),(x max ,y max )] as an example, where (x max ,y max ) represents the point in the lower right corner, (x min ,y min ) represents the upper left corner. If y min / h<0.05 and y max / h>0.1, it means that this frame belongs to the text frame at the watermark position and needs to be removed from sumT; otherwise, it is retained without processing. Similarly, the above steps are performed for all frames in sumT to obtain the filtered text frame set sumT1=[b1,b2…,b k1 ], the watermark filtering here takes the upper right corner as an example, and the parameters can be modified according to the specific application scenario to filter watermarks in other locations;
[0037] ② Filter the car body text, clothing text, etc. The characteristic of this type of text is that the text box is completely inside the other two element boxes. Merge the boxes of sumP and sumC to get sumPC = [b1, b2…, b e+j ], taking the i-th frame of sumT1 as an example b i =[(x T-min ,y T-min ),(x T-max ,y T-max)], traverse all the boxes in sumPC, if there is a box in sumPC, record it as b r =[(x PC-min ,y PC-min ),(x PC-max ,y PC-max )], satisfying x PC-min <x T-min And y PC-min <y T-min And x PC-max >x T-max And y PC-max >x T-max These four conditions, then b i The text boxes are low-quality and are filtered out; otherwise, they are retained. Similarly, all the boxes in sumT1 are traversed to obtain sumT2 = [b1, b2…, b k2 ];
[0038] ③ Filter small text, using b in sumT2 i =[(x min ,y min ),(x max ,y max )] as an example, calculate the area of the box area = (x max -x min )×(y max -y min ), if h×w / area>θ, then b i The low-quality text boxes are filtered out; otherwise, they are retained. Similarly, all the boxes in sumT2 are traversed to obtain sumT3 = [b1, b2…, b k3 ], if sumT3 is empty, image I is a low-quality image and no subsequent steps are performed; otherwise, proceed to the next step for processing;
[0039] Step 10: Filter out low-quality cars
[0040] The “car” detection box set sumC of image I = [b1, b2…, b e ] as an example:
[0041] ① When e=1, it means that the two-element definition of bicycle and text is met, and proceed to the next step;
[0042] ② When e>1, there are multiple cars, processing logic: calculate sumC = [b1, b2…, b e ]The area of each box is recorded as areaC = [area1, area2…, area e ], calculate the maximum value of areaC and record it as area max , the corresponding box is assumed to be bmax =[(x cmin ,y cmin ),(x cmax ,y cmax )],if and And θ1 <area max <θ2, that is, the center point of the entire image is located inside the car and the maximum frame ratio cannot be too large or too small. Here, θ1 and θ2 can be changed according to specific needs. The empirical threshold is θ1=(h×w) / 5, θ2=(4×h×w) / 5. If the above conditions are met, proceed to the next step; otherwise, image I is a low-quality image and no subsequent processing is performed;
[0043] Step 11: Filter out low-quality people
[0044] We collected high-quality datasets of people, cars and text, and low-quality datasets. Low-quality datasets include those with poor composition, too low proportion of people, and artificial backgrounds. High-quality images were divided into two categories: people and cars as a whole, and people sitting in cars. Both of these categories contain text elements. Finally, we obtained training and test sets containing three categories. In the training phase, we introduced data enhancement algorithms such as mirroring and upside-down flipping based on the ResNet network, and used the cross entropy loss function to update the model gradient. We iterated continuously until we got the optimal model M. pcls ; In the testing phase, image I is sent to M pcls , if I belongs to the low-quality category, the condition is not satisfied and the image is discarded; otherwise, the output image I is a high-quality image.
[0045] Preferably, in the detection box of [person, car] described in step 2, the "car" category corresponds to the "automobile" and "truck" categories of the 80-category coco dataset.
[0046] Preferably, the text detection model Mt described in step 4 can predict the position and score of text in the image through this model.
[0047] Preferably, the data enhancement algorithm described in step seven includes random shearing, random flipping, deformation scaling, etc.
[0048] Preferably, the θ mentioned in step nine is an empirical threshold, wherein the empirical threshold is set to 400.
[0049] Preferably, the low-quality "person" described in step eleven does not refer to the quality of the detected portrait. For example, although some faces are unclear, the overall three-element composition pattern meets the high-quality requirements. It is necessary to judge whether the "person" meets the high-quality characteristics based on the image composition.
[0050] Preferably, in the high-quality video cover described in step 10, the "car" satisfies two conditions: the first is a single car; the second is multiple cars, but the largest car is the main body.
[0051] The beneficial effects of the present invention are as follows:
[0052] By detecting the three elements of "people", "cars" and "text", we can filter out covers with rich elements. At the same time, we can filter out the three low-quality elements by combining the overall composition of the image and the position of the elements, assist in recommending and pushing high-quality video content, optimize the car display page, improve the user experience and increase the client retention rate. When uploading a new batch of videos on the car website, we only need to upload the video cover to the real-time interface of the system, detect the three elements and filter out the element boxes with low scores. If there are three-element boxes, we will filter out the text boxes with low quality and remove the background or irrelevant text. If the text box set is not empty, we will filter out the low-quality cars. Depending on whether the car set is empty, we can choose whether to filter the low-quality people. Finally, we will traverse all historical databases, refresh the database labels, and filter out high-quality car video covers. It has the characteristics of automation, batch processing, and labor saving. It has certain innovation and flexibility on car multimedia websites and brings good commercial value. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a schematic diagram of the overall process of the present invention;
[0054] Figure 2 This is a schematic diagram of the data preprocessing process of the present invention;
[0055] Figure 3 It is a schematic diagram of the low-quality text filtering process of the present invention. DETAILED DESCRIPTION
[0056] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0057] like Figures 1 to 3 As shown, the embodiment of the present invention provides a high-quality cover recognition system for automobile videos, and the specific steps are as follows:
[0058] Step 1: Dataset preparation
[0059] Collect video cover dataset D = [I1, I2, ..., I n ], where I iRepresents the cover image of a certain video, collects the public text detection dataset T = [T1, T2, ..., T p ], where each image is manually annotated with the location information of the text box, denoted as boxT = [boxT1, boxT2, …, boxT p ], where boxT i Defines the coordinate points of the upper left corner and lower right corner of the box;
[0060] Step 2: Dataset D processing
[0061] The dataset D is fed into the YOLO-V5 model trained on the public dataset COCO for object detection and recognition. Taking image I1 as an example, the detection box, score and category information of 80 types of targets are obtained, which are recorded as box = [b1, b2, …, b m ], score=[s1,s2,…,s m ]、class=[c1,c2,…,c m ], filter the score s i >0.5 and category c i ∈[person, car] detection box, and finally obtain the new target detection box and category information as boxN=[b1,b2,…,b t ]、class=[c1,c2,…,c t ], and so on, repeating the above process for all images in the dataset D, we can get the pre-annotated elements "person" and "car" D of all images res =[(boxN1,class1),(boxN2,class2),…(boxN n ,class n )], where (boxN i ,class i ) represents I i The corresponding preprocessing result, which may be empty or not;
[0062] Step 3: Processing of text dataset T
[0063] Similarly, perform the steps in step 2 for all images in dataset T to obtain the boxes and category information of the pre-annotated elements "person" and "car" in dataset T, denoted as T res =[(boxN1,class1),(boxN2,class2),…(boxN p ,class p )], where (boxN i ,class i ) represents the image T i Preprocessing result, this result may be empty or not;
[0064] Step 4: Train the initial text detection model
[0065] The public text detection dataset T and its corresponding boxT are divided into a training set Tr and a validation set Tv, and sent to the neural network yolo-v5 for text detection model training to obtain the initial version of the text detection model Mt;
[0066] Step 5: Pre-label the “text” boxes of dataset D
[0067] The data set D = [I1, I2, ..., I n ] is sent to the model Mt in step 4 for text detection. Taking I1 as an example, the position and score of the text detection box in image I1 are obtained, which is recorded as bt = [bt1, bt2, ..., bt q ]、score=[st1,st2,…,st q ], select the score st i >0.5, the text detection position corresponding to the final image I1 is recorded as boxT = [b1, b2, ..., b o ]; and so on, the above process is performed on all images of dataset D to obtain the text box position corresponding to dataset D, which is recorded as:
[0068] D t-res =[(boxT1,class),(boxN2,class),…(boxT n ,class)]
[0069] The class category is "text";
[0070] Step 6: Merge pre-labeled datasets
[0071] The result D of the dataset D in step 2 res and the result D in step 5 t-res By merging, we can get the location boxes of the three elements of "person", "car" and "text" corresponding to each image in the dataset D and the categories corresponding to the boxes, which are recorded as:
[0072] D gt =[(boxF1,cls1),(boxF2,cls2),…(boxF n ,cls n )]
[0073] Where boxF i Corresponding to a series of annotation boxes, cls i Category information corresponding to each box;
[0074] Similarly, the result T of “person” and “car” pre-labeled in step 3 of the dataset T res Merge it with the annotated "text" box result boxT in step 1 to obtain the position boxes of the three elements "person", "car" and "text" pre-annotated in the dataset T and their corresponding category information, recorded as:
[0075] T gt =[(boxF1,cls1),(boxF2,cls2),…(boxF p ,cls p )]
[0076] Merge the datasets D and T to obtain the final dataset F = [I1, I2, …, I m ], where m = p + n, and its corresponding three-element position frame and category (see Appendix Figure 2 As shown), recorded as:
[0077] F gt =[(boxF1,cls1),(boxF2,cls2),…(boxF m ,cls m )]
[0078] Step 7: Three-element detection model training
[0079] The data set F is divided into the training set F according to the ratio of 8:2. tr and validation set F tv ;
[0080] In the training phase, the yolo-v5 framework is used as the basic model, and the data enhancement algorithm is introduced to process the data, and it is continuously iterated until the optimal model M is obtained. F ;
[0081] In the testing phase, the image is sent to M F , output the box and score of each element;
[0082] Step 8: Three-element detection
[0083] Send the image I to be identified into the model M in step seven F , get the detection box, score and category of the three elements, record I res =[(b1,s1,c1),(b2,s2,c2),…(b z ,s z ,c z )], its b i represents the detection box, s i is the score of the corresponding box, c i For categories;
[0084] ①Retaini >0.5, get the new result I res_n =[(b1,s1,c1),(b2,s2,c2),…(b t ,s t ,c t )];
[0085] ②Category merging: (c1,c2,…,c t ) Perform category deduplication and obtain category set C. If "person", "car" and "text" are all in set C, then image I contains three elements and proceed to the next step; otherwise, image I does not meet the three-element condition and is assigned a low-quality image, ending;
[0086] Step 9: Filter out low-quality text
[0087] There are three types of low-quality text in the cover image. The first is watermark text; the second is text on the car body, clothing, etc.; the third is too small text, which is not the video title related text added by the editor later (the low-quality text filtering flowchart is as attached in the manual). Figure 3 As shown), replace I in step eight res_n The box is split according to the three-element category, where the "text" set is recorded as sumT = [b1, b2..., b k ], the set of “people” is recorded as sumP=[b1,b2…,b j ], the “car” set is recorded as sumC=[b1,b2…,b e ], assuming that the length and width of the image I to be identified in step eight are h and w respectively;
[0088] ① Watermark text filtering: Take the first box b1 in sumT = [(x min ,y min ),(x max ,y max )] as an example, where (x max ,y max ) represents the point in the lower right corner, (x min ,y min ) represents the upper left corner. If y min / h<0.05 and y max / h>0.1, it means that this frame belongs to the text frame at the watermark position and needs to be removed from sumT; otherwise, it is retained without processing. Similarly, the above steps are performed for all frames in sumT to obtain the filtered text frame set sumT1=[b1,b2…,b k1 ], the watermark filtering here takes the upper right corner as an example, and the parameters can be modified according to the specific application scenario to filter watermarks in other locations;
[0089] ② Filter the car body text, clothing text, etc. The characteristic of this type of text is that the text box is completely inside the other two element boxes. Merge the boxes of sumP and sumC to get sumPC = [b1, b2…, b e+j ], taking the i-th frame of sumT1 as an example b i =[(x T-min ,y T-min ),(x T-max ,y T-max )], traverse all the boxes in sumPC, if there is a box in sumPC, record it as b r =[(x PC-min ,y PC-min ),(x PC-max ,y PC-max )], satisfying x PC-min <x T-min And y PC-min <y T-min And x PC-max >x T-max And y PC-max >x T-max These four conditions, then b i The text boxes are low-quality and are filtered out; otherwise, they are retained. Similarly, all the boxes in sumT1 are traversed to obtain sumT2 = [b1, b2…, b k2 ];
[0090] ③ Filter small text, using b in sumT2 i =[(x min ,y min ),(x max ,y max )] as an example, calculate the area of the box area = (x max -x min )×(y max -y min ), if h×w / area>θ, then b i The low-quality text boxes are filtered out; otherwise, they are retained. Similarly, all the boxes in sumT2 are traversed to obtain sumT3 = [b1, b2…, b k3 ], if sumT3 is empty, image I is a low-quality image and no subsequent steps are performed; otherwise, proceed to the next step for processing;
[0091] Step 10: Filter out low-quality cars
[0092] The “car” detection box set sumC of image I = [b1, b2…, b e ] as an example:
[0093] ① When e=1, it means that the two-element definition of bicycle and text is met, and proceed to the next step;
[0094] ② When e>1, there are multiple cars, processing logic: calculate sumC = [b1, b2…, b e ]The area of each box is recorded as areaC = [area1, area2…, area e ], calculate the maximum value of areaC and record it as area max , the corresponding box is assumed to be b max =[(x cmin ,y cmin ),(x cmax ,y cmax )],if and And θ1 <area max <θ2, that is, the center point of the entire image is located inside the car and the maximum frame ratio cannot be too large or too small. Here, θ1 and θ2 can be changed according to specific needs. The empirical threshold is θ1=(h×w) / 5, θ2=(4×h×w) / 5. If the above conditions are met, proceed to the next step; otherwise, image I is a low-quality image and no subsequent processing is performed;
[0095] Step 11: Filter out low-quality people
[0096] We collected high-quality datasets of people, cars and text, and low-quality datasets. Low-quality datasets include those with poor composition, too low proportion of people, and artificial backgrounds. High-quality images were divided into two categories: people and cars as a whole, and people sitting in cars. Both of these categories contain text elements. Finally, we obtained training and test sets containing three categories. In the training phase, we introduced data enhancement algorithms such as mirroring and upside-down flipping based on the ResNet network, and used the cross entropy loss function to update the model gradient. We iterated continuously until we got the optimal model M. pcls ; In the testing phase, image I is sent to M pcls , if I belongs to the low-quality category, the condition is not satisfied and the image is discarded; otherwise, the output image I is a high-quality image.
[0097] The data preprocessing module saves manpower and avoids tedious and repetitive work by making public models and data sets, and pre-labeling training sets and test sets. The main three-element detection module can quickly detect the position and category information of the three main elements of people, cars, and text through deep learning. The low-quality image filtering module can filter out low-quality three elements, such as license plate text, small people, incomplete car bodies, etc., so that videos with high-quality covers can be screened out from batches of videos and recommended to users.
[0098] Among them, the detection box of [person, car] in step 2, where the "car" category corresponds to the "car" and "truck" categories of the 80-category coco dataset.
[0099] By refining the "car" category, the recognition result can be more detailed.
[0100] Among them, the text detection model Mt in step 4 can predict the location and score of the text in the image through this model.
[0101] Through training, the initial version of the text detection model Mt is obtained, which lays a good foundation for the subsequent three-element detection model.
[0102] Among them, the data enhancement algorithms in step seven include random shearing, random flipping, deformation scaling, etc.
[0103] Through data enhancement algorithms, limited data can produce value equivalent to more data without substantially increasing the data, thereby improving the training effect of the model.
[0104] Among them, θ in step nine is the empirical threshold, and the empirical threshold is set to 400.
[0105] The setting of the experience threshold is not fixed and can be changed according to the application scenario requirements during actual use.
[0106] The low-quality "person" in step 11 does not refer to the quality of the detected portrait. For example, although some faces are not clear, the overall three-element composition pattern meets the high-quality requirements. It is necessary to judge whether the "person" meets the high-quality characteristics based on the image composition.
[0107] By combining the overall three-element composition pattern to judge the quality of the portrait, we can avoid some unclear portraits affecting the overall quality of the picture.
[0108] Among them, in the high-quality video cover in step ten, "car" meets two conditions: the first is a single car; the second is multiple cars, but the largest car is the main body.
[0109] By setting the "car" situation of the high-quality video cover, high-quality and low-quality cars can be accurately identified.
[0110] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0111] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A high-quality cover recognition system for automobile videos, characterized by: The specific steps are as follows: Step 1: Dataset preparation Collect video cover dataset D = [I1, I2, ..., I n ], where I i Represents the cover image of a certain video, collects the public text detection dataset T = [T1, T2, ..., T p ], where each image is manually annotated with the location information of the text box, denoted as boxT = [boxT1, boxT2, …, boxT p ], where boxT i Defines the coordinate points of the upper left corner and lower right corner of the box; Step 2: Dataset D processing The dataset D is fed into the YOLO-V5 model trained on the public dataset COCO for object detection and recognition. Taking image I1 as an example, the detection box, score and category information of 80 types of targets are obtained, which are recorded as box = [b1, b2, …, b m ], score=[s1,s2,…,s m ]、class=[c1,c2,…,c m ], filter the score s i >0.5 and category c i ∈[person, car] detection box, and finally obtain the new target detection box and category information as boxN=[b1,b2,…,b t ]、class=[c1,c2,…,c t ], and so on, repeating the above process for all images in the dataset D, we can get the pre-annotated elements "person", "car" D of all images res =[(boxN1,class1),(boxN2,class2),…(boxN n ,class n )], where (boxN i ,class i ) represents I i The corresponding preprocessing result, which may be empty or not; Step 3: Processing of text dataset T Similarly, perform the steps in step 2 for all images in dataset T to obtain the boxes and category information of the pre-annotated elements "person" and "car" in dataset T, denoted as T res =[(boxN1,class1),(boxN2,class2),…(boxN p ,class p )], where (boxN i ,class i ) represents the image T i Preprocessing result, this result may be empty or not; Step 4: Train the initial text detection model The public text detection dataset T and its corresponding boxT are divided into a training set Tr and a validation set Tv, and sent to the neural network yolo-v5 for text detection model training to obtain the initial version of the text detection model Mt; Step 5: Pre-label the "text" boxes of dataset D The data set D = [I1, I2, ..., I n ] is sent to the model Mt in step 4 for text detection. Taking I1 as an example, the position and score of the text detection box in image I1 are obtained, which is recorded as bt = [bt1, bt2, ..., bt q ]、score=[st1,st2,…,st q ], select the score st i >0.5, the text detection position corresponding to the final image I1 is recorded as boxT = [b1, b2, ..., b o ]; and so on, the above process is performed on all images of dataset D to obtain the text box position corresponding to dataset D, which is recorded as: D t-res =[(boxT1,class),(boxN2,class),…(boxT n ,class)] The class category is "text"; Step 6: Merge pre-labeled datasets The result D of the dataset D in step 2 res and the result D in step 5 t-res By merging, we can get the location boxes of the three elements "person", "car" and "text" corresponding to each image in the dataset D and the categories corresponding to the boxes, which are recorded as: D gt =[(boxF1,cls1),(boxF2,cls2),…(boxF n ,cls n )] Where boxF i Corresponding to a series of annotation boxes, cls i Category information corresponding to each box; Similarly, the result T of the pre-labeled "person" and "car" in the dataset T in step 3 is res Merge it with the labeled "text" box result boxT in step 1 to obtain the position boxes of the three elements "person", "car" and "text" pre-labeled in the data set T and their corresponding category information, recorded as: T gt =[(boxF1,cls1),(boxF2,cls2),…(boxF p ,cls p )] Merge the datasets D and T to obtain the final dataset F = [I1, I2, …, I m ], where m = p + n, and its corresponding three-element position frame and category (as shown in Figure 2 of the specification), are recorded as: F gt =[(boxF1,cls1),(boxF2,cls2),…(boxF m ,cls m )] Step 7: Three-element detection model training The data set F is divided into the training set F according to the ratio of 8:
2. tr and validation set F tv ; In the training phase, the yolo-v5 framework is used as the basic model, and the data enhancement algorithm is introduced to process the data, and it is continuously iterated until the optimal model M is obtained. F ; In the testing phase, the image is sent to M F , output the box and score of each element; Step 8: Three-element detection Send the image I to be identified into the model M in step seven F , get the detection box, score and category of the three elements, record I res =[(b1,s1,c1),(b2,s2,c2),…(b z ,s z ,c z )], its b i represents the detection box, s i is the score of the corresponding box, c i For categories; ①Retain i >0.5, get the new result I res_n =[(b1,s1,c1),(b2,s2,c2),…(b t ,s t ,c t )]; ②Category merging: (c1,c2,…,c t ) to obtain a category set C. If "person", "car" and "text" are all in set C, then image I contains three elements and the process proceeds to the next step. Otherwise, image I does not meet the three-element condition and is assigned a low-quality image, and the process ends. Step 9: Filter out low-quality text In the cover image, there are three types of low-quality texts. The first is watermark text; The second is the car body text, clothing text, etc.; The third is too small text, which is not the video title related text added by the editor (the low-quality text filtering flow chart is shown in Figure 3 of the specification). res_n The box is split according to the three-element category, where the "text" set is recorded as sumT = [b1, b2..., b k ], the "person" set is recorded as sumP = [b1, b2…, b j ], the "car" set is recorded as sumC = [b1,b2…,b e ], assuming that the length and width of the image I to be identified in step eight are h and w respectively; ① Watermark text filtering: Take the first box b1 in sumT = [(x min ,y min ),(x max ,y max )] as an example, where (x max ,y max ) represents the point in the lower right corner, (x min ,y min ) represents the upper left corner. If y min / h<0.05 and y max / h>0.1, it means that this frame belongs to the text frame at the watermark position and needs to be removed from sumT; otherwise, it is retained without processing. Similarly, the above steps are performed for all frames in sumT to obtain the filtered text frame set sumT1=[b1,b2…,b k1 ], the watermark filtering here takes the upper right corner as an example, and the parameters can be modified according to the specific application scenario to filter watermarks in other locations; ② Filtering of car body text, clothing text, etc. The characteristic of this type of text is that the text box is completely inside the other two element boxes. Merge the boxes of sumP and sumC to get sumPC = [b1, b2…, b e+j ], taking the i-th frame of sumT1 as an example b i =[(x T-min ,y T-min ), (x T-max ,y T-max )], traverse all the boxes in sumPC, if there is a box in sumPC, record it as b r =[(x PC-min ,y PC-min ), (x PC-max ,y PC-max )], satisfying x PC-min <x T-min And y PC-min <y T-min And x PC-max >x T-max And y PC-max >x T-max These four conditions, then b i The text boxes are low-quality and are filtered out; otherwise, they are retained. Similarly, all the boxes in sumT1 are traversed to obtain sumT2 = [b1, b2…, b k2 ]; ③ Filter small text, using b in sumT2 i =[(x min ,y min ), (x max ,y max )] as an example, calculate the area of the box area = (x max -x min )×(y max -y min ), if h×w / area>θ, then b i The low-quality text boxes are filtered out; otherwise, they are retained. Similarly, all the boxes in sumT2 are traversed to obtain sumT3 = [b1, b2…, b k3 ], if sumT3 is empty, image I is a low-quality image and no subsequent steps are performed; otherwise, proceed to the next step for processing; Step 10: Filter out low-quality cars The "car" detection box set sumC of image I = [b1, b2..., b e ] as an example: ① When e=1, it means that the two-element definition of bicycle and text is met, and proceed to the next step; ② When e>1, there are multiple cars, processing logic: calculate sumC = [b1, b2…, b e ]The area of each box is recorded as areaC = [area1, area2…, area e ], calculate the maximum value of areaC and record it as area max , the corresponding box is assumed to be b max =[(x cmin ,y cmin ), (x cmax ,y cmax )],if and And θ1 <area max <θ2, that is, the center point of the entire image is located inside the car and the maximum frame ratio cannot be too large or too small. Here, θ1 and θ2 can be changed according to specific needs. The empirical threshold is θ1=(h×w) / 5, θ2=(4×h×w) / 5. If the above conditions are met, proceed to the next step; otherwise, image I is a low-quality image and no subsequent processing is performed; Step 11: Filter out low-quality people We collected high-quality datasets of people, cars and text, and low-quality datasets. Low-quality datasets include those with poor composition, too low proportion of people, and artificial backgrounds. High-quality images were divided into two categories: people and cars as a whole, and people sitting in cars. Both of these categories contain text elements. Finally, we obtained training and test sets containing three categories. In the training phase, we introduced data enhancement algorithms such as mirroring and upside-down flipping based on the ResNet network, and used the cross entropy loss function to update the model gradient. We iterated continuously until we got the optimal model M. pcls ; In the testing phase, image I is sent to M pcls , if I belongs to the low-quality category, the condition is not satisfied and the image is discarded; otherwise, the output image I is a high-quality image.
2. The high-quality cover recognition system for automobile videos according to claim 1, characterized in that: The detection box of [person, car] described in step 2, where the "car" category corresponds to the "car" and "truck" categories of the 80-category coco dataset.
3. The high-quality cover recognition system for automobile videos according to claim 1, characterized in that: The text detection model Mt described in step 4 can be used to predict the location and score of text in the image.
4. The high-quality cover recognition system for automobile videos according to claim 1, characterized in that: The data enhancement algorithms described in step seven include random shearing, random flipping, deformation scaling, etc.
5. The high-quality cover recognition system for automobile videos according to claim 1, characterized in that: The θ mentioned in step nine is an empirical threshold, wherein the empirical threshold is set to 400.
6. The high-quality cover recognition system for automobile videos according to claim 1, characterized in that: The low-quality "person" mentioned in step 11 does not refer to the quality of the detected portrait. For example, although some faces are not clear, the overall three-element composition pattern meets the high-quality requirements. It is necessary to judge whether the "person" meets the high-quality characteristics based on the image composition.
7. The high-quality cover recognition system for automobile videos according to claim 1, characterized in that: In the high-quality video cover described in step 10, "car" satisfies two situations: the first is a single car; the second is multiple cars, but the largest car is the main body.
