Medical image retrieval method based on approximate match dynamic locality sensitive hashing

CN118551071BActive Publication Date: 2026-10-20SECOND MEDICAL CENT OF CHINESE PLA GENERAL HOSPITAL +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410581169.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-11
Publication Date
2026-10-20
Estimated Expiration
2044-05-11

AI Technical Summary

Technical Problem

[0005]本发明的目的是为了解决采用浅层特征进行海量医学影像检索对医学影像识别准确率低以及海量医学影像数据检索计算量大、时间开销大的技术问题

Benefits of technology

[0043]本发明公开的基于近似匹配的动态局部敏感哈希方法的医学影像检索方法,针对现有近似匹配算法未考虑浅层特征语义性特征不明确,数据集中数据分布不均匀导致的哈希冲突问题,以及当数据量过大时导致计算量和时间开销较大,提出基于动态局部敏感哈希算法与加权K近邻算法的图像检索策略,动态调整哈希桶粒度,来减小检索时在该桶上产生的哈希冲突。建立满足稳定分布的哈希函数,通过哈希函数构建复合哈希函数和设置多索引哈希表,用于提高哈希表中近邻点的碰撞概率和非近邻点不碰撞概率,从而,减小哈希表在哈希桶上的冲突来提升提升哈希表检索的性能。通过邻域线性邻域权值矩阵调整相似图片间的距离公式,利用优化的K近邻算法,解决线性查找的图像检索方法导致的图像检索时间耗费过长效率低下的问题。经过本方法运算后的图像,可以提供图像的相似度保证,如此可以提高医学影像检索的效率和准确度,很好地满足临床需要。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118551071B_ABST
    Figure CN118551071B_ABST
Patent Text Reader

Abstract

The application discloses a medical image retrieval method based on an approximate matching dynamic local sensitive hashing method, and belongs to the medical image retrieval field.The implementation method of the application is as follows: after direction gradient histogram feature values, local binary pattern feature values and Haar-like feature values of picture data are extracted to construct a retrieval index of an image, a medical image retrieval method is optimized by using a dynamic local sensitive hashing method and a weighted k nearest neighbor algorithm.Thus, the technical problems of low medical image recognition accuracy, large medical image data retrieval calculation amount and large time consumption in mass medical image retrieval by using shallow features are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a medical image retrieval method based on the dynamic locality-sensitive hashing method of approximate matching, and belongs to the field of medical image retrieval. Background Technology

[0002] In image retrieval, image similarity is determined by calculating the distance between image features in a feature index database constructed from shallow features such as color, shape, and texture.

[0003] The integration of medical imaging and computer vision technologies, particularly the application of computer-aided detection and diagnosis in medical image retrieval, provides a foundation for searching similar case images. Medical images are characterized by small inter-class differences and large intra-class differences. Therefore, using the aforementioned shallow feature-based methods for medical image retrieval is insufficient to meet the requirements for high accuracy in recognizing highly similar medical images.

[0004] With the increase in hospital diagnosed cases, the resulting massive amount of medical image data presents a pressing issue: how to reduce image computation and time consumption during the retrieval of this vast amount of medical image data. Summary of the Invention

[0005] The purpose of this invention is to address the technical problems of low accuracy in medical image recognition and high computational and time costs associated with retrieving massive medical image data using shallow feature extraction. A medical image retrieval method based on dynamic local sensitive hashing (LSH) with approximate matching is proposed.

[0006] The objective of this invention is achieved through the following technical solution:

[0007] The medical image retrieval method based on the approximate matching dynamic locality-sensitive hashing method of the present invention includes the following steps:

[0008] Step 1: Input image data into the original image database.

[0009] Step 2: Extract directional gradient histogram feature values, local binary pattern feature values, and Haar-like feature values ​​from the image data obtained in Step 1 to construct an image retrieval index.

[0010] Step 2.1: Building Indexed dataset of images As shown in equation (1):

