Lung nodule CT image reordering method based on self-adaptive weight
1. A lung nodule CT image reordering method based on self-adaptive weight is characterized in that: the method comprises the following steps:
the method comprises the following steps: image dataset acquisition: the image data set comprises a lung CT image to be retrieved and a lung CT image in an image library;
step two: image preprocessing: carrying out image preprocessing on the lung CT image to be retrieved and the lung CT image in the image library, and intercepting a minimum circumscribed rectangle image taking RIO as a center to obtain the lung nodule CT image to be retrieved and the lung nodule CT image in the image library;
step three: image feature extraction: inputting the preprocessed lung nodule CT image into a CNN network for depth feature extraction;
step four: calculating the self-adaptive weight of different Hash code bits;
step five: similarity measurement: and sequencing the lung nodule CT image to be retrieved and the lung nodule CT images in the image library according to the Hamming distance to obtain the lung nodule CT image with the maximum similarity.
2. The method for reordering the CT images of lung nodules based on adaptive weight as claimed in claim 1, wherein: the lung CT image in the image library in the first step is specifically the lung CT image in the public LIDC database.
3. The method for reordering the CT images of lung nodules based on adaptive weight as claimed in claim 1, wherein: and in the third step, when the depth feature extraction is carried out on the lung nodule CT image, the principal component analysis is carried out on the feature matrix through PCA.
4. The method for reordering the CT images of lung nodules based on adaptive weight as claimed in claim 1, wherein: the adaptive weights for different hash code bits in the fourth step are specifically as follows:
step 4.1: suppose the lung nodule CT image to be retrieved is characterized by Cq=[C1,C2,...,Cn]The hash feature after mapping is Hq=[h1,h2,...,hn]Wherein n represents hash code bits;
step 4.2: suppose a lung nodule CT image in the image library is characterized by Imgq=[I1,I2,...,In]The hash feature after mapping is Himg=[himg1,himg2,...,himgn];
Step 4.3: and (3) weight calculation:
in the above formula: ciRepresenting the distance, K, between the feature vector of each dimension and the coordinate axis of the corresponding dimensioniRepresenting the mean of all feature vectors and the distance of the coordinate axis corresponding to each dimension.
5. The method for reordering CT images of lung nodules based on adaptive weight as claimed in claim 4, wherein: the similarity measurement in the step five specifically comprises the following steps:
step 5.1: similarity measurement between the lung nodule CT image to be retrieved and the lung nodule CT image in the image library is calculated through a Hamming distance, and the formula is as follows:
step 5.2: by sorting D from small to large, the most similar CT images of lung nodules are obtained.
Background
In the search of the lung nodule CT image, the higher the rank of the searched image in the image library, the more similar the image is to the image to be searched. Among the existing methods for image retrieval, the hash algorithm is widely used. The image to be retrieved and the images in the image library are subjected to Hash mapping by using a Hash algorithm, the image characteristics are mapped into a fixed-bit Hash code, and then the Hash code of the image to be retrieved and the Hash codes of the images in the image library are subjected to similarity measurement comparison. And finally, sequencing according to the similarity from large to small to give the most similar lung nodule CT image.
However, the current image reordering algorithms including greedy algorithm, QsRank, hypergraph, etc. have their algorithm limitations. The greedy algorithm depends on whether the first seed image is the closest to the image to be retrieved, and if the seed image is not properly selected, the sequencing result is not accurate. The QsRank algorithm is only effective for PCA principal component analysis hash algorithm, and the accuracy of other hash algorithms is not obviously improved, so that the QsRank algorithm has no robustness. The hypergraph algorithm takes into account affinity relationships between different images so that the amount of computation is greatly increased.
Therefore, a lung nodule CT image reordering method based on adaptive weight is provided, and the contribution degree of each dimension feature vector to the image feature is reflected by adding the adaptive weight.
Disclosure of Invention
In order to overcome the defects in the prior art, the invention aims to solve the technical problems that: an improvement of a lung nodule CT image reordering method based on adaptive weight is provided.
In order to solve the technical problems, the invention adopts the technical scheme that: a lung nodule CT image reordering method based on self-adaptive weight comprises the following steps:
the method comprises the following steps: image dataset acquisition: the image data set comprises a lung CT image to be retrieved and a lung CT image in an image library;
step two: image preprocessing: carrying out image preprocessing on the lung CT image to be retrieved and the lung CT image in the image library, and intercepting a minimum circumscribed rectangle image taking RIO as a center to obtain the lung nodule CT image to be retrieved and the lung nodule CT image in the image library;
step three: image feature extraction: inputting the preprocessed lung nodule CT image into a CNN network for depth feature extraction;
step four: calculating the self-adaptive weight of different Hash code bits;
step five: similarity measurement: and sequencing the lung nodule CT image to be retrieved and the lung nodule CT images in the image library according to the Hamming distance to obtain the lung nodule CT image with the maximum similarity.
The lung CT image in the image library in the first step is specifically the lung CT image in the public LIDC database.
And in the third step, when the depth feature extraction is carried out on the lung nodule CT image, the principal component analysis is carried out on the feature matrix through PCA.
The adaptive weights for different hash code bits in the fourth step are specifically as follows:
step 4.1: suppose the lung nodule CT image to be retrieved is characterized by Cq=[C1,C2,...,Cn]The hash feature after mapping is Hq=[h1,h2,...,hn]Wherein n represents hash code bits;
step 4.2: suppose a lung nodule CT image in the image library is characterized by Imgq=[I1,I2,...,In]The hash feature after mapping is Himg=[himg1,himg2,...,himgn];
Step 4.3: and (3) weight calculation:
in the above formula: ciRepresenting the distance, K, between the feature vector of each dimension and the coordinate axis of the corresponding dimensioniRepresenting the mean of all feature vectors and the distance of the coordinate axis corresponding to each dimension.
The similarity measurement in the step five specifically comprises the following steps:
step 5.1: similarity measurement between the lung nodule CT image to be retrieved and the lung nodule CT image in the image library is calculated through a Hamming distance, and the formula is as follows:
step 5.2: by sorting D from small to large, the most similar CT images of lung nodules are obtained.
Compared with the prior art, the invention has the beneficial effects that: the lung nodule CT image reordering method based on the self-adaptive weight fully considers the contribution degree of hash codes of different bits to image characteristics, and provides the self-adaptive weight of different code bits; when similarity measurement is carried out, the Hamming distances are sequenced from small to large, and the calculation complexity of Euclidean distance measurement is greatly reduced.
Drawings
The invention is further described below with reference to the accompanying drawings:
FIG. 1 is a block diagram of the method of the present invention.
Detailed Description
As shown in fig. 1, the lung nodule CT image reordering method based on adaptive weight of the present invention includes the following steps:
the method comprises the following steps: image dataset acquisition: the image data set comprises a lung CT image to be retrieved and a lung CT image in an image library;
step two: image preprocessing: carrying out image preprocessing on the lung CT image to be retrieved and the lung CT image in the image library, and intercepting a minimum circumscribed rectangle image taking RIO as a center to obtain the lung nodule CT image to be retrieved and the lung nodule CT image in the image library;
step three: image feature extraction: inputting the preprocessed lung nodule CT image into a CNN network for depth feature extraction;
step four: calculating the self-adaptive weight of different Hash code bits;
step five: similarity measurement: and sequencing the lung nodule CT image to be retrieved and the lung nodule CT images in the image library according to the Hamming distance to obtain the lung nodule CT image with the maximum similarity.
The lung CT image in the image library in the first step is specifically the lung CT image in the public LIDC database.
And in the third step, when the depth feature extraction is carried out on the lung nodule CT image, the principal component analysis is carried out on the feature matrix through PCA.
The adaptive weights for different hash code bits in the fourth step are specifically as follows:
step 4.1: suppose the lung nodule CT image to be retrieved is characterized by Cq=[C1,C2,...,Cn]The hash feature after mapping is Hq=[h1,h2,...,hn]Wherein n represents hash code bits;
step 4.2: suppose a lung nodule CT image in the image library is characterized by Imgq=[I1,I2,...,In]The hash feature after mapping is Himg=[himg1,himg2,...,himgn];
Step 4.3: and (3) weight calculation:
in the above formula: ciRepresenting the distance, K, between the feature vector of each dimension and the coordinate axis of the corresponding dimensioniRepresenting the mean of all feature vectors and the distance of the coordinate axis corresponding to each dimension.
The similarity measurement in the step five specifically comprises the following steps:
step 5.1: similarity measurement between the lung nodule CT image to be retrieved and the lung nodule CT image in the image library is calculated through a Hamming distance, and the formula is as follows:
step 5.2: by sorting D from small to large, the most similar CT images of lung nodules are obtained.
The lung nodule CT image reordering method based on the adaptive weight solves the problems that a pre-hash function uniformly maps the features, and the contribution degree of different positions to the features is not considered, so that the similarity between the partial lung nodule image which is ranked more front in the searched lung nodule CT image and the lung nodule image to be searched is not high, and therefore the lung nodule image is ordered by the adaptive weight of different hash code positions aiming at the problems.
The method comprises the following specific steps:
step A: and (4) image preprocessing, namely performing image preprocessing on the lung CT image in the public LIDC database, and intercepting a minimum circumscribed rectangle image taking the ROI as the center.
And B: and D, image feature extraction, namely inputting the processed lung nodule image obtained in the step A into a CNN network for depth feature extraction. Since some values in the feature matrix are 0, there is no meaning for the image feature, so the principal component analysis of PCA is performed on the feature.
And C: weight design and Hash mapping.
Suppose the lung nodule CT image to be retrieved is characterized by Cq=[C1,C2,...,Cn]The hash feature after mapping is Hq=[h1,h2,...,hn]Whereinn represents the hash code bit. The lung nodule image in the image library is characterized by Imgq=[I1,I2,...,In]The hash feature after mapping is Himg=[himg1,himg2,...,himgn]. The weight formula provided by the invention is as follows:wherein C isiRepresenting the distance between each dimension feature vector and the corresponding dimension coordinate axis. KiRepresenting the mean of all feature vectors and the distance of the coordinate axis corresponding to each dimension. In the present invention, it can be seen that the weight of each dimension feature vector is calculated according to the distance between the feature vector and each dimension coordinate axis, and the longer the distance is, the smaller the weight is. Conversely, the closer the distance, the greater the weight.
Step D: a similarity measure.
Step 1: similarity measurement between the lung nodule image to be retrieved and images in an image library is calculated through a Hamming distance;
the formula is as follows:
step 2: by sorting D from small to large, the most similar CT images of lung nodules are obtained.
According to the invention, different bit hash codes have different contribution degrees to the image characteristics through the proposed adaptive weight function to quantize, so that the contribution degrees of the different bit hash codes to the image characteristics can be fully calculated and considered during similarity measurement, and the similarity of the retrieved similar images is the highest.
It should be noted that, regarding the specific structure of the present invention, the connection relationship between the modules adopted in the present invention is determined and can be realized, except for the specific description in the embodiment, the specific connection relationship can bring the corresponding technical effect, and the technical problem proposed by the present invention is solved on the premise of not depending on the execution of the corresponding software program.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.
- 上一篇:石墨接头机器人自动装卡簧、装栓机
- 下一篇:一种基于计算机的图像检索方法及装置