Similar image search method, device, computer equipment, medium and product

By extracting and self-organizing the current image and the image to be found, the projection distance between the images is calculated, and the problem of inaccurate similar image search results in the prior art is solved, and efficient and accurate similar image search is achieved.

CN119782565APending Publication Date: 2025-04-08SHENZHEN COMTOP INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411943441.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

The prior art has the problem of inaccurate search results when looking for similar images of the current image.

Method used

By extracting the input current image and the image to be found, the pre-trained self-organization mapping network model is used for self-organization mapping, and the projection distance between the images is calculated to find similar target images.

Benefits of technology

It improves the accuracy and efficiency of similar image search results, reduces manual participation errors, and reduces human resource costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782565A_ABST
    Figure CN119782565A_ABST
Patent Text Reader

Abstract

The present application relates to a similar image search method, device, computer equipment, medium and product. The method comprises: extracting features according to the input current image to obtain a first hierarchical feature, and extracting features according to each image to be searched to obtain corresponding second hierarchical features, based on a pre-trained self-organizing map network model, performing self-organizing mapping on the first hierarchical feature and each second hierarchical feature to obtain the projection distance between the current image and each image to be searched, and searching for a target image similar to the current image from each image to be searched according to each projection distance. The above method can be used to obtain the accurate projection distance between the current image and each image to be searched based on the hierarchical features of the image and the self-organizing map network model, and then the target image similar to the current image can be quickly and accurately searched from each image to be searched according to each projection distance, thereby improving the accuracy of the similar image search results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a similar image search method, device, computer equipment, medium and product. Background Art

[0002] With the development of computer technology, similar image search technology has been widely used in various fields, such as e-commerce, digital copyright protection, forensic identification, medical diagnosis, etc.

[0003] In the related art, similar images of the current image are mainly found by using similar image search algorithms based on color features or texture features.

[0004] However, in the related art, when searching for similar images to the current image, there is a problem of inaccurate search results. Summary of the invention

[0005] Based on this, it is necessary to provide a similar image search method, device, computer equipment, medium and product to address the above technical problems, which can improve the accuracy of the search results in the process of searching for similar images to the current image.

[0006] In a first aspect, an embodiment of the present application provides a similar image search method, the method comprising:

[0007] Extracting features from the input current image to obtain first hierarchical features; and extracting features from each to-be-searched image to obtain corresponding second hierarchical features;

[0008] Based on the pre-trained self-organizing map network model, the first hierarchical features and each second hierarchical feature are self-organizing mapped to obtain the projection distance between the current image and each image to be searched;

[0009] According to each projection distance, a target image similar to the current image is searched from each image to be searched.

[0010] In one embodiment, extracting features from the input current image to obtain first hierarchical features includes:

[0011] Perform preprocessing on the current image to obtain the current preprocessed image;

[0012] The current preprocessed image is input into the deep learning feature extraction model, and the feature extraction of the current preprocessed image is performed to obtain the first hierarchical feature.

[0013] In one embodiment, preprocessing the current image to obtain the current preprocessed image includes:

[0014] Perform median filtering and denoising on the current image to obtain the current denoised image;

[0015] Perform edge extraction and edge enhancement processing on the current denoised image to obtain the current edge processed image;

[0016] Perform image enhancement processing on the current edge processed image to obtain the current pre-processed image.

[0017] In one embodiment, extracting features from each to-be-searched image to obtain corresponding second hierarchical features includes:

[0018] Preprocessing is performed on each image to be searched to obtain corresponding preprocessed images to be searched;

[0019] Each pre-processed image to be searched is input into a deep learning feature extraction model, and features are extracted from each pre-processed image to be searched to obtain second hierarchical features.

[0020] In one embodiment, preprocessing each to-be-searched image to obtain the corresponding preprocessed image to-be-searched includes:

[0021] Perform median filtering and denoising on each image to be searched, and obtain the corresponding denoised image to be searched;

[0022] Perform edge extraction and edge enhancement processing on each denoised image to be found, to obtain a corresponding edge-processed image to be found;

[0023] Perform image enhancement processing on each edge-processed image to be found to obtain each pre-processed image to be found.

[0024] In one embodiment, the process of constructing the self-organizing map network model includes:

[0025] Acquire multiple input features and an initial self-organizing map network model in a training feature set; the initial self-organizing map network model includes multiple output layer neurons;

[0026] Iteratively update the initialized weight vector of each output layer neuron based on each input feature;

[0027] The self-organizing map network model is determined according to the current weight vectors of the neurons in each output layer and the initial self-organizing map network model.

[0028] In one embodiment, each input feature includes a current input feature and a next input feature; and iteratively updating the initialized weight vector of each output layer neuron based on each input feature includes:

[0029] The initialization weight vector of each output layer neuron is updated according to the current input feature to obtain the current weight vector of each output layer neuron;

[0030] The current weight vector of each output layer neuron is used as the initialization weight vector of each output layer neuron, and the initialization weight vector of each output layer neuron is updated according to the next input feature to obtain the latest weight vector of each output layer neuron.

[0031] In one embodiment, the initialization weight vector of each output layer neuron is updated according to the current input feature to obtain the current weight vector of each output layer neuron, including:

