An image retrieval method, terminal, and computer-readable storage medium
By performing multiple searches and category tag filtering in a preset image library, the problem of incomplete image retrieval results in existing technologies is solved, achieving higher retrieval accuracy and comprehensiveness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-12
- Publication Date
- 2026-04-03
AI Technical Summary
Current image retrieval technologies are not comprehensive enough and have low accuracy, especially when it comes to face recognition, clothing changes during human body recognition, and vehicle recognition when the vehicle is not in motion.
By performing multiple searches in a preset image library, utilizing category label filtering and image clustering, combined with similarity threshold filtering and image merging, the accuracy and comprehensiveness of the search results are improved.
It improves the recall and accuracy of image retrieval, enabling a more comprehensive recall of data with the same style as the image being queried, and reducing false positives.
Smart Images

Figure CN116244457B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of target retrieval technology, and in particular to an image retrieval method, terminal, and computer-readable storage medium. Background Technology
[0002] Target-based feature extraction algorithms can achieve high similarity among features of multiple images of the same person and of the same type, while exhibiting low similarity between different people. Facial features have long-term robustness, but body features are primarily dependent on clothing; once clothing is changed, cross-day retrieval becomes impossible. Face-based search results in a large amount of data, such as images of people in silhouette, where no faces are found, making retrieval impossible. Body-based search suffers from the aforementioned clothing-change problem; and vehicle-based search fails to retrieve data where the person is not driving. Summary of the Invention
[0003] The main technical problem solved by this invention is to provide an image retrieval method, terminal and computer-readable storage medium, which solves the problems of insufficient retrieval results and low accuracy in the prior art.
[0004] To solve the above-mentioned technical problems, the first technical solution adopted by the present invention is: to provide an image retrieval method, the image retrieval method comprising:
[0005] Based on the obtained image to be queried, a search is performed in a preset image library to obtain multiple search images corresponding to the image to be queried; the preset image library includes multiple preset images with category labels;
[0006] Multiple search images are filtered based on the category labels of each search image to obtain a first candidate image set consisting of first candidate images corresponding to the image to be searched; the category labels of each first candidate image in the first candidate image set are the same.
[0007] Based on the first candidate images in the first candidate image set, a query is performed in a preset image library to obtain a second candidate image set consisting of the second candidate images corresponding to the image to be queried.
[0008] The first candidate image set and the second candidate image set are merged to obtain the retrieval results for the image to be queried.
[0009] Before the step of filtering multiple search images based on the category labels of each search image to obtain a first candidate image set consisting of first candidate images corresponding to the image to be queried, the method further includes:
[0010] Calculate the second similarity between the selected search image and the other search images corresponding to the query image;
[0011] The first number is obtained by counting the number of selected search images whose second similarity exceeds the second similarity threshold;
[0012] If the number of selected candidate images does not exceed the first preset number, the selected search images are removed.
[0013] Specifically, multiple search images are filtered based on the category labels of each search image to obtain a first candidate image set consisting of first candidate images corresponding to the image to be queried, including:
[0014] Count the number of searched images corresponding to each category label;
[0015] The image corresponding to the category label with the most occurrences is selected as the first candidate image for the query image.
[0016] The first candidate image set consists of all the first candidate images corresponding to the image to be queried.
[0017] Specifically, a second candidate image set is obtained by querying a preset image library based on the first candidate images in the first candidate image set, resulting in the second candidate images corresponding to the image to be queried. This second candidate image set includes:
[0018] Cluster the first candidate images in the first candidate image set to obtain a sub-image set;
[0019] Select at least one first candidate image from each sub-image set to obtain the representative image corresponding to the sub-image set;
[0020] Based on the representative images corresponding to each sub-image set, a searchable image set is formed for the image to be queried;
[0021] Based on the representative images in the image set to be retrieved, a second candidate image set is obtained by querying a preset image library to obtain the second candidate images corresponding to the image to be queried.
[0022] The step of forming a searchable image set based on representative images corresponding to each sub-image set also includes:
[0023] The representative images in the image set to be retrieved are filtered and / or augmented.
[0024] The process of filtering and / or amplifying representative images in the image set to be retrieved includes:
[0025] Extract preset images from the preset image library that have the same category label as the representative image;
[0026] Based on the similarity between each preset image and / or each representative image corresponding to the same category label, determine whether to classify the preset image and / or representative image into the image set to be retrieved;
[0027] And / or; in response to the association between the category labels corresponding to multiple preset images, and any preset image among the multiple preset images belonging to the image set to be retrieved, then all the multiple preset images are assigned to the image set to be retrieved.
[0028] Specifically, determining whether to classify the preset images and / or representative images into the image set to be retrieved, based on the similarity between preset images and / or representative images corresponding to the same category label, includes:
[0029] Calculate the third similarity between each preset image and / or each representative image corresponding to the same category label;
[0030] The second number is obtained by counting the number of preset images or representative images whose third similarity exceeds the third similarity threshold.
[0031] In response to the second quantity exceeding the second preset quantity, the preset image or representative image corresponding to the second quantity is assigned to the image set to be retrieved;
[0032] If the second quantity does not exceed the second preset quantity, the preset image or representative image corresponding to the second quantity will be removed from the image set to be searched.
[0033] The first and second candidate image sets are merged to obtain the retrieval results for the image to be queried, including:
[0034] The first candidate image set and the second candidate image set are merged to obtain the retrieval candidate images of the image to be queried;
[0035] Based on the similarity between the image to be queried and each of the candidate images, the candidate images are sorted.
[0036] If the search candidate image does not meet the preset requirements, the preset value is added to the similarity of the search candidate image to obtain the updated similarity of the search candidate image;
[0037] The candidate images are reordered based on the updated similarity.
[0038] Select candidate images that meet the preset requirements as the search results for the image to be queried.
[0039] To solve the above-mentioned technical problems, the second technical solution adopted by the present invention is to provide a terminal, which includes a memory, a processor, and a computer program stored in the memory and running on the processor. The processor is used to execute program data to implement the steps in the above-mentioned image retrieval method.
[0040] To solve the above-mentioned technical problems, the third technical solution adopted by the present invention is to provide a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps in the above-mentioned image retrieval method.
[0041] The beneficial effects of this invention are as follows: Unlike existing technologies, it provides an image retrieval method, terminal, and computer-readable storage medium. The image retrieval method includes: querying a pre-set image library based on an acquired image to be queried to obtain multiple retrieval images corresponding to the image to be queried; the pre-set image library includes multiple pre-set images with category labels; filtering the multiple retrieval images based on the category labels of each retrieval image to obtain a first candidate image set consisting of first candidate images corresponding to the image to be queried; the category labels of each first candidate image in the first candidate image set are the same; querying the pre-set image library based on the first candidate images in the first candidate image set to obtain a second candidate image set consisting of second candidate images corresponding to the image to be queried; merging the first candidate image set and the second candidate image set to obtain the retrieval result of the image to be queried. This application performs at least two searches in a preset image library based on the image to be searched and the search results of the image to be searched, thereby improving the recall rate of the search results; the first search results are filtered based on the category tags of multiple search images of the image to be searched, and the search images in the first search results are purified to retain the search images with the same category tags. The search images retained in the first search results are then searched a second time in the preset image library, thereby improving the accuracy of the search results. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 This is a flowchart illustrating the image retrieval method provided by the present invention;
[0044] Figure 2 yes Figure 1 A flowchart illustrating a specific embodiment of step S3 in the provided image retrieval method;
[0045] Figure 3 This is a schematic diagram of the framework of an embodiment of the image retrieval device provided by the present invention;
[0046] Figure 4 This is a schematic diagram of the framework of an embodiment of the terminal provided by the present invention;
[0047] Figure 5 A schematic diagram of a framework of an embodiment of a computer-readable storage medium provided by the present invention. Detailed Implementation
[0048] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0049] In the following description, specific details such as particular system architectures, interfaces, and technologies are presented for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of this application.
[0050] In this article, the term "and / or" simply describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "more" in this article means two or more objects.
[0051] To enable those skilled in the art to better understand the technical solution of the present invention, the image retrieval method provided by the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0052] Please see Figure 1 , Figure 1 This is a flowchart illustrating the image retrieval method provided by the present invention.
[0053] This embodiment provides an image retrieval method, which includes the following steps.
[0054] S1: Based on the obtained image to be queried, a search is performed in the preset image library to obtain multiple search images corresponding to the image to be queried.
[0055] Specifically, an image containing the target object to be retrieved is captured by an image acquisition device and used as the query image. In this embodiment, the query image contains a target object that needs to be retrieved.
[0056] In one specific embodiment, conventional methods in the art are used to extract features from the image to be queried, obtaining different types of feature information corresponding to the target object. For example, the feature information can be location information and bounding boxes for faces, bodies, vehicle license plates, and non-motorized vehicles, or other information about faces, bodies, vehicle license plates, and non-motorized vehicles. Based on each feature information, region images are extracted from the image containing the target object to be retrieved. The region images corresponding to the same target object are then associated. That is, the region images corresponding to the same target object are related.
[0057] Specifically, the preset image library includes multiple preset images with category labels. In one specific embodiment, there can be multiple preset databases, and these databases can correspond to different types. For example, the multiple preset databases may include a face preset database, a human body preset database, a motor vehicle license plate database, and a non-motor vehicle database. In this embodiment, the category labels of each preset image in the preset database are obtained based on clustering, and the category labels can be identity labels.
[0058] Specifically, the similarity between the image to be queried and each preset image in the preset image library is calculated, and the preset image with a similarity exceeding the first similarity threshold is selected as the search image corresponding to the image to be queried.
[0059] In one embodiment, based on the images of each region corresponding to the image to be queried, a preset image belonging to the same target object corresponding to each region image is queried in a preset image library of the corresponding type.
[0060] S2: Based on the category labels of each retrieved image, multiple retrieved images are filtered to obtain a first candidate image set consisting of the first candidate images corresponding to the image to be queried.
[0061] In one embodiment, a second similarity is calculated between the selected search image and each of the other search images corresponding to the query image; the number of times the second similarity of the selected search images exceeds a second similarity threshold is counted to obtain a first number; in response to the first number corresponding to the selected first candidate image not exceeding a first preset number, the selected search image is removed. This indicates that the probability that the preset target corresponding to the search image is the same as the target object contained in the query image is low. In response to the first number corresponding to the selected search image exceeding the first preset number, the selected search image is retained. This indicates that the probability that the preset target corresponding to the search image is the same as the target object contained in the query image is high.
[0062] In one embodiment, the number of search images corresponding to each category label is counted; the search image corresponding to the category label with the largest number of entries is selected as the first candidate image of the image to be queried; all the first candidate images corresponding to the image to be queried form a first candidate image set. The category labels of all the first candidate images in the first candidate image set are the same.
[0063] S3: Based on the first candidate image in the first candidate image set, query the preset image library to obtain the second candidate image set composed of the second candidate images corresponding to the image to be queried.
[0064] Specifically, since the first candidate image set corresponding to the target object contains first candidate images corresponding to local images such as faces, human bodies, motor vehicle license plates and / or non-motor vehicles, and the first candidate image set contains various types of data with rich styles, more comprehensive search results can be obtained based on the first candidate images contained in the first candidate image set.
[0065] See Figure 2 , Figure 2 yes Figure 1 A flowchart illustrating a specific embodiment of step S3 in the provided image retrieval method.
[0066] S31: Perform image clustering on the first candidate images in the first candidate image set to obtain a sub-image set.
[0067] Specifically, the first candidate images contained in the first candidate image set are classified to obtain multiple sub-image sets corresponding to the first candidate image set. In one embodiment, the first candidate images contained in the first candidate image set can be clustered using clustering methods such as hierarchical clustering and density clustering to obtain multiple sub-image sets. Images of the same target object with different styles are assigned to different sub-image sets. For example, first candidate images of people wearing different clothes, wearing different accessories, wearing masks, not wearing masks, and from different angles are assigned to different sub-image sets. This allows for secondary retrieval based on data of different types and styles, resulting in more comprehensive retrieval results.
[0068] S32: Select at least one first candidate image from each sub-image set to obtain the representative image corresponding to the sub-image set.
[0069] Specifically, in order to further improve the comprehensiveness of the search results, multiple first candidate images are extracted from each sub-image set as representative images corresponding to the sub-image set.
[0070] S33: Based on the representative images corresponding to each sub-image set, form a searchable image set for the image to be queried.
[0071] Specifically, the image set to be retrieved for the target object is composed of representative images corresponding to each of the sub-image sets. A secondary image search can be performed in a preset image library based on this image set.
[0072] S34: Perform filtering and / or augmentation processing on representative images in the image set to be retrieved.
[0073] In this embodiment, the preset images in the preset image library have category labels. To prevent the presence of erroneous images in the image set to be searched, a simple screening of the images in the image set can be performed here.
[0074] Specifically, preset images with the same category label as the representative images are extracted from a preset image library. Based on the third similarity between each preset image and / or each representative image corresponding to the same category label, it is determined whether the preset image and / or representative image should be assigned to the image set to be retrieved.
[0075] In one specific embodiment, the third similarity between each preset image and / or each representative image corresponding to the same category label is calculated; the number of preset images or each representative image whose third similarity exceeds the third similarity threshold is counted to obtain a second number; in response to the second number exceeding the second preset number, the preset image or representative image corresponding to the second number is assigned to the image set to be retrieved; in response to the second number not exceeding the second preset number, the preset image or representative image corresponding to the second number is removed from the image set to be retrieved.
[0076] In one embodiment, in response to multiple preset images corresponding to the same preset target, that is, the multiple preset images have a relationship, that is, the multiple preset images are region images with a relationship, and any preset image among the multiple preset images belongs to the image set to be retrieved, then the multiple preset images corresponding to the same preset target are all assigned to the image set to be retrieved, so as to expand the image set to be retrieved.
[0077] In one embodiment, the image set to be retrieved is augmented. Preset images with the same category label as the first candidate image corresponding to the image to be queried are extracted from a preset image library, and these extracted preset images are then assigned to the image set to be retrieved.
[0078] S35: Based on the representative images in the image set to be retrieved, query the preset image library to obtain the second candidate image set composed of the second candidate images corresponding to the image to be queried.
[0079] Specifically, based on the representative images in the image set to be retrieved, a query is performed in a preset database to obtain the second candidate images corresponding to each representative image. All the second candidate images corresponding to each representative image are then combined to form a second candidate image set. In one embodiment, the second candidate images corresponding to representative images of the same type are merged to obtain the retrieval results—the second candidate image set—corresponding to each type of representative image. The images in the second candidate image set are sorted from high to low according to their similarity after merging.
[0080] Because the clustering process utilizes information beyond features such as spatiotemporal and attribute characteristics, and can be cross-recalled based on the similarity between graphs, it is more effective than direct retrieval of a single image in recalling data with biases inconsistent with the image being searched, thus improving the comprehensiveness of the data.
[0081] In one embodiment, if the number of second candidate images obtained from retrieving a representative image in the image set to be retrieved does not exceed a third preset number, then multiple first candidate images are extracted from the sub-image set corresponding to the representative image as supplementary retrieval images; based on each supplementary retrieval image, a third candidate image set is obtained, consisting of third candidate images corresponding to each supplementary retrieval image. This third candidate image set is then merged into the second candidate image set.
[0082] In one embodiment, if the number of second candidate images obtained by retrieving a representative image in the image set to be retrieved does not exceed a third preset number, then multiple first candidate images are extracted from the sub-image set corresponding to the representative image as supplementary retrieval images; based on each supplementary retrieval image, a third candidate image set composed of third candidate images corresponding to each supplementary retrieval image is obtained by querying the preset image library.
[0083] S4: Merge the first candidate image set and the second candidate image set to obtain the retrieval results for the image to be queried.
[0084] Specifically, the first candidate image set, the second candidate image set, and the third candidate image set are merged to obtain the retrieval candidate images of the image to be queried; the retrieval candidate images are sorted based on the similarity between the image to be queried and each retrieval candidate image; and the retrieval candidate images that meet the preset requirements are selected as the retrieval results of the image to be queried.
[0085] If a candidate image fails to meet a preset requirement, a preset value is added to the similarity of the candidate image to obtain an updated similarity; and the candidate images are then reordered.
[0086] The image retrieval method provided in this embodiment includes: querying a preset image library based on an acquired image to be queried to obtain multiple search images corresponding to the image to be queried; the image to be queried contains a target object; the preset image library includes multiple preset images with category labels; filtering the multiple search images based on the category labels of each search image to obtain a first candidate image set consisting of first candidate images corresponding to the image to be queried; the category labels of each first candidate image in the first candidate image set are the same; querying the preset image library based on the first candidate images in the first candidate image set to obtain a second candidate image set consisting of second candidate images corresponding to the target object; merging the first candidate image set and the second candidate image set to obtain the retrieval result of the image to be queried. This application performs at least two searches in the preset image library based on the image to be queried and the retrieval result of the image to be queried to improve the recall rate of the retrieval result; filtering the first search result based on the category labels of multiple search images of the image to be queried to refine the search images in the first search result, retaining search images with the same category labels; and performing a second search in the preset image library based on the search images retained in the first search result to improve the accuracy of the retrieval result.
[0087] See Figure 3 , Figure 3 This is a schematic diagram of the framework of an embodiment of the image retrieval device provided by the present invention.
[0088] Figure. This embodiment provides an image retrieval device 60, which includes a first query module 61, a filtering module 62, a second query module 63, and a determination module 64.
[0089] The first query module 61 is used to perform a query in a preset image library based on the acquired image to be queried, and obtain multiple search images corresponding to the image to be queried; the image to be queried contains the target object;
[0090] The preset image library includes multiple preset images with category labels.
[0091] The filtering module 62 is used to perform zero-filtering on multiple search images based on the category labels of each search image to obtain a first candidate image set consisting of first candidate images corresponding to the image to be queried; the category labels of each first candidate image in the first candidate image set are the same.
[0092] The second query module 63 is used to query a preset image library based on the first candidate image in the first candidate image set to obtain a second candidate image set composed of the second candidate images corresponding to the image to be queried.
[0093] 5. The determining module 64 is used to merge the first candidate image set and the second candidate image set to obtain...
[0094] The search results for the image to be searched are retrieved.
[0095] The image retrieval device provided in this embodiment performs at least two searches in a preset image library based on the image to be queried and the retrieval results of the image to be queried, thereby improving the recall rate of the retrieval results;
[0096] The first search results are filtered based on the category labels of multiple search images of the image to be queried. The search images in the first search results are then purified, retaining the search images with the same category labels. A second search is then conducted in a preset image library based on the search images retained in the first search results, thereby improving the accuracy of the search results.
[0097] Please see Figure 4 , Figure 4 This is a schematic diagram of a terminal embodiment provided by the present invention. The terminal 80 includes a memory 81 and a processor 82 coupled to each other. The processor 82 is used to execute program instructions stored in the memory 81 to implement the steps of any of the above-described image retrieval method embodiments.
[0098] In a specific implementation scenario, terminal 80 may include, but is not limited to, microcomputers and servers. In addition, terminal 80 may also include mobile devices such as laptops and tablets, without limitation.
[0099] Specifically, processor 82 controls itself and memory 81 to implement the steps of any of the above-described image retrieval method embodiments. Processor 82 can also be referred to as a CPU (Central Processing Unit). Processor 82 may be an integrated circuit chip with signal processing capabilities. Processor 82 can also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor. Furthermore, processor 82 can be implemented using integrated circuit chips.
[0100] Please see Figure 5 , Figure 5 This is a schematic diagram of a framework of an embodiment of a computer-readable storage medium provided by the present invention. The computer-readable storage medium 90 stores program instructions 901 that can be executed by a processor. The program instructions 901 are used to implement the steps of any of the above-described image retrieval method embodiments.
[0101] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0102] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.
[0103] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0104] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0105] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0106] The above are merely embodiments of the present invention and do not limit the scope of patent protection of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. An image retrieval method, characterized in that, The image retrieval method includes: Based on the obtained image to be queried, a search is performed in a preset image library to obtain multiple search images corresponding to the image to be queried; the preset image library includes multiple preset images with category labels; The multiple search images are filtered based on the category labels of each search image to obtain a first candidate image set consisting of first candidate images corresponding to the image to be queried; the category labels of each first candidate image in the first candidate image set are the same; Based on the first candidate image in the first candidate image set, a query is performed in the preset image library to obtain a second candidate image set composed of the second candidate images corresponding to the image to be queried; The first candidate image set and the second candidate image set are merged to obtain the retrieval result of the image to be queried.
2. The image retrieval method according to claim 1, characterized in that, Before the step of filtering the multiple search images based on the category labels of each search image to obtain a first candidate image set consisting of first candidate images corresponding to the image to be queried, the method further includes: Calculate the second similarity between the selected search image and each of the other search images corresponding to the query image; The number of selected search images whose second similarity exceeds the second similarity threshold is counted to obtain the first number; If the number of selected candidate images does not exceed a first preset number, the selected search images are removed.
3. The image retrieval method according to claim 1 or 2, characterized in that, The step of filtering the multiple search images based on the category labels of each search image to obtain a first candidate image set consisting of first candidate images corresponding to the image to be queried includes: Count the number of retrieved images corresponding to each of the aforementioned category labels; The image corresponding to the category label with the largest number of occurrences is selected as the first candidate image of the image to be queried. The first candidate image set consists of all the first candidate images corresponding to the image to be queried.
4. The image retrieval method according to claim 1, characterized in that, The process of querying the preset image library based on the first candidate images in the first candidate image set to obtain a second candidate image set consisting of the second candidate images corresponding to the image to be queried includes: Cluster the first candidate images in the first candidate image set to obtain a sub-image set; At least one first candidate image is selected from each of the sub-image sets to obtain the representative image corresponding to the sub-image set; Based on the representative images corresponding to each of the sub-image sets, a searchable image set is formed for the image to be queried; Based on the representative images in the image set to be retrieved, a second candidate image set is obtained by querying the preset image library to obtain the second candidate images corresponding to the image to be queried.
5. The image retrieval method according to claim 4, characterized in that, After the step of forming the searchable image set of the image to be queried based on the representative images corresponding to each of the sub-image sets, the method further includes: The representative images in the image set to be retrieved are subjected to filtering and / or augmentation processing.
6. The image retrieval method according to claim 5, characterized in that, The filtering and / or augmentation of the representative images in the image set to be retrieved includes: Extract the preset images that have the same category label as the representative image from the preset image library; determine whether to classify the preset images and / or the representative images into the image set to be retrieved based on the similarity between each preset image and / or each representative image corresponding to the same category label; And / or; in response to the association between the category tags corresponding to the plurality of preset images, and any one of the plurality of preset images belonging to the image set to be retrieved, then all the plurality of preset images are assigned to the image set to be retrieved.
7. The image retrieval method according to claim 6, characterized in that, The step of determining whether to classify the preset images and / or representative images into the image set to be retrieved based on the similarity between the preset images and / or representative images corresponding to the same category label includes: Calculate the third similarity between each of the preset images and / or each of the representative images corresponding to the same category label; The number of times the third similarity exceeds the third similarity threshold corresponding to each of the preset images or representative images is counted to obtain the second number; In response to the second quantity exceeding the second preset quantity, the preset image or the representative image corresponding to the second quantity is assigned to the image set to be retrieved; If the second quantity does not exceed the second preset quantity, then the preset image or the representative image corresponding to the second quantity is removed from the image set to be retrieved.
8. The image retrieval method according to claim 1, characterized in that, The step of merging the first candidate image set and the second candidate image set to obtain the retrieval result of the image to be queried includes: The first candidate image set and the second candidate image set are merged to obtain the retrieval candidate images of the image to be queried; Based on the similarity between the image to be queried and each of the candidate images, the candidate images are sorted. In response to the fact that the search candidate image does not meet the preset requirements, a preset value is added to the similarity corresponding to the search candidate image to obtain the updated similarity of the search candidate image; The search candidate images are reordered based on the updated similarity. The candidate images that meet the preset requirements are selected as the search results for the image to be queried.
9. A terminal, characterized in that, The terminal includes a memory, a processor, and a computer program stored in the memory and running on the processor, the processor being used to execute program data to implement the steps in the image retrieval method as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the image retrieval method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Image retrieval method and device, electronic equipment and storage medium
CN113806582A
Image retrieval method, image retrieval system, electronic equipment and storage medium
CN114154002A