Image retrieval result rearrangement method and device, computer device and medium
Patent Information
- Application Number
- CN202211729136.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2042-12-30
AI Technical Summary
[0004]有鉴于此,本发明实施例提供了一种图像检索结果的重排方法、装置、计算机设备及介质,以解决图像检索的准确率较低的问题
[0022]获取待检索图像,从预设的数据库中对待检索图像进行检索,得到第一检索序列,第一检索序列包括至少一个目标图像,针对任一目标图像,确定目标图像在第一检索序列内的第一位置标识,根据第一位置标识,在第一检索序列中确定目标图像的至少一个参考图像,计算数据库内每个存储图像分别和目标图像之间的相似度,确定与目标图像最相似的前K个存储图像构成关联序列,获取每个参考图像在关联序列内的第二位置标识,采用预设的映射函数将第二位置标识映射为对应参考图像的权重,以每个参考图像和目标图像之间的相似度作为对应参考图像的初始相似度,根据每个参考图像的权重和初始相似度进行加权计算,得到目标图像的更新相似度,遍历每个目标图像,得到对应目标图像的更新相似度,根据所有目标图像的更新相似度,将所有目标图像重新排列,得到重排的第二检索序列,根据每个存储图像和目标图像之间的相似度构成关联序列,以参考图像在关联序列中的位置标识映射得到参考图像的权重,对参考图像和目标图像之间的相似度进行加权计算,更新每个目标图像的更新相似度,再根据更新相似度对目标图像进行重排,能够为图像检索的重排过程提供更丰富的位置信息,使得重排结果更加符合图像检索任务,从而提高了图像检索的准确率。
Smart Images

