Image retrieval method and device based on feature fusion, equipment and medium
Through the image retrieval method based on feature fusion, the convolutional neural network and feature branch module are used to generate image retrieval identifiers, which solves the problem of low efficiency of image material library retrieval in the existing technology and realizes fast and accurate image retrieval.
Patent Information
- Application Number
- CN202510802383.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-16
- Publication Date
- 2025-09-23
AI Technical Summary
Existing image retrieval methods rely on manual labeling or two-stage feature extraction, resulting in low efficiency and insufficient retrieval accuracy when faced with large image libraries.
An image retrieval method based on feature fusion is adopted. The basic features of the image are extracted through a convolutional neural network. The global feature branch module and the local feature branch module are used to generate the overall image representation vector and the regional detail vector respectively. The fused feature vector is generated, and an image retrieval identifier is generated based on the fused feature vector. The corresponding relationship between the retrieval identifier and the image is established.
It achieves efficient extraction of image features and generation of unique indexes, improves the speed and accuracy of image retrieval, and avoids the high computational overhead and inefficiency of traditional methods.
Smart Images

Figure CN120687628A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an image retrieval method, device, equipment and storage medium based on feature fusion. Background Art
[0002] In today's internet-connected world, imagery has become a crucial marketing and promotional tool across various industries, particularly in finance and healthcare. With the increasing popularity of the internet and the acceleration of digital transformation, companies' image libraries are constantly expanding. This is particularly true in the fintech and healthcare sectors, where the variety and volume of imagery is increasing dramatically, driven by the diversification of products and services and the segmentation of customer needs. However, managing and efficiently retrieving this massive amount of imagery presents significant challenges.
[0003] In the fintech business sector, image assets are used extensively and diversely, encompassing advertising, customer education, brand image presentation, and other areas. These images are often sourced from diverse channels and production teams, with varying themes, styles, and quality. As the business expands, the volume of assets in the image library also grows exponentially, making rapid retrieval and classification of these assets extremely challenging. Traditional image retrieval methods typically rely on manual labeling and classification, using manual descriptions of image content, labels, or related information to facilitate retrieval. While this approach may be effective initially, its cost and time consumption increase significantly as the number of images increases. Manual labeling not only requires significant labor costs but is also prone to inaccurate classifications due to subjective differences, thus impacting the efficiency and accuracy of image retrieval.
[0004] In the medical and health business field, the management and retrieval of image materials are also prominent. The medical and health industry needs to process a large number of medical images, patient education materials, health promotion images, etc. These materials are usually highly professional and complex. Medical institutions or health technology companies often need to quickly and accurately find specific medical images or related materials from huge image databases to support diagnosis, treatment or health management decisions. However, traditional image retrieval methods rely on manual labeling or simple classification based on image content, which is not only difficult to cope with the huge amount of data, but also prone to inaccurate classification or omissions. Especially in the medical and health field with a wide variety of image types and sources, traditional database structures and retrieval methods cannot efficiently process and manage these image materials, resulting in inefficient utilization of materials.
[0005] Among existing technical solutions, some two-stage image retrieval methods attempt to accelerate retrieval by extracting features from images and generating indexes, but these methods usually have problems with low efficiency and insufficient performance. In the two-stage method, feature extraction is performed first, and then the image is matched through the index. However, the retrieval process of the two-stage structure usually requires a lot of computing resources and time. Especially when faced with large-scale image libraries, the retrieval speed and accuracy cannot meet the needs of practical applications. The complexity of traditional methods and the consumption of computing resources make the actual application of image retrieval in the financial and medical health fields less effective, and it is impossible to achieve fast and accurate retrieval. Summary of the Invention
[0006] The main purpose of the present invention is to provide an image retrieval method, device, equipment and storage medium based on feature fusion, aiming to solve the technical problems that existing image retrieval methods rely on manual labels or two-stage feature extraction, resulting in low efficiency and insufficient retrieval accuracy when faced with a large image material library.
[0007] To achieve the above object, the present invention provides an image retrieval method based on feature fusion, comprising:
[0008] Receiving an image to be processed, and extracting basic features of the image to be processed through a convolutional neural network;
[0009] Processing the basic features through a global feature branch module to generate an overall image representation vector;
[0010] Processing the basic features through a local feature branch module to generate an image region detail vector;
[0011] Fusing the overall image representation vector and the image region detail vector to generate a fused feature vector;
[0012] generating an image retrieval identifier based on the fused feature vector;
[0013] A correspondence between the image retrieval identifier and the image to be processed is established, and when a retrieval request is received, a corresponding image is queried based on the query image retrieval identifier and the correspondence.
[0014] Furthermore, to achieve the above-mentioned object, the present invention provides an image retrieval device based on feature fusion, comprising:
[0015] A convolutional neural network module is used to receive an image to be processed and extract basic features of the image to be processed through a convolutional neural network;
[0016] A global feature branch module, configured to process the basic features through the global feature branch module to generate an overall image representation vector;
[0017] A local feature branch module, configured to process the basic features through the local feature branch module to generate an image region detail vector;
[0018] A feature fusion module, configured to fuse the overall image representation vector and the image region detail vector to generate a fused feature vector;
[0019] A retrieval identifier generation module, configured to generate an image retrieval identifier based on the fused feature vector;
[0020] The index management module is used to establish a corresponding relationship between the image retrieval identifier and the image to be processed, and when a retrieval request is received, search for a corresponding image based on the query image retrieval identifier and the corresponding relationship.
[0021] Furthermore, to achieve the above-mentioned purpose, the present invention also provides a computer device, which includes a memory, a processor, and a feature fusion-based image retrieval program stored in the memory and runnable on the processor. When the feature fusion-based image retrieval program is executed by the processor, the steps of the feature fusion-based image retrieval method as described above are implemented.
[0022] Furthermore, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a feature fusion-based image retrieval program is stored. When the feature fusion-based image retrieval program is executed by a processor, the steps of the feature fusion-based image retrieval method as described above are implemented.
[0023] Beneficial effects: The present invention relates to the field of image processing technology and can be applied to business scenarios such as financial technology and medical health. It discloses an image retrieval method, apparatus, equipment and medium based on feature fusion, including: receiving an image to be processed and extracting basic features through a convolutional neural network; processing basic features respectively through a global feature branch module and a local feature branch module to generate an overall image representation vector and an image region detail vector; fusing these two feature vectors to generate a fused feature vector; generating an image retrieval identifier based on the fused feature vector, and establishing a correspondence between the image retrieval identifier and the image to be processed. When a retrieval request is received, the corresponding image is queried based on the query image retrieval identifier and the correspondence. The present invention efficiently extracts image features and generates a unique index through a single-stage network architecture, avoiding the high computational overhead and inefficiency of traditional two-stage feature extraction methods, and improving the speed and accuracy of image retrieval. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:
[0025] Figure 1A schematic diagram of an application environment of an image retrieval method based on feature fusion in an embodiment of the present invention;
[0026] Figure 2 This is a flow chart of an embodiment of an image retrieval method based on feature fusion according to the present invention;
[0027] Figure 3 Schematic diagram of functional modules of a preferred embodiment of an image retrieval device based on feature fusion according to the present invention;
[0028] Figure 4 A schematic diagram of the structure of a computer device according to an embodiment of the present invention;
[0029] Figure 5 FIG. 2 is another structural diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0031] The image retrieval method based on feature fusion provided by the embodiment of the present invention can be applied in the following fields: Figure 1 In an application environment, the user terminal communicates with the server terminal through a network. The server terminal can receive the image to be processed through the user terminal and extract basic features through a convolutional neural network; process the basic features respectively through a global feature branch module and a local feature branch module to generate an overall image representation vector and an image region detail vector; fuse the two feature vectors to generate a fused feature vector; generate an image retrieval identifier based on the fused feature vector, and establish a correspondence between the image retrieval identifier and the image to be processed. When a retrieval request is received, the corresponding image is queried based on the query image retrieval identifier and the correspondence. The present invention efficiently extracts image features and generates a unique index through a single-stage network architecture, avoids the high computational overhead and inefficiency of the traditional two-stage feature extraction method, and improves the speed and accuracy of image retrieval. Among them, the user terminal can be but is not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices. The server terminal can be implemented with an independent server or a server cluster composed of multiple servers. The present invention is described in detail below through specific embodiments.
[0032] See also Figure 2 , Figure 2 This is a flow chart of an embodiment of an image retrieval method based on feature fusion provided by the present invention. It should be noted that although a logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in a different order than that shown here.
[0033] like Figure 2As shown, the image retrieval method based on feature fusion proposed in the present invention includes the following steps:
[0034] S10, receiving an image to be processed, and extracting basic features of the image to be processed through a convolutional neural network;
[0035] In this embodiment, the first step in receiving the image to be processed is to obtain image data from an input device (such as a camera, an image acquisition device, or a user-uploaded file) through a computer system. The image may contain multiple information layers, such as color, shape, texture, etc. The format of the image to be processed is usually two-dimensional image data, which includes pixel values and spatial distribution characteristics of the image. These images are received by a computer image processing module, and the image values are usually pixel values of the three channels of RGB (red, green, and blue), or pre-processed grayscale values or other color spaces. The received image data needs to be standardized to ensure that the size and range of the image are uniform, thereby facilitating subsequent feature extraction and analysis.
[0036] After receiving the image, the next step is to extract the image's basic features using a convolutional neural network (CNN). A CNN is a deep learning algorithm that processes image data through multiple convolutional layers, extracting local features and gradually synthesizing high-level image features. The key features of a convolutional neural network are local connections, weight sharing, and pooling layers. These enable CNNs to effectively capture spatial and textural features in images when processing image data. In practice, the image is convolved with a convolution kernel to generate feature maps, which contain useful local information within the image.
[0037] During the convolution process, the convolution kernel performs a pixel-by-pixel convolution operation on the image to extract local features of the image. For example, the convolution kernel can extract local features such as edges, corners, and textures, which are crucial for image recognition. Each convolution layer contains multiple convolution kernels, each of which is specialized to extract different types of features (such as edges, shapes, etc.). The subsequent pooling layer reduces the dimensionality of the feature map through downsampling operations, reducing computational complexity while retaining important feature information. Batch normalization is performed after each convolution operation to ensure the stable distribution of each feature map, avoid gradient vanishing or exploding problems, and improve the training speed and stability of the network.
[0038] The basic features extracted by convolutional neural networks are a preliminary representation of the image, including low-level features such as color, edges, and texture. These basic features serve as input for further analysis and processing by subsequent deep learning networks, providing a strong foundation for tasks such as image classification, object detection, and image retrieval.
[0039] In the implementation, the images to be processed can come from a variety of sources, such as X-rays and CT images in the healthcare sector, or product display images and marketing advertisements in the financial sector. Flexible processing capabilities are provided to accommodate the needs of diverse image sources. Upon image reception, appropriate preprocessing operations can be selected for different image types, such as normalization and denoising for medical images, or color equalization and resizing for financial advertisement images. The architecture of the convolutional neural network can be tailored to different tasks. For example, for smaller image datasets, simpler network architectures such as VGG or MobileNet can be used; for larger image datasets, deeper network architectures such as ResNet or Inception can be adopted to extract higher-dimensional features. During training, the convolutional neural network uses a backpropagation algorithm to adjust network weights and optimize feature extraction. Convolutional layer configurations can use different kernel sizes (e.g., 3x3, 5x5, etc.) to accommodate varying feature extraction requirements. Furthermore, during convolutional neural network training, data augmentation methods (such as rotation, flipping, and scaling) can be used to improve model generalization and prevent overfitting. Through these technical means, convolutional neural networks can efficiently extract image features, providing a solid foundation for subsequent image feature fusion, index generation and retrieval.
[0040] Example: In the healthcare sector, hospitals need to process large amounts of medical imaging data, such as X-rays and CT scans. Hospitals can efficiently extract features from these images, enabling faster diagnosis and labeling of patient images. Specifically, convolutional neural networks can automatically extract key disease features, such as tumors and fractures, from medical images, helping doctors make diagnostic decisions quickly.
[0041] In the financial sector, financial institutions need to process large amounts of image data, including advertising images and product display images, when providing customer service and advertising marketing. Financial institutions can automatically extract features from these marketing materials and form a unique index, enabling rapid image retrieval and classification. This allows them to more efficiently manage their marketing material libraries, reduce the need for manual labeling, and thus lower operating costs and improve marketing efficiency.
[0042] This embodiment efficiently processes the raw image data and extracts effective local features by receiving the image to be processed and using a convolutional neural network to extract basic features. This process avoids the limitations of manual feature design in traditional image feature extraction methods, making image feature extraction more automated and efficient, thereby improving the accuracy and speed of image retrieval.
[0043] S20, processing the basic features through a global feature branch module to generate an overall image representation vector;
[0044] In this embodiment, the global feature branch module processes the basic features of the image to extract global information and generate a holistic image representation vector. The global feature branch module is typically designed to capture the overall context of the image, rather than just local features. This is important for high-level image understanding and subsequent tasks such as image retrieval and classification.
[0045] The basic features of an image are typically low-level features extracted through convolutional neural networks (CNNs) or other deep learning algorithms. These features include color, texture, edges, and more. The task of the global feature branch module is to further process and aggregate this information based on these basic features to generate a feature vector that represents the overall content of the image. This process is not limited to feature extraction in local areas, but also considers the spatial relationships and contextual information of the entire image. The core operations in the global feature branch module typically include steps such as spatial dimension compression, channel weighting, and pooling to extract high-level information from the image and convert it into a unified vector representation.
[0046] In its implementation, the global feature branch module first compresses the spatial dimensions of the input base features, typically through convolutional or pooling layers. This reduces the spatial dimensions of the features while preserving key information in the image. The compressed feature maps are then fed into the next step of weighting, typically using a channel-wise attention mechanism to weight the features of each channel, allowing the model to focus more on feature channels that are helpful for the task.
[0047] Then, maximum pooling or other forms of pooling are used to further extract significant information from the features. Pooling can effectively reduce the amount of computation while retaining the most representative features of the image. Next, the pooled features are passed through a fully connected layer for dimensionality reduction. The goal is to convert the multi-dimensional feature map into a one-dimensional feature vector, making subsequent processing more efficient.
[0048] Finally, the processed features are passed through nonlinear activation functions (such as ReLU and Sigmoid) to optimize the overall image representation and enhance the network's nonlinear modeling capabilities. After these steps, the output image representation vector fully reflects the image's high-level information, providing strong support for subsequent image retrieval, classification, and other tasks.
[0049] In its implementation, the global feature branch module can employ different types of convolutional neural network architectures, including VGG and ResNet. The choice depends on the task requirements. For large-scale image datasets, deep networks such as ResNet can be used to extract richer feature information. The convolutional layer design can select an appropriate kernel size and number of layers based on image complexity, for example, using 3×3 or 5×5 kernels. For channel weighting, attention mechanisms such as SE-Net (Squeeze-and-Excitation Network) can be employed to automatically calculate per-channel weights to enhance feature importance. Pooling can employ either max pooling or average pooling, depending on the image characteristics and task requirements. Dimensionality reduction is implemented using fully connected layers. The number of neurons in this step can be selected based on the size of the feature vector and the task requirements to ensure that the reduced features retain sufficient context. For different application scenarios, such as processing medical images in healthcare, consideration can be given to incorporating pre-trained models tailored to medical imaging or optimizing the network architecture to improve performance on specific tasks. In the financial field, the processing of marketing materials or advertising images may need to consider more color and texture information, so the network structure and processing methods may be different.
[0050] Example: In the healthcare sector, hospitals digitally store large quantities of medical images, such as X-rays and CT scans. Processing these images using the global feature branching module extracts the overall structure and key information within the image, such as the shape and size of a tumor, helping doctors quickly diagnose and make decisions. By capturing global features, important information that traditional methods might overlook is avoided, improving diagnostic accuracy.
[0051] In the financial sector, financial institutions use a large amount of image material in their marketing and promotional efforts, such as advertising images and product display images. Financial institutions can efficiently extract and summarize the overall features of images from their vast image libraries, enabling rapid image retrieval and classification. For example, by extracting global features, marketing teams can quickly retrieve advertising images related to specific themes, improving the efficiency of advertising creativity and product promotion while reducing manual screening costs.
[0052] This embodiment processes the basic features of an image through a global feature branch module, extracting high-level global information from the image and generating a representative overall image representation vector. This process effectively avoids the limitations of focusing solely on local features, improving the comprehensiveness and accuracy of image understanding, particularly when faced with complex or diverse image materials, and better supporting subsequent image retrieval and classification tasks.
[0053] S30, processing the basic features through a local feature branch module to generate an image region detail vector;
[0054] In this embodiment, the local feature branch module processes basic features to generate image region detail vectors, aiming to extract and capture fine-grained information about local regions in an image. This information is crucial for efficient image retrieval and further analysis. Local image features typically include local information such as edges, corners, and textures, which often provide more refined recognition capabilities in specific application scenarios.
[0055] First, after the basic features of the image are extracted by the global features in the previous stage, they are input into the local feature branch module. The core task of the local feature branch module is to divide the image into multiple spatial grid regions and process these regions separately to extract the detailed features of each local region. Spatial grid region division is the first step in local feature extraction. It usually divides the feature map of the input image into several small grid blocks, each grid block corresponding to a local region of the image. The size of these grid regions can be adjusted according to the needs of the specific application. Usually, a fixed grid size (such as 4×4, 8×8, etc.) or an adaptive method is used to adapt to different types of images.
[0056] The features of each grid area are then subjected to an adaptive average pooling operation. Pooling is a common dimensionality reduction operation in image processing. It reduces the dimensionality of features by aggregating features from local areas while retaining important information in the image. Unlike traditional maximum pooling methods, adaptive average pooling adaptively adjusts the pooling strategy based on the features of each grid area. This can further reduce feature redundancy without losing key information. Pooling operations can generally reduce the impact of spatial deformation in the image on feature extraction, allowing the network to focus more on key details of the image.
[0057] Next, to preserve the spatial position information of the image, position encoding information is added to each grid-pooled feature. Position encoding can be achieved by calculating the normalized coordinate values of the grid center position. This step provides position information for each feature, allowing the subsequent network to understand the specific location of each feature in the image when processing the feature. This approach helps the model maintain spatial relationships in the image, especially when faced with complex scenes or images with strong spatial structure, as position information can improve retrieval accuracy.
[0058] The pooled features, now with positional encodings, are then fed into a multi-layer perceptron (MLP) module for further dimensionality adjustment. The MLP is a feedforward neural network that processes input features through several fully connected layers to adjust their dimensionality. This operation converts the pooled features into a fixed dimensionality, enabling the subsequent concatenation operation to proceed smoothly. This operation unifies the features of the grid region across all dimensions, ensuring that dimensionality inconsistencies do not cause issues during the feature fusion phase.
[0059] Finally, all adjusted grid features are concatenated into a single, integrated image region detail vector. This concatenation operation connects the feature vectors of each grid region to form a complete vector containing the image region details. This final step in generating the image region detail vector ensures the integrity of the local features and unifies the information from each region into a global representation.
[0060] In the specific implementation, basic image features are extracted from the original image using a convolutional neural network (CNN) and then processed by the local feature branch module. For local feature extraction, the grid size can be adjusted based on the image complexity. For example, when processing high-resolution images, a smaller grid area (such as 4×4) can be selected, while when processing low-resolution images, a larger grid area (such as 8×8) can be selected to accommodate different detail requirements. Adaptive average pooling can be implemented using an adaptive pooling layer, which generates a smaller feature map by calculating the average value of the pooled area. This effectively reduces image noise while preserving key image information. Position encoding can be implemented using standard coordinate encoding methods, converting the grid center position to relative coordinates and normalizing it based on the image size to ensure consistency of the position encoding across different images. The implementation of the multi-layer perceptron module relies on fully connected layers and activation functions. ReLU (rectified linear unit) is typically used as the activation function during network training to enhance the network's nonlinear representation capabilities. The number of layers and nodes in the MLP module can be adjusted to suit specific application scenarios based on the requirements of different tasks.
[0061] Example: In the healthcare sector, hospitals need to process large amounts of medical imaging data, such as CT scans and X-rays. These images typically contain both lesions and normal tissue, and the features of lesions are often detailed and complex. By extracting image region detail vectors using the local feature branch module, the system can effectively extract key local details from the image, such as tumor margins and lesion morphology, helping doctors make quick and accurate diagnoses.
[0062] In the financial sector, financial institutions use a vast amount of advertising and marketing imagery, which varies widely in subject matter, style, and content. Using the local feature branching module, financial institutions can quickly extract detailed features from images, such as brand logos and product displays, enabling efficient image classification and retrieval. This not only improves the management efficiency of the image library but also accelerates the implementation of marketing campaigns.
[0063] This embodiment processes basic features through a local feature branching module, extracting more detailed and local features from images, improving the accuracy of image retrieval and classification. Especially for complex scenes or images with strong spatial structure, local features can provide richer information, effectively improving the performance of subsequent retrieval systems.
[0064] S40, fusing the overall image representation vector and the image region detail vector to generate a fused feature vector;
[0065] In this embodiment, the purpose of fusing the overall image representation vector and the image region detail vector to generate a fused feature vector is to organically combine the global and local information of the image, thereby generating a more comprehensive and representative feature vector for subsequent image retrieval, classification, and other tasks. The overall image representation vector contains the global contextual information of the image, while the image region detail vector contains the detailed features of the local area of the image. By fusing these two, the key information of the image can be better preserved, improving the image's representation ability in high-dimensional feature space.
[0066] The image's overall representation vector and regional detail vector are derived from the global feature branch module and the local feature branch module, respectively. These modules extract image features from different perspectives. The global feature branch module focuses on the overall image information, while the local feature branch module focuses on the details of the local region. Fusion of these two types of features aims to capture both global image information and local details in a single vector, thereby improving image retrieval accuracy and performance.
[0067] The fusion process can employ a variety of strategies, including simple feature concatenation, weighted averaging, and orthogonal fusion. Feature concatenation is the most direct method, concatenating the overall image representation vector and the image region detail vector to form a new fused feature vector. This method preserves the full information of both feature vectors, maximizing the utilization of both global and local image features.
[0068] After concatenation, the fused feature vectors can be normalized to ensure that the numerical range of the feature vectors is consistent, avoiding unnecessary calculation errors caused by inconsistent feature numerical ranges during subsequent processing. Normalization can be achieved using L2 norm normalization or other standardization methods.
[0069] Besides direct concatenation, another fusion method is weighted averaging. In this weighted averaging process, different weight coefficients are assigned to the global and local feature vectors based on their importance. Their weighted values are then added together to produce the fused feature vector. The advantage of this method is that the importance of global and local information can be adjusted based on the needs of the task. For tasks that require a greater focus on local details, local features can be given a higher weight, while for global tasks, global features can be given more weight.
[0070] In the specific implementation process, feature fusion can be performed in different network architectures. For example, in the ResNet or VGG network, the global information of the image is represented by the global feature through the fully connected layer, while the local information of the image is obtained through the local feature branch module. The output of the global feature branch module is usually a high-dimensional feature vector representing the overall structure of the image, while the output of the local feature branch module is a local feature vector representing the details of the image. During fusion, the splicing of feature vectors can be achieved through Tensor operations. Specifically, the concatenation function of Tensor is used to splice the two types of features into a new vector according to the dimension. If the weighted average method is used, a weight learning module is first required to determine the weight coefficients of the global features and local features, and then the features are merged through weighted operations.
[0071] Example: In healthcare, medical images, such as CT scans or X-rays, often contain a wealth of detailed information, such as the shape and location of a tumor. Global features provide overall information about the image, while local features precisely describe the details of the tumor region. By fusing these two, the system can consider both global structure and local details during image retrieval, helping doctors quickly retrieve images of similar lesions from massive amounts of medical images, improving diagnostic efficiency and accuracy.
[0072] In the financial sector, financial institutions use a large number of advertising images, product display images, and other content. Both the global information (such as brand logos) and local details (such as product images and background designs) of these images are key retrieval features. By integrating global and local features, financial institutions can more efficiently search and manage image libraries, avoiding the limitations of a single feature extraction method and improving the efficiency of searching and applying marketing materials.
[0073] This embodiment can fully retain the global information and local details of the image by fusing the overall image representation vector and the image area detail vector, thereby improving the performance of image retrieval and classification. The fused features can more comprehensively express the image content, which helps to improve the accuracy and efficiency of retrieval.
[0074] S50, generating an image retrieval identifier based on the fused feature vector;
[0075] In this embodiment, the purpose of generating an image retrieval identifier based on the fused feature vector is to generate a unique identifier for the image through further processing of the fused feature vector. The image retrieval identifier is the key basis for finding and locating the image in the database, so generating an accurate and efficient retrieval identifier is key to improving the performance of the retrieval system.
[0076] First, by fusing feature vectors, the global and local image information are combined into a complete feature representation. This fused feature vector contains all key image information, such as color, shape, texture, and local details. To further improve retrieval efficiency and accuracy, the fused feature vector undergoes several processing steps to be converted into a more concise retrieval identifier.
[0077] The first step in generating image retrieval identifiers is dimensionality reduction. In high-dimensional spaces, feature vectors are typically high in dimensionality, resulting in high computational and storage costs. Therefore, dimensionality reduction can be used to reduce the dimensionality of features, retaining the most representative features and thus reducing subsequent computational overhead. During dimensionality reduction, methods such as principal component analysis (PCA) can be used to map feature vectors from high-dimensional space to low-dimensional space, ensuring that the integrity of the feature information is maintained as much as possible while reducing the dimensionality. The reduced feature vectors typically have smaller dimensions, making them easier to store and quickly compare.
[0078] After dimensionality reduction, the binarization threshold segmentation operation further converts the feature vector into a binary representation. The purpose of binarization is to compress the numerical range of the feature vector into binary (0 or 1). This binary representation can greatly improve the efficiency of the retrieval system, especially when using the Hamming distance for similarity calculation. By setting a threshold (such as 0.5), the features above this value are set to 1 and those below this value are set to 0, resulting in a binary feature vector. The binarization operation makes the image retrieval process more efficient, especially when performing similarity matching in massive data, as binary calculations are much faster than floating-point calculations.
[0079] Next, the binarized feature vector is input into a hash encoder to generate a hash code sequence. The purpose of hash coding is to convert the feature vector into a fixed-length binary string using a specific mapping function. These hash codes have good collision properties, meaning that different images can be mapped to different hash values. Hash encoders typically use locality-sensitive hashing (LSH) or other types of hash algorithms. Based on the input binary feature vector, the hash encoder generates a binary hash code sequence, which is used as an image identifier during subsequent retrieval.
[0080] Finally, the hash code sequence needs to be segmented and reassembled to generate a fixed-length image retrieval identifier. Since the hash code sequence can be quite long, to accommodate storage and retrieval needs, it needs to be segmented into fixed-length segments, and any missing segments need to be padded (e.g., with zeros) as necessary. This way, the generated image retrieval identifiers have a uniform length, facilitating fast storage and retrieval within the index library.
[0081] In specific implementations, the process of generating image retrieval identifiers can be adjusted based on different application scenarios. For high-resolution images, dimensionality reduction may utilize methods such as PCA for feature selection and compression, retaining the most representative principal components. For lower-dimensional feature vectors, dimensionality reduction may be less necessary, and subsequent binarization can proceed directly. Binarization is typically performed by setting a fixed threshold or using an adaptive threshold. A sigmoid function can be used to generate an output in the [0, 1] range, which is then binarized based on the set threshold. For hash encoder implementations, a locality-sensitive hashing (LSH) algorithm can be used to generate binary hash values by performing local mapping on the feature vector. The output length of the hash encoder can be adjusted based on the requirements of the retrieval system, for example, to generate a 64-bit or 128-bit hash code. The segmentation and reassembly operation involves appropriate processing of the hash code sequence to conform to a standard format for storage and retrieval. A common approach is to segment based on the number of bits per segment (e.g., 64 bits) and fill any missing bits with zeros.
[0082] Example: In the healthcare sector, hospital medical image libraries typically contain tens of thousands of images. By generating image retrieval identifiers based on fused feature vectors, doctors can quickly retrieve images of similar cases from the image database, significantly improving image retrieval efficiency. For example, when processing CT scan images, image feature extraction and identifier generation can quickly locate historical cases similar to the patient, assisting doctors in making accurate diagnoses.
[0083] In the financial sector, financial institutions manage vast amounts of image material for advertising and product displays. Using image retrieval identifiers generated based on fused feature vectors, marketing teams can quickly locate image material related to a specific theme within this vast library, thereby improving the efficiency of marketing campaigns. For example, financial institutions can quickly retrieve all image material related to a specific financial product based on the characteristics of product advertising images, helping marketers quickly develop promotional strategies.
[0084] This embodiment generates an image retrieval identifier based on the fused feature vectors, converting the image's high-dimensional feature vectors into concise, fixed-length binary identifiers. This identifier not only improves image retrieval efficiency, particularly in large-scale image databases, but also effectively avoids redundant information during the calculation process through hash coding, significantly improving the speed and accuracy of similarity matching.
[0085] S60: Establish a correspondence between the image retrieval identifier and the image to be processed, and when a retrieval request is received, query a corresponding image based on the query image retrieval identifier and the correspondence.
[0086] In this embodiment, the purpose of establishing the correspondence between the image retrieval identifier and the image to be processed is to associate the retrieval identifier of each image with its storage location in the database, so as to quickly find images matching the query image during retrieval.
[0087] The image retrieval identifier is derived through the previous feature extraction and fusion process. Each image's retrieval identifier uniquely identifies it and distinguishes it from the entire image library. In practice, the image retrieval identifier does not directly store the image, but rather serves as an index or reference to the actual storage location of the image. This creates a corresponding relationship between the image's actual storage path and its retrieval identifier. This allows the retrieval system to quickly locate the image's storage path by querying the image's retrieval identifier, allowing it to further acquire and process the image.
[0088] First, the generated image retrieval identifier is associated with the storage path of the image to be processed. The storage path is typically the image's location in a file system or database, such as the directory path where the image file resides or the ID of a table record in a database. This step aims to associate the image's unique identifier with its actual location in the storage system, ensuring that the corresponding image can be found during retrieval. The image's storage path is typically stored in a database for quick access.
[0089] Next, the generated key-value data records are written to a distributed key-value database. A key-value database is an efficient storage and retrieval structure that provides fast data query and update capabilities by storing data in the form of keys and values. In this step, the image's retrieval identifier is used as the "key" and the image's storage path is stored as the "value." Through the key-value database, the retrieval system can obtain the image's storage path based on the image's retrieval identifier in a very short time, thereby achieving efficient image retrieval.
[0090] After storing a large number of image retrieval identifiers and their corresponding storage path data in a key-value database, the next step is to construct an inverted index structure based on these index entries. The inverted index is a common index structure widely used in text retrieval. For image retrieval systems, the inverted index associates each retrieval identifier with its corresponding image feature information, making image retrieval more efficient. The inverted index structure organizes all image retrieval identifiers according to specific rules, allowing for quick retrieval of relevant identifiers and image paths.
[0091] By constructing an inverted index structure, we create an image feature index library that provides rapid image retrieval. During image retrieval, the system simply queries the image feature identifiers in the index library to quickly locate the corresponding image's storage path. This approach significantly improves image retrieval speed, particularly when the image database is large, significantly enhancing query efficiency.
[0092] Once the image feature index library is built and maintained, the system is capable of responding to external image retrieval requests. Upon receiving a retrieval request, the system first extracts the query image's retrieval identifier from the request data. This identifier can be generated in real time from the user's uploaded query image through a feature extraction and encoding process, or it can be directly input from an existing identifier. The extracted query image retrieval identifier serves as the query condition for subsequent comparisons and is entered into the index library for matching operations.
[0093] In the image feature index library, the system compares the query image retrieval identifier with the stored image retrieval identifiers one by one using a preset similarity metric. Similarity can be calculated based on metrics in vector space, such as Hamming distance, cosine similarity, or other hash-coding-based similarity functions. The results of the comparison are sorted by similarity score, and a set of identifiers with high matching scores is selected based on a preset similarity threshold to form a set of candidate retrieval results.
[0094] Next, the system searches the distributed key-value database for the image storage paths corresponding to these matching identifiers. Because the retrieval identifiers and image storage paths are stored as key-value pairs, this process allows efficient key lookups to directly locate the image path corresponding to each identifier. After loading or locating the image resources corresponding to these paths, the system aggregates the result set and returns it to the requester.
[0095] This process completes a closed loop from retrieval request to image collection response. By mapping retrieval identifiers to storage paths, an efficient feature vector-driven image location mechanism is implemented. The system not only retrieves similar images based on the query image, but also directly finds corresponding images using known identifiers, meeting the dual requirements of accurate recall and fast access. This architecture is particularly well-suited for applications with large image repositories and strict response latency requirements, such as financial marketing material management platforms and medical image-assisted diagnosis systems.
[0096] In specific implementation, a standard database management system (DBMS) or a specialized distributed storage system can be used to generate the correspondence between the image retrieval identifier and the image storage path. For example, using a NoSQL database (such as MongoDB) to store image identifiers and paths can ensure fast access in a high-concurrency environment. In a distributed key-value database, the retrieval identifier and path of each image are stored as a key-value pair, where the key is the image retrieval identifier and the value is the image path in the storage system. For the construction of the inverted index structure, you can choose an inverted index based on a hash or an inverted index based on a tree structure (such as a B+ tree). The hash structure can make the query process very fast, while the tree structure can provide better query performance when the data volume is large. In the inverted index, the hash value or index pointer of each retrieval identifier points to the corresponding image path or other related information.
[0097] Example: In the healthcare sector, hospitals typically store large amounts of medical imaging data, including X-rays, CT scans, and MRIs. These images need to be retrieved quickly and accurately for doctors to make diagnoses. By mapping each medical image's retrieval identifier to its storage path, the hospital's image database can quickly find the corresponding image based on the doctor's query, such as symptoms, disease type, or other criteria. This approach greatly improves image retrieval efficiency, especially when faced with millions of images, providing fast response times and ensuring that doctors receive the images they need in a timely manner.
[0098] In the financial sector, financial institutions use a vast amount of advertising images and marketing materials. Image retrieval speed is crucial for advertising and marketing campaigns. By associating each image's search identifier with its storage path, financial institutions can quickly locate relevant image materials within their vast image libraries. Whether querying by image content, subject matter, or other tags, the system can quickly locate the corresponding image path using the search identifier and display the image to the marketing team, thereby improving campaign response speed and execution efficiency.
[0099] This embodiment significantly improves retrieval efficiency by establishing a correspondence between image retrieval identifiers and image storage paths. Traditional image retrieval methods often rely on individual image matching and classification. However, by combining a key-value database with an inverted index structure, the image storage path can be quickly retrieved, thus avoiding the inefficient step-by-step retrieval required by traditional methods.
[0100] The present invention relates to the field of image processing technology and can be applied to business scenarios such as financial technology and medical health. It discloses an image retrieval method, device, equipment and medium based on feature fusion, including: receiving an image to be processed and extracting basic features through a convolutional neural network; processing the basic features respectively through a global feature branch module and a local feature branch module to generate an overall image representation vector and an image region detail vector; fusing these two feature vectors to generate a fused feature vector; generating an image retrieval identifier based on the fused feature vector, and establishing a corresponding relationship between the image retrieval identifier and the image to be processed. The present invention efficiently extracts image features and generates a unique index through a single-stage network architecture, avoiding the high computational overhead and inefficiency of traditional two-stage feature extraction methods, and improving the speed and accuracy of image retrieval.
[0101] In one embodiment, the above step S10 includes:
[0102] S101, performing standardization preprocessing on the image to be processed, and adjusting the image size to a preset resolution;
[0103] S102, inputting the preprocessed image into a multi-level convolution module, wherein the multi-level convolution module includes a plurality of consecutive convolution levels;
[0104] S103, in each convolution level of the multi-level convolution module, performing a convolution operation on the input feature map of the current level to generate a convolution output feature map;
[0105] S104, performing batch normalization processing on the convolution output feature map to generate a normalized feature map;
[0106] S105, performing a nonlinear activation function process on the normalized feature map to generate an activated feature map, and using the activated feature map as the input feature map of the next convolutional layer;
[0107] S106, adding the output features of the previous convolutional layer and the output features of the next convolutional layer element by element through a residual connection;
[0108] S107 , at the final convolution level of the multi-level convolution module, output basic features with a preset number of channels.
[0109] In this embodiment, image feature extraction is a key step in the image retrieval and analysis process, aiming to extract useful feature information from the image being processed. This step uses a convolutional neural network (CNN) to perform multi-level feature extraction on the image being processed, gradually extracting increasingly abstract features from the image, ultimately forming discernible basic image features.
[0110] First, the image to be processed needs to be standardized and preprocessed, which is the first step before the image is input into the network. Standardization preprocessing mainly includes image resizing and pixel value normalization. Since the size and resolution of the input image may be inconsistent, in order to adapt to the input requirements of the network, the image size needs to be adjusted to the preset resolution. For example, the image size can be adjusted to 224×224 or other suitable sizes. This process is usually completed through image scaling operations to ensure that the dimensions of the input image are suitable for the network structure. Standardization preprocessing can also include normalization of the image pixel values. A common practice is to adjust the pixel values of the image to the [0,1] range, or perform Z-score normalization (subtracting the mean and dividing by the standard deviation) to accelerate network training and improve the stability of the model.
[0111] Next, the preprocessed image is fed into a multi-level convolutional module. This module consists of multiple consecutive convolutional layers, each responsible for extracting features at different levels of the image. In each layer, the convolution operation convolves the image with a sliding convolution kernel, extracting feature maps for specific local regions. These convolution operations transform the original image into increasingly abstract feature representations, gradually revealing high-level features within the image.
[0112] In each convolutional layer, a convolution operation is first performed, which extracts local features from the image. The convolution kernel slides across the image and calculates the weighted sum within the local region, thereby obtaining the feature value of the local region. Next, the generated convolution output feature map is batch normalized. Batch normalization can accelerate network training and prevent gradient vanishing or gradient exploding problems. In batch normalization, each channel in the feature map is subtracted from its mean and divided by the standard deviation to standardize it to a certain range, avoiding the impact of uneven value distribution on network convergence.
[0113] The normalized feature map is then fed into a nonlinear activation function, such as the ReLU (rectified linear unit). This activation function introduces nonlinearity, enabling the network to learn more complex features. The feature map processed by the activation function serves as the input feature map for the next convolutional layer. This repetitive process enables the network to extract features from different layers of the image layer by layer, ultimately forming a deep image representation.
[0114] Furthermore, residual connections were introduced to alleviate the vanishing gradient problem in deep network training. Residual connections allow the network to directly add the output features of the previous layer to the output features of the current layer, ensuring smoother information flow within the network. By performing element-by-element addition, residual connections effectively prevent information loss in deep networks, making the network more stable during training. This connection method is applied to the output of each convolutional layer, ensuring that feature map transfer is not affected by the increase in the number of layers, further improving the network's expressiveness and training efficiency.
[0115] Finally, after several convolutional layers and residual connections, the network outputs the final basic features, which contain the key information of the image. The number of channels in the final output feature map is adjusted to a preset value. This process ensures that the network output features have a consistent dimension for subsequent processing. Typically, this preset value is selected based on the network design and task requirements; for example, 256 or 512 feature channels may be selected.
[0116] This example effectively extracts representative features from images by preprocessing them using standardized image preprocessing and using a multi-level convolutional module to extract basic image features. These features not only capture the image's global information but also preserve important local information, providing a solid foundation for subsequent image retrieval and classification tasks.
[0117] In one embodiment, the above step S20 includes:
[0118] S201, performing a spatial dimension compression operation on the basic features to generate a compressed feature map;
[0119] S202, processing the compressed feature map using a channel attention weight matrix to generate a weighted feature map;
[0120] S203, performing a maximum pooling operation on the weighted feature map along the spatial dimension to generate a primary global feature;
[0121] S204, inputting the primary global features into a fully connected layer for dimensionality reduction processing to generate reduced-dimensionality global features;
[0122] S205, performing nonlinear activation function processing on the dimension-reduced global feature to generate an activated global feature;
[0123] S206, performing normalization processing on the activated global feature to generate a regularized global feature;
[0124] S207: Output the regularized global feature as an overall image representation vector containing global context information.
[0125] In this embodiment, the global feature branch module processes basic features to generate a global image representation vector, aiming to extract global feature information from the image. This process effectively captures high-level visual information such as the image's overall structure, shape, and color, providing a foundation for subsequent image retrieval, classification, and analysis.
[0126] First, the input basic features are compressed in spatial dimension. This involves reducing the spatial size of the image feature map through dimensionality reduction. The spatial dimensions of the basic feature map are typically large, which increases computational complexity. Spatial dimension compression can reduce the size of the feature map while retaining key information. Common compression methods include downsampling using convolutional layers (e.g., using convolutions with a stride greater than 1) or pooling operations (e.g., max pooling or average pooling). The compressed feature map is smaller but retains important information in the image, providing an effective feature foundation for subsequent processing steps.
[0127] Next, the channel attention weight matrix is applied to the compressed feature map. The channel attention mechanism is designed to automatically select important channel features in the image by assigning different weights to each channel to highlight the most relevant features in the image. The channel attention mechanism can be implemented through adaptive pooling, convolutional layers, or fully connected layers. Through this operation, the system can focus on the most representative parts of the image, avoiding the computational waste associated with processing unimportant features. The weighted feature map is called a weighted feature map, which strengthens the global characteristics of the image by focusing on important channels.
[0128] Max pooling is performed on the weighted feature map in the spatial dimension to further reduce computational complexity while retaining the most representative features. Max pooling simplifies image features by selecting the maximum value within each pooling window and is often used to extract important information from an image. Max pooling not only effectively reduces the dimensionality of image features but also reduces noise in the image, allowing the network to better focus on important visual elements. Features after max pooling become primary global features.
[0129] The primary global features are then fed into a fully connected layer for dimensionality reduction, adjusting the feature vector dimensions to a suitable size for subsequent processing. Through a series of weighted summations, the fully connected layer flattens the feature map and converts it into a one-dimensional vector, achieving dimensionality reduction. The goal of dimensionality reduction is to reduce computational effort while ensuring the model maintains high expressiveness when processing images. The features output by this stage are called reduced-dimensionality global features.
[0130] Next, the reduced global features are processed using a nonlinear activation function, typically the ReLU (Rectified Linear Unit) activation function. The activation function introduces nonlinearity, enhancing the network's expressive power and enabling it to learn more complex and abstract features. Features processed by the activation function are called activated global features, which can capture more complex image features and increase the model's nonlinear expressive power.
[0131] Finally, the activated global features undergo normalization to ensure that each feature has a consistent scale and eliminate differences between different features. Normalization is typically implemented through L2 normalization or batch normalization. This operation ensures the consistency of feature vectors across different samples and batches, making the network more stable during training. The final output feature vector is the regularized global feature, which contains the global context of the image and can represent the overall structure and important elements of the image. The regularized global feature is output as the overall representation vector of the image and is used for subsequent tasks such as image retrieval and classification.
[0132] This embodiment uses a global feature branch module to process basic features and generate a holistic image representation vector. This extracts the image's global structural information and important visual elements, providing a precise feature representation for subsequent image retrieval, classification, and localization. Compared to traditional image processing methods, this method better preserves high-level image features, significantly improving image retrieval accuracy and efficiency.
[0133] In one embodiment, the above step S30 includes:
[0134] S301, dividing the basic features into a plurality of spatial grid areas;
[0135] S302, performing an adaptive average pooling operation on each spatial grid area to generate grid pooling features;
[0136] S303, adding position coding information to each grid pooling feature to generate a position coding feature;
[0137] S304, inputting the position coding feature into a multi-layer perception module for dimension adjustment to generate an adjusted grid feature;
[0138] S305: Splice all adjusted grid features to generate image region detail vectors.
[0139] In this embodiment, the step of processing basic features through the local feature branch module to generate image region detail vectors is a key step in the image feature extraction process for capturing detailed features of local image regions. This step effectively extracts detailed information about local regions in the image and enhances the image's regional recognition capabilities. This regional detail information is crucial for accurate image retrieval, classification, and other computer vision tasks.
[0140] First, the basic features are divided into multiple spatial grid regions. The basic features in an image are typically high-dimensional feature maps extracted by convolutional neural networks. These feature maps contain both global and local information about the image. To effectively extract local region features of an image, the entire feature map is segmented into multiple small spatial grid regions. These grid regions can be divided according to different strategies, typically using uniform division (e.g., dividing the image feature map into several regions of equal size). This division allows the network to focus on local region information in the image and further analyze the characteristics of each small region.
[0141] Next, an adaptive average pooling operation is performed on each spatial grid region. The goal of adaptive pooling is to extract a fixed-dimensional feature representation from each grid region. Unlike traditional pooling methods (such as maximum pooling or average pooling), adaptive pooling can adaptively adjust the size of the pooling window based on the size of the input feature map and the desired output size. After performing adaptive average pooling on each grid region, the generated pooled features are pooled features of that region. These pooled features can effectively represent the overall information of the local region and have high expressive power.
[0142] After pooling each grid pooled feature, position encoding information is added. Position encoding introduces spatial position information, allowing the model to capture the relative positional relationships between regions in the image. Position encoding is typically implemented by encoding the center coordinates of each grid region, which can be generated using methods such as linear position encoding or sinusoidal position encoding. After adding the position encoding to each grid pooled feature, the generated feature vector will not only contain the feature information of the region, but also carry its positional relationship within the entire image, thereby improving the spatial perception of the feature.
[0143] Subsequently, the positional encoding features are input into the multi-layer perception module for dimensionality adjustment. The multi-layer perception module is typically a neural network structure containing multiple fully connected layers, which is used to adjust the dimensionality of the input features to a fixed dimension. The purpose of this operation is to uniformly map the features of different grid areas to a space of the same dimensionality, so that subsequent feature splicing operations can proceed smoothly. The dimensionality adjustment process can also introduce nonlinear factors through nonlinear activation functions (such as ReLU) to further enhance the expressive power of the features. The features after dimensionality adjustment are called adjusted grid features.
[0144] Finally, all adjusted grid features are concatenated to generate a regional detail vector for the image. This concatenation operation connects the feature vectors of each grid region, resulting in a long vector containing all the local region information. This regional detail vector fully represents the local details of the image and, together with the global features, forms a complete image representation, providing more accurate image features for subsequent retrieval, classification, or other tasks.
[0145] This embodiment processes basic features through a local feature branch module and generates a regional detail vector of the image, which can extract richer local feature information from the image and more accurately describe the detail features of the image. Especially when there are many detail differences in the image, it can effectively improve the image recognition and retrieval accuracy.
[0146] In one embodiment, the above step S40 includes:
[0147] S401, performing an orthogonal projection operation on the overall representation vector of the image to generate a global projection component;
[0148] S402, decomposing the image region detail vector into orthogonal components orthogonal to the global projection component;
[0149] S403, performing a principal component preservation operation on the orthogonal components to generate principal component orthogonal components;
[0150] S404, linearly combining the global projection component and the principal component orthogonal component to generate a combined feature vector;
[0151] S405 , performing normalization processing on the combined feature vector to generate a fused feature vector.
[0152] In this embodiment, global features and local detail features are organically combined to form an efficient image feature representation. This fused feature not only captures the image's global structural information but also extracts local details, thereby improving image performance in tasks such as retrieval and classification. The entire process relies on operations such as orthogonal fusion, principal component preservation, and linear combination to ensure the efficiency and accuracy of the fused feature.
[0153] First, an orthogonal projection operation is performed on the overall representation vector of the image. The purpose of orthogonal projection is to map the global features of the image to a new space so that the global features can be efficiently fused with the local features. The orthogonal projection operation projects the overall representation vector of the image into a new basis vector space through a projection matrix to generate a global projection component. The purpose of this step is to remove the redundant parts of the global features while maintaining the key information of the image so that it can be effectively fused with the local features. Orthogonal projection is usually implemented using methods such as singular value decomposition (SVD) or principal component analysis (PCA).
[0154] Next, the image region detail vector is decomposed into orthogonal components that are orthogonal to the global projection component. This decomposition is performed to ensure that there is no information interference between local and global features. Through the decomposition operation, the local features are divided into two parts that are independent of the global features: one part is orthogonal to the global projection component, and the other part is redundant with the global features. The goal of this step is to retain the parts of the image region details that are different from the global features, thereby further enhancing the effect of feature fusion.
[0155] Next, a principal component preservation operation is performed on the orthogonal components. This operation aims to retain the most representative components from the local features, remove irrelevant information, and improve feature discrimination. Using methods such as principal component analysis (PCA) or singular value decomposition (SVD), redundant components in the orthogonal components are removed, retaining only the most important principal components to form principal component orthogonal components. This process ensures the simplicity of the fused features while improving computational efficiency.
[0156] After the principal components are retained, the global projection component is linearly combined with the principal component orthogonal component. The purpose of the linear combination is to effectively fuse the global features with the local features to form a new, fused feature representation. Through weighted summation (i.e., by selecting appropriate weight coefficients), the features of the global projection component and the principal component orthogonal component are combined into a new feature vector, called a combined feature vector. The purpose of this step is to fuse global and local features without losing key image information, thereby providing a more accurate image representation.
[0157] Finally, the combined feature vector is normalized. The goal of normalization is to ensure that all features have the same scale, preventing certain features from dominating the overall feature representation due to their larger scale. Common normalization methods include L2 normalization, which adjusts the Euclidean norm of the feature vector to 1, ensuring that the features have a consistent scale when calculating metrics such as cosine similarity. After normalization, the resulting fused feature vector becomes the final image representation, incorporating both global and local information and capable of being used in subsequent tasks such as image retrieval and classification.
[0158] This embodiment effectively combines the global and local features of an image through orthogonal fusion, preserving not only the overall image information but also the details within it. This process improves the expressiveness of image features, making subsequent image retrieval and classification tasks more accurate and efficient. Compared to traditional feature fusion methods, orthogonal fusion and principal component preservation significantly improve the quality and computational efficiency of image features, particularly when processing complex images, by reducing redundant information and highlighting key image information.
[0159] In one embodiment, the above step S50 includes:
[0160] S501, performing dimensionality reduction processing on the fused feature vector to generate a low-dimensional feature vector;
[0161] S502, performing binarization threshold segmentation on the low-dimensional feature vector to generate a binary feature vector;
[0162] S503, inputting the binary feature vector into a hash encoder to generate a hash code sequence;
[0163] S504: reorganize the hash code sequence in sections to generate an image retrieval identifier.
[0164] In this embodiment, by processing the fused feature vectors, an image retrieval identifier with efficient retrieval capability is generated. This process enables images to be quickly retrieved from a large-scale image library with very high computational efficiency.
[0165] First, dimensionality reduction is performed on the fused feature vector to generate a low-dimensional feature vector. Dimensionality reduction is a common method for reducing the dimension of feature vectors. Its purpose is to reduce computational costs while retaining important feature information in the image. Common dimensionality reduction techniques include principal component analysis (PCA) and linear discriminant analysis (LDA). In this step, dimensionality reduction not only reduces the dimension of the features, but may also eliminate redundant feature information, making subsequent calculations more efficient. Through the low-dimensional feature vector after dimensionality reduction, the system can reduce the burden of storage and computation and increase the speed of retrieval.
[0166] Next, the low-dimensional feature vector is binarized and thresholded to generate a binary feature vector. Binarization is the process of converting a feature vector into binary form, where each eigenvalue is either 0 or 1. Typically, binarization is performed by setting a threshold, setting the eigenvalues above the threshold to 1 and those below the threshold to 0. For example, a threshold of 0.5 can be set, setting eigenvalues below 0.5 to 0 and eigenvalues greater than or equal to 0.5 to 1. The binarization operation helps reduce data storage requirements and allows the feature vector to be encoded using a simple hashing method, thereby improving the efficiency of subsequent retrieval.
[0167] The binary feature vector is then input into a hash encoder to generate a hash code sequence. A hash encoder is a tool that maps high-dimensional feature vectors to low-dimensional binary representations. Hash coding converts image features into a fixed-length binary code, a process that helps improve the speed and accuracy of image retrieval. Common hash coding methods include Locality Sensitive Hashing (LSH) and Deep Hashing. Hash coding makes image features more compact, making them suitable for fast matching on large datasets.
[0168] Next, the hash code sequence is segmented and reassembled to generate an image retrieval identifier. The hash code sequence is typically a long binary string that needs to be segmented and reassembled to meet the requirements of the subsequent retrieval system. The segmentation and reassembly operation divides the long hash code sequence into multiple fixed-length subsequences, which may be sorted or padded to ensure that the retrieval identifier has a consistent length and structure. The resulting image retrieval identifier is a fixed-length binary string that is unique and comparable, enabling efficient matching and retrieval as an index identifier in image databases.
[0169] This embodiment converts complex image features into compact, highly efficient image retrieval identifiers by performing dimensionality reduction, binarization, hash coding, and segmented reassembly on the fused feature vector. This process significantly improves the efficiency and accuracy of image retrieval, particularly in large-scale image databases, enabling rapid identification of matching images, reducing storage and computational costs, and improving system response speed.
[0170] In one embodiment, the above step S60 includes:
[0171] S601, associating the image retrieval identifier with the storage path of the image to be processed to generate a key-value pair data record;
[0172] S602, writing the key-value pair data record into a distributed key-value database to generate an index entry;
[0173] S603, constructing an inverted index structure based on the index entries to form an image feature index library;
[0174] S604, when a search request is received, extracting a query image search identifier from the search request;
[0175] S605, determining the similarity between the query image retrieval identifier and the image retrieval identifiers stored in the image feature index library, and screening a matching identifier set according to a preset similarity threshold;
[0176] S606, obtaining the to-be-processed image path corresponding to the matched identifier set from the distributed key-value database;
[0177] S607: Return the image set corresponding to the image path to be processed.
[0178] In this embodiment, by establishing a correspondence between image retrieval identifiers and the images to be processed, image data can be efficiently managed and retrieved. The goal is to form an efficient index structure by associating the image retrieval identifier with the image's storage path. This allows the system to quickly respond to queries and locate relevant image data during image retrieval.
[0179] First, the image retrieval identifier is associated with the storage path of the image to be processed, generating a key-value data record. After processing, each image generates a unique retrieval identifier, which serves as a unique identifier for the retrieved image. By associating the image retrieval identifier with the image's storage path, a key-value data record is formed, where the key is the image retrieval identifier and the value is the image's storage path. This operation provides a quick basis for locating the image for subsequent retrieval.
[0180] Next, the key-value data records are written to a distributed key-value database, generating index entries. To improve data access efficiency, key-value data records are stored in a distributed key-value database. Distributed key-value databases enable efficient data storage and fast querying, and offer excellent scalability. By storing these key-value pairs in the database, the system can quickly retrieve the image's storage path using the image's search identifier as a key, enabling rapid image access. This operation generates index entries, laying the foundation for subsequent retrieval processes.
[0181] After this, an inverted index structure is constructed based on the index entries, forming an image feature index library. An inverted index is an index structure commonly used for efficient retrieval, particularly in text and image retrieval systems. By reverse-mapping the retrieval identifiers and their associated features, the inverted index effectively associates each image's feature vector with its corresponding image identifier. This inverted index structure allows the system to quickly locate images within the image feature library that have similar features to the query image, improving retrieval speed and efficiency.
[0182] When a search request is received, the query image retrieval identifier is extracted from the request. The user's search request typically includes features of the query image, or a retrieval identifier, which can be used to search for related images in the image feature index. In this step, the system extracts the image retrieval identifier from the query request and searches for matching images in the index based on the identifier.
[0183] Next, the system determines the similarity between the query image's retrieval identifier and the image retrieval identifiers stored in the image feature index library. It then selects a set of matching identifiers based on a preset similarity threshold. By calculating the feature similarity between the query image and images in the library, the system finds the images most similar to the query image. Similarity is typically measured using metrics such as cosine similarity, Euclidean distance, or Hamming distance. Based on the preset similarity threshold, the system selects a set of image identifiers that are highly similar to the query image, ensuring the accuracy of the retrieval results.
[0184] From the selected set of matching identifiers, the system retrieves the paths of the images to be processed from the distributed key-value database. Using the selected matching identifiers, the system can retrieve the storage paths of these images from the distributed key-value database. The image paths, as the storage locations of the images, allow the system to extract the actual image files from the database, rather than just returning identifiers or paths.
[0185] Finally, the image collection corresponding to the image path to be processed is returned. By obtaining the image's storage path, the system can directly extract the image data from the storage system and return the results to the user or other application. This step completes the image retrieval operation and provides the user with the image collection they need.
[0186] Example: Images are widely used in the financial sector, particularly in advertising and marketing. Financial institutions need to filter through vast libraries of advertising materials to identify images relevant to specific financial products or services. With the increasing variety of advertising materials, quickly and accurately identifying images relevant to the target promotion within this vast library of materials becomes crucial. In practical applications, the system first receives the advertising image to be processed. Basic features, such as color, shape, and texture, are extracted from the image using a convolutional neural network (CNN). These features form the basic description of the image and reflect the core message of the advertising material. Next, these basic features are processed by the global feature branch module to generate a global image representation vector. By processing the global information of the advertising image (such as the main composition and brand elements), this module extracts global contextual features of the image. Simultaneously, the local feature branch module analyzes the image's details to generate image region detail vectors. This process effectively identifies detailed regions within the advertising image, such as specific product images, text content, or promotional slogans. The system then fuses the global image representation vector with the region detail vectors to generate a fused feature vector. This fused feature vector combines the global information and local details of the ad image, comprehensively describing its content. Based on this fused feature vector, the system generates an image retrieval identifier, associates it with the ad image's storage path, and stores it in a distributed key-value database. This allows marketers to use the image retrieval identifier to quickly retrieve advertising creatives relevant to their target campaign. For example, when marketers need to find advertising images related to a new financial product, they can quickly locate suitable creatives by retrieving the product's associated identifier, greatly improving creative selection efficiency.
[0187] In the healthcare sector, the storage and retrieval of medical imaging data is a critical issue for hospitals and research institutions. Medical imaging data, such as X-rays, CT scans, and MRI images, contains a vast amount of clinical information. Doctors and researchers need to quickly and accurately identify relevant case images from this vast amount of imaging data to aid diagnosis. The system first receives the medical image and extracts basic features using a convolutional neural network (CNN). These basic features include structural information, edge detection, and local texture features. These features reflect fundamental properties of the image, such as organ morphology and lesion areas. These basic features are then processed by a global feature branch module to generate a global image representation vector. This module extracts global information from the image, such as the overall outline of human organs and the approximate location of lesions. Simultaneously, the local feature branch module processes detailed features of the image to generate image region detail vectors. These details, including specific lesion areas and tissue morphological changes, are of great value for clinical diagnosis. The system then fuses the global feature vector with the local detail vector to generate a fused feature vector. This fused vector effectively combines global and local features to more comprehensively describe the content of the medical image. Based on this fused feature vector, the system generates an image retrieval identifier, associates it with the storage path of the medical image, and stores it in a distributed key-value database. In practice, when a doctor needs to find an image similar to a case, the system can quickly retrieve similar images from the database using the image retrieval identifier. For example, if a doctor wants to find an image similar to a newly diagnosed cancer case, the system can quickly return images with similar features to the case, helping the doctor with reference and diagnosis.
[0188] By establishing a correspondence between image retrieval identifiers and the images to be processed, this system can efficiently manage and retrieve image data, avoiding the high costs of manual annotation and indexing required by traditional database methods. By utilizing an inverted index and a distributed key-value database, the image retrieval process is significantly accelerated, particularly in large-scale image repositories, enabling rapid response to user queries and improving the efficiency and accuracy of image retrieval.
[0189] In one embodiment, an image retrieval device based on feature fusion is provided, and the image retrieval device based on feature fusion corresponds one-to-one to the image retrieval method based on feature fusion in the above embodiment. Figure 3 , Figure 3 This is a schematic diagram of the functional modules of a preferred embodiment of the feature fusion-based image retrieval device of the present invention. It includes a convolutional neural network module 10, a global feature branching module 20, a local feature branching module 30, a feature fusion module 40, a search identifier generation module 50, and an index management module 60. Each functional module is described in detail below:
[0190] A convolutional neural network module 10 is configured to receive an image to be processed and extract basic features of the image to be processed through a convolutional neural network;
[0191] A global feature branch module 20 is configured to process the basic features through a global feature branch module to generate an overall image representation vector;
[0192] A local feature branch module 30 is configured to process the basic features through the local feature branch module to generate an image region detail vector;
[0193] A feature fusion module 40 is configured to fuse the overall image representation vector and the image region detail vector to generate a fused feature vector;
[0194] A retrieval identifier generating module 50, configured to generate an image retrieval identifier based on the fused feature vector;
[0195] The index management module 60 is configured to establish a correspondence between the image retrieval identifier and the image to be processed, and when a retrieval request is received, search for a corresponding image based on the query image retrieval identifier and the correspondence.
[0196] In one embodiment, the convolutional neural network module 10 is specifically configured to:
[0197] Performing standardized preprocessing on the image to be processed, and adjusting the image size to a preset resolution;
[0198] Inputting the preprocessed image into a multi-level convolution module, wherein the multi-level convolution module comprises a plurality of consecutive convolution layers;
[0199] In each convolutional level of the multi-level convolutional module, a convolution operation is performed on the input feature map of the current level to generate a convolution output feature map;
[0200] Performing batch normalization on the convolution output feature map to generate a normalized feature map;
[0201] Performing a nonlinear activation function on the normalized feature map to generate an activated feature map, and using the activated feature map as the input feature map of the next convolutional layer;
[0202] The output features of the previous convolutional layer are added element-by-element to the output features of the next convolutional layer through residual connections;
[0203] At the final convolutional level of the multi-level convolutional module, a basic feature having a preset number of output channels is output.
[0204] In one embodiment, the global feature branching module 20 is specifically configured to:
[0205] Performing a spatial dimension compression operation on the basic features to generate a compressed feature map;
[0206] Processing the compressed feature map through a channel attention weight matrix to generate a weighted feature map;
[0207] Performing a maximum pooling operation on the weighted feature map along the spatial dimension to generate primary global features;
[0208] Inputting the primary global features into a fully connected layer for dimensionality reduction processing to generate reduced-dimensionality global features;
[0209] Performing nonlinear activation function processing on the dimension-reduced global features to generate activated global features;
[0210] Normalizing the activated global features to generate regularized global features;
[0211] The regularized global feature is output as an overall image representation vector containing global context information.
[0212] In one embodiment, the local feature branching module 30 is specifically configured to:
[0213] Dividing the basic feature into a plurality of spatial grid regions;
[0214] Perform adaptive average pooling operation on each spatial grid area to generate grid pooling features;
[0215] Add position encoding information to each grid pooling feature to generate position encoding features;
[0216] Inputting the position encoding features into a multi-layer perception module for dimension adjustment to generate adjusted grid features;
[0217] Concatenate all adjusted mesh features to generate image region detail vectors.
[0218] In one embodiment, the feature fusion module 40 is specifically configured to:
[0219] Performing an orthogonal projection operation on the overall representation vector of the image to generate a global projection component;
[0220] Decomposing the image region detail vector into orthogonal components orthogonal to the global projection component;
[0221] Performing a principal component preservation operation on the orthogonal components to generate principal component orthogonal components;
[0222] Linearly combining the global projection component and the principal component orthogonal component to generate a combined eigenvector;
[0223] Normalization is performed on the combined feature vector to generate a fused feature vector.
[0224] In one embodiment, the search identifier generation module 50 is specifically configured to:
[0225] Performing dimensionality reduction processing on the fused feature vector to generate a low-dimensional feature vector;
[0226] Performing binarization threshold segmentation on the low-dimensional feature vector to generate a binary feature vector;
[0227] Inputting the binary feature vector into a hash encoder to generate a hash code sequence;
[0228] The hash code sequence is segmented and reassembled to generate an image retrieval identifier.
[0229] In one embodiment, the index management module 60 is specifically configured to:
[0230] Associating the image retrieval identifier with the storage path of the image to be processed to generate a key-value pair data record;
[0231] Writing the key-value pair data record into a distributed key-value database to generate an index entry;
[0232] Constructing an inverted index structure based on the index entries to form an image feature index library;
[0233] When a retrieval request is received, extracting a query image retrieval identifier from the retrieval request;
[0234] Determining the similarity between the query image retrieval identifier and the image retrieval identifiers stored in the image feature index library, and screening a matching identifier set according to a preset similarity threshold;
[0235] Obtaining the to-be-processed image path corresponding to the matched identifier set from the distributed key-value database;
[0236] Returns the image set corresponding to the image path to be processed.
[0237] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external user terminal via a network connection. When the computer program is executed by the processor, it realizes the functions or steps on the server side of an image retrieval method based on feature fusion.
[0238] In one embodiment, a computer device is provided. The computer device may be a user terminal, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, memory, network interface, display screen and input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it realizes the functions or steps on the user side of a method for image retrieval based on feature fusion.
[0239] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are performed:
[0240] Receiving an image to be processed, and extracting basic features of the image to be processed through a convolutional neural network;
[0241] Processing the basic features through a global feature branch module to generate an overall image representation vector;
[0242] Processing the basic features through a local feature branch module to generate an image region detail vector;
[0243] Fusing the overall image representation vector and the image region detail vector to generate a fused feature vector;
[0244] generating an image retrieval identifier based on the fused feature vector;
[0245] A correspondence between the image retrieval identifier and the image to be processed is established, and when a retrieval request is received, a corresponding image is queried based on the query image retrieval identifier and the correspondence.
[0246] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0247] Receiving an image to be processed, and extracting basic features of the image to be processed through a convolutional neural network;
[0248] Processing the basic features through a global feature branch module to generate an overall image representation vector;
[0249] Processing the basic features through a local feature branch module to generate an image region detail vector;
[0250] Fusing the overall image representation vector and the image region detail vector to generate a fused feature vector;
[0251] generating an image retrieval identifier based on the fused feature vector;
[0252] A correspondence between the image retrieval identifier and the image to be processed is established, and when a retrieval request is received, a corresponding image is queried based on the query image retrieval identifier and the correspondence.
[0253] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can be found in the relevant descriptions of the server side and the user side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0254] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0255] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0256] It should be noted that if any software tools or components other than those of the Company appear in the embodiments of this application, they are merely for illustration and do not represent actual use. The above embodiments are intended only to illustrate the technical solutions of the present invention, not to limit them. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some of the technical features therein with equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the scope of protection of the present invention.
Claims
1. An image retrieval method based on feature fusion, characterized in that: The following steps are involved: Receiving an image to be processed, and extracting basic features of the image to be processed through a convolutional neural network; Processing the basic features through a global feature branch module to generate an overall image representation vector; Processing the basic features through a local feature branch module to generate an image region detail vector; Fusing the overall image representation vector and the image region detail vector to generate a fused feature vector; generating an image retrieval identifier based on the fused feature vector; A correspondence between the image retrieval identifier and the image to be processed is established, and when a retrieval request is received, a corresponding image is queried based on the query image retrieval identifier and the correspondence.
2. The image retrieval method based on feature fusion according to claim 1, wherein: Receiving an image to be processed and extracting basic features of the image to be processed through a convolutional neural network, including: Performing standardized preprocessing on the image to be processed, and adjusting the image size to a preset resolution; Inputting the preprocessed image into a multi-level convolution module, wherein the multi-level convolution module comprises a plurality of consecutive convolution layers; In each convolutional level of the multi-level convolutional module, a convolution operation is performed on the input feature map of the current level to generate a convolution output feature map; Performing batch normalization on the convolution output feature map to generate a normalized feature map; Performing a nonlinear activation function on the normalized feature map to generate an activated feature map, and using the activated feature map as the input feature map of the next convolutional layer; The output features of the previous convolutional layer are added element-by-element to the output features of the next convolutional layer through residual connections; At the final convolutional level of the multi-level convolutional module, a basic feature having a preset number of output channels is output.
3. The image retrieval method based on feature fusion according to claim 1, wherein: The basic features are processed by the global feature branch module to generate an overall image representation vector, including: Performing a spatial dimension compression operation on the basic features to generate a compressed feature map; Processing the compressed feature map through a channel attention weight matrix to generate a weighted feature map; Performing a maximum pooling operation on the weighted feature map along the spatial dimension to generate primary global features; Inputting the primary global features into a fully connected layer for dimensionality reduction processing to generate reduced-dimensionality global features; Performing nonlinear activation function processing on the dimension-reduced global features to generate activated global features; Normalizing the activated global features to generate regularized global features; The regularized global feature is output as an overall image representation vector containing global context information.
4. The image retrieval method based on feature fusion according to claim 1, wherein: The basic features are processed by the local feature branch module to generate an image region detail vector, including: Dividing the basic feature into a plurality of spatial grid regions; Perform adaptive average pooling operation on each spatial grid area to generate grid pooling features; Add position encoding information to each grid pooling feature to generate position encoding features; Inputting the position encoding features into a multi-layer perception module for dimension adjustment to generate adjusted grid features; Concatenate all adjusted mesh features to generate image region detail vectors.
5. The image retrieval method based on feature fusion according to claim 1, wherein: The image overall representation vector and the image region detail vector are fused to generate a fused feature vector, including: Performing an orthogonal projection operation on the overall representation vector of the image to generate a global projection component; Decomposing the image region detail vector into orthogonal components orthogonal to the global projection component; Performing a principal component preservation operation on the orthogonal components to generate principal component orthogonal components; Linearly combining the global projection component and the principal component orthogonal component to generate a combined eigenvector; Normalization is performed on the combined feature vector to generate a fused feature vector.
6. The image retrieval method based on feature fusion according to claim 1, wherein: Generating an image retrieval identifier based on the fused feature vector includes: Performing dimensionality reduction processing on the fused feature vector to generate a low-dimensional feature vector; Performing binarization threshold segmentation on the low-dimensional feature vector to generate a binary feature vector; Inputting the binary feature vector into a hash encoder to generate a hash code sequence; The hash code sequence is segmented and reassembled to generate an image retrieval identifier.
7. The image retrieval method based on feature fusion according to claim 1, wherein: Establishing a correspondence between the image retrieval identifier and the image to be processed, and when a retrieval request is received, querying a corresponding image based on the query image retrieval identifier and the correspondence, including: Associating the image retrieval identifier with the storage path of the image to be processed to generate a key-value pair data record; Writing the key-value pair data record into a distributed key-value database to generate an index entry; Constructing an inverted index structure based on the index entries to form an image feature index library; When a retrieval request is received, extracting a query image retrieval identifier from the retrieval request; Determining the similarity between the query image retrieval identifier and the image retrieval identifiers stored in the image feature index library, and screening a matching identifier set according to a preset similarity threshold; Obtaining the to-be-processed image path corresponding to the matched identifier set from the distributed key-value database; Returns the image set corresponding to the image path to be processed.
8. An image retrieval device based on feature fusion, characterized in that: The image retrieval device based on feature fusion includes: A convolutional neural network module is used to receive an image to be processed and extract basic features of the image to be processed through a convolutional neural network; A global feature branch module, configured to process the basic features through the global feature branch module to generate an overall image representation vector; A local feature branch module, configured to process the basic features through the local feature branch module to generate an image region detail vector; A feature fusion module, configured to fuse the overall image representation vector and the image region detail vector to generate a fused feature vector; A retrieval identifier generation module, configured to generate an image retrieval identifier based on the fused feature vector; The index management module is used to establish a corresponding relationship between the image retrieval identifier and the image to be processed, and when a retrieval request is received, search for a corresponding image based on the query image retrieval identifier and the corresponding relationship.
9. A computer device, characterized in that: The computer device includes a memory, a processor, and a feature fusion-based image retrieval program stored in the memory and capable of running on the processor. When the feature fusion-based image retrieval program is executed by the processor, the steps of the feature fusion-based image retrieval method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that The storage medium stores a feature fusion-based image retrieval program, which, when executed by a processor, implements the steps of the feature fusion-based image retrieval method according to any one of claims 1 to 7.
Citation Information
Cited By
Pathological image storage method, query method, related device and storage medium
CN122158005A