一种LOGO识别系统

By constructing a LOGO database and filtering based on aspect ratio and area percentage, and using feature vector matching, the problem of low efficiency in recognizing LOGOs in image and video data in existing technologies is solved, achieving fast and accurate LOGO recognition.

CN116206295BActive Publication Date: 2026-11-24XINHUA FUSION MEDIA TECH DEV (BEIJING) CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310196542.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-02
Publication Date
2026-11-24
Estimated Expiration
2043-03-02

AI Technical Summary

Technical Problem

Existing technologies struggle to quickly identify logos in image and video data, impacting the efficiency of tasks such as tracing the source of public opinion.

Method used

A logo database is constructed, divided into multiple sub-databases. The logos are filtered based on their aspect ratio and area proportion. Feature vectors are used for matching to reduce unnecessary comparisons and improve recognition efficiency.

Benefits of technology

By filtering and feature vector matching, the efficiency of logo recognition has been significantly improved, unnecessary comparison processes have been reduced, and recognition speed and accuracy have been enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116206295B_ABST
    Figure CN116206295B_ABST
Patent Text Reader

Abstract

This application relates to the field of computer vision technology, and in particular to a logo recognition system. The system includes a memory storing a logo database, which consists of at least two sub-databases of logos. Different sub-databases correspond to different aspect ratios of the logos. Each sub-database stores a feature vector of a corresponding logo, and the storage location index of the feature vector corresponding to a logo in each sub-database is positively or negatively correlated with the area ratio of the corresponding logo. The system also includes a processor and a storage medium storing a computer program. When the computer program is executed by the processor, a corresponding logo recognition method is implemented. This invention can quickly identify logos in image and video data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision technology, and in particular to a logo recognition system. Background Technology

[0002] In recent years, with the rapid development of mobile internet technology, the self-media industry has flourished, and the number of views on various media platforms has exploded. The majority of data dissemination on these platforms is in the form of images and videos. Among image and video data, the most crucial information is the logo. A logo is typically a way for the creator of an image or video to identify copyright. Furthermore, other logos within images or videos can help analyze the creative background and context of the content, which is extremely important for tasks such as tracing the origins of public opinion. Therefore, how to quickly identify logos in image and video data is a pressing technical problem that needs to be solved. Summary of the Invention

[0003] The purpose of this invention is to provide a logo recognition system that can quickly identify logos in image and video data.

[0004] According to the present invention, a logo recognition system is provided, including a memory storing a logo database, the logo database being composed of at least two logo sub-databases, the different logo sub-databases corresponding to different ranges of logo width-to-height ratios, the logo width-to-height ratio being the ratio of the width to the height of the smallest bounding rectangle corresponding to the logo; each logo sub-database storing a feature vector corresponding to the logo, the storage position index of the feature vector corresponding to the logo in each logo sub-database being positively or negatively correlated with the area percentage of the corresponding logo, the logo area percentage being the ratio of the area of ​​the logo to the area of ​​the smallest bounding rectangle corresponding to the logo.

[0005] The system also includes a processor and a storage medium storing a computer program, which, when executed by the processor, performs the following steps:

[0006] S100 uses a LOGO detector to detect the target LOGO region in the target image.

[0007] S200, Obtain the feature vector F corresponding to the target LOGO region. crop .

[0008] S300, obtain the corresponding target logo width-to-height ratio and target logo area percentage based on the target logo area.

[0009] S400: Obtain the sub-database of logos to be searched based on the aspect ratio of the target logo, and obtain the range of logos to be searched in the sub-database of logos to be searched based on the area ratio of the target logo.

[0010] S500, obtain F crop The similarity between the feature vector and the feature vector corresponding to each logo in the range of logos to be searched.

[0011] S600, if with F crop If the feature vectors with the highest similarity to a predetermined number of features correspond to the same logo, then the logo in the target logo region is determined to be the same as F. crop The LOGO is the most similar feature vector; otherwise, proceed to S700.

[0012] S700, if with F crop The feature vector with the highest similarity and F crop If the similarity is greater than a preset similarity threshold, then the LOGO in the target LOGO region is determined to be similar to F. crop The most similar feature vector corresponds to the LOGO; otherwise, it is determined that the LOGO in the target LOGO region does not exist in the LOGO database.