[0011] (1)

[0012] After inputting image data, an indexed image database is formed. Indexed dataset of images .in The central index of the representative dataset is An image.

[0013] Step 2.2: Indexing the dataset A label vector L is defined for each image, as shown in equation (2):

[0014] (2)

[0015] in, , This is used to count the total number of label categories in index dataset I, where each label represents the category to which the current image belongs.

[0016] Step 2.3: Extract the directional gradient histogram feature values ​​of the image, which are used to characterize the edge semantic processing of the lesion area.

[0017] Step 2.4: Extract local binary pattern feature values ​​from the image to characterize the texture semantic processing of the lesion area.

[0018] Step 2.5: Extract Haar-like feature values ​​to characterize the gray-scale change features of the lesion area.

[0019] Step 2.6: Construct an image retrieval index based on the feature values ​​obtained in steps 2.3 to 2.5 above, in order to improve the accuracy of medical image retrieval.

[0020] Step 3: Based on the image retrieval index obtained in Step 2, optimize the medical image retrieval method using the Dynamic Local Sensitive Hash (DHS) method and the Weighted k-Nearest Neighbors (KNN) algorithm.

[0021] Step 3.1: Based on the index dataset obtained in Step 2 The image feature values ​​are assigned hash addresses to construct hash functions and mapped to hash tables, which is the dynamic locality-sensitive hashing method.

[0022] Step 3.2: Define the search keywords based on the tag vector L obtained in Step 2.

[0023] Step 3.3: Establish the correspondence between search keywords and hash functions;

[0024] Step 3.3.1: To ensure a stable distribution of data in the hash table, the hash function is defined as shown in equation (3):

[0025] (3)

[0026] Where S is a random n-dimensional vector following a standard normal distribution N(0,1), It is a data set vector. Let W be a random integer selected from (0, W). It is the length of a segment on the straight line;

[0027] Step 3.3.2: Construct a composite hash function and set up a multi-index hash table through the hash function, as shown in Equation (4); this is used to increase the collision probability of nearest neighbors and the non-collision probability of non-nearest neighbors in the hash table; thereby reducing the collision of the hash table on the hash bucket to improve the performance of hash table retrieval.

[0028]

[0029]

[0030] (4)

[0031] in, To randomly generate a matrix based on the dataset The matrix maps the dataset to V projection spaces in terms of dimensions.

[0032] Step 3.4: Access the image data in the hash table and use K-nearest neighbors to display the search results.

[0033] Step 3.4.1: Input the keyword to search for, calculate the address of the query point falling into each hash function. If the hash function family is constructed from n hash functions, then n addresses can be calculated.

[0034] Step 3.4.2: Calculate the distance between the address and the remaining addresses in the neighborhood of the n search addresses in Step 3.4.1 in the hash table, forming a local neighborhood structure; the distance measure of the local neighborhood structure is shown in Equation (5):

[0035] (5)

[0036] in, The hash address obtained in step 3.4.1 , for In the field and Similar points, that is, except outer distance The k most recent hash addresses, yes From its neighborhood The obtained reconstructed matrix weights, yes From its neighborhood The obtained reconstructed matrix weights, for The set of local neighborhood points; that is, constructing the linear neighborhood weight matrix. As shown in equation (4), it is used for measurement and Similarity;

[0037] (6)

[0038] (7)

[0039] Among them, the linear neighborhood weight matrix must satisfy the condition shown in equation (5); Represents a local Gram matrix;

[0040] Step 3.4.3: Sort the results according to the obtained distances and select the K nearest neighbor search results for display.

[0041] This invention optimizes the medical image retrieval method by using step 3 (i.e., after extracting the directional gradient histogram feature value, local binary pattern feature value and Haar-like feature value of the image data in step 2 to construct the image retrieval index, the medical image retrieval method is optimized by using the dynamic local sensitive hashing method and the weighted k-nearest neighbor algorithm).

