An image search method, apparatus, system, device and medium
By obtaining the long and short feature vectors of the image and using the similarity calculation in the image database to determine the candidate and target images, the problems of long search time and low efficiency in the traditional image search method are solved, and efficient image retrieval is achieved.
Patent Information
- Application Number
- CN202210383994.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-12
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2042-04-12
AI Technical Summary
Traditional image search methods take a long time to search in large-scale image databases, are inefficient, and cannot meet user needs.
By obtaining the first long feature vector and the first short feature vector of the image to be retrieved, the candidate standard image whose similarity meets the candidate requirements is determined by using the short feature vector distance of each standard image in the image database, and the target image whose similarity meets the output conditions is determined based on the distance between the long feature vector in the candidate image group and the image to be retrieved, thereby reducing the one-to-one matching process.
It improves the efficiency of image search, reduces search time, and increases the speed of image retrieval.
Smart Images

Figure CN114780779B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, and in particular to an image search method, device, system, equipment and medium. BACKGROUND
[0002] A smart city is a new technology that is emerging. In the process of building a smart city, a large number of city management images need to be collected. For example, the travel of citizens needs to be determined by capturing vehicle and pedestrian data. Such city management images are stored in an image database. At this time, a picture search technology can be used to search for images similar to a specific scene or event in the numerous historical images in the image database.
[0003] Picture search is a new search mode based on image data provided by a user to retrieve relevant image data on the Internet, which is a sub-function of a search engine. With the geometric growth of a large number of digital images on the network, the demand for image retrieval by users is increasing. When the number of images in the image database reaches hundreds of millions or even more, using a traditional picture search method to find a target image requires a large amount of computing resources, and there is a problem of long search time and low search efficiency, which cannot meet the needs of users. SUMMARY
[0004] The present application provides an image search method, device, system, equipment and medium, which is used to solve the problem of long search time and low search efficiency of picture search.
[0005] In a first aspect, the present application provides an image search method, which comprises:
[0006] obtaining a first long feature vector and a first short feature vector of a to-be-retrieved image;
[0007] determining a candidate standard image that meets a candidate requirement in similarity according to the distance between the first short feature vector and the short feature vector of each standard image in the image database;
[0008] determining a target image that meets an output condition in similarity according to the distance between the long feature vector of each candidate image in the group where each candidate standard image is located and the first long feature vector, and taking the target image as a searched image.
[0009] In a second aspect, the present application provides an image search system, which comprises:
[0010] a name node, configured to receive a to-be-retrieved image sent by a client, and send the to-be-retrieved image to a corresponding data node;
[0011] The data node is configured to receive the image to be searched, acquire a first long feature vector and a first short feature vector of the image to be searched, determine a candidate standard image whose similarity meets a candidate requirement according to a distance between the first short feature vector and a short feature vector of each standard image in an image database, determine a target image whose similarity meets an output condition according to a distance between a long feature vector of each candidate image in a group where the candidate standard image is located and the first long feature vector, and send the target image as a searched image to the name node.
[0012] The name node is further configured to send the searched image to the client.
[0013] In a third aspect, the present application provides an image search device, and the device comprises:
[0014] An acquisition module is configured to acquire a first long feature vector and a first short feature vector of an image to be searched.
[0015] A determination module is configured to determine a candidate standard image whose similarity meets a candidate requirement according to a distance between the first short feature vector and a short feature vector of each standard image in an image database, determine a target image whose similarity meets an output condition according to a distance between a long feature vector of each candidate image in a group where the candidate standard image is located and the first long feature vector, and send the target image as a searched image.
[0016] In a fourth aspect, the present application provides an electronic device, and the electronic device comprises a processor and a memory, and the processor is configured to implement steps of an image search method according to any one of the above aspects when executing a computer program stored in the memory.
[0017] In a fifth aspect, the present application provides a computer storage medium, and the computer storage medium stores a computer program executable by an electronic device, and when the program is executed on the electronic device, the electronic device is caused to execute steps of an image search method according to any one of the above aspects.
[0018] The application provides an image search method, device, system, equipment and medium. The method comprises the following steps: obtaining a first long feature vector and a first short feature vector of a to-be-searched image; determining a candidate standard image which meets a candidate requirement in similarity according to the distance between the first short feature vector and the short feature vector of each standard image in an image database; determining a target image which meets an output condition in similarity according to the distance between the long feature vector of each candidate image in the group where the candidate standard image is located and the first long feature vector, and taking the target image as a searched image. In the image database of the embodiment of the application, the images in the image set are clustered according to the distance between the short feature vectors, and the standard image corresponding to each group after clustering is determined. Therefore, when the first long feature vector and the first short feature vector of the to-be-searched image are obtained, the candidate standard image which is similar to the to-be-searched image can be determined based on the first short feature vector and the short feature vector of each standard image, and the target image which meets the output condition in similarity can be determined according to the long feature vector of each candidate image in the group where the candidate standard image is located and the first long feature vector. Therefore, the process does not need to match the images one by one, and the efficiency of image searching is improved. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the application or the implementation manners in the related art, the drawings needed to be used in the embodiment or related art description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the application, and other drawings can also be obtained by those skilled in the art according to these drawings.
[0020] Figure 1 An image search process schematic diagram provided by some embodiments of the application;
[0021] Figure 2 A process schematic diagram of saving a long feature vector to a chunk block and clustering images in an image set provided by some embodiments of the application;
[0022] Figure 3 An index information schematic diagram of a meta file and a chunk block in an image database provided by some embodiments of the application;
[0023] Figure 4 A UID storage structure schematic diagram provided by some embodiments of the application;
[0024] Figure 5 A process schematic diagram of image search provided by some embodiments of the application;
[0025] Figure 6 A process schematic diagram of image search provided by some embodiments of the application;
[0026] Figure 7 A structural schematic diagram of an image search system provided for some embodiments of the present application;
[0027] Figure 8 A structural schematic diagram of an image search system provided for some embodiments of the present application;
[0028] Figure 9 A structural schematic diagram of an image search system provided for some embodiments of the present application;
[0029] Figure 10 A structural schematic diagram of an image search system provided for some embodiments of the present application;
[0030] Figure 11 A structural schematic diagram of an image search system provided for some embodiments of the present application; DETAILED DESCRIPTION
[0031] For the purpose of making the objects and embodiments of the present application more clear, the following will combine the drawings in the exemplary embodiments of the present application to make a clear and complete description of the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only some embodiments of the present application, but not all embodiments of the present application.
[0032] It should be noted that the brief description of the terms in the present application is only for the convenience of understanding the following described embodiments, and is not intended to limit the embodiments of the present application. Unless otherwise specified, these terms should be understood according to their ordinary and general meanings.
[0033] The terms "first", "second", "third", and the like in the specification and claims of the present application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit the specific order or sequence, unless otherwise specified. It should be understood that the terms used in this way can be interchanged under appropriate circumstances.
[0034] The terms "include" and "have" and any variations thereof are intended to cover but not exclusive inclusion, for example, a product or device including a series of components does not necessarily limit to all components clearly listed, but can include other components not clearly listed or inherent to these products or devices.
[0035] The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware or / and software code capable of performing a function associated with that element.
[0036] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
[0037] For the convenience of explanation, the above description has been made in combination with specific embodiments. However, the above exemplary discussion is not intended to exhaust or limit the embodiments to the specific forms disclosed above. Various modifications and variations can be derived according to the above teachings. The selection and description of the above embodiments are to better explain the principles and practical applications, so that those skilled in the art can better use the embodiments and various different modified embodiments suitable for specific use considerations.
[0038] The present application provides an image search method, device, system, equipment and medium, which comprises: acquiring a first long feature vector and a first short feature vector of a to-be-searched image; determining a candidate standard image whose similarity meets a candidate requirement according to the distance between the first short feature vector and the short feature vector of each standard image in an image database; determining a target image whose similarity meets an output condition according to the distance between the long feature vector of each candidate image in the group where each candidate standard image is located and the first long feature vector, and taking the target image as a searched image.
[0039] In order to improve the search efficiency of image search, the present application provides an image search method, device, system, equipment and medium.
[0040] Embodiment 1:
[0041] Figure 1 An image search process diagram is provided for some embodiments of the present application, which comprises the following steps:
[0042] S101: acquiring a first long feature vector and a first short feature vector of a to-be-searched image.
[0043] The image search method provided by the embodiments of the present application is applied to an electronic device, which can be a PC, a server or the like.
[0044] Specifically, the image to be searched can be carried in a search request sent to the electronic device. In an embodiment of the present application, in order to search the image, first, a first long feature vector and a first short feature vector of the image to be searched are obtained. The long feature vector contains 256 floats and occupies 1024 bytes, and the first long feature vector of the image to be searched can be obtained by using a resnet-50 model; the short feature vector contains 256 bits and occupies 32 bytes, and the first short feature vector of the image to be searched can be obtained by adding a hash layer on a conv5_x layer on the basis of the resnet-50 model.
[0045] S102: According to the distance between the first short feature vector and the short feature vector of each standard image in the image database, a candidate standard image whose similarity meets a candidate requirement is determined.
[0046] In order to facilitate searching, in an embodiment of the present application, each image in the image database is preprocessed, the images are clustered according to the short feature vectors of the images, the group to which each image belongs is determined, and each group contains a standard image. The images in each group can be considered to have similar short feature vectors. Therefore, when searching the image, the first short feature vector of the image to be searched and the short feature vector of each standard image in the image database can be used to determine the similarity between the image to be searched and each standard image. Specifically, the distance between the first short feature vector and the short feature vector of each standard image in the image database is calculated, so as to obtain each candidate standard image whose similarity meets a candidate requirement. The candidate standard image whose similarity meets a candidate requirement can be a plurality of standard images with high similarity.
[0047] Specifically, the process of determining the similarity according to the distance between the feature vectors belongs to the prior art, and will not be described here.
[0048] In an embodiment of the present application, each image has its corresponding UID. Therefore, when the candidate standard image is determined, because each standard image has its group, the UID of each candidate image in the group of the candidate standard image can be obtained.
[0049] S103: According to the distance between the long feature vector of each candidate image in the group of each candidate standard image and the first long feature vector, a target image whose similarity meets an output condition is determined, and the target image is taken as the searched image.
[0050] In the embodiment of the present application, the UID corresponding to each long feature vector is pre-stored, and therefore, when the UID of each candidate image is determined, the long feature vector corresponding to each candidate image can be obtained based on the UID of each candidate image. The first long feature vector of the image to be searched is compared with the long feature vector of each candidate image in terms of similarity, that is, the similarity between the image to be searched and each candidate image is determined based on the long feature vector of the candidate image corresponding to each UID and the first long feature vector. The candidate image with high similarity to the image to be searched can be determined according to the similarity. The candidate image with high similarity is taken as the target image that meets the output condition in terms of similarity, and the target image is output as the searched image.
[0051] Because the long feature vectors have the same length, the similarity between the long feature vector of each candidate image and the first long feature vector can be determined according to the distance between the long feature vectors, and the smaller the distance, the higher the similarity.
[0052] In the image database of the embodiment of the present application, a plurality of image sets are included, the images in the image sets are clustered according to the distance between the short feature vectors, and the standard image corresponding to each cluster after clustering is determined. Therefore, when the first long feature vector and the first short feature vector of the image to be searched are obtained, the candidate standard image with high similarity to the image to be searched can be determined based on the first short feature vector and the short feature vector of each standard image. The target image that meets the output condition in terms of similarity can be determined according to the long feature vector of each candidate image in the group where the candidate standard image is located and the first long feature vector. Therefore, this process does not need to match the images one by one, and the efficiency of image searching is improved.
[0053] Embodiment 2:
[0054] In order to provide images that meet the requirements, on the basis of the above-mentioned embodiments, in the embodiment of the present application, the method further includes: obtaining a similarity threshold, and determining the candidate standard image that meets the candidate requirement in terms of similarity based on the distance between the first short feature vector and the short feature vector of each standard image in the image database includes:
[0055] The standard image with a similarity greater than the similarity threshold is taken as the candidate standard image that meets the candidate requirement in terms of similarity.
[0056] In order to provide images that meet the requirements in the embodiment of the present application, the similarity threshold can also be carried in the search request. Therefore, when the similarity between each standard image and the image to be searched is obtained based on the distance between the short feature vectors, the similarity threshold is obtained, and the similarity between each standard image and the image to be searched is compared with the similarity threshold. If the similarity between a certain standard image and the image to be searched is greater than the similarity threshold, the standard image is the candidate standard image that meets the candidate requirement in terms of similarity.
[0057] Embodiment 3
[0058] In order to improve the search efficiency of image search by image, on the basis of the above embodiments, in the embodiment of the application, the method further comprises: acquiring a quantity threshold, and the target image whose similarity meets the output condition is determined according to the distance between the long feature vector of each candidate image in the group where each candidate standard image is located and the first long feature vector.
[0059] The candidate images are sorted in descending order of similarity, and the candidate images of the quantity threshold sorted in the front are taken as the target images whose similarity meets the output condition.
[0060] In order to further accurately provide images meeting the requirements, the search request can also carry a quantity threshold, which is a quantity requirement met by the output images. Specifically, the similarity of each candidate image to the image to be searched can be determined according to the distance between the long feature vectors, and after the similarity of each candidate image to the image to be searched is determined, each candidate image can be sorted in descending order of similarity, and the candidate images of the quantity threshold sorted in the front are taken as the target images searched.
[0061] Embodiment 4
[0062] In order to improve the search efficiency of image search by image, on the basis of the above embodiments, in the embodiment of the application, before the target image whose similarity meets the output condition is determined according to the distance between the long feature vector of each image in the group corresponding to each candidate standard image and the first long feature vector, the method further comprises:
[0063] For each candidate standard image, the storage position of the long feature vector of each candidate image in the file storing the long feature vector is determined according to the UID of each candidate image in the group where the candidate standard image is located and the total number of long feature vectors stored in the file storing the long feature vectors of images, and each long feature vector stored in the corresponding storage position is acquired.
[0064] In the embodiment of the application, in order to facilitate the determination of similarity and thus the determination of the target image, each long feature vector and the UID corresponding to each long feature vector are pre-stored. When the candidate standard image is determined, each candidate image in the group where the candidate standard image is located is also determined, and each candidate image also has a corresponding UID, which is the same as the UID corresponding to the long feature vector of the candidate image. The UID is determined according to the order of storing the long feature vector into the file storing the long feature vectors of images.
[0065] In the embodiment of the present application, one image database comprises a plurality of image sets, one image set corresponds to a file in which a long feature vector of each image in the image set is stored, and the file can be a chunk block. The storage space of one chunk block is the same, and the total number of long feature vectors that can be stored is also determined. One chunk block corresponds to a plurality of groups, so when each candidate standard image is determined, the chunk block corresponding to the image set to which the candidate standard image belongs can be found. According to the UID of each candidate image in the group to which the candidate standard image belongs and the total number of long feature vectors stored in the chunk block, the storage position of the long feature vector of the candidate image stored in the chunk block can be determined, so that the long feature vector stored in the storage position can be obtained.
[0066] Embodiment 5
[0067] In order to improve the search efficiency of image search, before the first long feature vector and the first short feature vector of the image to be searched are obtained in the above embodiments, the method further comprises:
[0068] In order to improve the search efficiency of image search, before the first long feature vector and the first short feature vector of the image to be searched are obtained in the above embodiments, the method further comprises:
[0069] In order to improve the search efficiency of image search, before the first long feature vector and the first short feature vector of the image to be searched are obtained in the above embodiments, the method further comprises:
[0070] In the embodiment of the present application, the index of the image can be established for the image stored in the image database, and the image can be searched according to the index of the image during the search.
[0071] In order to save the second long feature vector of each image, a file for saving the second long feature vector is provided in the present application, and the file is specifically a chunk block. The total number of second long feature vectors that can be saved in each chunk block is fixed. When the second long feature vector of an image is obtained, it is determined whether the current file is full, that is, whether the chunk block in which the long feature vector is written is full. If not, the idle storage positions in the chunk block are sequentially searched, the second long feature vector is stored in the first searched idle storage position, and a new UID is generated by incrementing the last UID corresponding to the chunk block on the basis of the last UID.
[0072] If the current file is full, the image corresponding to the current file can be saved into the image set corresponding to the current file, and clustering is performed on the images in the image set to determine the group to which each image belongs. When clustering the images, a standard image can be manually selected first, and other images belonging to the group in which the standard image belongs are determined according to the distance between the short feature vector of the standard image and the short feature vector of the other images in the image set and a preset distance threshold. After the group in which the standard image belongs is determined, if there are still images in the image set that have not been grouped, another standard image can be manually selected, and other images belonging to the group in which the standard image belongs are determined again. The above method is used to cluster the images that have not been grouped to determine the group corresponding to the standard image, until all the images in the image set are divided into corresponding groups.
[0073] Because the UID of each image is determined according to the order in which the second long feature vector of the image is stored in the chunk block, and the total number of long feature vectors saved in each chunk block is determined, the number of storage positions contained in the chunk block is also determined, one second long feature vector occupies one storage position, each second long feature vector is sequentially stored in the chunk block, and the UID corresponding to the second long feature vector is also sequentially incremented. Therefore, when the UID of the candidate image is determined, the chunk block corresponding to the UID can be known, the storage position of the long feature vector corresponding to the UID in the chunk block can be determined according to the UID and the total number of long feature vectors saved in the chunk block, and each long feature vector stored in the storage position can be obtained. Specifically, the storage position of the long feature vector corresponding to the UID is determined according to the remainder of the UID divided by the total number.
[0074] In order to facilitate the writing of the second long feature vector, in the embodiments of the present application, the determination of whether the current file is full includes:
[0075] acquire a storage quantity identification file corresponding to the current file, judge whether the last bit recorded in the storage quantity identification file is an occupied identification, if not, determine that the current file is not stored full, otherwise, determine that the current file is stored full;
[0076] After the second long feature vector is saved into the current file, the method further comprises:
[0077] In the storage quantity identification file corresponding to the current file, the bit corresponding to the UID of the second long feature vector is modified to an occupied identification.
[0078] In order to facilitate recording how many long feature vectors are written in the chunk block, each chunk corresponds to a storage quantity identification file, and the storage quantity identification file contains bits equal to the total number of long feature vectors that can be stored in the chunk block, that is, each bit corresponds to each storage position contained in the chunk block, and each bit is used to record whether the corresponding storage position in the chunk block is occupied. If the storage position is occupied, the bit corresponding to the storage position in the storage quantity identification file is an occupied identification, for example, it can be 1. If it is not occupied, the bit corresponding to the storage position in the storage quantity identification file is an unoccupied identification, for example, it can be 0.
[0079] Specifically, the storage quantity identification file can be a.bm file, and the number of bits contained in the.bm file is equal to the total number of long feature vectors that can be saved in the chunk block. Each chunk block corresponds to a.bm file. Because the storage positions in the chunk block are occupied in sequence, each bit in the.bm file is also modified to an occupied identification in sequence. Therefore, according to whether the last bit of the.bm file corresponding to the current file is an occupied identification, it can be known whether the current file is stored full.
[0080] In the embodiment of the present application, the long feature vector can be saved in the chunk block. Because the length of a long feature vector is fixed, the length of a long feature vector is generally fixed, and the storage space of the chunk block is also fixed, so the total number of long feature vectors that can be stored in the chunk block is determined, and a first number threshold can be set according to the total number. In the embodiment of the present application, 65536 long feature vectors can be saved in a chunk block, that is, the first number threshold can be 65536, that is, the UIDs corresponding to the long feature vectors saved in the chunk block also have 65536.
[0081] Because the total number of long feature vectors that can be stored in a chunk block is determined, before saving a second long feature vector into a chunk block, it is first determined whether the number of long feature vectors already stored in the chunk block reaches the first number threshold, if not, the second long feature vector is saved to the free storage position in the chunk block, and the UID corresponding to the second long feature vector is determined; if the number of long feature vectors already stored in the chunk block reaches the first number threshold, the next free chunk block of the chunk block can be searched, the second long feature vector is saved to the searched chunk block, and the UID corresponding to the second long feature vector is determined.
[0082] Figure 2 The process of saving long feature vectors into chunk blocks and clustering images in an image set provided for some embodiments of the present application is shown in the following figure: Figure 2 As shown, for an image to be stored in an image database, when the second long feature vector of the image is determined, according to the current chunk block in which data is currently written, according to the bm file corresponding to the chunk block, it is determined whether the number of long feature vectors already stored in the chunk block reaches the first number threshold, if yes, the next free chunk block of the chunk block is searched, the second long feature vector is saved to the searched chunk block, and the UID corresponding to the second long feature vector is determined; if the number of long feature vectors already stored in the chunk block does not reach the first number threshold, the second long feature vector is saved to the chunk block, and the UID corresponding to the second long feature vector is determined.
[0083] In addition, the short feature vector of the image having the long feature vector can also be saved for each long feature vector of the UID.
[0084] If the number of long feature vectors already stored in the chunk block reaches the first number threshold, it means that the images corresponding to the chunk block are already enough, the images corresponding to the chunk block can be located in an image set, and clustering operation can be performed for the images in the image set, so as to determine each standard image in the image set and the group corresponding to each standard image. Specifically, when determining the group corresponding to each standard image, the distance between the short feature vectors of the standard image and the ungrouped images can be used to determine.
[0085] Because the chunk block storing the long feature vector can contain multiple, in order to facilitate the management of multiple chunk blocks, and facilitate the query of each chunk block, the index information of the chunk block can be recorded to the core index file, which is the meta file in the embodiment of the application. The meta file sets a corresponding bit for each managed chunk block, and each bit records whether the number of long feature vectors already stored in the corresponding chunk block reaches the first number threshold, that is, whether the data in the chunk block is full. In the embodiment of the application, the size of the meta file can be determined according to the number of index information of the chunk block recorded in the meta file.
[0086] Figure 3 The index information of the meta file and the chunk block in the image database provided for some embodiments of the application is shown in FIG. 3. The total length of the meta file is 0x1018 bytes. The image database contains multiple chunk block clusters, and the chunk blocks belong to the chunk block clusters. Each chunk block cluster occupies 8 bytes and contains 64 bits. Each chunk block cluster contains 64 chunk blocks, so each chunk block cluster occupies 512 64 = 32768bit. Each bit in the meta file corresponds to a chunk block, and the meta file records the total number of managed chunk blocks, which is 32768. Each chunk block corresponds to a bit to identify whether the chunk block is full. If the number of long feature vectors already stored in the chunk block reaches the first number threshold, the chunk block is full, the bit position corresponding to the chunk block is 1, otherwise, the bit position corresponding to the chunk block is 0.
[0087] A meta file can manage up to 32768 chunk blocks, and each chunk block has a.bm file for storing the index in the chunk block. The feature cluster array of the.bm file contains 1024 feature clusters, and each feature cluster is 64 bits. Each feature cluster manages 64 feature vectors, so one.bm file can manage 1024 64=65535 long feature vectors. Each chunk block contains two feature vector files C-x.0 and C-x.1 for storing short feature vectors and long feature vectors, respectively.
[0088] Each long feature vector corresponds to a unique UID, which is a 64-bit integer. The high 32 bits of the UID are the node number, and the low 32 bits are the specific uid. uid = cidx 65536 + inner_idx. If the UID does not contain the node number bit, the long feature vector storage location determined based on the UID is the same as the long feature vector storage location determined based on the uid.
[0089] Figure 4 A schematic diagram of a UID storage structure provided in some embodiments of the present application is shown in FIG. Figure 4 As shown, the UID corresponding to the long feature vector is a 64-bit integer. To distinguish the UID, the upper 32 bits of the UID are the node number, and the lower 32 bits are the specific UID. The range of cidx is [0, 32767], and the range of inner_idx is [0, 65535]. idx is also the file name of the chunk file. For example, if cidx = 1, the corresponding chunk number is 1. Its index file name is 1.bm. The short feature vector storage file is C-1.0, and the long feature vector storage file is C-1.1. The time complexity of using UID retrieval is o(1).
[0090] According to the above UID formula, the UID corresponding to the long feature vector can be directly used to determine the chunk number and feature vector number within the chunk of the long feature vector represented by this UID, without having to match the long feature vectors in the chunk one by one. Therefore, after determining the UID corresponding to the low-order 32 bits of the UID, the above formula can be used to determine the chunk number and long feature vector number stored in the chunk corresponding to this UID. Because the chunk corresponding to each image set is fixed, it is possible to directly determine the chunk number of the long feature vector stored in the chunk by simply determining the value of cidx.
[0091] Figure 5 A schematic diagram of the image search process provided in some embodiments of the present application, such as Figure 5As shown, in the embodiments of the present application, each image set can be saved in the map index table, after the first long feature vector and the first short feature vector of the image to be retrieved are obtained, the map index table saves each image set, and each image set corresponds to a key. As shown, the image set in the map index table includes keys c0, c1 and c2. The distance between the short feature vector of the standard image in each key and the first short feature vector can be determined, so as to determine the similarity between each standard image and the image to be retrieved. According to the similarity, the candidate standard image that meets the candidate requirement can be determined. Specifically, the candidate image in the group of the candidate standard image is the image that meets the value condition. According to the group where each candidate standard image is located, the UID of each candidate image in the group is identified. For each candidate image, the storage location of the long feature vector of the candidate image in the chunk block corresponding to the image set where the candidate image is located is determined according to the UID of the candidate image and the chunk block. The long feature vector of the candidate image stored in the storage location is obtained. The distance between the long feature vector and the first long feature vector is calculated to determine the similarity between the candidate image and the image to be retrieved. According to the similarity between each candidate image and the image to be retrieved, the target image whose similarity meets the output condition is determined.
[0092] Figure 6 The process diagram of image search provided for some embodiments of the present application is shown as Figure 6 As shown, the input query is received, and the query carries the image to be retrieved. The first long feature vector and the first short feature vector of the image to be retrieved are obtained. According to the short feature vector of the standard image in each image set saved in the map index table and the first short feature vector, the candidate standard image that meets the candidate requirement can be determined. According to the group where each candidate standard image is located, the UID of each candidate image in the group is identified. The low 32 bits of the UID with a length of 64-bit integer are obtained. Based on the uid and the long feature vector saved in the chunk block in the meta index table, the storage location of the long feature vector corresponding to the candidate image is determined. Specifically, inner_idx = uid%65536 can be used to determine the chunk block that stores the long feature vector of the candidate image. When the corresponding chunk block is determined, cidx = uid / 65536 can be used to obtain the storage location of the long feature vector. After the long feature vector of the candidate image stored in the storage location is obtained, the similarity between the candidate image and the image to be retrieved can be determined according to the distance between the long feature vector and the first long feature vector. The candidate images are sorted in descending order of similarity. According to the sorting result, the target image whose similarity meets the output condition is determined.
[0093] Embodiment 6:
[0094] On the basis of the above embodiments, the embodiment of the present application further provides an image search system, Figure 7 A structural schematic diagram of an image search system provided for some embodiments of the present application is shown in the figure, and the system comprises:
[0095] A name node 701 is configured to receive a to-be-searched image sent by a client, and send the to-be-searched image to a corresponding data node;
[0096] The data node 702 is configured to receive the to-be-searched image, acquire a first long feature vector and a first short feature vector of the to-be-searched image, determine a candidate standard image whose similarity meets a candidate requirement according to a distance between the first short feature vector and a short feature vector of each standard image in an image set, determine a target image whose similarity meets an output condition according to a distance between a long feature vector of each candidate image in a group to which each candidate standard image belongs and the first long feature vector, send the target image as a searched image to the name node, and send the searched image to the client.
[0097] The name node 701 is further configured to send the searched image to the client.
[0098] In order to improve the efficiency of image search, in the embodiment of the present application, an image search system with a scalable distributed architecture is used for implementation, in which multiple data nodes (datanodes) can be set according to requirements, the datanodes are used for distributed storage, and multiple retrieval tasks can be performed concurrently in different datanodes, thereby improving the retrieval efficiency.
[0099] When performing image search, the name node (namenode) first receives a to-be-searched image sent by a client, and sends the to-be-searched image to a datanode. Specifically, the name node receives a json string sent by the client, the information of the to-be-searched image is written in the json string, and the name node acquires the to-be-searched image by parsing the json string.
[0100] After receiving the to-be-searched image, the datanode determines a first long feature vector and a first short feature vector of the to-be-searched image, determines a candidate standard image whose similarity meets a candidate requirement according to a distance between the first short feature vector and a short feature vector of each standard image in an image set, and the subsequent process of determining a searched image based on the candidate standard image by the datanode has been described in the above other embodiments, and will not be described here.
[0101] On the basis of the above embodiments, in the embodiment of the present application, the name node 701 is specifically used for receiving a json string in which information of the to-be-retrieved image and a time range to which the retrieved image belongs are written and sent by a client; the json string is parsed to obtain the to-be-retrieved image and the time range, a target time wide range to which the time range belongs is determined according to a pre-stored corresponding relationship between each data node and a time wide range, and the to-be-retrieved image is sent to a data node corresponding to the target time wide range.
[0102] In order to reduce the pressure of the data node, a plurality of data nodes can be deployed, and each data node stores part of the images. Specifically, in the embodiment of the present application, the historical time of the image can be divided into a plurality of time wide ranges according to the historical time, each data node corresponds to a time wide range, when constructing the database of each data node, the historical time of the image is determined according to the historical time, the time wide range to which the historical time belongs is determined, and the data node corresponding to the corresponding time wide range is determined, and the image is stored in the data node. Each data node can determine the second feature vector of the image stored locally, save the second long feature vector to the database, and cluster the images in the image set.
[0103] When searching for the image, the time range to which the retrieved image belongs can be specified. In order to obtain accurate images, the time range to which the retrieved image belongs is written in the json string, after the name node parses the json string to obtain the time range, the target time wide range to which the time range belongs is determined according to the pre-stored corresponding relationship between each data node and the time wide range, and the to-be-retrieved image is sent to the data node corresponding to the target time wide range.
[0104] In order to obtain images that meet the requirements, in the embodiment of the present application, the json string can also carry at least one of the quantity threshold and the similarity threshold, so as to facilitate the datanode to obtain target images that meet the output conditions in similarity. Specifically, how the datanode searches the image based on the quantity threshold and the similarity threshold is described in the above other embodiments, and will not be described here.
[0105] In addition, the json string can also carry information of a target object type contained in the image to be searched, and in the image search system provided in the embodiments of the present application, a datanode corresponding to each object type is arranged, and the datanode corresponding to each object type is generally multiple, and the namenode can save the datanode corresponding to each object type, and when the target object type in the json string is acquired, the datanode corresponding to the target object type can be determined. According to the different object types, different databases can be used, and each database has a corresponding datanode, and specifically, the databases can be divided into a pedestrian database, a vehicle database, a face database, a person riding a bicycle database and the like, and according to the type of the object contained in the image to be detected, the image to be searched is sent to the datanode of the corresponding database for processing.
[0106] On the basis of the above embodiments, in the embodiments of the present application, the name node is specifically used for sending the image to be searched to the data node in a socket mode.
[0107] Specifically, the information transmission between the namenode and the datanode is performed in a socket mode, which includes that the namenode sends the image to be searched to the datanode in the socket mode. After the datanode acquires the searched image, the datanode sends the searched image to the namenode in the socket mode. After the namenode receives the searched image, the namenode sends the searched image to the client in the http restful mode.
[0108] Figure 8 The overall architecture diagram of the image search system provided in some embodiments of the present application is shown in FIG. 1. Figure 8As shown in the figure, the image search system includes a namenode and a plurality of datanodes. After receiving a search request carrying an image to be searched, the namenode parses the content of the search request, determines the datanode node storing the image in the time range of the time width to which the searched image belongs according to the time range of the searched image carried in the search request, and sends the search request carrying the image to be searched to the corresponding datanode through an internal socket. The datanode is responsible for specific search of the image. After receiving the search request carrying the image to be searched sent by the namenode, the datanode parses the search request, performs image search according to the parsed content, and obtains the searched image. The searched image is generally an image set containing a plurality of images. The datanode returns the image set to the namenode through a socket. The namenode returns the image set to the client through an http restful. In the present application, the namenode and the datanode are separated. The namenode is responsible for datanode node management, resource scheduling, task management, client request response, etc. The datanode is responsible for processing data, specifically including data storage and query, etc.
[0109] The image search process of the embodiments of the present application will be described in detail below in combination with a specific embodiment.
[0110] Figure 9 A specific image search process diagram is provided for some embodiments of the present application, as shown in Figure 9 The image search process is as follows:
[0111] 1) The client receives an image to be searched, writes the time range to which the searched image belongs, the image to be searched, the similarity threshold value and the quantity threshold value, etc. into a json string, and sends the json string to the namenode. The namenode determines the target time width range to which the time range belongs according to the time range contained in the json string, and sends the image to be searched, the similarity threshold value and the quantity threshold value, etc. to the datanode corresponding to the target time width range through a socket.
[0112] 2) The datanode obtains the first long feature vector and the first short feature vector of the image to be searched, and the map index table stores each image set, wherein each image set corresponds to a key, the distance between the short feature vector of the standard image in each key and the first short feature vector can be determined, so as to determine the similarity between each standard image and the image to be searched, and the standard image with a similarity greater than a similarity threshold is determined as a candidate standard image meeting the candidate requirement, and the candidate image in the group of the specific candidate standard image is an image meeting the value condition and is also the initial screening result set.
[0113] 3) The datanode identifies the UID of each candidate image in each group, and for each candidate image, the storage location of the long feature vector of the candidate image in the chunk block corresponding to the image set where the candidate image is located is determined according to the UID of the candidate image and the chunk block, the long feature vector of the candidate image stored in the storage location is obtained, the distance between the long feature vector and the first long feature vector is calculated, and the similarity between the candidate image and the image to be searched is determined; according to the similarity between each candidate image and the image to be searched, the candidate images are sorted in descending order of similarity, and the candidate images in the front of the threshold are taken as target images meeting the output condition of similarity.
[0114] Embodiment 7:
[0115] On the basis of the above-mentioned embodiments, the embodiment of the present application further provides an image search device, Figure 10 The structure diagram of an image search device provided by some embodiments of the present application is shown in the figure, and the device comprises:
[0116] The acquisition module 1001 is configured to acquire the first long feature vector and the first short feature vector of the image to be searched.
[0117] The determination module 1002 is configured to determine the candidate standard image meeting the candidate requirement according to the distance between the first short feature vector and the short feature vector of each standard image in the image database, determine the target image meeting the output condition of similarity according to the distance between the long feature vector of each candidate image in the group of each candidate standard image and the first long feature vector, and take the target image as the searched image.
[0118] Further, the determination module 1002 is specifically configured to take the standard image with a similarity greater than the similarity threshold as the candidate standard image meeting the candidate requirement.
[0119] Further, the determining module 1002 is specifically configured to: for each candidate standard image, determine a storage position of a long feature vector of each candidate image in the file according to a UID of each candidate image in a group to which the candidate standard image belongs and a total number of long feature vectors stored in the file, and acquire each long feature vector stored in the corresponding storage position.
[0120] Further, the determining module 1002 is specifically configured to: sort the candidate images in a descending order of similarity, and take the candidate images in the top N as target images whose similarity meets an output condition.
[0121] Further, the apparatus further comprises:
[0122] The index establishing module 1003 is configured to: for each image in the database, acquire a second long feature vector and a second short feature vector of the image; determine whether a current file is full, and if not, save the second long feature vector into the current file, determine a UID of the second long feature vector in an incremental manner, save the image into an image set corresponding to the current file; if yes, select a standard image for the image set of the current file, cluster the images in the image set according to the second short feature vector of each image included in the image set, and determine other images included in each cluster.
[0123] Further, the index establishing module 1003 is specifically configured to: acquire a storage number identifier file corresponding to the current file, determine whether a last bit recorded in the storage number identifier file is an occupied identifier, and if not, determine that the current file is not full, otherwise, determine that the current file is full.
[0124] The index establishing module 1003 is specifically configured to: after saving the second long feature vector into the current file, modify a bit corresponding to the UID of the second long feature vector in the storage number identifier file corresponding to the current file to the occupied identifier.
[0125] Since the image database in the embodiment of the present application contains multiple image sets, the images in the image sets are clustered according to the distance between the short feature vectors, and the standard image corresponding to each cluster after clustering is determined, therefore, when the first long feature vector and the first short feature vector of the image to be searched are obtained, based on the first short feature vector and the short feature vector of each standard image, the candidate standard image similar to the image to be searched can be determined, and based on the long feature vector of each candidate image in the cluster where the candidate standard image is located and the first long feature vector, the target image whose similarity meets the output condition can be determined, therefore, the process does not need to match the images one by one, and the efficiency of image searching is improved.
[0126] Embodiment 8:
[0127] Based on the above embodiments, the embodiment of the present application further provides an electronic device, Figure 11 An electronic device provided by some embodiments of the present application is shown in FIG. 1, which includes a processor 1101 and a memory 1102. Figure 11
[0128] The memory 1102 stores a computer program, and when the program is executed by the processor 1101, the processor 1101 performs the following steps:
[0129] Obtain the first long feature vector and the first short feature vector of the image to be searched; determine the candidate standard image whose similarity meets the candidate requirement according to the distance between the first short feature vector and the short feature vector of each standard image in the image database.
[0130] Determine the target image whose similarity meets the output condition according to the distance between the long feature vector of each candidate image in the cluster where each candidate standard image is located and the first long feature vector, and take the target image as the searched image.
[0131] Further, in a possible implementation, the processor 1101 is further configured to perform:
[0132] Take the standard image whose similarity is greater than the similarity threshold as the candidate standard image whose similarity meets the candidate requirement.
[0133] Further, in a possible implementation, the processor 1101 is further configured to perform:
[0134] For each candidate standard image, determine the storage location of the long feature vector of each candidate image in the file storing the long feature vector according to the UID of each candidate image in the cluster where the candidate standard image is located and the total number of long feature vectors stored in the file storing the long feature vector, and obtain each long feature vector stored in the corresponding storage location.
[0135] Further, in a possible implementation, the processor 1101 is further configured to execute the following steps:
[0136] The candidate images are sorted in descending order of similarity, and the candidate images in the top of the order are taken as target images whose similarity meets the output condition.
[0137] Further, in a possible implementation, the processor 1101 is further configured to execute the following steps:
[0138] In sequence, for each image in the database, the second long feature vector and the second short feature vector of the image are obtained; it is determined whether the current file is full, if not, the second long feature vector is saved to the current file, and it is determined that the UID of the stored long feature vector is in an incremental manner, the UID corresponding to the second long feature vector is determined, and the image is saved to the image set corresponding to the current file; if yes, for the image set of the current file, a standard image is selected, the images in the image set are clustered according to the second short feature vector of each image contained in the image set, and other images contained in each cluster are determined.
[0139] Further, in a possible implementation, the processor 1101 is further configured to execute the following steps:
[0140] The storage quantity identification file corresponding to the current file is obtained, and it is determined whether the last bit recorded in the storage quantity identification file is the occupied identification, if not, it is determined that the current file is not full, otherwise, it is determined that the current file is full.
[0141] Further, in a possible implementation, the processor 1101 is further configured to execute the following steps:
[0142] In the storage quantity identification file corresponding to the current file, the bit corresponding to the UID of the second long feature vector is modified to the occupied identification.
[0143] Embodiment 9:
[0144] On the basis of each of the above embodiments, the embodiment of the present application further provides a computer storage medium, and the computer storage medium stores a computer program executable by an electronic device, and when the program runs on the electronic device, the electronic device executes the following steps:
[0145] The first long feature vector and the first short feature vector of the image to be searched are obtained.
[0146] According to the distance between the first short feature vector and the short feature vector of each standard image in the image database, the candidate standard image whose similarity meets the candidate requirement is determined.
[0147] determine a target image whose similarity meets an output condition according to a distance between a long feature vector of each candidate image in a group in which each candidate standard image is located and the first long feature vector, and take the target image as a searched image.
[0148] Further, the method further comprises: obtaining a similarity threshold, and determining the candidate standard image whose similarity meets the candidate requirement according to a distance between the first short feature vector and a short feature vector of each standard image in the image database comprises:
[0149] taking a standard image whose similarity is greater than the similarity threshold as the candidate standard image whose similarity meets the candidate requirement.
[0150] Further, before the determining the target image whose similarity meets the output condition according to a distance between a long feature vector of each candidate image in a group corresponding to each candidate standard image and the first long feature vector, the method further comprises:
[0151] For each candidate standard image, determining a storage position of a long feature vector of each candidate image in a file in which the long feature vector is stored according to a UID of each candidate image in a group in which the candidate standard image is located and a total number of long feature vectors stored in the file, and obtaining each long feature vector stored in the corresponding storage position.
[0152] Further, the method further comprises: obtaining a number threshold, and determining the target image whose similarity meets the output condition according to a distance between a long feature vector of each candidate image in a group in which each candidate standard image is located and the first long feature vector comprises:
[0153] sorting the candidate images in a descending order of similarity, and taking the candidate images of the number threshold sorted in the front as the target images whose similarity meets the output condition.
[0154] Further, before the obtaining the first long feature vector and the first short feature vector of the image to be searched, the method further comprises:
[0155] sequentially for each image in the database, obtaining a second long feature vector and a second short feature vector of the image; determining whether a current file is full, if not, saving the second long feature vector into the current file, and determining a UID of the second long feature vector in an incremental manner, determining a UID corresponding to the second long feature vector, and saving the image into an image set corresponding to the current file; if yes, for each image set of the current file, selecting a standard image, clustering images in the image set according to the second short feature vector of each image contained in the image set, and determining other images contained in each cluster.
[0156] Further, the determining whether the current file is full includes:
[0157] obtaining a storage quantity identification file corresponding to the current file, determining whether a last bit recorded in the storage quantity identification file is an occupied identification, if not, determining that the current file is not full, otherwise, determining that the current file is full.
[0158] Further, after the saving the second long feature vector into the current file, the method further includes:
[0159] modifying a bit corresponding to the UID of the second long feature vector in the storage quantity identification file corresponding to the current file to the occupied identification.
[0160] In the image database of the embodiment of the present application, a plurality of image sets are included, the images in the image sets are clustered according to the distances between the short feature vectors, and the standard images corresponding to each group after clustering are determined. Therefore, when the first long feature vector and the first short feature vector of the image to be searched are obtained, based on the first short feature vector and the short feature vectors of each standard image, the candidate standard images similar to the image to be searched can be determined, and based on the long feature vectors of each candidate image in the group where the candidate standard image is located and the first long feature vector, the target image whose similarity satisfies the output condition can be determined. Therefore, the process does not need to match the images one by one, and the efficiency of image searching is improved.
[0161] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt a computer program product in the form of being implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program codes.
[0162] The present application is described with reference to flowcharts and / or block diagrams according to the methods, devices (systems), and computer program products of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the computer or other programmable data processing devices produce a device that implements the flowcharts and / or block diagrams. Figure 1 one flow or multiple flows and / or blocks Figure 1means for performing the function specified by the block or blocks.
[0163] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the flow Figure 1 one or more flowcharts and / or blocks Figure 1 one or more blocks or means for performing the function specified by the block or blocks.
[0164] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the flow Figure 1 one or more flowcharts and / or blocks Figure 1 one or more blocks or steps for performing the function specified by the block or blocks.
[0165] Obviously, numerous modifications and variations of the present application are possible in light of the above teachings. It is therefore to be understood that within the scope of the apparent, such modifications and variations are to be included within the scope of the application and the equivalent of such.
Claims
1. An image search method characterized by, The method comprises: obtaining a first long feature vector and a first short feature vector of an image to be searched; determining candidate standard images whose similarity meets a candidate requirement according to distances between the first short feature vector and short feature vectors of each standard image in an image database; for each candidate standard image, determining storage positions of long feature vectors of each candidate image in a group to which the candidate standard image belongs in a file in which long feature vectors of images are stored according to a UID of each candidate image in the group and a total number of long feature vectors stored in the file, obtaining each long feature vector stored in a corresponding storage position, wherein the UID is determined according to an order in which the long feature vector is saved to the file in which long feature vectors of images are stored; determining a target image whose similarity meets an output condition according to distances between the first long feature vector and long feature vectors of each candidate image in the group to which the candidate standard image belongs, and taking the target image as a searched image.
2. The method of claim 1, wherein, The method further comprises: obtaining a similarity threshold, and the determining of the candidate standard images whose similarity meets the candidate requirement according to the distances between the first short feature vector and the short feature vectors of each standard image in the image database comprises: taking a standard image whose similarity is greater than the similarity threshold as the candidate standard image whose similarity meets the candidate requirement.
3. The method of claim 1, wherein, The method further comprises: obtaining a number threshold, and the determining of the target image whose similarity meets the output condition according to the distances between the first long feature vector and the long feature vectors of each candidate image in the group to which the candidate standard image belongs comprises: sorting the candidate images in descending order of similarity, and taking candidate images of the number threshold sorted in front as the target images whose similarity meets the output condition.
4. The method of claim 1, wherein, Before the obtaining of the first long feature vector and the first short feature vector of the image to be searched, the method further comprises: for each image in the database, obtaining a second long feature vector and a second short feature vector of the image in sequence; determining whether a current file is full, if not, saving the second long feature vector to the current file, and determining a UID corresponding to the second long feature vector in an incremental manner, saving the image to an image set corresponding to the current file; if yes, for the image set of the current file, selecting a standard image, clustering images in the image set according to the second short feature vector of each image contained in the image set, and determining other images contained in each cluster.
5. The method of claim 4, wherein, The determining of whether the current file is full comprises: obtaining a storage number identification file corresponding to the current file, and judging whether a last bit recorded in the storage number identification file is an occupied bit, if not, determining that the current file is not full, otherwise, determining that the current file is full; after the saving of the second long feature vector to the current file, the method further comprises: modifying a bit corresponding to the UID corresponding to the second long feature vector in the storage number identification file corresponding to the current file to the occupied bit.
6. An image search system characterized by comprising: The system comprises: The name node is configured to receive the image to be searched sent by the client, and send the image to be searched to the corresponding data node. The data node is configured to receive the image to be searched, obtain a first long feature vector and a first short feature vector of the image to be searched, determine candidate standard images whose similarity meets a candidate requirement according to distances between the first short feature vector and short feature vectors of each standard image in an image database, determine storage positions of long feature vectors of each candidate image in a file storing the long feature vectors of the images according to a UID of each candidate image in a group to which the candidate standard image belongs and a total number of the long feature vectors stored in the file, obtain each long feature vector stored in the corresponding storage position, wherein the UID is determined according to an order in which the long feature vectors are stored in the file storing the long feature vectors of the images, determine a target image whose similarity meets an output condition according to distances between the long feature vectors of each candidate image in the group to which the candidate standard image belongs and the first long feature vector, and send the target image as a searched image to the name node. The name node is further configured to send the searched image to the client.
7. An image search apparatus characterized by comprising: The apparatus comprises: An obtaining module configured to obtain a first long feature vector and a first short feature vector of an image to be searched. A determining module configured to determine candidate standard images whose similarity meets a candidate requirement according to distances between the first short feature vector and short feature vectors of each standard image in an image database, determine storage positions of long feature vectors of each candidate image in a file storing the long feature vectors of the images according to a UID of each candidate image in a group to which the candidate standard image belongs and a total number of the long feature vectors stored in the file, obtain each long feature vector stored in the corresponding storage position, wherein the UID is determined according to an order in which the long feature vectors are stored in the file storing the long feature vectors of the images, determine a target image whose similarity meets an output condition according to distances between the long feature vectors of each candidate image in the group to which the candidate standard image belongs and the first long feature vector, and send the target image as a searched image.
8. An electronic device, comprising: The electronic device comprises at least a processor and a memory, and the processor is configured to implement steps of the image searching method according to any one of claims 1-5 when executing a computer program stored in the memory.
9. A computer storage medium, characterized in that The electronic device stores a computer program executable by the electronic device, and when the program runs on the electronic device, the electronic device is caused to execute steps of the image searching method according to any one of claims 1-5.
Citation Information
Patent Citations
Retrieval method and device and electronic equipment
CN112989093A
Method and system for searching images by images
CN113407746A
Image searching method and electronic equipment
CN113590922A