[0013] Compared with the prior art, the present invention has significant advantages. Through the above technical solution, the LOGO recognition system provided by the present invention achieves considerable technological advancement and practicality, and has broad industrial application value. It has at least the following advantages:

[0014] The LOGO database stored in the memory of this invention includes multiple LOGO sub-databases. Different LOGO sub-databases correspond to different LOGO aspect ratios. Therefore, based on the aspect ratio of the target LOGO, the different LOGO sub-databases can be filtered first. Only the target LOGO needs to be compared with the LOGOs in the matching LOGO sub-databases (the comparison process involves calculating the similarity between the feature vector corresponding to the target LOGO and the feature vector corresponding to the LOGOs in the matching LOGO sub-databases), eliminating the need to compare the target LOGO with LOGOs in unmatched LOGO sub-databases, thus improving the efficiency of LOGO recognition. Furthermore, the storage location index of the feature vector corresponding to different LOGOs in each LOGO sub-database of this invention is positively or negatively correlated with the corresponding LOGO area proportion. Therefore, based on the size of the area proportion corresponding to the target LOGO, a portion of the LOGOs in the matching LOGO sub-databases can be selected for comparison, further reducing the amount of data of LOGOs to be compared, accelerating the effective comparison process, and improving the efficiency of LOGO recognition. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 A flowchart of the LOGO recognition method of the LOGO recognition system provided in the embodiments of the present invention. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] According to the present invention, a logo recognition system is provided, including a memory storing a logo database, the logo database being composed of at least two logo sub-databases, the different logo sub-databases corresponding to different ranges of logo width-to-height ratios, the logo width-to-height ratio being the ratio of the width to the height of the smallest bounding rectangle corresponding to the logo; each logo sub-database storing a feature vector corresponding to the logo, the storage position index of the feature vector corresponding to the logo in each logo sub-database being positively or negatively correlated with the area percentage of the corresponding logo, the logo area percentage being the ratio of the area of ​​the logo to the area of ​​the smallest bounding rectangle corresponding to the logo.

[0019] The LOGO database of the present invention is pre-built and stores a large number of feature vectors of LOGOs. Each LOGO corresponds to a feature vector, which is a high-dimensional feature vector. As an example, the feature vector corresponding to each LOGO stored in the LOGO database is a 768-dimensional feature vector obtained by extracting the corresponding LOGO region image using the CLIP model.

[0020] Different logos correspond to different shapes, and their aspect ratios and area proportions also vary. This invention optimizes the storage location of different logos in the logo database based on their aspect ratios and area proportions. Logos with similar aspect ratios are stored in the same sub-database. Within the same sub-database, feature vectors corresponding to logos are stored either from largest to smallest or smallest to largest area proportion (if the larger the area proportion, the earlier the feature vector is stored, i.e., the smaller the storage position number, then the storage position number of the feature vector is negatively correlated with the area proportion; conversely, the storage position number of the feature vector is positively correlated with the area proportion). Based on this, subsequent feature vector matching of small regions can be performed according to the aspect ratio and area proportion of the target logo, reducing the matching workload and improving the efficiency of logo recognition.

[0021] Optionally, the process of constructing the LOGO database includes:

[0022] S001, crop the image containing the logo to be built, remove the background area, and obtain an image containing only the logo to be built.

[0023] According to the present invention, by cropping the background area in the image that is unrelated to the LOGO area, an image containing only the area to be constructed is obtained. This avoids the interference of the background area on the acquisition of the feature vector corresponding to the LOGO, thereby improving the accuracy of subsequent feature vector comparison.

[0024] S002, obtain the feature vector corresponding to the region image and store it in the LOGO database.

[0025] According to the present invention, the feature vector corresponding to each logo to be constructed can be obtained according to the methods of S001-S002. After obtaining the feature vectors corresponding to all logos to be constructed, the logos to be constructed can be stored according to the above storage method based on the width-to-height ratio and area ratio of each logo. As an embodiment, all logos to be constructed are arranged in ascending order of their corresponding width-to-height ratios and divided into 3 groups. The first group includes the first 1 / 3 of the logos, corresponding to the group with the smallest width-to-height ratio; the second group includes the middle 1 / 3 of the logos, corresponding to the group with a moderate width-to-height ratio; and the third group includes the last 1 / 3 of the logos, corresponding to the group with the largest width-to-height ratio. It should be understood that the range of the width-to-height ratio of the logos corresponding to a logo sub-database is the minimum value of the width-to-height ratio of the logos corresponding to that logo sub-database minus the maximum value of the width-to-height ratio of the logos.

