Training methods for trademark retrieval models, trademark retrieval methods and devices

By collecting and transforming trademark elements to generate images, expanding the training data, and using convolutional neural networks to train the trademark retrieval model, the problem of insufficient training data for the trademark retrieval model is solved, thereby improving the accuracy and recognition ability of trademark retrieval.

CN114610925BActive Publication Date: 2025-10-28TONGDUN NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210159408.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-21
Publication Date
2025-10-28
Estimated Expiration
2042-02-21

AI Technical Summary

Technical Problem

The existing trademark retrieval model has a small training data capacity, resulting in poor model training performance and affecting retrieval accuracy.

Method used

Collect trademark elements, combine and transform them to generate trademark images, expand the training data capacity, and train the trademark retrieval model through a convolutional neural network.

Benefits of technology

It improves the trademark retrieval model's ability to understand and identify different trademarks, reduces the probability of false detections, and improves the accuracy of retrieval.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114610925B_ABST
    Figure CN114610925B_ABST
Patent Text Reader

Abstract

This invention provides a training method, a trademark retrieval method, and an apparatus for a trademark retrieval model, applicable to the field of data processing technology. The training method for this trademark retrieval model can also collect similar trademark elements when acquiring a first trademark image. Since trademarks are typically composed of different icons, text, and other similar trademark elements, similar trademark images can be obtained by combining and transforming these elements. Based on this, a convolutional neural network is trained using the actually acquired first trademark image and the similar trademark images obtained from the similar trademark elements, thereby obtaining the trademark retrieval model. The similar trademark images generated from the similar trademark elements effectively expand the capacity and variety of the training data, thereby improving the trademark retrieval model's ability to understand and recognize different trademarks, reducing the probability of false detections in trademark retrieval, and improving the accuracy of trademark retrieval.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention applies to the field of data processing technology, and in particular relates to a training method for a trademark retrieval model, a trademark retrieval method, and an apparatus. Background Technology

[0002] Trademark retrieval technology can be used in scenarios such as trademark identification and trademark registration to analyze the input trademark image and retrieve the same or similar trademark styles.

[0003] Trademark retrieval technology typically determines the trademark style corresponding to the input trademark image by comparing it with existing trademark images. The input trademark image and the existing trademark images are usually close-up shots of the trademark styles; therefore, the characteristics of the trademark images are greatly influenced by the shape, size, and material of the trademark styles. However, because collecting close-up images of different trademark styles is costly, the amount of training data is usually small, resulting in insufficient learning during model training and poor performance, thus affecting the accuracy of the retrieval. Summary of the Invention

[0004] In view of this, embodiments of the present invention propose a training method for a trademark retrieval model, a trademark retrieval method, and an apparatus to solve the problem of poor model training effect in trademark retrieval, resulting in low retrieval accuracy.

[0005] The first aspect of this invention provides a method for training a trademark retrieval model, which may include:

[0006] Collect a first trademark image and similar trademark elements, wherein the similar trademark elements include at least one of icons and text;

[0007] By combining and / or transforming the aforementioned trademark elements, a trademark image can be obtained.

[0008] A convolutional neural network is trained using the first trademark image and the class trademark image to obtain a trademark retrieval model.

[0009] Optionally, the trademark element includes an icon, and the combination and / or transformation of the trademark element to obtain the trademark image includes at least one of the following:

[0010] Change the line style of the icon, wherein the line style includes at least one of line color and line thickness;

[0011] Change the background of the icon;

[0012] At least two of the icons are overlapped;

[0013] Join at least two of the icons together.

[0014] Optionally, the trademark element includes text, and the combination and / or transformation of the trademark element to obtain the trademark image includes at least one of the following:

[0015] Change the language of the text;

[0016] Change the text style of the text, wherein the text style includes at least one of font, font size, and color;

[0017] Change the background of the text;

[0018] Overlapping at least two of the aforementioned texts;

[0019] Combine at least two of the aforementioned texts.

[0020] Optionally, the total number of the trademark images is less than the total number of the first trademark images.

[0021] Optionally, the trademark images may include at least two types, and the trademark elements contained in different types of trademark images may differ.

[0022] Optionally, after combining and / or transforming the trademark elements to obtain the trademark image, the method further includes:

[0023] Random sampling is performed on each type of the first trademark image, such that the maximum number of different types of the first trademark images and the class of trademark images is less than or equal to the target number, and the target number is less than or equal to a preset multiple of the minimum number of different types of the first trademark images and the class of trademark images.

[0024] Optionally, after combining and / or transforming the trademark elements to obtain the trademark image, the method further includes:

[0025] Data enhancement is performed on the first trademark image and the trademark-like image, and the data enhancement includes at least one of rotation, flipping, scaling, cropping, color changing, blurring, and embossing.

[0026] Optionally, before training the convolutional neural network using the first trademark image and the similar trademark images to obtain the trademark retrieval model, the method further includes:

[0027] The convolutional neural network is adjusted, and the adjustment includes at least one of the following:

[0028] Increase the input size of the convolutional neural network;

[0029] Reduce the downsampling factor of the convolutional neural network;