Figure CN116383423B_ABST
Abstract
Claims
1. A method for rearranging image retrieval results, characterized in that, The rearrangement method includes: The image to be retrieved is obtained, and the image to be retrieved is retrieved from a preset database to obtain a first retrieval sequence, wherein the first retrieval sequence includes at least one target image; For any target image, a first position identifier of the target image within the first retrieval sequence is determined, and at least one reference image of the target image is determined in the first retrieval sequence based on the first position identifier. Calculate the similarity between each stored image in the database and the target image, and determine the image most similar to the target image. The stored images form an associated sequence. Integers greater than zero; Obtain the second position identifier of each reference image within the associated sequence, and use a preset mapping function to map the second position identifier to the weight of the corresponding reference image; The similarity between each reference image and the target image is used as the initial similarity of the corresponding reference image. The updated similarity of the target image is obtained by weighting the initial similarity based on the weight of each reference image. Traverse each target image to obtain the updated similarity of the corresponding target image. Based on the updated similarity of all target images, rearrange all target images to obtain the rearranged second retrieval sequence. The weights for mapping the second position identifier to the corresponding reference image using a preset mapping function include: Multiply the preset first parameter and the second position identifier to obtain the multiplication result; The multiplication result is added to the preset second parameter, and the addition result is subjected to exponentiation to obtain the exponentiation result; The weight of the corresponding reference image is obtained by adding the result of the exponential operation to the preset third parameter and comparing it with the preset fourth parameter. The similarity between each stored image in the database and the target image is calculated, and the image most similar to the target image is determined. The stored images constitute an associated sequence, including: Calculate the similarity between each stored image in the database and the target image to obtain the second similarity of the corresponding stored images; Sort by second similarity in descending order, and then select the top-ranked items with the highest second similarity. The associated sequence is obtained by arranging the stored images; The second similarity represents the difference information between the stored image and the target image. All stored images corresponding to the second similarity are arranged in descending order of the second similarity to obtain the arrangement retrieval sequence. The second position identifier represents the sorting position of the reference image in the arrangement retrieval sequence. The second position identifier of the reference image in the association sequence is determined according to the number of columns of the element corresponding to the stored image to which the reference image belongs in the association sequence. The step of calculating the updated similarity of the target image by weighting each reference image based on its weight and initial similarity includes: For any reference image, the reference similarity is obtained by multiplying the weight of the reference image by the initial similarity. Traverse all reference images to obtain the reference similarity of the corresponding reference images, calculate the mean of the reference similarity of all reference images, and use the mean as the updated similarity of the target image; The initial similarity is used to characterize the difference information between the reference image and the target image.
2. The rearrangement method according to claim 1, characterized in that, The step of retrieving the image to be retrieved from the preset database to obtain the first retrieval sequence includes: Calculate the similarity between each stored image in the database and the image to be retrieved to obtain the first similarity of the corresponding stored images; The first one with the highest similarity The stored image is determined to be the target image. Integers greater than zero; Sort by first similarity in descending order, The target images are arranged to obtain the first retrieval sequence.
3. The rearrangement method according to claim 1, characterized in that, The step of determining at least one reference image of the target image in the first retrieval sequence based on the first location identifier includes: Obtain the first position identifier of each target image in the first retrieval sequence; All first position identifiers preceding the first position identifier are identified as reference identifiers, thus obtaining at least one reference identifier; The at least one reference image is obtained by using the target image corresponding to each reference identifier as the reference image.
4. The rearrangement method according to any one of claims 1 to 3, characterized in that, The step of rearranging all target images based on their updated similarity to obtain the rearranged second retrieval sequence includes: All target images are rearranged in descending order of updated similarity. The rearranged result is determined to be the second retrieval sequence.
5. A rearrangement device for image retrieval results, characterized in that, The rearrangement device includes: An image retrieval module is used to acquire an image to be retrieved, retrieve the image to be retrieved from a preset database, and obtain a first retrieval sequence, wherein the first retrieval sequence includes at least one target image. The identifier determination module is used to determine, for any target image, a first position identifier of the target image within the first retrieval sequence, and to determine at least one reference image of the target image in the first retrieval sequence based on the first position identifier; The sequence association module is used to calculate the similarity between each stored image in the database and the target image, and to determine the image most similar to the target image. The stored images form an associated sequence. Integers greater than zero; The weight mapping module is used to obtain the second position identifier of each reference image in the associated sequence, and to map the second position identifier to the weight of the corresponding reference image using a preset mapping function; The weighted calculation module is used to take the similarity between each reference image and the target image as the initial similarity of the corresponding reference image, and perform weighted calculation based on the weight of each reference image and the initial similarity to obtain the updated similarity of the target image; The image rearrangement module is used to traverse each target image, obtain the updated similarity of the corresponding target image, and rearrange all target images according to the updated similarity of all target images to obtain the rearranged second retrieval sequence; The weight mapping module includes: The multiplication calculation unit is used to multiply the preset first parameter and the second position identifier to obtain the multiplication result; The exponentiation unit is used to add the multiplication result to a preset second parameter, perform exponentiation on the addition result, and obtain the exponentiation result. The weight calculation unit is used to add the result of the exponential operation to the preset third parameter, and compare the result with the preset fourth parameter to obtain the weight of the corresponding reference image. The sequence association module includes: The second similarity calculation unit is used to calculate the similarity between each stored image in the database and the target image, and obtain the second similarity of the corresponding stored images; The second image sorting unit is used to sort the images in descending order of the second similarity, placing the images with the highest second similarity. The associated sequence is obtained by arranging the stored images; The second similarity represents the difference information between the stored image and the target image. All stored images corresponding to the second similarity are arranged in descending order of the second similarity to obtain the arrangement retrieval sequence. The second position identifier represents the sorting position of the reference image in the arrangement retrieval sequence. The second position identifier of the reference image in the association sequence is determined according to the number of columns of the element corresponding to the stored image to which the reference image belongs in the association sequence. The weighted calculation module includes: The reference similarity calculation unit is used to multiply the weight of the reference image and the initial similarity for any reference image to obtain the reference similarity of the reference image. The mean calculation unit is used to traverse all reference images, obtain the reference similarity of the corresponding reference images, calculate the mean of the reference similarity of all reference images, and use the mean as the updated similarity of the target image. The initial similarity is used to characterize the difference information between the reference image and the target image.
6. A computer device, characterized in that, The computer device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the rearrangement method as described in any one of claims 1 to 4.
7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the rearrangement method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Image retrieval method and device
CN106886599A
Picture retrieval reordering method, electronic equipment and computer readable storage medium
CN114254144A