A method and related device for image recognition search
The category of the input image is judged through the image intent classification model, and image search is performed only when it is a product category. This solves the problem of wasting computing resources caused by searching for non-commodity images in the existing technology, and achieves resource saving and improvement of search efficiency. .
Patent Information
- Application Number
- CN202010616301.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-30
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2040-06-30
AI Technical Summary
In the existing technology, whether the input image uploaded by the user is a product image or a non-commodity image, the image search for products will be performed, resulting in a waste of computing resources.
The image intent classification model is used to determine whether the intent category of the input image is a product category or a non-commodity category. Image feature extraction and search are only performed when the intent category is a product category, avoiding image search for products for input images of non-commodity categories.
It effectively avoids the waste of computing resources, greatly saves computing resources, and improves the efficiency and user experience of image search.
Smart Images

Figure CN113869336B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an image recognition search method and related devices. Background Art
[0002] With the rapid development of image recognition technology, in daily life, you can take pictures of clothes, cosmetics, daily necessities, etc. that you are interested in, and then search for products by image. In fact, it means to perform image recognition and search on the image, and quickly obtain the link of the same or similar product corresponding to the image, thereby meeting the user's needs for quick search of products of interest.
[0003] At present, the specific execution process of searching for products by image is: first use the deep learning model to extract the image features of the input image, and then calculate the distance between the image features and the image features of each product image in the product image database to return product images similar to the input image, thereby obtaining links to the same or similar products.
[0004] However, after research, the inventors found that there are various categories of input images, which may be product images or non-product images. In fact, there is no need to perform the operation of searching for products by image for non-product images; while in the prior art, the above-mentioned operation of searching for products by image is performed on input images, that is, the operation of searching for products by image is also performed on non-product images, which is very likely to lead to a waste of computing resources. Summary of the invention
[0005] The technical problem to be solved by the present application is to provide a method and related device for image recognition search, in which input images of non-commodity categories do not perform image search operations for commodities, thereby avoiding the waste of computing resources and greatly saving computing resources.
[0006] In a first aspect, an embodiment of the present application provides a method for image recognition search, the method comprising:
[0007] Using an image intent classification model to classify the intent of an input image, and obtaining an intent category of the input image; the intent category includes a commodity category and a non-commodity category;
[0008] If the intended category of the input image is the commodity category, extracting image features of the input image using an image recognition model;
[0009] Based on the image features of the input image, at least one commodity image similar to the input image is searched in a commodity image database to obtain a set of similar images to the input image.
[0010] Optionally, the commodity category includes clothing commodity category and other commodity categories; correspondingly, the image recognition model includes clothing commodity recognition model and other commodity recognition model.
[0011] Optionally, if the commodity category of the input image is specifically the clothing commodity category, the extracting the image features of the input image by using an image recognition model includes:
[0012] Detecting the input image using a detection network to obtain multiple clothing area images in the input image;
[0013] Extracting image features of each of the clothing area images using the clothing commodity recognition model;
[0014] Alternatively, if the commodity category of the input image is specifically the other commodity category, the extracting the image features of the input image by using the image recognition model is specifically:
[0015] The image features of the input image are directly extracted using the other commodity recognition model.
[0016] Optionally, the step of obtaining the image intent classification model includes:
[0017] Acquire a plurality of image samples labeled with intent category labels; the plurality of image samples labeled with intent category labels include a plurality of first image samples labeled with commodity category labels and a plurality of second image samples labeled with non-commodity category labels;
[0018] Taking the image sample as input and the intent category label as output, a neural network model is pre-trained to obtain the image intent classification model.
[0019] Optionally, after obtaining a set of similar images to the input image, the method further includes:
[0020] Based on the distance between the image feature of the input image and the image feature of each similar image in the similar image set, obtaining a rank value corresponding to each similar image;
[0021] Based on the rank value corresponding to each of the similar images and the preset rank value threshold, similar images in the similar image set whose rank value is less than the preset rank value threshold are filtered to obtain a first target similar image set.
[0022] Optionally, after obtaining a set of similar images to the input image, the method further includes:
[0023] If multiple similar images in the similar image set correspond to multiple image categories, obtaining an entropy value for each image category based on the number of similar images corresponding to each image category in the similar image set;
[0024] Based on the entropy value of each of the image categories and a preset entropy value threshold, similar images corresponding to image categories having entropy values greater than the preset entropy value threshold in the similar image set are filtered to obtain a second target similar image set.
[0025] Optionally, after obtaining a set of similar images to the input image, the method further includes:
[0026] Based on the distance between the image feature of the input image and the image feature of each similar image in the similar image set, obtaining a rank value corresponding to each similar image;
[0027] Determining image categories corresponding to a plurality of similar images in the similar image set;
[0028] Based on the rank value corresponding to each of the similar images and the image category, a sorting order of multiple similar images in the similar image set is determined.
[0029] In a second aspect, an embodiment of the present application provides a device for image recognition search, the device comprising:
[0030] An intention category obtaining unit, configured to perform intention classification on an input image using an image intention classification model to obtain an intention category of the input image; the intention category includes a commodity category and a non-commodity category;
[0031] an image feature extraction unit, configured to extract image features of the input image using an image recognition model if the intended category of the input image is the commodity category;
[0032] The similar image set obtaining unit is used to search for at least one commodity image similar to the input image in a commodity image database based on the image features of the input image, and obtain a similar image set of the input image.
[0033] Optionally, the commodity category includes clothing commodity category and other commodity categories; correspondingly, the image recognition model includes clothing commodity recognition model and other commodity recognition model.
[0034] Optionally, if the commodity category of the input image is specifically the clothing commodity category, the image feature extraction unit includes:
[0035] A clothing area image acquisition subunit, used to detect the input image using a detection network to obtain a plurality of clothing area images in the input image;
[0036] An image feature extraction subunit, used to extract image features of each clothing area image using the clothing commodity recognition model;
[0037] Alternatively, if the intended category of the input image is the other commodity category, the image feature extraction unit is specifically used to:
[0038] The image features of the input image are directly extracted using the other commodity recognition model.
[0039] Optionally, the device further includes an image intent classification model obtaining unit, and the image intent classification model obtaining unit includes:
[0040] An image sample acquisition subunit is used to acquire a plurality of image samples annotated with intention category labels; the plurality of image samples annotated with intention category labels include a plurality of first image samples annotated with commodity category labels and a plurality of second image samples annotated with non-commodity category labels;
[0041] The image intent classification model acquisition subunit is used to take the image sample as input and the intent category label as output, and pre-train a neural network model to obtain the image intent classification model.
[0042] Optionally, the device further comprises:
[0043] A rank value obtaining unit, used for obtaining a rank value corresponding to each similar image based on a distance between an image feature of the input image and an image feature of each similar image in the similar image set;
[0044] The first target similar image set obtaining unit is used to filter similar images in the similar image set whose rank value is less than the preset rank value threshold based on the rank value corresponding to each of the similar images and the preset rank value threshold, so as to obtain the first target similar image set.
[0045] Optionally, the device further comprises:
[0046] an entropy value obtaining unit, configured to obtain an entropy value of each image category based on the number of similar images corresponding to each image category in the similar image set if multiple similar images in the similar image set correspond to multiple image categories;
[0047] The second target similar image set obtaining unit is used to filter similar images corresponding to image categories whose entropy values in the similar image set are greater than the preset entropy value threshold based on the entropy value of each image category and the preset entropy value threshold, so as to obtain the second target similar image set.
[0048] Optionally, the device further comprises:
[0049] A rank value obtaining unit, used for obtaining a rank value corresponding to each similar image based on a distance between an image feature of the input image and an image feature of each similar image in the similar image set;
[0050] An image category determination unit, used to determine image categories corresponding to a plurality of similar images in the similar image set;
[0051] A sorting order determining unit is used to determine the sorting order of multiple similar images in the similar image set based on the rank value corresponding to each of the similar images and the image category.
[0052] In a third aspect, an embodiment of the present application provides a device for image recognition search, the device comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations:
[0053] Using an image intent classification model to classify the intent of an input image, and obtaining an intent category of the input image; the intent category includes a commodity category and a non-commodity category;
[0054] If the intended category of the input image is the commodity category, extracting image features of the input image using an image recognition model;
[0055] Based on the image features of the input image, at least one commodity image similar to the input image is searched in a commodity image database to obtain a set of similar images to the input image.
[0056] In a fourth aspect, an embodiment of the present application provides a machine-readable medium having instructions stored thereon, which, when executed by one or more processors, enables the device to perform the image recognition search method described in any one of the first aspects above.
[0057] Compared with the prior art, this application has at least the following advantages:
[0058] Using the technical solution of the embodiment of the present application, first, the image intent classification model is used to determine whether the intent category of the input image is a commodity category or a non-commodity category; then, when the intent category of the input image is a commodity category, the image features of the input image are extracted by the input image recognition model; finally, based on the image features of the input image, at least one commodity image similar to the input image is searched in the commodity image database to form a similar image set of the input image. It can be seen that the image intent classification model is used to determine the intent category of the input image, and only when the judgment result is a commodity category, the operation of searching for commodities by image is performed, so as to achieve the purpose of filtering input images of non-commodity categories, that is, the input images of non-commodity categories are not subjected to the operation of searching for commodities by image, thereby avoiding the waste of computing resources and greatly saving computing resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0060] Figure 1 A schematic diagram of a system framework involved in an application scenario in an embodiment of the present application;
[0061] Figure 2 A flowchart of an image recognition search method provided in an embodiment of the present application;
[0062] Figure 3 A flowchart of another method for image recognition search provided in an embodiment of the present application;
[0063] Figure 4 A flowchart of another method for image recognition search provided in an embodiment of the present application;
[0064] Figure 5 A flowchart of another method for image recognition search provided in an embodiment of the present application;
[0065] Figure 6 A flowchart of another method for image recognition search provided in an embodiment of the present application;
[0066] Figure 7 A schematic diagram of the structure of an image recognition and search device provided in an embodiment of the present application;
[0067] Figure 8 A schematic diagram of the structure of a device for image recognition search provided in an embodiment of the present application;
[0068] Fig. 9 A schematic diagram of the structure of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0069] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0070] After research, the inventors found that at present, searching for products by image usually directly extracts image features from input images uploaded by users to search for product images similar to the input images; however, the input images uploaded by users are of various types and may be product images or non-product images. In fact, it is not necessary to perform the operation of searching for products by image for non-product images; that is, at present, all input images uploaded by users are subjected to the operation of searching for products by image, which is extremely likely to lead to a waste of computing resources.
[0071] In order to solve this problem, in an embodiment of the present application, an image intent classification model is used to determine whether the intent category of the input image is a commodity category or a non-commodity category; when the intent category of the input image is a commodity category, the image features of the input image are extracted by the input image recognition model; based on the image features of the input image, at least one commodity image similar to the input image is searched in the commodity image database to form a similar image set of the input image. It can be seen that the image intent classification model is used to determine the intent category of the input image, and only when the judgment result is a commodity category, the operation of searching for commodities by image is performed, so as to achieve the purpose of filtering input images of non-commodity categories, that is, input images of non-commodity categories are not subjected to the operation of searching for commodities by image, thereby avoiding the waste of computing resources and greatly saving computing resources.
[0072] For example, one of the scenarios of the embodiments of the present application may be applied to Figure 1In the scenario shown. In the scenario, there are a user terminal 101 and a processor 102, wherein the user terminal 101 can be, for example, a device such as a smart phone, a tablet or a personal computer with a shooting function. The user shoots the item of interest through the user terminal 101 to obtain an item image, and uploads the item image as an input image to the processor 102; the processor 102 stores a pre-trained image intent classification model and an image recognition model, and uses the method of the embodiment of the present application to filter the input images of non-commodity categories, obtain a similar image set of the input images of the commodity category and return it to the user terminal 101, so that the user terminal 101 displays the similar image set to the user.
[0073] It can be understood that in the above application scenario, although the action description of the implementation mode of the present application is executed by the processor 102, the present application is not limited in terms of the execution subject, as long as the actions disclosed in the implementation mode of the present application are executed.
[0074] It can be understood that the above scenario is only an example scenario provided by the embodiment of the present application, and the embodiment of the present application is not limited to this scenario.
[0075] The specific implementation of the image recognition search method and related devices in the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0076] Exemplary Methods
[0077] See also Figure 2 , shows a flow chart of a method for image recognition search in an embodiment of the present application. In this embodiment, the method may include the following steps:
[0078] Step 201: Use an image intent classification model to perform intent classification on an input image to obtain an intent category of the input image; the intent category includes a commodity category and a non-commodity category.
[0079] It should be noted that since the input images uploaded by users are of various types, the input images may be product images or product images. In most cases, the input images uploaded by users are non-product images. It is meaningless to search for products with non-product images. If a large number of non-product images are also subjected to the operation of searching for products with images, it will cause a considerable waste of computing resources. Therefore, in the embodiment of the present application, in order to achieve the purpose of saving computing resources by not performing the operation of searching for products with images for non-product images, it is necessary to first determine whether the input image uploaded by the user is a product image or a non-product image. Specifically, an image intent classification model is obtained by pre-training a neural network model based on a large number of image samples labeled with intent category labels, and determining whether the intent category of the input image is a product category or a non-product category. The image samples include a large number of first image samples labeled with product category labels and second image samples labeled with non-product category labels.
[0080] That is, in an optional implementation of the embodiment of the present application, the step of obtaining the image intent classification model may, for example, include: obtaining a plurality of image samples labeled with intent category labels; the plurality of image samples labeled with intent category labels include a plurality of first image samples labeled with commodity category labels and a plurality of second image samples labeled with non-commodity category labels; using the image samples as input and the labeled intent category labels as output, pre-training a neural network model to obtain the image intent classification model.
[0081] Step 202: If the intended category of the input image is the commodity category, extract image features of the input image using an image recognition model.
[0082] It should be noted that after obtaining the intended category of the input image, for input images of non-commodity categories, in order to avoid wasting computing resources, it is not necessary to perform the operation of searching for commodities by image, that is, when performing the operation of searching for commodities by image, it is necessary to filter the input images of non-commodity categories; for input images of commodity categories, it is necessary to perform the operation of searching for commodities by image, and it is necessary to first extract the image features of the input images of commodity categories. Therefore, in the embodiment of the present application, the input images of commodity categories are input into an image recognition model pre-trained based on a large number of commodity image samples to extract the image features of the input images of commodity categories.
[0083] It should be noted that, considering that a large proportion of users search for goods by image by taking pictures of clothing, in an embodiment of the present application, the input images of the product category can be divided into input images of the clothing product category and input images of other product categories, wherein the input images of other product categories represent the input images of the product category except the input images of the clothing product category. Correspondingly, the input images of the clothing product category need to be input into a clothing product recognition model pre-trained based on a large number of clothing product image samples to extract its image features. The input images of other product categories need to be input into other product recognition models pre-trained based on a large number of other product image samples to extract its image features. Therefore, in an optional implementation of the embodiment of the present application, the product categories include clothing product categories and other product categories; correspondingly, the image recognition model includes a clothing product recognition model and other product recognition models.
[0084] The following specifically describes the implementation of step 202 when the commodity categories of the input image are divided into two situations: clothing commodity categories and other commodity categories.
[0085] First, when the commodity category of the input image is the clothing commodity category, since the input image of the clothing commodity category may include multiple clothing, such as tops, pants and shoes, etc., if the input image of the clothing commodity category is directly recognized by a single model, the model is more inclined to select one clothing in the input image of the clothing commodity category for recognition, and can only extract the image features of one clothing in the input image of the clothing commodity category. Subsequently, only similar images can be searched for to obtain similar images of one clothing in the input image of the clothing commodity category, which affects the effect of searching for commodities by image. Therefore, in an embodiment of the present application, for the input image of the clothing commodity category, it is necessary to first obtain multiple clothing area images through the detection network frame selection, and then extract the image features of each clothing area image through the clothing commodity recognition model. That is, in an optional implementation of the embodiment of the present application, if the commodity category of the input image is specifically the clothing commodity category, the step 202 may, for example, include the following steps:
[0086] Step A: Detecting the input image using a detection network to obtain multiple clothing area images in the input image;
[0087] Step B: extracting image features of each clothing area image using the clothing commodity recognition model.
[0088] As an example, an input image of a clothing product category includes tops, pants, and shoes. In the prior art, an image recognition network is used to extract image features of the top in the input image; while in an embodiment of the present application, a detection network is used to detect the input image to obtain a top area image, a pants area image, and a shoe area image in the input image; and a clothing product recognition model is used to extract image features of the top area image, image features of the pants area image, and image features of the shoe area image, respectively.
[0089] Through the implementation method of step A-step B, a detection network is used to detect multiple clothing area images in an input image of the clothing product category, and image features are extracted from the multiple clothing area images to avoid the phenomenon that only the image features of one of the clothing items can be extracted when the input image of the clothing product category is directly identified. Subsequently, similar images can be searched based on the image features of each clothing area image, thereby greatly improving the effect of image search for products.
[0090] Second, when the commodity category of the input image is other commodity categories, for the input image of other commodity categories, the image features of the input image of other commodity categories can be directly extracted through other commodity recognition models. Therefore, in an optional implementation of the embodiment of the present application, if the intended category of the input image is the other commodity category, the step 202 can be specifically, for example, to directly extract the image features of the input image using the other commodity recognition model.
[0091] Step 203: Based on the image features of the input image, search a product image database for at least one product image similar to the input image to obtain a set of similar images to the input image.
[0092] It should be noted that after obtaining the image features of the input image of the product category, the distance between the image features and the image features of each product image in the product image database can be calculated. The smaller the distance, the greater the similarity between the product image and the input image, and the larger the distance, the smaller the similarity between the product image and the input image. Based on each distance and the preset distance threshold, the product image corresponding to the distance less than the preset distance threshold is determined as a similar image of the input image, forming a similar image set of the input image.
[0093] Through the various implementation methods provided in this embodiment, first, the image intent classification model is used to determine whether the intent category of the input image is a commodity category or a non-commodity category; then, when the intent category of the input image is a commodity category, the image features of the input image are extracted through the input image recognition model; finally, based on the image features of the input image, at least one commodity image similar to the input image is searched in the commodity image database to form a similar image set of the input image. It can be seen that the image intent classification model is used to determine the intent category of the input image, and only when the judgment result is a commodity category, the operation of searching for commodities by image is performed, so as to achieve the purpose of filtering input images of non-commodity categories, that is, the input images of non-commodity categories are not subjected to the operation of searching for commodities by image, thereby avoiding the waste of computing resources and greatly saving computing resources.
[0094] It should also be noted that, after the above-mentioned embodiment searches and obtains a set of similar images of the input image from the commodity image database, similar images that are more similar to the input image can be screened out from the set of similar images of the input image. Therefore, on the basis of the above-mentioned embodiment, the rank value corresponding to each similar image can be first calculated through the distance between the known image features of the input image and the image features of each similar image in the set of similar images. The larger the rank value, the greater the similarity between the similar image and the input image, and the smaller the rank value, the smaller the similarity between the similar image and the input image. Then, similar images in the similar image set whose rank values are less than a preset rank value threshold are filtered out, and similar images in the similar image set whose rank values are greater than or equal to the preset rank value threshold are retained, that is, images that are more similar to the input image are screened out from the similar image set to form a first target similar image set.
[0095] See below Figure 3 , shows a flow chart of another method for image recognition search in an embodiment of the present application. In this embodiment, the method may include the following steps:
[0096] Step 301: Use an image intent classification model to perform intent classification on an input image to obtain an intent category of the input image; the intent category includes a commodity category and a non-commodity category.
[0097] Step 302: If the intended category of the input image is the commodity category, extract image features of the input image using an image recognition model.
[0098] Step 303: Based on the image features of the input image, search a product image database for at least one product image similar to the input image to obtain a set of similar images to the input image.
[0099] In this embodiment, steps 301 to 303 are the same as steps 201 to 202 in the above embodiment. The specific implementation of steps 301 to 303 can refer to the specific implementation of steps 201 to 202 in the above embodiment, which will not be repeated here.
[0100] Step 304: Based on the distance between the image feature of the input image and the image feature of each similar image in the similar image set, obtain the rank value corresponding to each similar image.
[0101] In the embodiment of the present application, the calculation formula of the rank value corresponding to the similar image can be specifically: rank=2-distance; wherein distance represents the distance between the image features of the input image and the image features of the similar image.
[0102] Step 305: Based on the rank value corresponding to each of the similar images and the preset rank value threshold, filter the similar images in the similar image set whose rank value is less than the preset rank value threshold to obtain a first target similar image set.
[0103] As an example, assuming that the preset rank value threshold is 1.08, similar images with rank values less than 1.08 in the similar image set are filtered to obtain the first target similar image set.
[0104] Through various implementation methods provided in this embodiment, first, the image intention classification model is used to determine whether the intention category of the input image is a commodity category or a non-commodity category; then, when the intention category of the input image is a commodity category, the image features of the input image are extracted by the input image recognition model; secondly, according to the image features of the input image, at least one commodity image similar to the input image is searched in the commodity image database to form a similar image set of the input image; thirdly, the rank value corresponding to each similar image is calculated by the distance between the image feature of the input image and the image feature of each similar image in the similar image set; finally, similar images whose rank value in the similar image set is less than the preset rank value threshold are filtered to obtain the first target similar image set. It can be seen that the image intention classification model is used to determine the intention category of the input image, and only when the judgment result is a commodity category, the operation of searching for commodities by image is performed, so as to achieve the purpose of filtering the input image of the non-commodity category, that is, the input image of the non-commodity category does not perform the operation of searching for commodities by image, thereby avoiding the waste of computing resources and greatly saving computing resources; in addition, the rank value corresponding to each similar image is used to filter similar images in the similar image set that are more similar to the input image, thereby improving the effect of searching for commodities by image, thereby improving the user search experience.
[0105] It should also be noted that, in the above embodiment, after the similar image set of the input image is obtained by searching from the commodity image database, the image categories to which different similar images in the similar image set belong may be different, that is, multiple similar images in the similar image set correspond to multiple image categories; the uncertainty of similar images corresponding to certain image categories in the similar image set may be large, and filtering is required. Therefore, on the basis of the above embodiment, the entropy value of each image category can also be calculated first by the number of similar images corresponding to each image category in the similar image set, the larger the entropy value, the greater the uncertainty of the similar images corresponding to the image category, and the smaller the entropy value, the smaller the uncertainty of the similar images corresponding to the image category; then, similar images corresponding to the image categories in the similar image set whose entropy values are greater than the preset entropy value threshold are filtered out, and similar images corresponding to the image categories in the similar image set whose entropy values are less than or equal to the preset entropy value threshold are retained to form a second target similar image set.
[0106] See below Figure 4 , shows a flow chart of another method for image recognition search in an embodiment of the present application. In this embodiment, the method may include the following steps:
[0107] Step 401: Use an image intent classification model to perform intent classification on an input image to obtain an intent category of the input image; the intent category includes a commodity category and a non-commodity category.
[0108] Step 402: If the intended category of the input image is the commodity category, extract image features of the input image using an image recognition model.
[0109] Step 403: Based on the image features of the input image, search a product image database for at least one product image similar to the input image to obtain a set of similar images to the input image.
[0110] In this embodiment, steps 401 to 403 are the same as steps 201 to 202 in the above embodiment. The specific implementation of steps 401 to 403 can refer to the specific implementation of steps 201 to 202 in the above embodiment, which will not be repeated here.
[0111] Step 404: If multiple similar images in the similar image set correspond to multiple image categories, an entropy value of each image category is obtained based on the number of similar images corresponding to each image category in the similar image set.
[0112] As an example, the number of similar images in the similar image set is 30, the input image is a Coca-Cola image, and multiple similar images in the similar image set correspond to three image categories, namely, beverage category, cup category, and toy category. Among them, the number of similar images corresponding to the beverage category in the similar image set is 20, the number of similar images corresponding to the cup category is 8, and the number of similar images corresponding to the toy category is 2. Based on this calculation, the entropy value of the beverage category, the entropy value of the cup category, and the entropy value of the toy category are obtained.
[0113] Step 405: Based on the entropy value of each of the image categories and the preset entropy value threshold, similar images corresponding to image categories having entropy values greater than the preset entropy value threshold in the similar image set are filtered to obtain a second target similar image set.
[0114] As an example, based on the above example, if the entropy value of the toy category is greater than the preset entropy value threshold, the similar images corresponding to the toy category in the similar image set are filtered, and the similar images corresponding to the beverage category and the similar images corresponding to the cup category in the similar image set are retained to obtain the second target similar image set, and the number of similar images in the second target similar image set is 28.
[0115] Through various implementation methods provided in this embodiment, first, the image intention classification model is used to determine whether the intention category of the input image is a commodity category or a non-commodity category; then, when the intention category of the input image is a commodity category, the image features of the input image are extracted through the input image recognition model; secondly, according to the image features of the input image, at least one commodity image similar to the input image is searched in the commodity image database to form a similar image set of the input image; thirdly, based on the number of similar images corresponding to each image category in the similar image set, the entropy value of each image category is calculated; finally, the similar images corresponding to the entropy value greater than the preset entropy value threshold in the similar image set are filtered to obtain the second target similar image set. It can be seen that the image intention classification model is used to judge the intention category of the input image, and only when the judgment result is a commodity category, the operation of searching for commodities by image is performed, so as to achieve the purpose of filtering the input image of the non-commodity category, that is, the input image of the non-commodity category does not perform the operation of searching for commodities by image, thereby avoiding the waste of computing resources and greatly saving computing resources; in addition, by filtering the similar images with large uncertainty in the similar image set through the entropy values of the image categories to which multiple similar images in the similar image set belong, the effect of searching for commodities by image is improved, thereby improving the user search experience.
[0116] It should also be noted that the sorting order of multiple similar images in the similar image set can also be determined so that the sorted multiple similar images in the similar image set are displayed to the user to improve the user's search experience. The sorting order of multiple similar images depends on the rank value corresponding to each similar image in the similar image set described above and the image categories corresponding to the multiple similar images in the similar image set.
[0117] See below Figure 5 , shows a flow chart of another method for image recognition search in an embodiment of the present application. In this embodiment, the method may include the following steps:
[0118] Step 501: Use an image intent classification model to perform intent classification on an input image to obtain an intent category of the input image; the intent category includes a commodity category and a non-commodity category.
[0119] Step 502: If the intended category of the input image is the commodity category, extract image features of the input image using an image recognition model.
[0120] Step 503: Based on the image features of the input image, search a product image database for at least one product image similar to the input image to obtain a set of similar images to the input image.
[0121] In this embodiment, steps 501 to 503 are the same as steps 201 to 202 in the above embodiment. The specific implementation of steps 501 to 503 can refer to the specific implementation of steps 201 to 202 in the above embodiment, which will not be repeated here.
[0122] Step 504: Based on the distance between the image feature of the input image and the image feature of each similar image in the similar image set, obtain the rank value corresponding to each similar image.
[0123] In this embodiment, step 504 is the same as step 304 in the above embodiment. The specific implementation of step 504 can refer to the specific implementation of step 304 in the above embodiment, which will not be repeated here.
[0124] Step 505: Determine the image categories corresponding to the multiple similar images in the similar image set.
[0125] In this embodiment, step 505 actually refers to obtaining the image category to which each similar image in the similar image set belongs, thereby determining the image categories corresponding to multiple similar images in the similar image set.
[0126] Step 506: Determine the sorting order of multiple similar images in the similar image set based on the rank value corresponding to each of the similar images and the image category.
[0127] In this embodiment, first, multiple similar images in a similar image set can be sorted based on the rank value corresponding to each similar image to obtain a sorting position value of each similar image, and then, based on the sorting position values of similar images corresponding to each image category, a sorting score for each image category can be calculated; finally, based on the sorting score of each image category, the sorting of multiple similar images in the similar image set is adjusted to obtain a sorting order of multiple similar images in the similar image set.
[0128] For example, the number of similar images corresponding to an image category is k, and the calculation formula for the ranking score of the image category is as follows:
[0129]
[0130] Among them, score represents the ranking score of the image category, X i Represents the ranking position value of the i-th similar image corresponding to the image category.
[0131] Of course, in this embodiment, if multiple similar images in the similar image set belong to the same image category, that is, multiple similar images in the similar image set correspond to one image category, the multiple similar images in the similar image set are sorted directly based on the rank value corresponding to each similar image to determine the sorting order of the multiple similar images in the similar image set.
[0132] Through the various implementation methods provided in this embodiment, first, the image intention classification model is used to determine whether the intention category of the input image is a commodity category or a non-commodity category; then, when the intention category of the input image is a commodity category, the image features of the input image are extracted through the input image recognition model; secondly, based on the image features of the input image, at least one commodity image similar to the input image is searched in the commodity image database to form a similar image set of the input image; thirdly, the rank value corresponding to each similar image is calculated through the distance between the image features of the input image and the image features of each similar image in the similar image set; then, the image category to which the similar images in the similar image set belong is determined; finally, based on the rank value and image category corresponding to each similar image, multiple similar images in the similar image set are sorted. It can be seen that the image intent classification model is used to judge the intent category of the input image. Only when the judgment result is the commodity category, the operation of searching for commodities by image is performed, so as to achieve the purpose of filtering input images of non-commodity categories. That is, the operation of searching for commodities by image is not performed on input images of non-commodity categories, thereby avoiding the waste of computing resources and greatly saving computing resources. In addition, multiple similar images are sorted according to the rank value corresponding to each similar image and the image category to which the similar images belong, so as to improve the effect of searching for commodities by image, thereby enhancing the user search experience.
[0133] It should also be noted that after searching the product image database for a set of similar images of the input image in the above embodiment, steps 304-305, steps 404-405 and steps 504-506 can be combined to improve the effect of searching for products by image, thereby enhancing the user search experience.
[0134] See below Figure 6 , shows a flow chart of another method for image recognition search in an embodiment of the present application. In this embodiment, the method may include the following steps:
[0135] Step 601: Use an image intent classification model to perform intent classification on an input image to obtain an intent category of the input image; the intent category includes a commodity category and a non-commodity category.
[0136] Step 602: If the intended category of the input image is the commodity category, extract image features of the input image using an image recognition model.
[0137] Step 603: Based on the image features of the input image, search a product image database for at least one product image similar to the input image to obtain a set of similar images to the input image.
[0138] In this embodiment, steps 601 to 603 are the same as steps 201 to 202 in the above embodiment. The specific implementation of steps 601 to 603 can refer to the specific implementation of steps 201 to 202 in the above embodiment, which will not be repeated here.
[0139] Step 604: Based on the distance between the image feature of the input image and the image feature of each similar image in the similar image set, obtain the rank value corresponding to each similar image.
[0140] Step 605: Based on the rank value corresponding to each of the similar images and the preset rank value threshold, filter the similar images in the similar image set whose rank value is less than the preset rank value threshold to obtain a first target similar image set.
[0141] In this embodiment, step 604-step 605 are the same as step 304-step 305 in the above embodiment. The specific implementation of step 604-step 605 can refer to the specific implementation of step 304-step 305 in the above embodiment, which will not be repeated here.
[0142] Step 606: If multiple similar images in the first similar image set correspond to multiple image categories, obtain an entropy value of each image category based on the number of similar images corresponding to each image category in the first similar image set.
[0143] Step 607: Based on the entropy value of each of the image categories and the preset entropy value threshold, similar images corresponding to the entropy values greater than the preset entropy value threshold in the first similar image set are filtered to obtain a second target similar image set.
[0144] Step 608: Determine a sorting order of multiple similar images in the second target similar image set based on the rank value corresponding to each similar image in the second target similar image set and the image category.
[0145] Through the various implementation methods provided in this embodiment, the image intent classification model is used to judge the intent category of the input image. Only when the judgment result is the commodity category, the operation of searching for commodities by image is performed, so as to achieve the purpose of filtering input images of non-commodity categories, that is, the input images of non-commodity categories do not perform the operation of searching for commodities by image, thereby avoiding the waste of computing resources and greatly saving computing resources; in addition, the similar images in the similar image set that are more similar to the input image are firstly filtered through the rank value corresponding to each similar image, so as to obtain the first target similar image set; then, through the entropy value of the image category to which multiple similar images in the first target similar image set belong, the similar images with larger uncertainty in the first target similar image set are filtered for a second time, so as to obtain the second target similar image set; finally, multiple similar images are sorted through the rank value corresponding to each similar image in the second target similar image set and the image category to which the similar images belong, so as to improve the effect of searching for commodities by image, thereby improving the user search experience.
[0146] Exemplary Devices
[0147] See also Figure 7 , shows a schematic diagram of the structure of an image recognition search device in an embodiment of the present application. In this embodiment, the device may specifically include:
[0148] The intention category obtaining unit 701 is used to perform intention classification on the input image using the image intention classification model to obtain the intention category of the input image; the intention category includes a commodity category and a non-commodity category;
[0149] An image feature extraction unit 702, configured to extract image features of the input image using an image recognition model if the intended category of the input image is the commodity category;
[0150] The similar image set obtaining unit 703 is used to search for at least one product image similar to the input image in the product image database based on the image features of the input image, and obtain a similar image set of the input image.
[0151] In an optional implementation of the embodiment of the present application, the commodity category includes a clothing commodity category and other commodity categories; correspondingly, the image recognition model includes a clothing commodity recognition model and other commodity recognition models.
[0152] In an optional implementation of the embodiment of the present application, if the commodity category of the input image is specifically the clothing commodity category, the image feature extraction unit 702 includes:
[0153] A clothing area image acquisition subunit, used to detect the input image using a detection network to obtain a plurality of clothing area images in the input image;
[0154] An image feature extraction subunit, used to extract image features of each clothing area image using the clothing commodity recognition model;
[0155] Alternatively, if the intended category of the input image is the other commodity category, the image feature extraction unit 702 is specifically configured to:
[0156] The image features of the input image are directly extracted using the other commodity recognition model.
[0157] In an optional implementation of the embodiment of the present application, the device further includes an image intent classification model acquisition unit, and the image intent classification model acquisition unit includes:
[0158] An image sample acquisition subunit is used to acquire a plurality of image samples annotated with intention category labels; the plurality of image samples annotated with intention category labels include a plurality of first image samples annotated with commodity category labels and a plurality of second image samples annotated with non-commodity category labels;
[0159] The image intent classification model acquisition subunit is used to take the image sample as input and the intent category label as output, and pre-train a neural network model to obtain the image intent classification model.
[0160] In an optional implementation manner of the embodiment of the present application, the device further includes:
[0161] A rank value obtaining unit, used for obtaining a rank value corresponding to each similar image based on a distance between an image feature of the input image and an image feature of each similar image in the similar image set;
[0162] The first target similar image set obtaining unit is used to filter similar images in the similar image set whose rank value is less than the preset rank value threshold based on the rank value corresponding to each of the similar images and the preset rank value threshold, so as to obtain the first target similar image set.
[0163] In an optional implementation manner of the embodiment of the present application, the device further includes:
[0164] an entropy value obtaining unit, configured to obtain an entropy value of each image category based on the number of similar images corresponding to each image category in the similar image set if multiple similar images in the similar image set correspond to multiple image categories;
[0165] The second target similar image set obtaining unit is used to filter similar images corresponding to image categories whose entropy values in the similar image set are greater than the preset entropy value threshold based on the entropy value of each image category and the preset entropy value threshold, so as to obtain the second target similar image set.
[0166] In an optional implementation manner of the embodiment of the present application, the device further includes:
[0167] A rank value obtaining unit, used for obtaining a rank value corresponding to each similar image based on a distance between an image feature of the input image and an image feature of each similar image in the similar image set;
[0168] An image category determination unit, used to determine image categories corresponding to a plurality of similar images in the similar image set;
[0169] A sorting order determining unit is used to determine the sorting order of multiple similar images in the similar image set based on the rank value corresponding to each of the similar images and the image category.
[0170] Through the various implementation methods provided in this embodiment, first, the image intent classification model is used to determine whether the intent category of the input image is a commodity category or a non-commodity category; then, when the intent category of the input image is a commodity category, the image features of the input image are extracted through the input image recognition model; finally, based on the image features of the input image, at least one commodity image similar to the input image is searched in the commodity image database to form a similar image set of the input image. It can be seen that the image intent classification model is used to determine the intent category of the input image, and only when the judgment result is a commodity category, the operation of searching for commodities by image is performed, so as to achieve the purpose of filtering input images of non-commodity categories, that is, the input images of non-commodity categories are not subjected to the operation of searching for commodities by image, thereby avoiding the waste of computing resources and greatly saving computing resources.
[0171] Figure 8 8 is a block diagram of an apparatus 800 for image recognition search according to an exemplary embodiment. For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0172] Reference Figure 8 , the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0173] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0174] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, images, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0175] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.
[0176] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0177] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0178] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0179] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0180] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0181] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0182] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0183] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to perform an image recognition search method, the method comprising:
[0184] Using an image intent classification model to classify the intent of an input image, and obtaining an intent category of the input image; the intent category includes a commodity category and a non-commodity category;
[0185] If the intended category of the input image is the commodity category, extracting image features of the input image using an image recognition model;
[0186] Based on the image features of the input image, at least one commodity image similar to the input image is searched in a commodity image database to obtain a set of similar images to the input image.
[0187] Fig. 9 : is a schematic diagram of the structure of the server in the embodiment of the present application. The server 900 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 922 (for example, one or more processors) and memory 932, and one or more storage media 930 (for example, one or more mass storage devices) storing application programs 942 or data 944. Among them, the memory 932 and the storage medium 930 can be short-term storage or permanent storage. The program stored in the storage medium 930 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 922 can be configured to communicate with the storage medium 930 and execute a series of instruction operations in the storage medium 930 on the server 900.
[0188] The server 900 may also include one or more power supplies 926, one or more wired or wireless network interfaces 950, one or more input and output interfaces 958, one or more keyboards 956, and / or one or more operating systems 941, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0189] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0190] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0191] 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. The terms "include", "comprises" 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. In the absence of further restrictions, the elements defined by the statement "comprises a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0192] The above is only a preferred embodiment of the present application and does not constitute any formal limitation to the present application. Although the present application has been disclosed as above with a preferred embodiment, it is not intended to limit the present application. Any technician familiar with the art can make many possible changes and modifications to the technical solution of the present application using the methods and technical contents disclosed above without departing from the scope of the technical solution of the present application, or modify it into an equivalent embodiment of equivalent changes. Therefore, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present application without departing from the content of the technical solution of the present application still fall within the scope of protection of the technical solution of the present application.
Claims
1. A method for image recognition search, characterized in that: include: Using an image intent classification model to perform intent classification on an input image to obtain an intent category of the input image; The intended categories include commodity categories and non-commodity categories; If the intended category of the input image is the commodity category, extracting image features of the input image using an image recognition model; If the intended category of the input image is the non-product category, the operation of searching for products by image is not performed; Based on the image features of the input image, searching a product image database for at least one product image similar to the input image to obtain a set of similar images to the input image; If multiple similar images in the similar image set correspond to multiple image categories, obtaining an entropy value for each image category based on the number of similar images corresponding to each image category in the similar image set; Based on the entropy value of each of the image categories and a preset entropy value threshold, similar images corresponding to image categories having entropy values greater than the preset entropy value threshold in the similar image set are filtered to obtain a second target similar image set.
2. The method according to claim 1, characterized in that The commodity categories include clothing commodity categories and other commodity categories; correspondingly, the image recognition model includes clothing commodity recognition models and other commodity recognition models.
3. The method according to claim 2, characterized in that If the commodity category of the input image is specifically the clothing commodity category, the extracting the image features of the input image by using the image recognition model includes: Detecting the input image using a detection network to obtain multiple clothing area images in the input image; Extracting image features of each of the clothing area images using the clothing commodity recognition model; Alternatively, if the commodity category of the input image is specifically the other commodity category, the extracting the image features of the input image by using the image recognition model is specifically: The image features of the input image are directly extracted using the other commodity recognition model.
4. The method according to any one of claims 1 to 3, characterized in that: The steps of obtaining the image intent classification model include: Acquire a plurality of image samples labeled with intent category labels; the plurality of image samples labeled with intent category labels include a plurality of first image samples labeled with commodity category labels and a plurality of second image samples labeled with non-commodity category labels; Taking the image sample as input and the intent category label as output, a neural network model is pre-trained to obtain the image intent classification model.
5. The method according to claim 1, characterized in that After obtaining a set of similar images of the input image, the method further includes: Based on the distance between the image feature of the input image and the image feature of each similar image in the similar image set, obtaining a rank value corresponding to each similar image; Based on the rank value corresponding to each of the similar images and the preset rank value threshold, similar images in the similar image set whose rank value is less than the preset rank value threshold are filtered to obtain a first target similar image set.
6. The method according to claim 1, characterized in that After obtaining a set of similar images of the input image, the method further includes: Based on the distance between the image feature of the input image and the image feature of each similar image in the similar image set, obtaining a rank value corresponding to each similar image; Determining image categories corresponding to a plurality of similar images in the similar image set; Based on the rank value corresponding to each of the similar images and the image category, a sorting order of multiple similar images in the similar image set is determined.
7. An image recognition search device, characterized in that: include: An intention category obtaining unit, used to perform intention classification on an input image using an image intention classification model to obtain an intention category of the input image; The intended categories include commodity categories and non-commodity categories; an image feature extraction unit, configured to extract image features of the input image using an image recognition model if the intended category of the input image is the commodity category; and not perform an operation of searching for commodities by image if the intended category of the input image is the non-commodity category; a similar image set obtaining unit, configured to search, based on the image features of the input image, a product image database for at least one product image similar to the input image, and obtain a similar image set of the input image; an entropy value obtaining unit, configured to obtain an entropy value of each image category based on the number of similar images corresponding to each image category in the similar image set if multiple similar images in the similar image set correspond to multiple image categories; The second target similar image set obtaining unit is used to filter similar images corresponding to image categories whose entropy values in the similar image set are greater than the preset entropy value threshold based on the entropy value of each image category and the preset entropy value threshold, so as to obtain the second target similar image set.
8. The device according to claim 7, characterized in that The commodity categories include clothing commodity categories and other commodity categories; correspondingly, the image recognition model includes clothing commodity recognition models and other commodity recognition models.
9. The device according to claim 8, characterized in that If the commodity category of the input image is specifically the clothing commodity category, the image feature extraction unit includes: A clothing area image acquisition subunit, used to detect the input image using a detection network to obtain a plurality of clothing area images in the input image; An image feature extraction subunit, used to extract image features of each clothing area image using the clothing commodity recognition model; Alternatively, if the intended category of the input image is the other commodity category, the image feature extraction unit is specifically used to: The image features of the input image are directly extracted using the other commodity recognition model.
10. The device according to any one of claims 7 to 9, characterized in that: The device also includes an image intent classification model acquisition unit, and the image intent classification model acquisition unit includes: An image sample acquisition subunit is used to acquire a plurality of image samples annotated with intention category labels; the plurality of image samples annotated with intention category labels include a plurality of first image samples annotated with commodity category labels and a plurality of second image samples annotated with non-commodity category labels; The image intent classification model acquisition subunit is used to take the image sample as input and the intent category label as output, and pre-train a neural network model to obtain the image intent classification model.
11. The device according to claim 7, characterized in that The device also includes: A rank value obtaining unit, used for obtaining a rank value corresponding to each similar image based on a distance between an image feature of the input image and an image feature of each similar image in the similar image set; The first target similar image set obtaining unit is used to filter similar images in the similar image set whose rank value is less than the preset rank value threshold based on the rank value corresponding to each of the similar images and the preset rank value threshold, so as to obtain the first target similar image set.
12. The device according to claim 7, characterized in that The device also includes: A rank value obtaining unit, used for obtaining a rank value corresponding to each similar image based on a distance between an image feature of the input image and an image feature of each similar image in the similar image set; An image category determination unit, used to determine image categories corresponding to a plurality of similar images in the similar image set; A sorting order determining unit is used to determine the sorting order of multiple similar images in the similar image set based on the rank value corresponding to each of the similar images and the image category.
13. A device for image recognition search, characterized in that: The system comprises a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations: Using an image intent classification model to classify the intent of an input image, and obtaining an intent category of the input image; the intent category includes a commodity category and a non-commodity category; If the intended category of the input image is the commodity category, extracting image features of the input image using an image recognition model; If the intended category of the input image is the non-product category, the operation of searching for products by image is not performed; Based on the image features of the input image, searching a product image database for at least one product image similar to the input image to obtain a set of similar images to the input image; If multiple similar images in the similar image set correspond to multiple image categories, obtaining an entropy value for each image category based on the number of similar images corresponding to each image category in the similar image set; Based on the entropy value of each of the image categories and a preset entropy value threshold, similar images corresponding to image categories having entropy values greater than the preset entropy value threshold in the similar image set are filtered to obtain a second target similar image set.
14. A machine-readable medium having instructions stored thereon, which, when executed by one or more processors, causes a device to perform the image recognition search method according to any one of claims 1 to 6.