[0030] The dimension of the first trademark feature output by the convolutional neural network is increased. The first trademark feature is obtained by the convolutional neural network from the feature extraction of the first trademark image and the similar trademark image.

[0031] According to a second aspect of the present invention, a trademark retrieval method is provided, which may include:

[0032] Obtain a second trademark image;

[0033] The trademark retrieval model is used to extract features from the second trademark image to obtain the features of the second trademark, wherein the trademark retrieval model is trained by the method described in claim 1.

[0034] The image of the second trademark is retrieved based on the characteristics of the second trademark to obtain the retrieval results of the image of the second trademark.

[0035] According to a third aspect of the present invention, a training apparatus for a trademark retrieval model is provided, the apparatus comprising:

[0036] The first data acquisition module is used to acquire the first trademark image and trademark-like elements, wherein the trademark-like elements include at least one of icons and text.

[0037] The trademark generation module is used to combine and / or transform the trademark elements to obtain a trademark image.

[0038] The model training module is used to train a convolutional neural network using the first trademark image and the similar trademark images to obtain a trademark retrieval model.

[0039] Optionally, the trademark-like element includes an icon, and the trademark-like generation module includes:

[0040] The line style submodule is used to change the line style of the icon, wherein the line style includes at least one of line color and line thickness;

[0041] The icon background submodule is used to change the background of the icon;

[0042] The trademark overlap submodule is used to overlap at least two of the icons;

[0043] The trademark splicing submodule is used to splice at least two of the icons.

[0044] Optionally, the trademark-like element includes text, and the trademark-like generation module includes:

[0045] The text content submodule is used to change the language of the text.

[0046] The text style submodule is used to change the text style of the text, wherein the text style includes at least one of font, font size, and color;

[0047] The text background submodule is used to change the background of the text;

[0048] The text overlap submodule is used to overlap at least two types of the text.

[0049] The text splicing submodule is used to splice at least two types of the text.

[0050] Optionally, the total number of the trademark images is less than the total number of the first trademark images.

[0051] Optionally, the trademark images may include at least two types, and the trademark elements contained in different types of trademark images may differ.

[0052] Optionally, the device further includes:

[0053] The data sampling module is used to randomly sample each type of the first trademark image, such that the maximum number of different types of the first trademark images and the class trademark images is less than or equal to the target number, and the target number is less than or equal to a preset multiple of the minimum number of different types of the first trademark images and the class trademark images.

[0054] Optionally, the device further includes:

[0055] The data enhancement module is used to perform data enhancement on the first trademark image and the similar trademark image, wherein the data enhancement includes at least one of rotation, flipping, scaling, cropping, color changing, blurring, and embossing.

[0056] Optionally, the device further includes:

[0057] A model tuning module is used to tune the convolutional neural network, wherein the tuning includes at least one of the following:

[0058] Increase the input size of the convolutional neural network;

[0059] Reduce the downsampling factor of the convolutional neural network;

[0060] The dimension of the first trademark feature output by the convolutional neural network is increased. The first trademark feature is obtained by the convolutional neural network from the feature extraction of the first trademark image and the similar trademark image.

[0061] According to a fourth aspect of the present invention, a trademark retrieval device is provided, the device comprising:

[0062] The second data acquisition module is used to obtain the second trademark image;

[0063] The feature extraction module is used to extract features from the second trademark image using a trademark retrieval model to obtain the features of the second trademark, wherein the trademark retrieval model is trained by the apparatus described in the third aspect.

[0064] The trademark classification module is used to search for the second trademark image based on the characteristics of the second trademark and obtain the search results for the second trademark image.

[0065] According to a fifth aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, wherein when the computer program is executed by a processor, it implements the training method for the trademark retrieval model described in the first aspect, or the trademark retrieval method described in the third aspect.

[0066] According to a sixth aspect of the present invention, an electronic device is provided, including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein when the program or instructions are executed by the processor, they implement the training method for the trademark retrieval model described in the first aspect, or the trademark retrieval method described in the third aspect.

[0067] Compared with related technologies, the present invention has the following advantages:

[0068] This invention provides a training method for a trademark retrieval model. When acquiring a first trademark image, similar trademark elements can also be acquired. Since trademarks are typically composed of different icons, texts, etc., similar trademark images can be obtained by combining and transforming these elements. Based on this, a convolutional neural network is trained using the actually acquired first trademark image and the similar trademark images obtained from the similar trademark elements, thereby obtaining the trademark retrieval model. The similar trademark images generated from the similar trademark elements effectively expand the capacity and variety of the training data, thereby improving the trademark retrieval model's ability to understand and recognize different trademarks, reducing the probability of false detections in trademark retrieval, and improving the accuracy of trademark retrieval.

[0069] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0070] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0071] Figure 1 This is one of the flowcharts of the training method for the trademark retrieval model provided in this embodiment of the invention;

[0072] Figure 2 This is the second step in the flowchart of the training method for the trademark retrieval model provided in this embodiment of the invention;

[0073] Figure 3a This is one of the trademark images generated based on icons provided in the embodiments of the present invention;

[0074] Figure 3b This is the second type of trademark image generated based on icons provided in this embodiment of the invention;