[0026] The system of the present invention further includes a processor and a storage medium storing a computer program. When the computer program is executed by the processor, a logo recognition method is implemented. The logo recognition method is as follows: Figure 1 As shown, it includes the following steps:

[0027] S100 uses a LOGO detector to detect the target LOGO region in the target image.

[0028] According to the present invention, if the object to be detected is a video, the video is first divided into frames to obtain the images of each frame included in the video, and then the logo recognition is performed on each frame image separately.

[0029] In order to enable the LOGO detector to have both high detection performance and fast detection processing speed, this invention uses the YOLOv5 target detection model as the LOGO detector.

[0030] To enable the logo detector to detect various types of logos, this invention collected millions of images containing logos, including as many images as possible of different logo categories. The locations of the logos in these images were labeled, uniformly categorized as logo types. Based on this labeled image data, the training process for the logo detector included:

[0031] S101, the image dataset after partitioning and labeling.

[0032] Optionally, the labeled image dataset can be divided into a training set, a validation set, and a test set in an 8:1:1 ratio. 80% of the data is used for training the LOGO detector, 10% of the dataset is used to validate the model's performance during training, and the remaining 10% of the data is used to test the performance of the final model.

[0033] S102, LOGO detector model training parameter settings.

[0034] Optionally, the YOLOv5 model loads a pre-trained model as its initialization parameters, and the learning rate of the main required model training parameters is set to 1×e. -5 The number of iterations is 300.

[0035] S103, Obtain the final LOGO detector model.

[0036] Optionally, the model weights with the highest mAP performance tested on the validation set can be selected as the detector parameters for LOGO.

[0037] It should be understood that the trained logo detector has logo detection capabilities and can be used to detect the location of a logo in an image. Those skilled in the art will recognize that any existing logo detector model and its training method fall within the scope of this invention.

[0038] S200, Obtain the feature vector F corresponding to the target LOGO region. crop .

[0039] Optionally, the CLIP model can be used to obtain the feature vector F corresponding to the target logo region. crop F crop The feature vector is 768-dimensional. Those skilled in the art will understand that any existing method for obtaining the feature vector corresponding to an image falls within the protection scope of this invention.

[0040] S300, obtain the corresponding target logo width-to-height ratio and target logo area percentage based on the target logo area.

[0041] In this invention, the aspect ratio of the target logo is the ratio of the width to the height of the smallest bounding rectangle corresponding to the target logo, and the area ratio of the target logo is the ratio of the area of ​​the target logo to the area of ​​the smallest bounding rectangle corresponding to the logo (the area of ​​the target logo can be represented by the number of pixels occupied by the target logo in the target logo area, and the area of ​​the smallest bounding rectangle corresponding to the target logo can be represented by the number of pixels occupied by the smallest bounding rectangle corresponding to the target logo). Those skilled in the art will understand that any method for obtaining the smallest bounding rectangle in the prior art falls within the protection scope of this invention.

[0042] S400: Obtain the sub-database of logos to be searched based on the aspect ratio of the target logo, and obtain the range of logos to be searched in the sub-database of logos to be searched based on the area ratio of the target logo.

[0043] Optionally, a sub-database of logos to be searched can be obtained based on the aspect ratio of the target logo, including:

[0044] S410, the aspect ratio of the target logo is adjusted downwards according to a first preset ratio coefficient to obtain the lower limit value b of the aspect ratio of the target logo. min .

[0045] S420, the aspect ratio of the target logo is adjusted upwards according to a first preset ratio coefficient to obtain the upper limit value b of the aspect ratio of the target logo. max .

[0046] Optionally, the first preset scaling factor can be set between 0.1 and 0.2. As an example, if the first preset scaling factor is 0.2, then b... min Let b be (1-0.2) * the aspect ratio of the target logo. max The aspect ratio is (1+0.2)*target logo width and height.

[0047] S430, the sub-database of logos whose width-to-height ratio range intersects with the target logo's width-to-height ratio range is selected as the sub-database of logos to be searched; the lower limit of the target logo's width-to-height ratio range is b. min The upper limit of the aspect ratio range of the target logo is b. max .