[0042] Beneficial effects:

[0043] This invention discloses a medical image retrieval method based on dynamic locality-sensitive hashing (LRHS) using approximate matching. Addressing the issues of existing approximate matching algorithms failing to consider shallow features and unclear semantic features, hash collisions caused by uneven data distribution, and high computational and time costs with large datasets, this invention proposes an image retrieval strategy based on LRHS and a weighted K-nearest neighbor (KNN) algorithm. The method dynamically adjusts the hash bucket granularity to reduce hash collisions within that bucket during retrieval. A hash function satisfying a stable distribution is established, and a composite hash function and a multi-index hash table are constructed to increase the collision probability of nearest neighbors and the non-collision probability of non-nearest neighbors in the hash table, thereby reducing hash table collisions and improving hash table retrieval performance. The distance formula between similar images is adjusted using a linear neighborhood weight matrix, and an optimized KNN algorithm is used to solve the problem of excessively long image retrieval times and low efficiency caused by linear search methods. Images processed by this method can provide image similarity guarantees, thus improving the efficiency and accuracy of medical image retrieval and effectively meeting clinical needs. Attached Figure Description

[0044] Figure 1 is a flowchart of the medical image retrieval method based on the dynamic locality-sensitive hashing method of approximate matching;

[0045] Figure 2 This is a CT image of the lungs.

[0046] Figure 3 This is a CT image of the liver.

[0047] Figure 4 This is a CT image of the kidney.

[0048] Figure 5 Chest X-ray; Detailed Implementation

[0049] To better illustrate the purpose and advantages of this invention, the invention will be further described below with reference to the accompanying drawings and examples. It should be noted that the implementation of this invention is not limited to the following embodiments, and any modifications or alterations made to this invention will fall within the scope of protection of this invention.

[0050] Example

[0051] like Figure 1 As shown, the medical image retrieval method based on the approximate matching dynamic locality-sensitive hashing method of the present invention is implemented in the following specific steps:

[0052] Step 1: Input image data into the original image database.

[0053] Step 2: Extract directional gradient histogram feature values, local binary pattern feature values, and Haar-like feature values ​​from the image data obtained in Step 1 to construct an image retrieval index.

[0054] Step 2.1: Build Indexed dataset of images As shown in equation (8):

[0055] (8)

[0056] After inputting image data, an indexed image database is formed. Indexed dataset of images .in The central index of the representative dataset is An image.

[0057] Step 2.2: Indexing the dataset A label vector L is defined for each image, as shown in equation (9):

[0058] (9)

[0059] in, , This is used to count the total number of label categories in index dataset I, where each label represents the category to which the current image belongs.

[0060] Step 2.3: Extract the directional gradient histogram feature values ​​of the image, which are used to characterize the edge semantic processing of the lesion area.

[0061] In this embodiment, the extraction of the directional gradient histogram feature values ​​of the image is first performed by converting the image to grayscale, and then normalizing the color space of the input image as shown in Equation (10). By adjusting the contrast of the image, the influence of local shadows and lighting changes in the image is reduced, while noise interference is suppressed. The gamma coefficient is preferably 1 / 2.

[0062] (10)

[0063] Secondly, the size and orientation gradient of each pixel in the image are calculated as shown in Equations (11) and (12) to capture contour information and further reduce the interference of illumination.

[0064] (11)

[0065] (12)

[0066] in, The size of the gradient for each pixel, For the direction of the gradient for each pixel, then and , , .

[0067] Finally, the image is segmented into units, and the number of gradients in the gradient histogram of each unit is counted. The segmented units are then regrouped, and the feature values ​​obtained after regrouping are used as directional gradient histogram features. Thus, the edge semantic processing representing the lesion region is completed.

[0068] Step 2.4: Extract local binary pattern feature values ​​from the image to characterize the texture semantic processing of the lesion area.