[0075] Figure 3c This is the third type of trademark image generated based on icons provided in this embodiment of the invention;

[0076] Figure 3d This is the fourth type of trademark image generated based on icons provided in this embodiment of the invention;

[0077] Figure 4a This is a first-class trademark image generated based on text, provided in an embodiment of the present invention;

[0078] Figure 4b This is a second type of trademark image generated based on text, provided in an embodiment of the present invention;

[0079] Figure 4c This is a third type of trademark image generated based on text, provided in an embodiment of the present invention;

[0080] Figure 5a This is a schematic diagram of a first trademark image provided in an embodiment of the present invention;

[0081] Figure 5b This is a schematic diagram of an embossing process for a first trademark image provided in an embodiment of the present invention;

[0082] Figure 6 This is a flowchart of the steps of a trademark retrieval method provided in an embodiment of the present invention;

[0083] Figure 7 This is a schematic diagram of a trademark retrieval process provided by an embodiment of the present invention;

[0084] Figure 8 This is a structural block diagram of a training device for a trademark retrieval model provided in an embodiment of the present invention;

[0085] Figure 9 This is a structural block diagram of a trademark retrieval device provided in an embodiment of the present invention;

[0086] Figure 10 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0087] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.

[0088] Figure 1 This is one of the flowcharts of the training method for the trademark retrieval model provided in this embodiment of the invention, such as... Figure 1 As shown, the method may include:

[0089] Step 101: Collect the first trademark image and similar trademark elements, wherein the similar trademark elements include at least one of icons and text.

[0090] In this embodiment of the invention, the first trademark image refers to the trademark image actually collected for training the trademark retrieval model. The first trademark image can be obtained from publicly available trademark images, or it can be obtained by cropping the trademark area of ​​photos, advertising images, video screenshots, etc. that contain trademarks.

[0091] In this embodiment of the invention, trademark-like elements can refer to various elements typically included in an actual trademark image, such as text and graphics. In addition to collecting the first trademark image, trademark-like elements can also be collected in this embodiment, such as different icons and text. Icons can be different graphics and symbols, such as geometric shapes, traffic signs, safety signs, etc., or program identifiers, data identifiers, command identifiers, mode identifiers, switch identifiers, status identifiers, etc., in computer software. Text can include different languages, fonts, colors, and content. Icons can also be obtained by disassembling the collected first trademark image; for example, for a graphic trademark, different parts of the graphic can be disassembled, and for a text trademark, the text content can be disassembled. This embodiment of the invention does not specifically limit the types and methods of collecting trademark-like elements.

[0092] Step 102: Combine and / or transform the trademark elements to obtain a trademark image.

[0093] In this embodiment of the invention, the trademark image may be an image containing elements that make up an actual trademark, but not an actual trademark. The trademark image can be obtained by combining and transforming the collected trademark elements. Optionally, the trademark elements can be transformed at least once, two or more trademark elements can be combined, or two or more trademark elements can be combined and then transformed at least once, or different trademark elements can be further decomposed to obtain the trademark image.

[0094] Step 103: Train a convolutional neural network using the first trademark image and the similar trademark image to obtain a trademark retrieval model.

[0095] In this embodiment of the invention, a first trademark image of an actual trademark and similar trademark images obtained based on similar trademark elements can be used to train a convolutional neural network. The similar trademark images expand the capacity and variety of training data in the model training, enabling the convolutional neural network to fully learn a wider range of diverse trademark features, effectively improving the model's understanding of trademark images and thus enhancing the accuracy of trademark retrieval. Optionally, features can be extracted from the first trademark image and similar trademark images using a convolutional neural network, and a classifier can be constructed to classify the first trademark image and similar trademark images based on the extracted features. The convolutional neural network can then be adjusted based on the classification results to train and obtain a trademark retrieval model.

[0096] This invention provides a training method for a trademark retrieval model. When acquiring a first trademark image, similar trademark elements can also be acquired. Since trademarks are typically composed of different icons, texts, etc., similar trademark images can be obtained by combining and transforming these elements. Based on this, a convolutional neural network is trained using the actually acquired first trademark image and the similar trademark images obtained from the similar trademark elements, thereby obtaining the trademark retrieval model. The similar trademark images generated from the similar trademark elements effectively expand the capacity and variety of the training data, thereby improving the trademark retrieval model's ability to understand and recognize different trademarks, reducing the probability of false detections in trademark retrieval, and improving the accuracy of trademark retrieval.

[0097] Figure 2 This is the second step in the flowchart of the training method for the trademark retrieval model provided in this embodiment of the invention, as follows: Figure 2 As shown, the method may include:

[0098] Step 201: Collect the first trademark image and similar trademark elements, wherein the similar trademark elements include at least one of icons and text.

[0099] In this embodiment of the invention, step 201 can be referred to the relevant description of step 101 above. To avoid repetition, it will not be repeated here.

[0100] In this embodiment of the invention, the trademark elements to be collected can be publicly available icon SVG (Scalable Vector Graphics) files. SVG is an open standard vector graphics language that can achieve displays such as gradients, animations, transparency effects, filter effects, and embedded fonts. It can also collect vector icons in other formats such as PNG (Portable Network Graphics). This embodiment of the invention does not impose any specific limitations on this.