[0032] According to the current input feature and the initialization weight vector of each output layer neuron, the distance between the current input feature and the initialization weight vector of each output layer neuron is determined, and the output layer neuron corresponding to the minimum distance among the distances is obtained as the winning neuron;

[0033] According to the current input features and the initialization weight vector of the winning neuron, the initialization weight vector of the winning neuron is updated to obtain the updated weight vector of the winning neuron;

[0034] Determine the degree to which other neurons in each output layer are influenced by the winning neuron according to the neighborhood function, obtain the neighbor neurons of the winning neuron from each output layer neuron according to the degree of influence, and update the initialization weight vector of the neighbor neurons according to the current input features and the initialization weight vector of the neighbor neurons to obtain the updated weight vector of the neighbor neurons;

[0035] According to the updated weight vector of the winning neuron and the updated weight vector of the neighboring neurons, the current weight vector of each output layer neuron is determined.

[0036] In a second aspect, an embodiment of the present application provides a similar image search device, the device comprising:

[0037] A feature extraction module is used to extract features from the input current image to obtain first hierarchical features; and to extract features from each to-be-searched image to obtain corresponding second hierarchical features;

[0038] A mapping module, used to perform self-organizing mapping on the first hierarchical features and each second hierarchical feature based on a pre-trained self-organizing mapping network model, to obtain a projection distance between the current image and each image to be searched;

[0039] The search module is used to search for a target image similar to the current image from each image to be searched according to each projection distance.

[0040] In a third aspect, an embodiment of the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method of any one of the embodiments of the first aspect when executing the computer program.

[0041] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method of any embodiment in the above-mentioned first aspect are implemented.

[0042] In a fifth aspect, an embodiment of the present application further provides a computer program product, the computer program product comprising a computer program, which, when executed by a processor, implements the steps of the method of any embodiment of the first aspect above.

[0043] The embodiments of the present application provide a similar image search method, apparatus, computer equipment, medium and product, including: extracting features according to an input current image to obtain a first hierarchical feature, and extracting features according to each to-be-searched image to obtain corresponding second hierarchical features, performing self-organizing mapping on the first hierarchical feature and each second hierarchical feature based on a pre-trained self-organizing map network model to obtain a projection distance between the current image and each to-be-searched image, and searching for a target image similar to the current image from each to-be-searched image according to each projection distance; the above method can extract hierarchical features from the current image and each to-be-searched image, and obtain the accurate projection distance between the current image and each to-be-searched image based on the hierarchical features and the self-organizing map network model, and then quickly and accurately search for a target image similar to the current image from each to-be-searched image according to each projection distance, thereby improving the accuracy of similar image search results and improving the efficiency of similar image search; at the same time, the above method does not require manual participation, thereby reducing manual participation errors, greatly improving the accuracy of similar image search results, and reducing the human resource costs required for the similar image search process. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 is a schematic diagram of a process flow of a similar image search method in one embodiment;

[0045] Figure 2 A structural diagram of a self-organizing map network model in one embodiment;

[0046] Figure 3 is a schematic flow chart of a similar image search method in another embodiment;

[0047] Figure 4 is a schematic flow chart of a similar image search method in another embodiment;

[0048] Figure 5 is a schematic flow chart of a similar image search method in another embodiment;

[0049] Figure 6 is a schematic flow chart of a similar image search method in another embodiment;

[0050] Figure 7 is a schematic flow chart of a similar image search method in another embodiment;

[0051] Figure 8 is a schematic flow chart of a similar image search method in another embodiment;

[0052] Fig. 9 is a schematic flow chart of a similar image search method in another embodiment;

[0053] Fig.10 is a structural block diagram of a similar image searching device in one embodiment;

[0054] Fig.11 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0056] In the field of image processing, similar image search technology is widely used in various fields, such as e-commerce, digital copyright protection, forensic identification, medical diagnosis, etc. In the related art, similar image search algorithms based on color features or texture features are mainly used to search for similar images of the current image. However, in the process of searching for similar images of the current image in the related art, there is a problem of inaccurate search results. Based on this, an embodiment of the present application provides a similar image search method, which can improve the accuracy of the search results in the process of searching for similar images of the current image.

[0057] The similar image search method provided in the embodiment of the present application can be applied to a computer device. The computer device can be a personal computer, a laptop computer, a tablet computer, a smart phone, a smart bracelet, etc. The specific form of the computer device is not limited in this embodiment. The following embodiment takes a computer device as the execution subject of the similar image search method to introduce the specific process of the similar image search method.

[0058] like Figure 1 FIG. 1 is a flow chart of a similar image search method provided in an embodiment of the present application. The method can be implemented by the following steps:

[0059] S100, extracting features from a current input image to obtain first hierarchical features; and extracting features from each to-be-searched image to obtain corresponding second hierarchical features.

[0060] The current image may be a medical image, an architectural image, a biological image, a vehicle image, a directory image, or the like.

[0061] In practical applications, the computer device can use a hierarchical feature extraction algorithm to extract features from the input current image to obtain a first hierarchical feature, and use a hierarchical feature extraction algorithm to extract features from each image to be searched in the image library to obtain a second hierarchical feature corresponding to each image to be searched.

[0062] Optionally, the above-mentioned hierarchical feature extraction algorithm can be at least one of a scale-invariant feature transformation algorithm, an accelerated robust feature algorithm, a directional gradient histogram algorithm, a local binary pattern algorithm, and the like.

