Abstract
BACKGROUND:
Gynecological diseases threaten women’s health, and vaginal microecological testing is a common method for detecting gynecological diseases. Efficient and accurate microecological testing methods have always been the goal pursued by gynecologists.
OBJECTIVE:
In order to automatically identify different types of microbial images in vaginal micromorphology detection, this paper proposes a vaginal microecological image recognition method based on Gabor texture analysis combined with long and short-term memory network (LSTM) model.
METHOD:
Firstly, we denoise the microecological morphological im-ages, which selects the area of interest and sets the label of the microorganism according to the doctors label. Secondly, texture analysis is carried out for the region of interest, which uses Gabor filters with 8 directions and 5 scales to filter the region of interest to extract the texture features on the image. Comparing the differences between different microbial image features, and screening suitable features to reduce the number of features. Then, we design an LSTM model to analyze the relationship of image features in different categories of microorganisms. Finally, we use the full connection layer and Softmax function to realize the automatic recognition of different microbial images.
RESULTS:
The experimental results show that the image classification accuracy of 8 common microorganisms is 81.26%.
CONCLUSION:
Texture analysis combined with LSTM network strategy can identify different kinds of vaginal micro ecological images. Gabor-LSTM model has better classification effect on imbalanced data sets.
Introduction
Gynecological diseases seriously threaten women’s health. Vaginal microecological detection is a common method for gynecological diseases. This method can effectively evaluate women’s health status and guide doctors to treat gynecological diseases [1]. The detection technology of gynecological vaginal microecology includes morphological detection and functional detection. Microecological functional detection mainly relies on equipment and reagents, while morphological detection mainly relies on artificial recognition. There is a certain subjectivity in artificial recognition. Therefore, morphological detection has become a shortcoming that restricts the further promotion of microecological detection technology [2]. How to carry out vaginal morphological examination without interference from external factors has become the focus of vaginal microecological examination.
There are many researches on the detection of microecological morphology. Bai et al. [3] found that there was a close relationship between intestinal microecological environment and gastrointestinal tumors. Therefore, intestinal microecological detection can detect tumors in time and play a key role in clinical diagnosis. Yan et al. [4] analyzed the microecology of nasopharynx. It was found that the microbial species in nasopharyngeal position was more abundant, and this study played a guiding role in the diagnosis of upper respiratory diseases. In the field of vaginal microecology detection, Brotman et al. [5] found that the imbalance of vaginal microecology was significantly associated with HPV infection. Clinicians can determine whether they have HPV infection based on vaginal microecological testing. It can be seen that human microecological detection plays a very important role in disease diagnosis.
Clinical examination based on microecological morphology has obvious advantages, which can detect diseases early and has high clinical value, attracting many people to conduct research [6]. In mainland China alone, there are a number of first-class hospitals such as Beijing Tsinghua Changgung Hospital and Peking University First Hospital for research [7]. However, data collection is difficult due to the large number of microbial categories and uneven distribution. And most of the data are unbalanced, which brings great challenges to microbial classification and identification. Many researchers are also trying to solve the above problems.
The main purpose of this paper is to improve the accuracy in the detection of vaginal microecologic morphology. According to the image data of microecology, the distribution of each colony is very uneven. The imbalance of data sets brings great challenges to the construction of classification model. We propose a classification model to classify 8 microecological images. Our model is composed of Gabor texture feature and LSTM classification model. There are differences in the texture of different microbe images. We use Gabor filter to obtain image texture features and select the features. LSTM method was used to classify the screened features. The classification accuracy, sensitivity, specificity and other indicators are compared, and the parameters are constantly adjusted to build the best classification model. The experimental results show that the proposed model is very effective in distinguishing different types of microecological images, with a classification accuracy of 81.26%. Although the data is very uneven, our model can identify eight microbial characteristics. It shows that our strategy has certain advantages in the identification of micro ecological colonies.
Related work
Machine learning and pattern recognition technology have developed rapidly and have been applied in many fields. In particular, in the field of image processing, image feature extraction combined with machine learning algorithm can be used to complete image classification efficiently. There are many methods of feature analysis, including principal component analysis [8], linear discriminant analysis [9], texture analysis [10] and so on. These methods can extract the features of different images and assist the computer to process different types of images.
Texture analysis of medical images
Texture analysis is widely used in medical image processing. For example, Kondo et al. [11] analyzed the ultrasonic images of liver cancer and used support vector machine model to classify the features. The experimental results show that different types of liver cancer can be classified by image features with a classification accuracy of 84.4%. Liu et al. [12] established a support vector machine classification model which is based on the Gabor wavelet texture analysis to predict the primary central nervous system lymphoma (PCNSL) and glioblastoma multiforme (GBM). The result shows that the model can distinguish different diagnosis categories of tumor images. It shows that the Gabor analysis of MRI can distinguish different types of tumors. Their work shows that texture analysis combined with machine learning algorithms is effective in image classification. In recent years, deep learning has developed rapidly, and many researchers have tried to use neural network models to analyze medical images. Kooi et al. [13] applied a convolutional neural network to the recognition of malignant lesions of breast cancer. This method can achieve better recognition results at low sensitivity in comparison with traditional computer-aided methods, and the accuracy rate of this method will be higher at high sensitivity. This shows that neural network is superior to traditional image recognition methods and deep learning algorithm has great advantages in image processing.
Medical examination image processing and recognition
Image processing technology is widely used in medical examination image processing. Many researchers have tried to use machine learning algorithms to process microscopic images. Spanho et al. [14] extracted features from the images on the BreaKHis breast pathology data set, and then used a machine learning model to classify the images with an accuracy of 85%. Experiments have shown that this method can distinguish between different pathological findings of breast diseases. However, this method only classifies 6 image features, and the results cannot be well extended to other pathological images. Sharma et al. [15] used a convolutional neural network to classify three grades of malignancy in a small sample of gastric cancer data set. Good results were obtained in the experiment. However, this method only uses convolutional network to extract image features, which is time-consuming and has some limitations. Coudray et al. [16] used an architecture based on Inception network to distinguish pathological images of lung cancer. The experiment worked very well. However, this method requires a lot of computing power and takes a long time. All the above methods have their own advantages and disadvantages [17], so the model needs to be further improved.
It can be seen that the image processing method has been widely used in the recognition of medical examination images and plays a very key role in the diagnosis of many diseases. Because the neural network model can automatically extract image variation features and has high classification accuracy, this model is favored by many researchers. The deep learning model requires a large number of samples to be learned, which requires too much data. Therefore, the advantages of using neural network model to process medical small-sample images are not obvious. There are a lot of studies on microecological morphological image detection, but most of them have problems such as less data and more kinds of microorganisms. How to construct an efficient and accurate classification model is one of the hot issues in current research.
Data and methods
In this paper, we propose an image classification model to classify micro ecological images. In this section, we mainly introduce the data set and the model framework.
Data acquisition
With the help of doctors from Tianjin Cancer Clinical Research Center, we collected 1800 micromorphological images of vaginal microecology with a size of 1200
Images of vaginal microecologic detection, (a) Original image, (b) Image after labeling.
As shown in the Fig. 1, a is the original image data, and b is the marked data. The yellow rectangle in Fig. 1b is the name of the marked microorganism. We tagged seven identified microbes. Some of the microbes that we don’t recognize, we’ve tagged them and described them as “other”.
Our model consists of data preprocessing, texture analysis, feature selection, LSTM network and full connection classification. The model structure is shown in Fig. 2.
Model structure diagram. Our method consists of data preprocessing, feature analysis, feature classification, LSTM network construction, full connection classification, etc.
Firstly, we denoise the original image, obtain the region of interest of the image, and set the region of interest label. Secondly, 8 directions and 5 scales of Gabor wavelet are used to filter the region of interest in order to obtain the texture features of the region of interest. According to the differences between features, feature selection is carried out to reduce the feature dimension. Then, we use LSTM network learning to screen the links between features to speed up model convergence and solve the gradient disappearance problem with lower computing cost. Finally, the automatic classification of different microbial images was completed by using the full connection layer and Softmax functions.
Image preprocessing is an important step before image texture feature. The main purpose of preprocessing is to complete image denoising, obtain the region of interest, and facilitate the construction of classification model. Because the microecological image is the magnified image of the microscope, there will be noise under the influence of the microscope lens and staining reagent. Therefore, the original image should be denoised. Different image noise corresponds to diffeent image denoising methods. Affected by the microscope lens and stain, the original image has many noise points. Our main objective is to remove noise points from the image. Median filter is suitable for denoising the original image.
Median filtering is a nonlinear signal processing technique based on the sorting statistics theory to suppress noise. The basic principle of median filtering is to replace the median value of each point value in the adjacent domain of an image point, so that the surrounding pixel value is close to the true value, thus eliminating the denoising method of isolated noise points. In this method, a two-dimensional sliding template
Median filter denoising, (a) Original image, (b) Denoised image.
Where,
Quantity and proportion of various microorganisms
Texture analysis process diagram.
This section introduces three parts: image texture analysis, feature extraction and feature selection. The process of image texture analysis is shown in Fig. 4. Firstly, Gabor filter is used to analyze the features of 8 kinds of microbial images. Secondly, the filtered image is sampled to obtain the feature sequence. Then, according to the rule that the distance between different types of features is greater than the distance between the same type of features, the features are selected. Finally, three common classifiers are selected to classify the features, and the optimal number of features is found through experimental comparison.
Image texture analysis based on Gabor wavelet
Image texture is one of the most important features to describe and distinguish different objects. The microecomorphology image is the image under high power microscope, so we use the spectral method to extract the texture features of the image. We mainly use Gabor wavelet to analyze the spectral feature of images. Gabor texture feature is the shortened form of texture feature analyzed with multi-resolution filter based on Gabor wavelet [18]. Gabor wavelets have tunable orientation and radial scales bandwidths, tunable center scales, allowing them to optimally achieve joint resolution in the spatial and frequency domains. Due to the Gabor wavelets capture the local structure corresponding to spatial frequency (scales), spatial localization, and orientation selectivity, they are widely applied in many research areas, such as texture analysis and image segmentation.
The impulse response of Gabor filter can be defined as a cosine wave multiplied by a Gauss function [12]. The sharpness of the filter is controlled through the major axis and minor axis, which is perpendicular to the wave. The filter can be defined as:
Where,
Where,
Gabor wavelet function, 
In the process of generating Gabor filter banks, the selection of direction and scale is crucial. As shown in Fig. 5, Gabor wavelet functions with five scales and eight directions are selected.
Since microorganisms have no color, in order to facilitate observation in microscopic images, coloring agents are often used to stain the microorganisms for easy observation. In order to reduce the influence of dye color on microbial classification, we convert the original image to grayscale image, and then used Gabor to filter the ROI. The filtering process is shown in Fig. 6.
Gabor texture filtering process diagram.
After the ROI filtering, the corresponding feature images are obtained and analyzed. 40 groups of feature images can be obtained from each image, with the size of 56
Feature sampling graph.
The sampling feature length obtained by sampling the features successively in 64 units is 1960. Since there are many redundant or irrelevant features in the high-dimensional data, we need to select the features and select the key features by analyzing the separability of the features. We mainly judge and sort the separability of features to complete feature selecting. The method of feature selection is as follows.
Firstly, we normalized the feature data, because using Gabor filters with different scales to extract features, the difference of feature values is too large, leading to large experimental errors. Specifically, we use the deviation standardization method to map the eigenvalues to between
Where: Secondly, due to the commonness among samples of the same kind of objects, the attribute distance between samples of the same kind should be smaller than that between samples of different kinds. Therefore, we sort the features according to the inter-class distance, and the calculation formula is as follows.
Where, Thirdly, in order to select out the key features, we calculate the distance from each attribute point to the point set in turn. And sorting the properties according to the distance value. The sorting formula is as follows.
Where:
The long short-term memory (LSTM) network is a recurrent neural network. The traditional cyclic neural network has the problem of gradient disappearance when dealing with the long-term dependence problem. However, LSTM network model introduces memory unit and forgetting gate. Therefore, the model can determine what information should be remembered based on the state of the input and the previous time. Due to its unique design structure, the LSTM network is well suited for processing and predicting important events with very long intervals and delays in time series. We convert texture features into sequence information and classify them by LSTM model.
LSTM network structure.
LSTM network is very suitable for the prediction of sequence model. The network structure is shown in Fig. 8. As shown in the Fig. 8,
Where,
Where
In the process of feature analysis, we select features and sort them according to their separability. We select different number of features in turn, classify these features, and compare the classification results. According to the classification results, we choose the most suitable number of key features.
We select different number of key features in turn and put them into the constructed classification model as input layer. Because of the special gate structure of LSTM network, it can not only improve gradient disappearance and gradient explosion problems, but also excavate the feature sequence, analyze the deep features among different microbial images and learn and map them. This enables the LSTM network to capture the connections that exist in the feature sequence. At the end of the model, we use the full connection layer and the Softmax function to calculate the prediction probability according to the output of the LSTM unit to complete the classification of different microbial images.
We build the LSTM classification network model of input layer, hidden layer and full connection layer. Combined with the classification accuracy, we constantly adjust the size of each layer to find the best model parameters. The LSTM network model we adopted has a maximum training cycle of 80 and block size of 50. We adopt adam to optimize the network structure. We select different number of feature sequences and different sizes of hidden layers. The experimental results are shown in the Fig. 9. As can be seen from the figure, when the number of key features is 20
Classification accuracy chart of models with different parameter values.
We transferred the final output of the LSTM network to the full connection layer and used the Softmax activation function to divide the features into eight pre-marked categories. The 8 nodes in the Softmax layer respectively represent the probabilities of 8 image types of microorganisms. The formula for calculating the probability
where
Table 2 shows the structure of LSTM network model after parameter adjustment.
LSTM network model parameters
In order to verify the accuracy of the model, K-fold cross validation is used to cross-verify the classified data. The K-fold cross validation is the most common cross validation method. The basic idea is to divide the data set into
Where,
Accuracy refers to the proportion of correctly classified
Where,
The sensitivity is the percentage of samples with positive detection in the total number of samples. The higher the sensitivity is, the lower the rate of missed diagnosis will be. Its calculation formula is as follows.
Specificity is also called true negative rate, which refers to the ratio between the number of negative samples classified as negative and the actual number of negative samples. The higher the specificity is, the lower the rate of misdiagnosis will be. Its calculation formula is:
The overall accuracy (OA) is the index to measure the classification ability of the overall model, and its calculation formula is as follows.
Where,
Our experimental environment is windows10 operating system, matlab2020a. The experimental results are cross-verified by a factor of 10, and the letters S, H, As, B, N, C, Ah and I are used to represent the 8 categories of microorganisms. We use the model to show the classification results. We use the obfuscation matrix to display the classification results, as shown in Fig. 10.
It can be seen from the figure that the model proposed by us has a good effect on the discrimination of 8 microbe images. We calculated the classification index of each category in turn. The experimental results are shown in Table 3. From Table 3, the overall classification accuracy of our proposed model is 81.26%.
The experimental results
The experimental results
Confusion matrix.
In order to compare the classification effect of different models, we use Bayesian classifier, k-nearest neighbor classifier and random forest classifier to classify Gabor features. The results are as follows:
Bayesian classification: Bayesian classification is a relatively simple classification algorithm [19]. The basic idea of this algorithm is to first give the options to be classified, and then solve the probability of each option under this condition. Finally, the category of the item is judged according to the probability. The results of Bayesian classification are shown in Fig. 11. As can be seen from the Fig. 11, we screened 6
Bayesian classification results.
K-nearest neighbor classification: K nearest neighbor (KNN) classification is a supervised learning algorithm, which determines the category of the test sample by calculating the distance between the test sample and all the training samples [20]. The algorithm has the advantages of few parameters and short training time. We selected different numbers of features in turn and verified the optimal classification accuracy by adjusting the K value of KNN algorithm. The results are shown in Fig. 12. As can be seen from the Fig. 12, when the number of features is 345 and K value is 4, the classification accuracy is the highest 76.9231%.
K-nearest neighbor classification results.
Random forest classification: Random forest is an algorithm that integrates multiple trees through the idea of integrated learning. Its basic unit is decision tree, and its essence belongs to integrated learning method [21]. We selected different number of image features and different number of trees in turn for classification. The classification results are shown in Fig. 13. It can be seen from the Fig. 13 that the classification accuracy of random forest is between 62%
Classification results of different texture features
Results of random forest classification.
We compare the results of common texture feature classification such as Gabor feature, LAWs feature, Tamura feature and GLCM, and the results of PCA method for feature extraction of original images [22]. We use bayesian, KNN, random forest and other classifiers to classify the above characteristics in turn, and the results were shown in Table 4. It can be seen from the classification results that Gabor features have a very good effect on distinguishing different types of microorganisms. KNN classifier is used, and the highest classification accuracy is 76.9231%. In order to verify the influence of LSTM network on feature classification, we input the above features into LSTM network and classify them. The classification results are shown in Fig. 14. As shown in the figure, four features of Gabor, LAWs, Tamura and GLCM were selected and combined with LSTM algorithm and SVM algorithm respectively for experiments. The results show that Gabor combined with LSTM model has the optimal classification accuracy, reaching 81.26%, which proves that the model proposed by us is feasible.
Classification accuracy map of different texture features combined with LSTM network and SVM.
Confusion matrix of Gabor-LSTM model and CNN model.
At the same time, we use the current popular deep learning classification method to classify eight categories of images. We use convolution neural network model to classify eight categories of image data, randomly select 3000 images as training data, and the remaining images are classified as test data. The confusion matrix of test set classification results is shown in the Fig. 15. It can be seen from the figure that there is little difference between the two models, but Gabor-LSTM model can recognize multiple small samples. We compare the two models and compare the accuracy of the eight categories and the overall accuracy respectively. The results are shown in the Fig. 16. It can be seen that although the recognition accuracy of CNN model is higher than that of our proposed model, there are a lot of misjudgments and even can not be correctly classified on unbalanced data sets. The strategy of image texture analysis can solve this problem.
Comparison of accuracy between Gabor-LSTM model and CNN model.
Due to the feature analysis and selection, the number of features is reduced. Therefore, the training time of our model is much shorter than that of deep learning method. In addition, our model has some advantages in dealing with unbalanced data.
It is well known that the detection of vaginal microecologic morphology plays a very important role in the diagnosis and treatment of gynecological diseases in women. Our scheme was able to identify images of eight different types of microbes. Therefore, our model has very important clinical value.
Conclusions
For imbalanced data, we propose a texture analysis combined with feature selection scheme, which can effectively improve the classification accuracy. We have proved the feasibility of our scheme through experimental comparison. The images detected by vaginal microecological morphology can be classified and predicted by texture features combined with LSTM model. Different texture features can distinguish different types of microorganisms, and neural network model can be combined to obtain better classification effect. Compared with the traditional method, our model has better accuracy. Compared with deep learning method, our model is more efficient and has more advantages in dealing with unbalanced data.
The microecological image recognition method proposed in this paper can accurately and quickly identify different microbial categories. It can provide guidance for clinicians to predict the disease. Therefore, our method has high clinical value. The experiment also shows that image texture feature analysis can be applied to micro-ecological image recognition, and Gabor feature has great advantages in distinguishing different microbial images.
Future prospects
In the follow-up work, we will focus on improving the classification accuracy, and at the same time complete the detection of micro-ecological image targets. By constructing target detection combined with target classification model, we can better assist doctors to evaluate treatment.