[0101] Step 202: Combine and / or transform the trademark elements to obtain a trademark image.

[0102] In this embodiment of the invention, step 202 can be referred to the relevant description of step 102 above. To avoid repetition, it will not be repeated here.

[0103] Optionally, the trademark element includes an icon, and step 202 includes at least one of the following:

[0104] Step S11: Change the line style of the icon, wherein the line style includes at least one of line color and line thickness.

[0105] Step S12: Change the background of the icon.

[0106] Step S13: Overlap at least two of the icons.

[0107] Step S14: Join at least two of the icons together.

[0108] In this embodiment of the invention, when the trademark-like element is a trademark, the trademark can be combined and / or at least transformed to obtain a trademark-like image. For example, a trademark usually includes different graphics, which are usually formed by splicing, combining, and wrapping lines. Therefore, transforming the icon can be done by changing the line style of the graphics in the icon, such as changing the line color or line thickness. A trademark may also include a background, such as a solid color background or a textured background. Therefore, transforming the icon can be done by changing the color or texture of the background in the icon. A trademark-like element can include at least two icons. Therefore, at least two icons can be overlapped or spliced. The overlap ratio between different trademarks and the position of overlap or splicing can be selected according to the model training needs of those skilled in the art. This embodiment of the invention does not impose specific limitations on this.

[0109] Optionally, the trademark element includes text, and step 202 includes at least one of the following:

[0110] Step S21: Change the language of the text.

[0111] Step S22: Change the text style of the text, wherein the text style includes at least one of font, font size, and color.

[0112] Step S23: Change the background of the text.

[0113] Step S24: Overlap at least two of the aforementioned texts.

[0114] Step S25: Combine at least two of the aforementioned texts.

[0115] In this embodiment of the invention, when the trademark element is text, the text can be combined and / or at least transformed to obtain a trademark image. The text can include characters, numbers, symbols, etc., in different languages. Languages ​​can include Chinese, English, Japanese, Korean, etc. Therefore, transforming the text can change the language of the text, such as changing the text from Chinese to English, or from Chinese to Japanese, etc. The text can also include different text styles, such as font, font size, color, etc. Fonts can include KaiTi, SongTi, HeiTi, etc. Font size refers to the size of the text. Therefore, transforming the text can change the font, font size, color, etc. The text can also include a background, such as a solid color background, a textured background, etc. Therefore, transforming the text can change the color, texture, etc. of the text background. The trademark element can include at least two types of text. Therefore, at least two types of text can be overlapped, spliced, etc. The overlap ratio between different types of text, and the overlapping or splicing position, can be selected according to the model training needs of those skilled in the art. This embodiment of the invention does not impose specific limitations on this.

[0116] Optionally, the total number of the trademark images is less than the total number of the first trademark images.

[0117] In this embodiment of the invention, since the trademark-like images are obtained by combining and transforming trademark-like elements, they may differ from the actual trademark images, which may interfere with the model's understanding and recognition of the trademark images, thus affecting the model's performance in practical applications. Therefore, the total number of trademark-like images can be made smaller than the total number of the first trademark images. This expands the capacity of training data during model training, ensuring that the model fully learns trademark features, and also avoids the impact of trademark-like images on the model's performance in practical scenarios.

[0118] Optionally, the trademark images may include at least two types, and the trademark elements contained in different types of trademark images may differ.

[0119] In this embodiment of the invention, the effect of expanding the training data capacity can be improved by increasing the types of trademark images, enabling the model to learn the features of different types of trademarks more fully, improving the model's understanding ability and strengthening its generalization ability. Different types of trademark images can be distinguished by the trademark elements they contain. Trademark images of the same type can contain the same type and quantity of icons and text; trademark images of different types can have different icon styles, different text content, language, fonts, etc., different proportions of overlap of trademark elements, different positions of overlap of trademark elements, different positions of splicing of trademark elements, etc. Optionally, the colors, backgrounds, line colors, line thicknesses, and other features of trademark images of the same type can be different.

[0120] Figure 3a This is one of the trademark images generated based on icons provided in the embodiments of the present invention;

[0121] Figure 3b This is the second type of trademark image generated based on icons provided in this embodiment of the invention;

[0122] Figure 3c This is the third type of trademark image generated based on icons provided in this embodiment of the invention;

[0123] Figure 3d This is the fourth type of trademark image generated based on icons provided in the embodiments of the present invention.

[0124] Among them, such as Figure 3a -d is shown. Figure 3a -d represents the different transformations applied to an icon, where... Figure 3a The line colors, backgrounds, etc., between -d are all different, and Figure 3d The thickness of the lines compared to Figure 3a -c is finer.

[0125] Figure 4a This is a first-class trademark image generated based on text, provided in an embodiment of the present invention;

[0126] Figure 4b This is a second type of trademark image generated based on text, provided in an embodiment of the present invention;

[0127] Figure 4c This is a third type of trademark image generated based on text, provided in an embodiment of the present invention.