[0069] In this embodiment, for the extraction of local binary pattern feature values ​​of an image, a 3*3 window is defined as an example. Using the center pixel of the window as a threshold, the grayscale values ​​of the eight adjacent pixels are compared with it. If the surrounding pixel values ​​are greater than the center pixel value, the position of that pixel is marked as 1; otherwise, it is marked as 0. This yields the local binary pattern feature value of the center pixel of the 3*3 window. Thus, the texture semantic processing representing the lesion region is completed.

[0070] Step 2.5: Extract Haar-like feature values ​​to characterize the gray-scale change features of the lesion area.

[0071] In this embodiment, edge features, linear features, center features, and diagonal features of the image are extracted and combined to form a feature template. The feature template contains two types of rectangles: white and black, and its feature value is defined as the sum of the white rectangle pixels minus the sum of the black rectangle pixels.

[0072] Step 2.6: Construct an image retrieval index based on the feature values ​​obtained in steps 2.3 to 2.5 above, in order to improve the accuracy of medical image retrieval.

[0073] In the embodiment, the above three eigenvalues ​​are analyzed using a similarity matrix. The image retrieval index is constructed using the data labels shown in Equation (13).

[0074] (13)

[0075] When at least one of the tags is the same, When the samples are different for all labels, .

[0076] Step 2.6: Construct an image retrieval index based on the feature values ​​obtained in steps 2.3 to 2.5 above, in order to improve the accuracy of medical image retrieval.

[0077] Step 3: Based on the image retrieval index obtained in Step 2, optimize the medical image retrieval method using the Dynamic Local Sensitive Hash (DHS) method and the Weighted k-Nearest Neighbors (KNN) algorithm.

[0078] Step 3.1: Based on the index dataset obtained in Step 2 The image feature values ​​are assigned hash addresses to construct hash functions and mapped to hash tables, which is the dynamic locality-sensitive hashing method.

[0079] In this embodiment, with a fixed hash table length, performance drops sharply when there are many keywords and hash table clustering occurs. Therefore, the hash bucket granularity is dynamically adjusted to reduce hash collisions generated on that bucket during retrieval.

[0080] Step 3.2: Define the search keywords based on the tag vector L obtained in Step 2.

[0081] Step 3.3: Establish the correspondence between search keywords and hash functions;

[0082] Step 3.3.1: To ensure a stable distribution of data in the hash table, the hash function is defined as shown in equation (14):

[0083] (14)

[0084] Where S is a random n-dimensional vector following a standard normal distribution N(0,1), It is a data set vector. Let W be a random integer selected from (0, W). It is the length of a segment on the straight line;

[0085] Step 3.3.2: Construct a composite hash function and set up a multi-index hash table through the hash function, as shown in Equation (15); this is used to increase the collision probability of nearest neighbors and the non-collision probability of non-nearest neighbors in the hash table; thereby reducing the collision of the hash table on the hash bucket to improve the performance of hash table retrieval.

[0086]

[0087]

[0088] (15)

[0089] in, To randomly generate a matrix based on the dataset The matrix maps the dataset to V projection spaces in terms of dimensions.

[0090] In the embodiments, The dimension of the matrix That is, a series of individual hash functions are ,choose arrive Composition function As shown in equation (16).

[0091]

[0092]

[0093] (16)

[0094] Step 3.4: Access the image data in the hash table and use K-nearest neighbors to display the search results.

[0095] Step 3.4.1: Input the keyword to search for, calculate the address of the query point falling into each hash function. If the hash function family is constructed from n hash functions, then n addresses can be calculated.

[0096] Step 3.4.2: Calculate the distance between the address and the remaining addresses in the neighborhood of the n search addresses in Step 3.4.1 in the hash table, forming a local neighborhood structure; the distance measure of the local neighborhood structure is shown in Equation (17):

[0097] (17)