[0063] S200 , based on a pre-trained self-organizing map network model, perform self-organizing mapping on the first hierarchical features and each second hierarchical feature to obtain a projection distance between the current image and each image to be searched.

[0064] Furthermore, for each second hierarchical feature corresponding to an image to be searched, the computer device can input both the first hierarchical feature and the second hierarchical feature corresponding to the image to be searched into a pre-trained self-organizing map network model, and the self-organizing map network model performs self-organizing mapping on the first hierarchical feature and the second hierarchical feature corresponding to the image to be searched, and then outputs the projection distance between the current image and the image to be searched.

[0065] In practical applications, the self-organizing map network model may include an input layer and a competition layer (i.e., an output layer), wherein the input layer includes N input layer neurons, the output layer includes m output layer neurons, the m output layer neurons may form a one-dimensional or two-dimensional planar array, and the output layer and the output layer are fully connected, that is, each input node is connected to each output node. Figure 2 Shown is the structural diagram of the self-organizing map network model.

[0066] It should be noted here that the projection distance between the current image and the image to be found can be understood as the distance between the projection positions of the current image and the image to be found on the output layer in the self-organizing map network model.

[0067] S300 , searching for a target image similar to the current image from among the images to be searched according to the projection distances.

[0068] Specifically, the computer device can pre-train an algorithm model, and then input the projection distance between the current image and each image to be searched into the algorithm model. The algorithm model searches for a target image similar to the current image from each image to be searched and outputs it.

[0069] In addition, the computer device can perform comparison processing, analysis processing, matching processing and other operations on each projection distance, and search for a target image similar to the current image from each image to be searched based on the processing operation results.

[0070] The technical solution in the embodiment of the present application performs feature extraction based on the input current image to obtain the first hierarchical feature, and performs feature extraction based on each image to be searched to obtain the corresponding second hierarchical features, and based on a pre-trained self-organizing map network model, performs self-organizing mapping on the first hierarchical feature and each second hierarchical feature to obtain the projection distance between the current image and each image to be searched, and searches for a target image similar to the current image from each image to be searched according to each projection distance; the above method can extract hierarchical features from the current image and each image to be searched, and obtain the accurate projection distance between the current image and each image to be searched based on the hierarchical features and the self-organizing map network model, and then quickly and accurately searches for a target image similar to the current image from each image to be searched according to each projection distance, thereby improving the accuracy of the similar image search result and improving the similar image search efficiency.

[0071] The following is a description of the process of extracting features from the input current image to obtain the first hierarchical features. Figure 3 As shown, the step of extracting features from the input current image to obtain the first hierarchical features in the above S100 can be implemented in the following way:

[0072] S110, performing preprocessing on the current image to obtain a current preprocessed image.

[0073] In practical applications, the computer device may preprocess the current image to obtain the current preprocessed image. Optionally, the preprocessing may include at least one of grayscale processing, normalization processing, standardization processing, cropping processing, and the like.

[0074] In one embodiment, if Figure 4 As shown, the step of performing preprocessing according to the current image to obtain the current preprocessed image in the above S110 may include:

[0075] S111 , performing median filtering denoising processing on the current image to obtain a current denoised image.

[0076] In practical applications, the computer device may use a median filter method to perform median filtering denoising on the current image to obtain a current denoised image. Optionally, the median filter method may be at least one of a basic median filter method, an adaptive median filter method, a weighted median filter method, and the like.

[0077] S112: Perform edge extraction and edge enhancement processing on the current denoised image to obtain a current edge-processed image.

[0078] Specifically, the computer device may use an edge extraction algorithm to perform edge extraction processing on the current denoised image, and then use an edge enhancement algorithm to perform edge enhancement processing on the current denoised image after the edge extraction processing to obtain the current edge processed image.

[0079] Optionally, the edge extraction algorithm may be at least one of a Sobel operator, a Prewitt operator, a Canny edge detection algorithm, etc.; the edge enhancement algorithm may be at least one of a high-pass filter method, a Laplace operator, etc.

[0080] S113: Perform image enhancement processing on the current edge-processed image to obtain a current pre-processed image.

[0081] Specifically, the computer device may use an image enhancement method to perform image enhancement processing on the current edge processed image to obtain the current pre-processed image. Optionally, the above-mentioned image enhancement method is multiple, and may include a grayscale transformation method, a histogram equalization enhancement method, a Laplace algorithm enhancement method, an object-based Log transformation method, and a gamma transformation method.

[0082] It should be noted here that the above-mentioned current pre-processed image may include a plurality of enhanced images obtained by performing image enhancement processing on the current edge-processed image by using a plurality of different image enhancement methods.

[0083] S120: Input the current preprocessed image into a deep learning feature extraction model, and perform feature extraction on the current preprocessed image to obtain a first hierarchical feature.

[0084] Specifically, the computer device can input the current preprocessed image into the deep learning feature extraction model, and perform feature extraction on the current preprocessed image to obtain the first hierarchical features.

[0085] Among them, the above-mentioned deep learning feature extraction model can be a convolutional neural network model, a fully connected neural network model, a long short-term memory neural network model, a residual neural network model, a recurrent neural network model, etc.