[0128] in, Figure 4a -c is obtained by transforming different scripts separately. Figure 4a In the -c option, the text content, language, color, background, etc., of each type of trademark image are different. Figure 4a A trademark image representing the first type of language. Figure 4b Trademark images representing a second language Figure 4c A trademark image representing a third language.

[0129] In this embodiment of the invention, while increasing the number of trademark images of different categories to improve the generalization ability of the model, the number of trademark images of each category can be adjusted to ensure the model's ability to recognize each type of trademark image. For example, while ensuring that the total number of trademark images of different categories is less than the number of first trademark images, the number of trademark images of each category can be less than 10 and greater than 1.

[0130] Optionally, after step 202, the method further includes:

[0131] Step 203: Randomly sample each type of the first trademark image, such that the maximum number of different types of the first trademark images and the class of trademark images is less than or equal to the target number, and the target number is less than or equal to a preset multiple of the minimum number of different types of the first trademark images and the class of trademark images.

[0132] In this embodiment of the invention, to avoid the problem of imbalance caused by excessive differences in data capacity between different types of first trademark images and class trademark images, which affects the model training effect, random sampling can be performed on each type of first trademark image to adjust the number of different types of first trademark images. This ensures that the maximum number of each type of first trademark image and class trademark image is less than or equal to the target number. The target number can be less than or equal to a preset multiple of the minimum number of each type of first trademark image and class trademark image, thereby balancing the data capacity of different types of first trademark images and class trademark images. Optionally, the preset multiple can be set according to the model structure design and actual retrieval needs, such as 10 times, 15 times, 20 times, etc. This embodiment of the invention does not impose specific limitations on the specific value of the preset multiple.

[0133] For example, there are three types of trademark images: five images for the first type, eight images for the second type, and seven images for the third type.

[0134] There are three types of trademark images in total. The first type has 500 images, the second type has 300 images, and the third type has 1200 images.

[0135] With a preset multiplier of 10, and a minimum of 5 images among the different types of first trademark images and class trademark images, the target quantity is 50 images. At this point, random sampling can be performed on the three types of first trademark images so that the number of the three types of first trademark images is less than or equal to 50.

[0136] Optionally, after step 202, the method further includes:

[0137] Step 204: Perform data augmentation on the first trademark image and the trademark-like image. The data augmentation includes at least one of rotation, flipping, scaling, cropping, color changing, blurring, and embossing.

[0138] In this embodiment of the invention, due to limitations in acquisition conditions, the actual trademark image may have complex application scenarios. Therefore, further data augmentation can be performed on the trademark-like image to simulate the state of the actual trademark image in the application scenario. For example, the trademark-like image can be flipped, scaled, cropped, or color-changed. Since the actual trademark image may be obtained by cropping images of advertisements, products, etc., it may have problems such as small size and poor clarity. The trademark-like image can also be scaled or blurred to simulate its size and clarity. Since the trademark may exist on the surface of different materials, such as cloth, paper, leather, metal, or printed through different processes, the first trademark image and the trademark-like image can be embossed to eliminate the texture information in the trademark image, making it easier for the model to focus more on the structure of the trademark and improve the model's recognition ability.

[0139] Figure 5a This is a schematic diagram of a first trademark image provided in an embodiment of the present invention, such as... Figure 5a As shown, the first trademark image includes a metal trademark "H" located on the leather surface; Figure 5b This is a schematic diagram of an embossing process for a first trademark image provided in an embodiment of the present invention, such as... Figure 5b As shown, by Figure 5a Based on the relief treatment, Figure 5b Eliminated Figure 5a The texture information of materials such as metal and leather can help the model recognize the structure of the trademark "H".

[0140] Step 205: Adjust the convolutional neural network, the adjustment including at least one of the following:

[0141] Increase the input size of the convolutional neural network;

[0142] Reduce the downsampling factor of the convolutional neural network;

[0143] The dimension of the first trademark feature output by the convolutional neural network is increased. The first trademark feature is obtained by the convolutional neural network from the feature extraction of the first trademark image and the similar trademark image.

[0144] In this embodiment of the invention, a Convolutional Neural Network (CNN) is a type of feedforward neural network that can be composed of various backbones. For example, a CNN typically consists of one or more convolutional layers and a fully connected layer at the top, and also includes associated weights and pooling layers. It can perform good image processing. The convolutional layers can slide different convolutional kernels on the input image and perform operations, outputting the corresponding image features. The pooling layers implement a non-linear form of downsampling, dividing the input image into several rectangular regions and outputting a corresponding value for each rectangular region according to the pooling function. For example, max pooling outputs the maximum value of each rectangular region. By inserting pooling layers into the convolutional layers, the sensitivity of the convolutional layers to image features can be reduced. Therefore, in this invention, the convolutional neural network can be improved, such as by increasing the input size of the convolutional neural network to enable it to discover more detailed information of the input image, or by reducing the downsampling factor of the convolutional neural network to improve its sensitivity to image features, or by increasing the dimension of the first trademark feature output by the convolutional neural network. The first trademark feature is obtained by the convolutional neural network through feature extraction from the input first trademark image and similar trademark image, thus increasing the number of features of the output first trademark feature, thereby enabling more complete extraction of detailed information of the input image. Those skilled in the art can choose other operations to adjust the convolutional neural network according to actual needs, so as to better preserve the detailed information of the first trademark image and similar trademark image while ensuring the model training effect. Step 205 can be executed before step 206, which uses the first trademark image and similar trademark image to train the convolutional neural network, or it can be adjusted during the execution of step 206 according to the actual training situation. This embodiment of the invention does not impose specific limitations on this.