[0098] in, The hash address obtained in step 3.4.1 , for In the field and Similar points, that is, except outer distance The k most recent hash addresses, yes From its neighborhood The obtained reconstructed matrix weights, yes From its neighborhood The obtained reconstructed matrix weights, for The set of local neighborhood points; that is, constructing the linear neighborhood weight matrix. As shown in equation (4), it is used for measurement and Similarity;

[0099] (18)

[0100] (19)

[0101] Among them, the linear neighborhood weight matrix must satisfy the condition shown in equation (19); Represents a local Gram matrix;

[0102] In this embodiment, the image feature information corresponding to the label is used as the input matrix, and the point is found using a local neighborhood structure distance metric method. The nearest neighbor points are given, and constraints are set on the reconstructed matrix. The weight is 0, that is , , Thus, a linear neighborhood weight matrix is ​​constructed. Use unlabeled data. Transmit label information using the label vector as shown in equation (20). This minimizes the resulting reconstruction error, thereby obtaining category information for the unlabeled data.

[0103] (20)

[0104] The category information of the unlabeled data is iteratively optimized using equation (21) to obtain the following result. After the second iteration, the data points The category information is

[0105] (twenty one)

[0106] in, , is a data point Adjustment factor for obtaining label information from nearest neighbors; Representing data points pass The category information after the next iteration. This is achieved by finding the data points corresponding to the category information after the next iteration. The corresponding hash address information of the data point is obtained from its nearest neighbors, as shown in equation (22). .

[0107] (twenty two)

[0108] in, This is new test data without label information, nearest neighbor points. Data obtained from the original data and K-nearest neighbors, According to The distance, from 1~ Sort in ascending order represent and The weights between them. It is a nearest neighbor point Belongs to the The probability of a class. When hour, , hour, .

[0109] Step 3.4.3: Sort the results according to the obtained distances and select the K nearest neighbor search results for display.

[0110] In this embodiment, K in the K-nearest neighbor algorithm represents the K images most similar to the direct retrieval results in image retrieval. In the actual retrieval process, this value should be a positive integer not exceeding the amount of image data in the retrieval database. The parameter K is preferably 5 or 7.

[0111] Table 1. Results of the Database Image Recall Comparison Experiment

[0112] lung 86 98 liver 88 95 kidney 92 98 chest X-ray 90 97

[0113] from Figure 2 , Figure 3 , Figure 4 , Figure 5As shown in Tables 1 and 2, the precision of this invention for the four keywords "lung," "liver," "kidney," and "chest X-ray" in the database reached 98%, 95%, 98%, and 97%, respectively, while the recall reached 92%, 97%, 94%, and 98%, respectively. To further evaluate the superiority of this invention, the traditional hash algorithm before its improvement was chosen as a comparison method. As can be seen from the tables, through improvements to the hash table and hash function, as well as optimization of the K-nearest neighbor algorithm, the precision of this invention for the four keywords "lung," "liver," "kidney," and "chest X-ray" was improved by 12%, 7%, 6%, and 7%, respectively, while the recall was improved by 5%, 12%, 3%, and 9%, respectively.

[0114] Table 2. Results of the Database Image Precision Comparison Experiment

[0115] lung 87 92 liver 85 97 kidney 91 94 chest X-ray 89 98

[0116] Table 3. Comparison of Experimental Results on Database Image Search Time

[0117] Average search time 19.6975 15.0718

[0118] Furthermore, Table 3 provides the average time required to retrieve images in the database for the present invention and traditional hash algorithms. As can be seen from the table, the present invention reduces the retrieval time by 21% by optimizing the retrieval process.

[0119] The results show that the medical image retrieval method based on approximate matching dynamic local sensitive hashing proposed in this invention can significantly improve the accuracy of image retrieval and reduce the time required for image retrieval.

Claims