[0086] In an embodiment of the present application, the deep learning feature extraction model can be obtained based on the training of the convolutional neural network model, and is used to extract the hierarchical features of the image. The deep learning feature extraction model can include at least two convolutional layers, a pooling layer, and a fully connected layer in sequence.

[0087] The technical solution in the embodiment of the present application performs preprocessing on the current image to obtain a current preprocessed image, and inputs the current preprocessed image into a deep learning feature extraction model, and performs feature extraction on the current preprocessed image to obtain a first hierarchical feature; the above method can first preprocess the current image to improve the image quality, and then perform feature extraction on the high-quality current preprocessed image, which can improve the accuracy of the hierarchical features obtained by feature extraction.

[0088] The following is a description of the process of extracting features from each image to be searched to obtain the corresponding second hierarchical features. Figure 5 As shown, the step of extracting features from each to-be-searched image to obtain corresponding second hierarchical features in the above S100 can be implemented in the following manner:

[0089] S130 , performing preprocessing on each to-be-searched image to obtain a corresponding preprocessed image to-be-searched.

[0090] In practical applications, the computer device may preprocess each to-be-searched image to obtain the corresponding preprocessed image to-be-searched. Optionally, the preprocessing may include at least one of grayscale processing, normalization processing, standardization processing, cropping processing, and the like.

[0091] In one embodiment, if Figure 6 As shown, the step of performing preprocessing on each to-be-searched image to obtain the corresponding preprocessed image to-be-searched in the above S130 may include:

[0092] S131 , performing median filtering and denoising processing on each to-be-searched image to obtain a corresponding denoised to-be-searched image.

[0093] In practical applications, the computer device can use a median filtering method to perform median filtering denoising on each image to be searched, and obtain a denoised image to be searched corresponding to each image to be searched. Optionally, the median filtering method can be at least one of a basic median filtering method, an adaptive median filtering method, a weighted median filtering method, and the like.

[0094] S132, performing edge extraction processing and edge enhancement processing on each denoised image to be found, to obtain a corresponding edge-processed image to be found.

[0095] Specifically, the computer device can use an edge extraction algorithm to perform edge extraction processing on each denoised image to be found, and then use an edge enhancement algorithm to perform edge enhancement processing on each denoised image to be found after the edge extraction processing to obtain an edge processed image to be found corresponding to each denoised image to be found.

[0096] Optionally, the edge extraction algorithm may be at least one of a Sobel operator, a Prewitt operator, a Canny edge detection algorithm, etc.; the edge enhancement algorithm may be at least one of a high-pass filter method, a Laplace operator, etc.

[0097] S133, performing image enhancement processing on each edge-processed image to be found to obtain each pre-processed image to be found.

[0098] Specifically, for any processed edge image to be found, the computer device can use an image enhancement method to perform image enhancement processing on the processed edge image to be found, and obtain a pre-processed image to be found corresponding to the processed edge image to be found. Optionally, there are multiple image enhancement methods, which can include grayscale transformation method, histogram equalization enhancement method, Laplace algorithm enhancement method, object-based Log transformation method and gamma transformation method, etc.

[0099] It should be noted here that the pre-processed image to be found corresponding to the edge-processed image to be found may include a plurality of enhanced images obtained by performing image enhancement processing on the edge-processed image to be found by using a plurality of different image enhancement methods.

[0100] S140, inputting each pre-processed image to be searched into a deep learning feature extraction model, and performing feature extraction on each pre-processed image to be searched to obtain each second hierarchical feature.

[0101] Specifically, the computer device can input each pre-processed image to be searched into a deep learning feature extraction model, and perform feature extraction on each pre-processed image to be searched to obtain each second hierarchical feature.

[0102] The technical solution in the embodiment of the present application performs preprocessing on each image to be searched to obtain corresponding preprocessed images to be searched, and inputs each preprocessed image to be searched into a deep learning feature extraction model, and performs feature extraction on each preprocessed image to be searched to obtain each second hierarchical feature; the above method can first preprocess each image to be searched to improve the image quality, and then perform feature extraction on each high-quality preprocessed image to be searched, which can improve the accuracy of the hierarchical features obtained by feature extraction.

[0103] The construction process of the self-organizing map network model is described below. In one embodiment, Figure 7As shown, the construction process of the self-organizing map network model can be achieved through the following process:

[0104] S400, obtaining a plurality of input features and an initial self-organizing map network model in a training feature set; the initial self-organizing map network model includes a plurality of output layer neurons.

[0105] The training feature set includes a plurality of input features, each of which may be a hierarchical feature. In practical applications, a training set may be first obtained, and feature extraction may be performed on each sample image in the training set to obtain corresponding input features.

[0106] S500, iteratively updating the initialized weight vector of each output layer neuron based on each input feature.

[0107] It should be noted here that the initial weight vectors of the neurons in each output layer of the initial self-organizing map network model are configured during the initialization process.

[0108] Specifically, the computer device may adopt a preset updating method to iteratively update the initialized weight vector of each output layer neuron based on each input feature.

[0109] In addition, the computer device can also pre-train an iterative update model, and then input each input feature and the initialized weight vector of each output layer neuron into the iterative update model, and the iterative update model outputs the iterative update result, that is, the current weight vector of each output layer neuron is obtained.

[0110] S600 , determining a self-organizing map network model according to the current weight vectors of neurons in each output layer and the initial self-organizing map network model.