[0145] Step 206: Train a convolutional neural network using the first trademark image and the similar trademark image to obtain a trademark retrieval model.

[0146] In this embodiment of the invention, step 206 can be referred to the relevant description of step 103 above. To avoid repetition, it will not be repeated here.

[0147] In this embodiment of the invention, a classifier can be built after the convolutional neural network. The number of categories output by the classifier is the number of categories of the first trademark image and the number of categories of similar trademark images in the training data. The classifier can output the probability of the first trademark image and similar trademark images belonging to different categories based on the features of the first trademark. Then, based on the probability and the loss function, the convolutional neural network can be adjusted through gradient backpropagation. When the loss function reaches the convergence condition, the classifier is discarded to obtain the trademark retrieval model.

[0148] This invention provides a training method for a trademark retrieval model. When acquiring a first trademark image, similar trademark elements can also be acquired. Since trademarks are typically composed of different icons, texts, etc., similar trademark images can be obtained by combining and transforming these elements. Based on this, a convolutional neural network is trained using the actually acquired first trademark image and the similar trademark images obtained from the similar trademark elements, thereby obtaining the trademark retrieval model. The similar trademark images generated from the similar trademark elements effectively expand the capacity and variety of the training data, thereby improving the trademark retrieval model's ability to understand and recognize different trademarks, reducing the probability of false detections in trademark retrieval, and improving the accuracy of trademark retrieval.

[0149] Figure 6 This is a flowchart of the steps of a trademark retrieval method provided in an embodiment of the present invention, as follows: Figure 6 As shown, the method may include:

[0150] Step 301: Obtain the second trademark image.

[0151] In this embodiment of the invention, the second trademark image may be a trademark image to be searched whose category is unknown. Optionally, the trademark image to be searched may be preprocessed, such as cropping, background removal, or embossing, to avoid the influence of other interfering information on the model recognition.

[0152] Step 302: Use a trademark retrieval model to extract features from the second trademark image to obtain the features of the second trademark. The trademark retrieval model uses... Figure 1-2 The training is obtained by any of the methods described.

[0153] In this embodiment of the invention, a trademark retrieval model can be used to extract features from the second trademark image to obtain the second trademark image. The trademark retrieval model can be obtained through the aforementioned... Figure 1-2 The training obtained by any of the methods described above can be referred to the relevant descriptions of steps 101 to 103 or steps 201 to 206. To avoid repetition, they will not be repeated here.

[0154] Step 303: Search the image of the second trademark based on the features of the second trademark to obtain the search results of the image of the second trademark.

[0155] In this embodiment of the invention, the retrieval can be the process of determining a trademark image that matches the second trademark image among the retrieved trademark images. Optionally, the aforementioned trademark retrieval model can be used in advance or on-site to extract features from the retrieved trademark image, and the features of the second trademark can be compared with the features of the retrieved trademark image to determine the trademark image that matches the second trademark image and obtain the retrieval result.

[0156] Figure 7 This is a schematic diagram of a trademark retrieval process provided by an embodiment of the present invention, such as... Figure 7 As shown, the trademark retrieval model 401 extracts features from the second trademark image 402 and the retrieved trademark image 403 respectively, and obtains the second trademark feature 404 corresponding to the second trademark image 401 and the retrieved trademark feature 405. The second trademark feature 404 and the retrieved trademark feature 405 are compared to determine the retrieval result 406 corresponding to the second trademark image 402.

[0157] In this embodiment of the invention, during the trademark retrieval process, a trademark retrieval model is used to extract features from the second trademark image to be retrieved, thereby obtaining the second trademark features. The second trademark image is then retrieved based on these features to obtain the retrieval results. The trademark retrieval model employs the aforementioned... Figure 1-2 The method described above can be used to train a trademark retrieval model. This method can also collect trademark-like elements when collecting the first trademark image. Since trademarks are usually composed of different icons, texts, etc., trademark-like images can be obtained by combining and transforming trademark-like elements. Based on this, a convolutional neural network is trained using the actually collected first trademark image and the trademark-like images obtained based on trademark-like elements to obtain a trademark retrieval model. The trademark-like images generated by trademark-like elements effectively expand the capacity and variety of training data, thereby improving the trademark retrieval model's ability to understand and recognize different trademarks, reducing the probability of false detections in trademark retrieval, and improving the accuracy of trademark retrieval.

[0158] Figure 8 This is a structural block diagram of a training device 50 for a trademark retrieval model provided in an embodiment of the present invention, as shown below. Figure 8 As shown, the device may include:

[0159] The first data acquisition module 501 is used to acquire a first trademark image and trademark-like elements, wherein the trademark-like elements include at least one of icons and text.