[0048] According to the present invention, the aspect ratio range of the target logo is [b min b max If the aspect ratio range of a logo corresponding to a certain logo sub-database is different from [b min b max If there is an intersection, then that LOGO sub-database is the LOGO sub-database to be searched. It should be noted that if multiple LOGO sub-databases correspond to LOGO width and height ratio ranges that differ from [b...], then... min b max If there is an intersection, then the number of LOGO sub-databases to be searched is also multiple.

[0049] Optionally, the range of logos to be searched in the sub-database of logos to be searched can be obtained based on the area ratio of the target logo, including:

[0050] S440, the area ratio of the target logo is adjusted downwards according to a second preset ratio coefficient to obtain the lower limit value c of the area ratio of the target logo. min .

[0051] S450, the area ratio of the target logo is adjusted downwards according to a second preset ratio coefficient to obtain the upper limit value c of the area ratio of the target logo. max .

[0052] Optionally, the second preset scaling factor can range from 0.1 to 0.2. As an example, if the second preset scaling factor is 0.1, then c... min Let c be (1-0.1) * the target logo area percentage. max The percentage of the target logo area is (1+0.1)*.

[0053] S460, the set of LOGOs stored in the LOGO sub-database whose positions are between the first position and the second position is taken as the range of LOGOs to be searched in the LOGO sub-database; the first position is the area ratio of c. min The storage location of the logo, the second location is the corresponding area proportion of c. max The storage location of the logo.

[0054] S500, obtain F crop The similarity between the feature vector and the feature vector corresponding to each logo in the range of logos to be searched.

[0055] Optionally, F can be obtained using the cosine similarity calculation formula. crop The similarity between the feature vector and the feature vector corresponding to each logo in the range of logos to be searched. Those skilled in the art will understand that any vector similarity calculation method in the prior art falls within the protection scope of this invention.

[0056] S600, if with F crop If the feature vectors with the highest similarity to a predetermined number of features correspond to the same logo, then the logo in the target logo region is determined to be the same as F. crop The LOGO is the most similar feature vector; otherwise, proceed to S700.

[0057] Optionally, the set quantity is 5.

[0058] S700, if with F crop The feature vector with the highest similarity and F crop If the similarity is greater than a preset similarity threshold, then the LOGO in the target LOGO region is determined to be similar to F. crop The most similar feature vector corresponds to the LOGO; otherwise, it is determined that the LOGO in the target LOGO region does not exist in the LOGO database.

[0059] Optionally, the preset similarity threshold is 0.9.

[0060] The LOGO database stored in the memory of this invention includes multiple LOGO sub-databases. Different LOGO sub-databases correspond to different LOGO aspect ratios. Therefore, based on the aspect ratio of the target LOGO, the different LOGO sub-databases can be filtered first. Only the target LOGO needs to be compared with the LOGOs in the matching LOGO sub-databases (the comparison process involves calculating the similarity between the feature vector corresponding to the target LOGO and the feature vector corresponding to the LOGOs in the matching LOGO sub-databases), eliminating the need to compare the target LOGO with LOGOs in unmatched LOGO sub-databases, thus improving the efficiency of LOGO recognition. Furthermore, the storage location index of the feature vector corresponding to different LOGOs in each LOGO sub-database of this invention is positively or negatively correlated with the corresponding LOGO area proportion. Therefore, based on the size of the area proportion corresponding to the target LOGO, a portion of the LOGOs in the matching LOGO sub-databases can be selected for comparison, further reducing the amount of data of LOGOs to be compared, accelerating the effective comparison process, and improving the efficiency of LOGO recognition.

[0061] While specific embodiments of the invention have been described in detail by way of example, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of the invention. It should also be understood that various modifications can be made to the embodiments without departing from the scope and spirit of the invention. The scope of the invention is defined by the appended claims.

Claims

1. A logo recognition system, characterized in that, The system includes a memory that stores a logo database. The logo database consists of at least two sub-logo databases, with different sub-databases containing logos of varying aspect ratios. The aspect ratio is the ratio of the width to the height of the smallest bounding rectangle of the logo. Each sub-database stores a feature vector corresponding to the logo. The storage location index of the feature vector in each sub-database is positively or negatively correlated with the area percentage of the corresponding logo, where the area percentage is the ratio of the logo's area to the area of ​​its smallest bounding rectangle. The process of acquiring the at least two sub-logo databases includes: arranging all logos to be constructed in ascending order of their aspect ratios and dividing them into three groups: the first group includes the first 1 / 3 of the logos, the second group includes the middle 1 / 3, and the third group includes the last 1 / 3. The system also includes a processor and a storage medium storing a computer program, which, when executed by the processor, performs the following steps: S100, uses a LOGO detector to detect the target LOGO region in the target image; S200, obtaining a feature vector F corresponding to the target LOGO region crop ; S300, obtain the corresponding width-to-height ratio and area percentage of the target logo based on the target logo area; S400, obtain the sub-database of logos to be searched based on the aspect ratio of the target logo, and obtain the range of logos to be searched in the sub-database of logos to be searched based on the area ratio of the target logo; S500, obtaining F crop a similarity of a feature vector corresponding to each logo in the logo range to be searched; S600, if the maximum similarity of the first set number of feature vectors corresponds to the same LOGO, it is determined that the LOGO in the target LOGO region is the same as F crop the maximum similarity of the first set number of feature vectors corresponds to the same LOGO, it is determined that the LOGO in the target LOGO region is the same as F crop the maximum similarity of the first set number of feature vectors corresponds to the same LOGO; otherwise, go to S700; S700, if the similarity between the feature vector with F crop is greater than a preset similarity threshold, it is determined that the LOGO in the target LOGO region is the LOGO corresponding to the feature vector with the greatest similarity; otherwise, it is determined that the LOGO in the target LOGO region does not exist in the LOGO database. crop S700, if the similarity between the feature vector with F crop is greater than a preset similarity threshold, it is determined that the LOGO in the target LOGO region is the LOGO corresponding to the feature vector with the greatest similarity; otherwise, it is determined that the LOGO in the target LOGO region does not exist in the LOGO database. In S400, a sub-database of logos to be searched is obtained based on the aspect ratio of the target logo, including: S410, the aspect ratio of the target logo is adjusted downwards according to a first preset ratio coefficient to obtain the lower limit value b of the aspect ratio of the target logo. min ; S420, the aspect ratio of the target logo is adjusted upwards according to a first preset ratio coefficient to obtain the upper limit value b of the aspect ratio of the target logo. max ; S430, the sub-database of logos whose width-to-height ratio range intersects with the target logo's width-to-height ratio range is selected as the sub-database of logos to be searched; the lower limit of the target logo's width-to-height ratio range is b. min The upper limit of the aspect ratio range of the target logo is b. max .

2. The system according to claim 1, characterized in that, In S400, the range of logos to be searched in the sub-database of logos to be searched is obtained based on the area ratio of the target logo, including: S440, the area ratio of the target logo is adjusted downwards according to a second preset ratio coefficient to obtain the lower limit value c of the area ratio of the target logo. min ; S450, the area ratio of the target logo is adjusted upwards according to a second preset ratio coefficient to obtain the upper limit value c of the area ratio corresponding to the target logo. max ; S460, the set of LOGOs stored in the LOGO sub-database whose positions are between the first position and the second position is taken as the range of LOGOs to be searched in the LOGO sub-database; the first position is the area ratio of c. min The storage location of the logo, the second location is the corresponding area proportion of c. max The storage location of the logo.

3. The system according to claim 1, characterized in that, In S200, the CLIP model is used to obtain the feature vector F corresponding to the target LOGO region. crop .

4. The system according to claim 1, characterized in that, In S600, the set quantity is 5.

5. The system according to claim 1, characterized in that, The process of building the LOGO database includes: S001, crop the image containing the logo to be built, remove the background area, and obtain an image of the area containing only the logo to be built; S002, obtain the feature vector corresponding to the region image and store it in the LOGO database.

6. The system according to claim 1, characterized in that, In S500, F is obtained using the cosine similarity calculation formula. crop The similarity between the feature vector and the feature vector corresponding to each logo in the range of logos to be searched.

Citation Information

Patent Citations

  • LOGO recognition method based on attention mechanism image retrieval

    CN111881906A

  • Big data content intelligent classification storage processing method

    CN112307232A

  • Method and device for image search

    JP2002099570A