[0111] In an embodiment of the present application, the initialization weight vector of each output layer neuron in the initial self-organizing map network model can be replaced with the current weight vector of each output layer neuron to generate a self-organizing map network model.

[0112] In one embodiment, each input feature includes a current input feature and a next input feature; Figure 8 As shown, the step of iteratively updating the initialization weight vector of each output layer neuron based on each input feature in the above S500 may include:

[0113] S510 , updating the initialized weight vector of each output layer neuron according to the current input feature to obtain the current weight vector of each output layer neuron.

[0114] In one embodiment, the method for updating the initialized weight vector of each output layer neuron according to the current input feature can be to pre-train a weight vector update model, and then input the current input feature and the initialized weight vector of each output layer neuron into the weight vector update model. The weight vector update model updates the initialized weight vector of each output layer neuron according to the current input feature and then outputs the current weight vector of each output layer neuron.

[0115] Optionally, the weight vector update model can be implemented by at least one of a convolutional neural network model, a fully connected neural network model, a long short-term memory neural network model, a recurrent neural network model, a residual neural network model, etc.

[0116] In another embodiment, the method of updating the initialized weight vector of each output layer neuron according to the current input feature can also be to perform arithmetic operation on the current input feature and the initialized weight vector of each output layer neuron, and determine the current weight vector of each output layer neuron according to the arithmetic operation result. Optionally, the arithmetic operation can include at least one of addition, subtraction, division, multiplication, logarithm, exponential operation, etc.

[0117] S520, using the current weight vector of each output layer neuron as the initialization weight vector of each output layer neuron, and updating the initialization weight vector of each output layer neuron according to the next input feature to obtain the latest weight vector of each output layer neuron.

[0118] Furthermore, the current weight vector of each output layer neuron can be used as the initialization weight vector of each output layer neuron, and the initialization weight vector of each output layer neuron is updated according to the next input feature to obtain the latest weight vector of each output layer neuron.

[0119] It should be noted here that if there are multiple input features, the weight vector of each output layer neuron is updated in turn through the multiple input features. Among them, the initialized weight vector of each output layer neuron is updated for the first time, and the weight vector updated last time is updated next time, and the cycle is repeated until the update operation is completed through all input features, or the number of iterative updates reaches the preset number.

[0120] In one embodiment, if Fig. 9 As shown, the step of updating the initialization weight vector of each output layer neuron according to the current input feature in the above S510 to obtain the current weight vector of each output layer neuron can be implemented in the following way:

[0121] S511. According to the current input feature and the initialization weight vector of each output layer neuron, determine the distance between the current input feature and the initialization weight vector of each output layer neuron, and obtain the output layer neuron corresponding to the minimum distance among the distances as the winning neuron.

[0122] In practical applications, the computer device can perform arithmetic operations based on the current input features and the initialized weight vectors of each output layer neuron to obtain the distances between the current input features and the initialized weight vectors of each output layer neuron.

[0123] The computer device may also use a distance calculation method to calculate the distance between the current input feature and the initialization weight vector of each output layer neuron according to the current input feature and the initialization weight vector of each output layer neuron. Optionally, the distance calculation method may be a cosine similarity method, a Hamming distance method, a Manhattan distance method, etc.

[0124] In the embodiment of the present application, the current input feature The output layer neurons Initialization weight vector The distance between ,in, It can be obtained in the following ways, namely:

[0125] (1)

[0126] in, Represents the current input features The features corresponding to the input neuron i in the input layer are mapped, Represents the input neuron i to the output neuron The weight vector between Represents the total number of neurons in the input layer.

[0127] Furthermore, based on the distances obtained in the previous steps, the minimum value of each distance can be obtained or the minimum distance can be obtained by pairwise comparison, and the output layer neuron corresponding to the minimum distance is taken as the winning neuron.

[0128] S512: Update the initialization weight vector of the winning neuron according to the current input feature and the initialization weight vector of the winning neuron to obtain an updated weight vector of the winning neuron.

[0129] In the embodiment of the present application, the initialization weight vector of the winning neuron may be updated according to the current input feature and the initialization weight vector of the winning neuron to obtain an updated weight vector of the winning neuron.

[0130] In one embodiment, the method for updating the initialization weight vector of the winning neuron can be to input both the current input feature and the initialization weight vector of the winning neuron into a weight vector update model, and the weight vector update model updates the initialization weight vector of the winning neuron according to the current input feature and then outputs the updated weight vector of the winning neuron.

[0131] In another embodiment, the method for updating the initialization weight vector of the winning neuron according to the current input feature can also be to perform arithmetic operation on the current input feature and the initialization weight vector of the winning neuron, and determine the updated weight vector of the winning neuron according to the arithmetic operation result.

[0132] S513. Determine the degree to which other neurons in each output layer are influenced by the winning neuron according to the neighborhood function, obtain the neighbor neurons of the winning neuron from each output layer neuron according to the respective influence degrees, and update the initialization weight vector of the neighbor neurons according to the current input feature and the initialization weight vector of the neighbor neurons to obtain the updated weight vector of the neighbor neurons.