[0160] The trademark generation module 502 is used to combine and / or transform the trademark elements to obtain a trademark image;

[0161] The model training module 503 is used to train a convolutional neural network using the first trademark image and the similar trademark images to obtain a trademark retrieval model.

[0162] Optionally, the trademark-like element includes an icon, and the trademark-like generation module 502 includes:

[0163] The line style submodule is used to change the line style of the icon, wherein the line style includes at least one of line color and line thickness;

[0164] The icon background submodule is used to change the background of the icon;

[0165] The trademark overlap submodule is used to overlap at least two of the icons;

[0166] The trademark splicing submodule is used to splice at least two of the icons.

[0167] Optionally, the trademark-like element includes text, and the trademark-like generation module 502 includes:

[0168] The text content submodule is used to change the language of the text.

[0169] The text style submodule is used to change the text style of the text, wherein the text style includes at least one of font, font size, and color;

[0170] The text background submodule is used to change the background of the text;

[0171] The text overlap submodule is used to overlap at least two types of the text.

[0172] The text splicing submodule is used to splice at least two types of the text.

[0173] Optionally, the total number of the trademark images is less than the total number of the first trademark images.

[0174] Optionally, the trademark images may include at least two types, and the trademark elements contained in different types of trademark images may differ.

[0175] Optionally, the device further includes:

[0176] The data sampling module is used to randomly sample each type of the first trademark image, such that the maximum number of different types of the first trademark images and the class trademark images is less than or equal to the target number, and the target number is less than or equal to a preset multiple of the minimum number of different types of the first trademark images and the class trademark images.

[0177] Optionally, the device further includes:

[0178] The data enhancement module is used to perform data enhancement on the first trademark image and the similar trademark image, wherein the data enhancement includes at least one of rotation, flipping, scaling, cropping, color changing, blurring, and embossing.

[0179] Optionally, the device further includes:

[0180] A model tuning module is used to tune the convolutional neural network, wherein the tuning includes at least one of the following:

[0181] Increase the input size of the convolutional neural network;

[0182] Reduce the downsampling factor of the convolutional neural network;

[0183] The dimension of the first trademark feature output by the convolutional neural network is increased. The first trademark feature is obtained by the convolutional neural network from the feature extraction of the first trademark image and the similar trademark image.

[0184] This invention provides a training device for a trademark retrieval model. When acquiring a first trademark image, it can also acquire similar trademark elements. Since trademarks are typically composed of different icons, texts, etc., similar trademark images can be obtained by combining and transforming these elements. Based on this, a convolutional neural network is trained using the actually acquired first trademark image and the similar trademark images obtained from the similar trademark elements to obtain the trademark retrieval model. The similar trademark images generated from the similar trademark elements effectively expand the capacity and variety of the training data, thereby improving the trademark retrieval model's ability to understand and recognize different trademarks, reducing the probability of false detections in trademark retrieval, and improving the accuracy of trademark retrieval.

[0185] Figure 9 This is a structural block diagram of a trademark retrieval device 60 provided in an embodiment of the present invention, as shown below. Figure 9 As shown, the device may include:

[0186] The second data acquisition module 601 is used to obtain the second trademark image;

[0187] The feature extraction module 602 is used to extract features from the second trademark image using a trademark retrieval model to obtain the features of the second trademark, wherein the trademark retrieval model is trained by the apparatus as described in the third aspect.

[0188] The trademark classification module 603 is used to search for the image of the second trademark based on the features of the second trademark, and obtain the search results of the image of the second trademark.

[0189] The trademark retrieval device provided in this embodiment of the invention, during the trademark retrieval process, uses a trademark retrieval model to extract features from a second trademark image to be retrieved, obtains second trademark features, and then retrieves the second trademark image based on the second trademark features to obtain retrieval results for the second trademark image. The trademark retrieval model employs the aforementioned... Figure 8The device is trained to acquire trademark retrieval models. While acquiring the first trademark image, it can also acquire similar trademark elements. Since trademarks are typically composed of different icons, texts, etc., similar trademark images can be obtained by combining and transforming these elements. Based on this, a convolutional neural network is trained using the actually acquired first trademark image and the similar trademark images obtained from the similar trademark elements to obtain a trademark retrieval model. The similar trademark images generated from the similar trademark elements effectively expand the capacity and variety of the training data, thereby improving the trademark retrieval model's ability to understand and recognize different trademarks, reducing the probability of false detections in trademark retrieval, and improving the accuracy of trademark retrieval.

[0190] This invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the training method for the trademark retrieval model or the trademark retrieval method described above.

[0191] Figure 10 This is a structural block diagram of an electronic device 700 provided in an embodiment of the present invention, such as... Figure 10 As shown, the memory 702 and the program or instructions stored on the memory 702 and executable on the processor 701, when the program or instructions are executed by the processor 701, implement the training method of the above-mentioned trademark retrieval model, or the above-mentioned trademark retrieval method.