1. A medical image retrieval method based on approximate matching dynamic locality-sensitive hashing, characterized in that: Includes the following steps, Step 1: Input image data into the original image database; Step 2: Extract directional gradient histogram feature values, local binary pattern feature values, and Haar-like feature values ​​from the image data obtained in Step 1 to construct an image retrieval index; Step 3: Based on the image retrieval index obtained in Step 2, optimize the medical image retrieval method using the Dynamic Local Sensitive Hash (DHS) method and the Weighted k-Nearest Neighbors (KNN) algorithm; Step 3.1: Based on the index dataset obtained in Step 2 The image feature values ​​are assigned hash addresses to construct hash functions and mapped to hash tables, i.e., the Dynamic Locality Sensitive Hash (DLHS) method. Step 3.2: Define the search keywords based on the tag vector L obtained in Step 2; Step 3.3: Establish the correspondence between search keywords and hash functions; Step 3.3.1: To ensure a stable distribution of data in the hash table, the hash function is defined as shown in equation (1): (1) Where S is a random n-dimensional vector following a standard normal distribution N(0,1). It is a data set vector. Let W be a random integer selected from (0, W). It is the length of the segment on the straight line; Step 3.3.2: Construct a composite hash function and set up a multi-index hash table using a hash function, as shown in equation (2); This is used to increase the collision probability of nearest neighbors and the non-collision probability of non-nearest neighbors in a hash table; thereby reducing collisions in the hash bucket and improving the performance of hash table retrieval. (2) in, To randomly generate a matrix based on the dataset The matrix maps the dataset to V projection spaces in terms of dimensions. Step 3.4: Access and retrieve image data from the hash table, and use K-nearest neighbors to display the retrieval results; Step 3.4.1: Input the keyword to search for, calculate the address of the query point falling into each hash function. If the hash function family is constructed from n hash functions, then n addresses can be calculated. Step 3.4.2: Calculate the distance between the address and the remaining addresses in the neighborhood of the n search addresses in Step 3.4.1 in the hash table, forming a local neighborhood structure; the distance measure of the local neighborhood structure is shown in Equation (3): (3) in, The hash address obtained in step 3.4.1 , for In the field and Similar points, that is, except outer distance The k most recent hash addresses, yes From its neighborhood The obtained reconstructed matrix weights, yes From its neighborhood The obtained reconstructed matrix weights, for The set of local neighborhood points; that is, constructing the linear neighborhood weight matrix. As shown in equation (4), it is used for measurement and Similarity; (4) (5) Among them, the linear neighborhood weight matrix must satisfy the condition shown in equation (5); Represents a local Gram matrix; Step 3.4.3: Sort the results according to the obtained distances and select the K nearest neighbor search results for display.

2. The medical image retrieval method based on approximate matching and dynamic locality-sensitive hashing as described in claim 1, characterized in that: The parameter K is set to 7.

3. The medical image retrieval method based on approximate matching and dynamic locality-sensitive hashing as described in claim 1, characterized in that: Step 2 is implemented as follows: Step 2.1: Building Indexed dataset of images As shown in equation (6): (6) After inputting image data, an indexed image database is formed. Indexed dataset of images ;in The central index of the representative dataset is An image; Step 2.2: Indexing the dataset For each image, a corresponding label vector L is defined, as shown in equation (7): (7) in, , Used to count the total number of label categories in index dataset I, where each label represents the category to which the current image belongs; Step 2.3: Extract the histogram of oriented gradients (HGRs) feature values ​​from the image, which are used to characterize the edge semantic processing of the lesion region; Step 2.4: Extract local binary pattern feature values ​​from the image to characterize the texture semantic processing of the lesion area; Step 2.5: Extract Haar-like feature values ​​to characterize the gray-scale change features of the lesion area; Step 2.6: Construct an image retrieval index based on the feature values ​​obtained in steps 2.3 to 2.5 above, in order to improve the accuracy of medical image retrieval.

Citation Information

Patent Citations

  • Method for detecting approximately repeated image

    CN106570141A

  • Hierarchical structure-based local sensitive hash image indexing method

    CN109829066A