[0133] In practical applications, the neighborhood function may be a Gaussian neighborhood function, a rectangular neighborhood function, etc. Specifically, the computer device may calculate the distance between the winning neuron and other neurons in each output layer except the winning neuron, and then input the distance between other neurons and the winning neuron and the neighborhood radius into the neighborhood function to obtain the degree to which other neurons are affected by the winning neuron. In the embodiment of the present application, there are multiple other neurons.

[0134] Furthermore, the influence degrees can be compared, screened, analyzed, and the like, and the neighbor neurons of the winning neuron can be obtained from the neurons in each output layer according to the processing results. Then, the initialized weight vector of the neighbor neurons is updated according to the current input features and the initialized weight vector of the neighbor neurons to obtain the updated weight vector of the neighbor neurons.

[0135] In one embodiment, the method for updating the initialized weight vector of the neighbor neuron can be to input both the current input feature and the initialized weight vector of the neighbor neuron into a weight vector update model, and the weight vector update model updates the initialized weight vector of the neighbor neuron according to the current input feature and then outputs the updated weight vector of the neighbor neuron.

[0136] In another embodiment, the method for updating the initialized weight vector of the neighbor neuron according to the current input feature can also be to perform arithmetic operation on the current input feature and the initialized weight vector of the neighbor neuron, and determine the updated weight vector of the neighbor neuron according to the result of the arithmetic operation.

[0137] S514: Determine the current weight vector of each output layer neuron according to the updated weight vector of the winning neuron and the updated weight vectors of the neighboring neurons.

[0138] In an embodiment of the present application, if each output layer neuron includes a winning neuron and other neurons, and the other neurons only include neighboring neurons, the updated weight vector of the winning neuron and the updated weight vector of the neighboring neuron can be used as the current weight vector of each output layer neuron.

[0139] If each output layer neuron includes a winning neuron and other neurons, and the other neurons include neighbor neurons and remaining neurons, the updated weight vector of the winning neuron, the updated weight vector of the neighbor neurons and the initialization weight vector of the remaining neurons can be used as the current weight vector of each output layer neuron.

[0140] The technical solution in the embodiment of the present application obtains multiple input features and an initial self-organizing map network model in a training feature set, iteratively updates the initialized weight vector of each output layer neuron in the initial self-organizing map network model based on each input feature, and determines the self-organizing map network model based on the current weight vector of each output layer neuron and the initial self-organizing map network model; the above method can optimize the initial self-organizing map network model to improve the processing accuracy of the acquired self-organizing map network model.

[0141] In one embodiment, the present application also provides a similar image search method, which is applied to a computer device. The method includes the following process:

[0142] (1) Perform median filtering and denoising on the current image to obtain the current denoised image;

[0143] (2) Perform edge extraction and edge enhancement processing on the current denoised image to obtain the current edge processed image;

[0144] (3) Performing image enhancement processing on the current edge processed image to obtain the current pre-processed image;

[0145] (4) inputting the current preprocessed image into the deep learning feature extraction model, extracting features from the current preprocessed image to obtain a first hierarchical feature; and,

[0146] (5) Perform median filtering and denoising on each image to be searched to obtain the corresponding denoised image to be searched;

[0147] (6) Performing edge extraction and edge enhancement processing on each denoised image to be searched, to obtain the corresponding edge-processed image to be searched;

[0148] (7) Performing image enhancement processing on each edge-processed image to be found to obtain each pre-processed image to be found;

[0149] (8) Inputting each pre-processed image to be searched into a deep learning feature extraction model, and performing feature extraction on each pre-processed image to be searched to obtain each second hierarchical feature;

[0150] (9) Based on the pre-trained self-organizing map network model, the first hierarchical features and each second hierarchical feature are self-organizing mapped to obtain the projection distance between the current image and each image to be searched;

[0151] Among them, the construction process of the self-organizing map network model includes:

[0152] (91) obtaining a plurality of input features and an initial self-organizing map network model in a training feature set; the initial self-organizing map network model includes a plurality of output layer neurons; each input feature includes a current input feature and a next input feature;

[0153] (92) According to the current input feature and the initialization weight vector of each output layer neuron, determine the distance between the current input feature and the initialization weight vector of each output layer neuron, and obtain the output layer neuron corresponding to the minimum distance among the distances as the winning neuron;

[0154] (93) updating the initialization weight vector of the winning neuron according to the current input feature and the initialization weight vector of the winning neuron to obtain an updated weight vector of the winning neuron;

[0155] (94) Determine the degree to which other neurons in each output layer are influenced by the winning neuron according to the neighborhood function, obtain the neighbor neurons of the winning neuron from each output layer neuron according to the degree of influence, and update the initialization weight vector of the neighbor neurons according to the current input feature and the initialization weight vector of the neighbor neurons to obtain the updated weight vector of the neighbor neurons;

[0156] (95) Determine the current weight vector of each output layer neuron according to the updated weight vector of the winning neuron and the updated weight vectors of the neighboring neurons;

[0157] (96) using the current weight vector of each output layer neuron as the initialization weight vector of each output layer neuron, and updating the initialization weight vector of each output layer neuron according to the next input feature to obtain the latest weight vector of each output layer neuron;

[0158] (97) determining a self-organizing map network model according to the current weight vectors of the neurons in each output layer and the initial self-organizing map network model;

[0159] (10) According to each projection distance, search for a target image similar to the current image from each image to be searched.

[0160] The execution process of the above (1) to (10) can be specifically referred to the description of the above embodiment. The implementation principle and technical effect are similar and will not be repeated here.