[0192] Those skilled in the art will understand that this invention includes devices for performing one or more of the operations described herein. These devices may be specifically designed and manufactured for the desired purpose, or may include known devices found in general-purpose computers. These devices have computer programs stored therein that can be selectively activated or reconfigured. Such computer programs may be stored in a storage medium of the device (e.g., a computer) or in any type of medium suitable for storing electronic instructions and coupled to a bus, including but not limited to any type of disk (including floppy disks, hard disks, optical disks, CD-ROMs, and magneto-optical disks), ROM (Read-Only Memory), RAM (Random Access Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic cards, or optical cards. That is, the storage medium includes any medium by which a device (e.g., a computer) stores or transmits information in a readable form.

[0193] Those skilled in the art will understand that each block in these structural diagrams and / or block diagrams and / or flowcharts, as well as combinations of blocks in these structural diagrams and / or block diagrams and / or flowcharts, can be implemented using computer program instructions. Those skilled in the art will also understand that these computer program instructions can be provided to a processor of a general-purpose computer, a specialized computer, or other programmable data processing method for implementation, thereby enabling the processor of the computer or other programmable data processing method to execute the schemes specified in the blocks or plurality of blocks of the structural diagrams and / or block diagrams and / or flowcharts disclosed herein.

[0194] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A training method for a trademark retrieval model, characterized in that, The method includes: Collect a first trademark image and similar trademark elements, wherein the similar trademark elements are various elements contained in the trademark image, and the similar trademark elements include at least one of icons and text; The trademark elements are combined and / or transformed to obtain a trademark image. A convolutional neural network is trained using the first trademark image and the similar trademark images to obtain a trademark retrieval model; The total number of the trademark images of the aforementioned category is less than the total number of the first trademark images; The trademark images include at least two types, and different types of trademark images contain different trademark elements. The first trademark image contains different trademark elements than the trademark image.

2. The method according to claim 1, characterized in that, The trademark elements include icons, and the combination and / or transformation of the trademark elements to obtain the trademark image includes at least one of the following: Change the line style of the icon, wherein the line style includes at least one of line color and line thickness; Change the background of the icon; At least two of the icons are overlapped; Join at least two of the icons together.

3. The method according to claim 1, characterized in that, The trademark elements include text, and the combination and / or transformation of the trademark elements to obtain the trademark image includes at least one of the following: Change the language of the text; Change the text style of the text, wherein the text style includes at least one of font, font size, and color; Change the background of the text; Overlapping at least two of the aforementioned texts; Combine at least two of the aforementioned texts.

4. The method according to claim 1, characterized in that, After combining and / or transforming the trademark elements to obtain the trademark image, the method further includes: Random sampling is performed on each type of the first trademark image, such that the maximum number of different types of the first trademark images and the class of trademark images is less than or equal to the target number, and the target number is less than or equal to a preset multiple of the minimum number of different types of the first trademark images and the class of trademark images.

5. The method according to claim 1, characterized in that, After combining and / or transforming the trademark elements to obtain the trademark image, the method further includes: Data enhancement is performed on the first trademark image and the trademark-like image, and the data enhancement includes at least one of rotation, flipping, scaling, cropping, color changing, blurring, and embossing.

6. The method according to claim 1, characterized in that, Before training a convolutional neural network using the first trademark image and the similar trademark images to obtain a trademark retrieval model, the method further includes: The convolutional neural network is adjusted, and the adjustment includes at least one of the following: Increase the input size of the convolutional neural network; Reduce the downsampling factor of the convolutional neural network; The dimension of the first trademark feature output by the convolutional neural network is increased. The first trademark feature is obtained by the convolutional neural network from the feature extraction of the first trademark image and the similar trademark image.

7. A trademark retrieval method, characterized in that, The method includes: Obtain a second trademark image; The trademark retrieval model is used to extract features from the second trademark image to obtain the features of the second trademark. The trademark retrieval model is trained by the method described in any one of claims 1-6. The image of the second trademark is retrieved based on the characteristics of the second trademark to obtain the retrieval results of the image of the second trademark.

8. A training device for a trademark retrieval model, characterized in that, The device comprises: The first data acquisition module is used to acquire a first trademark image and trademark-like elements, wherein the trademark-like elements are various elements contained in the trademark image, and the trademark-like elements include at least one of icons and text. The trademark generation module is used to combine and / or transform the trademark elements to obtain a trademark image. The model training module is used to train a convolutional neural network using the first trademark image and the similar trademark image to obtain a trademark retrieval model; The total number of the trademark images of the aforementioned category is less than the total number of the first trademark images; The trademark images include at least two types, and different types of trademark images contain different trademark elements. The first trademark image contains different trademark elements than the trademark image.

9. A trademark retrieval device, characterized in that, The device comprises: The second data acquisition module is used to obtain the second trademark image; The feature extraction module is used to extract features from the second trademark image using a trademark retrieval model to obtain the features of the second trademark, wherein the trademark retrieval model is trained by the apparatus as described in claim 8. The trademark classification module is used to search for the second trademark image based on the characteristics of the second trademark and obtain the search results for the second trademark image.

Citation Information

Patent Citations

  • Method and apparatus for generating training data, training method and apparatus for object detection model

    CN109544496A

  • Related method and device for identifying identification pattern in media content

    CN111126390A