[0161] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0162] Based on the same inventive concept, the embodiment of the present application also provides a similar image search device for implementing the similar image search method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more similar image search device embodiments provided below can refer to the limitations of the similar image search method above, and will not be repeated here.

[0163] In one embodiment, Fig.10 This is a schematic diagram of the structure of a similar image search device in one embodiment of the present application. The similar image search device provided in the embodiment of the present application can be applied to a computer device. Fig.10 As shown, the similar image search device of the embodiment of the present application may include: a feature extraction module 11, a mapping module 12 and a search module 13, wherein:

[0164] The feature extraction module 11 is used to extract features from the input current image to obtain first hierarchical features; and to extract features from each to-be-searched image to obtain corresponding second hierarchical features;

[0165] A mapping module 12 is used to perform self-organizing mapping on the first hierarchical features and each second hierarchical feature based on a pre-trained self-organizing mapping network model to obtain a projection distance between the current image and each image to be searched;

[0166] The search module 13 is used to search for a target image similar to the current image from the images to be searched according to the projection distances.

[0167] The similar image search device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned similar image search method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.

[0168] In one embodiment, the read instruction sending module 12 includes: a first preprocessing unit and a first feature extraction unit, wherein:

[0169] A first preprocessing unit, configured to perform preprocessing on the current image to obtain a current preprocessed image;

[0170] The first feature extraction unit is used to input the current preprocessed image into the deep learning feature extraction model, and perform feature extraction on the current preprocessed image to obtain a first hierarchical feature.

[0171] The similar image search device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned similar image search method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.

[0172] In one embodiment, the first preprocessing unit is specifically used for:

[0173] Perform median filtering and denoising on the current image to obtain the current denoised image;

[0174] Perform edge extraction and edge enhancement processing on the current denoised image to obtain the current edge processed image;

[0175] Perform image enhancement processing on the current edge processed image to obtain the current pre-processed image.

[0176] The similar image search device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned similar image search method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.

[0177] In one embodiment, the feature extraction module 11 further includes: a second preprocessing unit and a second feature extraction unit, wherein:

[0178] A second preprocessing unit, used for preprocessing each to-be-searched image to obtain a corresponding preprocessed image to-be-searched;

[0179] The second feature extraction unit is used to input each pre-processed image to be searched into a deep learning feature extraction model, and perform feature extraction on each pre-processed image to be searched to obtain each second hierarchical feature.

[0180] The similar image search device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned similar image search method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.

[0181] In one embodiment, the second pre-processing unit is specifically used for:

[0182] Perform median filtering and denoising on each image to be searched, and obtain the corresponding denoised image to be searched;

[0183] Perform edge extraction and edge enhancement processing on each denoised image to be found, to obtain a corresponding edge-processed image to be found;

[0184] Perform image enhancement processing on each edge-processed image to be found to obtain each pre-processed image to be found.

[0185] The similar image search device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned similar image search method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.

[0186] In one embodiment, the similar image search device includes: an acquisition module, an iterative update unit and a determination unit, wherein:

[0187] An acquisition module is used to acquire multiple input features and an initial self-organizing map network model in a training feature set; the initial self-organizing map network model includes multiple output layer neurons;

[0188] An iterative updating unit, used for iteratively updating the initialized weight vector of each output layer neuron based on each input feature;

[0189] The determination unit is used to determine the self-organizing map network model according to the current weight vectors of the neurons in each output layer and the initial self-organizing map network model.

[0190] The similar image search device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned similar image search method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.

[0191] In one embodiment, each input feature includes a current input feature and a next input feature; the iterative update unit includes: a first update subunit and a second update subunit, wherein:

[0192] A first updating subunit is used to update the initialization weight vector of each output layer neuron according to the current input feature to obtain the current weight vector of each output layer neuron;

[0193] The second updating subunit is used to use the current weight vector of each output layer neuron as the initialization weight vector of each output layer neuron, and update the initialization weight vector of each output layer neuron according to the next input feature to obtain the latest weight vector of each output layer neuron.

[0194] The similar image search device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned similar image search method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.

[0195] In one embodiment, the first updating subunit is specifically used for:

[0196] According to the current input feature and the initialization weight vector of each output layer neuron, the distance between the current input feature and the initialization weight vector of each output layer neuron is determined, and the output layer neuron corresponding to the minimum distance among the distances is obtained as the winning neuron;

[0197] According to the current input features and the initialization weight vector of the winning neuron, the initialization weight vector of the winning neuron is updated to obtain the updated weight vector of the winning neuron;

[0198] Determine the degree to which other neurons in each output layer are influenced by the winning neuron according to the neighborhood function, obtain the neighbor neurons of the winning neuron from each output layer neuron according to the degree of influence, and update the initialization weight vector of the neighbor neurons according to the current input features and the initialization weight vector of the neighbor neurons to obtain the updated weight vector of the neighbor neurons;

[0199] According to the updated weight vector of the winning neuron and the updated weight vector of the neighboring neurons, the current weight vector of each output layer neuron is determined.

[0200] The similar image search device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned similar image search method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.

[0201] For the specific definition of the similar image search device, please refer to the definition of the similar image search method above, which will not be repeated here. Each module in the above-mentioned similar image search device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0202] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.11As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide processing 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, 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 database of the computer device is used to store the current image and the image library. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a similar image search method is implemented.

[0203] Those skilled in the art will understand that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0204] In one embodiment, a computer device is also provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the technical solution in the above-mentioned similar image search method embodiment of the present application is implemented. The implementation principle and technical effect are similar and will not be repeated here.

[0205] In one embodiment, a computer-readable storage medium is also provided, on which a computer program is stored. When the computer program is executed by a processor, the technical solution of the similar image search method mentioned above in the present application is implemented. The implementation principle and technical effect are similar and will not be repeated here.

[0206] In one embodiment, a computer program product is also provided, including a computer program. When the computer program is executed by a processor, the technical solution of the similar image search method described above in the present application is implemented. The implementation principle and technical effect are similar and will not be repeated here.

[0207] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and 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 at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0208] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0209] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A similar image search method, characterized in that: The method comprises: Extracting features from the input current image to obtain first hierarchical features; and extracting features from each to-be-searched image to obtain corresponding second hierarchical features; Based on a pre-trained self-organizing map network model, performing self-organizing mapping on the first hierarchical features and each of the second hierarchical features to obtain a projection distance between the current image and each of the images to be searched; According to each of the projection distances, a target image similar to the current image is searched from each of the images to be searched.

2. The method according to claim 1, characterized in that The step of extracting features from the input current image to obtain first hierarchical features includes: Performing preprocessing on the current image to obtain a current preprocessed image; The current preprocessed image is input into a deep learning feature extraction model, and feature extraction is performed on the current preprocessed image to obtain the first hierarchical feature.

3. The method according to claim 2, characterized in that The preprocessing according to the current image to obtain the current preprocessed image includes: Performing median filtering denoising processing on the current image to obtain a current denoised image; Performing edge extraction processing and edge enhancement processing on the current denoised image to obtain a current edge-processed image; Performing image enhancement processing on the current edge-processed image to obtain the current pre-processed image.

4. The method according to any one of claims 1 to 3, characterized in that The step of extracting features from each to-be-searched image to obtain corresponding second hierarchical features includes: Preprocessing each of the to-be-searched images to obtain corresponding preprocessed images to be searched; Input each of the preprocessed images to be searched into a deep learning feature extraction model, and perform feature extraction on each of the preprocessed images to be searched to obtain each of the second hierarchical features.

5. The method according to claim 4, characterized in that The preprocessing of each of the to-be-searched images to obtain the corresponding preprocessed images to be searched comprises: Performing median filtering and denoising processing on each of the to-be-searched images to obtain a corresponding denoised image to be searched; Performing edge extraction and edge enhancement processing on each of the denoised images to be found, to obtain a corresponding edge-processed image to be found; Perform image enhancement processing on each of the edge-processed images to be found to obtain each of the pre-processed images to be found.

6. The method according to any one of claims 1 to 3, characterized in that The construction process of the self-organizing map network model includes: Acquire multiple input features and an initial self-organizing map network model in a training feature set; the initial self-organizing map network model includes multiple output layer neurons; Iteratively updating the initialized weight vector of each output layer neuron based on each input feature; The self-organizing map network model is determined according to the current weight vector of each of the output layer neurons and the initial self-organizing map network model.

7. The method according to claim 6, characterized in that Each of the input features includes a current input feature and a next input feature; The iterative updating of the initialization weight vector of each output layer neuron based on each input feature includes: The initialized weight vector of each of the output layer neurons is updated according to the current input feature to obtain the current weight vector of each of the output layer neurons; The current weight vector of each output layer neuron is used as the initialization weight vector of each output layer neuron, and the initialization weight vector of each output layer neuron is updated according to the next input feature to obtain the latest weight vector of each output layer neuron.

8. The method according to claim 7, characterized in that The updating of the initialization weight vector of each of the output layer neurons according to the current input feature to obtain the current weight vector of each of the output layer neurons includes: According to the current input feature and the initialization weight vector of each output layer neuron, determine the distance between the current input feature and the initialization weight vector of each output layer neuron, and obtain the output layer neuron corresponding to the minimum distance among the distances as the winning neuron; According to the current input feature and the initialization weight vector of the winning neuron, the initialization weight vector of the winning neuron is updated to obtain an updated weight vector of the winning neuron; Determine the degree to which other neurons in each of the output layer neurons are influenced by the winning neuron according to the neighborhood function, obtain the neighbor neurons of the winning neuron from each of the output layer neurons according to the respective influence degrees, and update the initialization weight vector of the neighbor neuron according to the current input feature and the initialization weight vector of the neighbor neuron to obtain the updated weight vector of the neighbor neuron; The current weight vector of each of the output layer neurons is determined according to the updated weight vector of the winning neuron and the updated weight vectors of the neighboring neurons.

9. A similar image search device, characterized in that: The device comprises: A feature extraction module is used to extract features from the input current image to obtain first hierarchical features; and to extract features from each to-be-searched image to obtain corresponding second hierarchical features; A mapping module, used for performing self-organizing mapping on the first hierarchical features and each of the second hierarchical features based on a pre-trained self-organizing mapping network model to obtain a projection distance between the current image and each of the images to be searched; A search module is used to search for a target image similar to the current image from the images to be searched according to the projection distances.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.