Abstract
The accurately automatic classification of medical pathological images has always been an important problem in the field of deep learning. However, the traditional manual extraction of features and image classification usually requires in-depth knowledge and more professional researchers to extract and calculate high-quality image features. This kind of operation generally takes a lot of time and the classification effect is not ideal. In order to solve these problems, this study proposes and tests an improved network model DenseNet-201-MSD to accomplish the task of classification of medical pathological images of breast cancer. First, the image is preprocessed, and the traditional pooling layer is replaced by multiple scaling decomposition to prevent overfitting due to the large dimension of the image data set. Second, the BN algorithm is added before the activation function Softmax and Adam is used in the optimizer to optimize performance of the network model and improve image recognition accuracy of the network model. By verifying the performance of the model using the BreakHis dataset, the new deep learning model yields image classification accuracy of 99.4%, 98.8%, 98.2%and 99.4%when applying to four different magnifications of pathological images, respectively. The study results demonstrate that this new classification method and deep learning model can effectively improve accuracy of pathological image classification, which indicates its potential value in future clinical application.
Keywords
Introduction
In medicine, cancer refers to the malignant tumor originated from epithelial tissue, is the most common type of malignant tumor. Cancer has become a major health problem worldwide. The latest data from the 2018 International Agency for Research on Cancer (IARC) survey is displayed. The incidence of breast cancer in female cancers worldwide is 24.2%, ranking first among female cancers, of which 52.9%occur in developing countries [1]. As a major killer of female diseases, a large number of clinical studies have shown that the method of breast cancer diagnosis is usually a preliminary examination through palpation, followed by regular re-examination using mammography or ultrasound imaging technology. Clinically, compared with mammography, ultrasound imaging, mammography and other techniques to check images, biopsy is an important method for doctors to diagnose breast cancer. Therefore, observing and studying the histopathological images of biopsy and analyzing the corresponding cancer category is an important basis for doctors to formulate the best treatment. Experts can evaluate and draw final conclusions based on the results of breast tissue biopsy. However, the process of diagnosing breast cancer is very time-consuming. Traditional manual diagnosis requires more professional experts and the workload is also very huge. Therefore, it is easy to misdiagnose for inexperienced experts.
In recent years, with the rapid development of digital image processing technology and computer vision technology, computer-aided diagnosis and treatment have become one of the research hotspots in the field of modern medical imaging [2–4]. At present, there are two main methods for image classification research on breast cancer histopathology: (1) Machine learning algorithms are used by researchers to process and analyze pathological images of breast tissue. This method extracts the feature information of pathological images by manual feature extraction [5]. Computers are used to learn these characteristics in order to determine the nature of the breast tissue. (2) Classification method based on deep learning [6, 7]. Deep learning allows the model to directly extract features from the input image, avoiding errors in manually extracting features, and reducing the consumption of manpower and material resources. As an important method of deep learning, convolutional neural networks have played a huge advantage in the field of image recognition and have also made major breakthroughs in medical image analysis. Convolutional neural networks have been gradually applied in breast histopathology. Compared with traditional machine learning algorithms, the biggest advantage of convolutional neural networks is that it can automatically extract feature information from histopathological images, eliminating the need for manual feature extraction.
In response to this challenge and problem, this research is based on deep learning algorithms. Based on the convolutional neural network model DenseNet-201, an improved DenseNet-201 model is explored. For pathological images of different resolutions, the idea of maximizing the variance of image segmentation and multiple scaling decomposition reduction is proposed. Data enhancement and transfer learning methods are combined. Breast cancer pathological image data set BreakHis is used by the model for training and testing and verify the accuracy and robustness of the method.
Related work
An algorithm to automatically generate the normalized target image of stains was proposed by Chuhan Hu et al. [8]. Bias in manually selected reference images were eliminated. The characteristics of H&E images were considered by the author. Elastic distortion combined with affine transformation for data enhancement was introduced and achieved 91%accuracy on the BreakHis dataset. Due to the complexity of breast tissue, accurate detection and classification of breast cancer were a key task in the field of medical imaging. Features of automatic extraction of image features based on deep learning, a new patch-based deep learning method called Pa-DBN-BC was proposed by Irum Hirra et al. [9]. Deep Belief Network (DBN) was used to detect and classify breast cancer on histopathological images. Through unsupervised pre-training and supervised fine-tuning stages to extract features, the network automatically extracts features from image patches, while logistic regression was used to classify patches from histopathological images, and the features extracted from patches were provided as input model. The entire slice histopathology image dataset of images from four different data groups was trained and tested with an accuracy of 86%. The advantages of convolutional neural networks and capsule networks were used by Pin Wang et al. [10].
Breast cancer histopathology image classification based on deep feature fusion and enhancement path (FE-BkCapsNet) was also proposed. Design a new dual-channel structure that can extract convolutional features and capsule features at the same time. Semantic features and spatial features were integrated into the new capsule to obtain more discriminative information. Embed the path process into the entire optimization process by modifying the loss function. This method was tested on the public data set BreakHis, and the accuracy of the four magnifications were 92%, 94%, 94%, and 93%. By assembling multiple compact convolutional neural networks, a classification of histopathological images of breast cancer was proposed by Chuang Zhu et al. [11]. The experimental results were shown, hybrid models were proposed to achieve performance comparable to the latest technology. Multi-model assembly scheme was used. This method was superior to the state-of-the-art methods in the patient-level and image-level accuracy of the BACH data set. A new hybrid convolution and recurrent deep neural network was proposed by Rui Yan et al. [12]. The short-term and long-term spatial correlations between patches directly integrated by RNN on the CNN feature extractor were considered by this method. The experimental results were shown, this method achieves an average accuracy of 90%in four classification tasks.
Additionally, a new type of breast cancer histopathological image classification method based on deep convolutional neural network was proposed by Benzheng Wei et al. [13] to solve two types of breast cancer classification problems on pathological images. In addition, an advanced data enhancement method was proposed to adapt to the recognition of the entire image and fully preserve the image edge features of the cancerous area. The experimental results were shown, the proposed method had higher classification accuracy. It showed good robustness and generalization. A 152-layer convolutional neural network based on residual learning was classified by Mahesh Gour et al. [14] designed breast cancer histopathological images. The model learns the rich ability to distinguish features from histopathological images and divides histopathological images into benign and malignant. To improve the performance of the developed model, a data enhancement technology based on dyeing normalization, image block generation and affine transformation was designed. The data enhancement method was adopted and achieved 92%accuracy in the classification of breast cancer histopathological images. Deep convolutional neural network combined with Ensemble learning method was adopted by SA Adeshina et al. [15]. The TensorFlow framework with backpropagation training and ReLU activation function was used to achieve accurate and automatic classification of these images. Achieved 91%of results on the breast cancer public data set.
Materials and methods
The optimization of convolutional neural networks has always been one of the hot topics in the field of deep learning. From the earliest LeNet-5 [16, 17], AlexNet [18], VGGNet [19, 20], ResNet [21] to the nearest Inceptionv3 [22]. The number of network model layers gradually increases, and thus the structure becomes more complex. Another method is to increase or improve the number of layers and algorithms in the network model to improve the generalization ability of the model. ImageNet [23] image classification data set has 1.2 million labeled pictures. In real applications, it is difficult to collect so much annotation data. Even if it can be collected, it will cost considerable manpower and material resources. Even with massive data sets, training a complex convolutional neural network takes days or even weeks. Figure 1 is displayed, in order to solve the above problems, Densenet-201 deep network learning model transfer learning is adopted in this article. Multi-scale dimensionality reduction is used to replace the pooling layer in the convolutional layer to multi-dimensionally zoom the pathological image of breast cancer tissue. The BN algorithm [24] is added before the softmax activation function of the convolutional layer and Adam is used as an optimizer. The data input to the activation function is used for batch normalization processing to improve the performance of the model and the accuracy of the image classification of the network model.

Image classification flow chart of the improved algorithm.
DenseNet is a convolutional neural network with dense connections. It connects all layers with each other, and each layer will be also connected with all the previous layers in the channel dimension. The DenseNet network structure is shown in Fig. 2, it can realize feature reuse and serve as input to the next layer. This not only slows down the disappearance of the gradient, but also enables it to achieve better performance than ResNet with fewer parameters and calculations.

DenseNet network structure.
The traditional convolutional neural network of the L layer has L connections (there is a connection between each layer and its subsequent layers). However, DenseNet contains
DenseNet-201 network model parameters
Dense Block is a module that contains many layers. The feature maps of each layer are of the same size, and dense connections are used between layers. The Transition module connects two adjacent Dense Blocks and reduces the size of the feature map through Pooling. Due to dense connection, the backpropagation of the gradient is boosted by DenseNet and the network is easier to train. Since each layer can directly reach the final error signal, an implicit “deep supervision” is realized. The error signal can easily propagate to earlier layers. Therefore, earlier layers can get direct supervision from the final classification layer. In a standard convolutional network, the final output will only be used to extract the highest-level features. But in DenseNet, it uses different levels of features and tends to give a smoother decision boundary.
Multiple scaling decomposition (MSD for short) [25] is a classic data dimensionality reduction method. It simplifies the research object (sample or variable) in the multi-dimensional space to the low-dimensional space for positioning, analysis and classification. At the same time, the data analysis method of the original relationship between the objects is retained.
Assume that the distance matrix of m samples in the original space is D ∈ Rn×n. The element dist ij in the i row and j column is the distance from sample x i to x j . Our goal is to obtain a representation of the sample in d′ dimensional space Z ∈ Rd′×n, d′ ≤ d. The Euclidean distance of any two samples in the d′ dimensional space is equal to the distance in the original space. which is ∥z i - z j ∥ = dist ij .
Command B = Z
T
Z ∈ Rm×m, B is the inner product matrix of the sample after dimensionality reduction b
ij
= z
i
T
z
j
.
For the convenience of discussion, the sample z after ordering dimensionality reduction is centralized, which is
Where tr (·) represents the trace of the matrix,
From Equation (2) and Equations (3)—(8), we can get
In this way, the inner product matrix B can be obtained by the distance matrix D that remains unchanged before and after the dimension reduction.
Do eigenvalue decomposition of matrix B, B = VΛV
T
, Where Λ = diag (λ1, λ2, ⋯ , λ
d
) is the diagonal matrix of eigenvalues, λ1 ≥ λ2 ≥ ⋯ ≥ λ
d
, V is the eigenvector matrix. Suppose there are d* non-zero eigenvalues, They form a diagonal matrix Λ* = diag (λ1, λ2, ⋯ , λ
d
*
), Command V* represents the corresponding eigenvector matrix, then Z can be expressed as
In order to effectively reduce dimensionality in real applications, the distance after dimensionality reduction needs to be as close as possible to the distance in the original space, but not necessarily exactly the same. At this time, d′ ≤ d maximum eigenvalues can be taken to form a diagonal matrix
Datasets
Breast cancer histopathology image data set BreaKHis [26] is adopted in this article. This database comes from the microbiopsy images of 82 patients with benign or malignant breast tumors, including 24 benign and 58 malignant. So far, this data set includes a total of 7909 marked breast tissue pathological images. There are 2,480 pathological images of benign tumors, including adenopathy, fibroadenoma, phyllodes tumor and tubular tumor. There are 5429 pathological images of malignant tumors, including ductal carcinoma, lobular carcinoma, breast mucinous carcinoma and papillary carcinoma. Each histopathological image has four different magnifications. As followed: 40×, 100×, 200×, 400×and the pixels of each image are 700×460, Mode is RGB three-channel image, and as shown in Table 2.
The distribution of images in the BreaKHis dataset
The distribution of images in the BreaKHis dataset
In addition to being divided into benign and malignant tumor images, breast cancer tumor images can also be divided into four benign tumors and four malignant tumors according to the pathological structure presented under the microscope, as shown in Figs. 3(a)–(d). This article only conducts a binary classification study on pathological images of benign and malignant tumors under different magnifications.

BreaKHis data set of benign pathological image samples, which show adenoma (a), fibroadenoma (b), phyllodes tumor (c) and tubular adenoma (d).

Malignant pathology image samples of BreaKHis data set, which show ductal carcinoma (a), lobular carcinoma (b), breast mucinous carcinoma (c) and papillary carcinoma (d).
The breast cancer pathology image data sets of 4 microscope magnifications are named as Data1, Data2, Data3 and Data4. As shown in Fig. 5, select 50 benign and 50 malignant pathological images in the data1 folder, and conduct a preliminary “cross segmentation” of each selected image. Calculate the image variance of the four sub-images after segmentation and select the two sub-images with the largest variance at the same time. There are 100 benign images and 100 malignant images. The size of the original image in this experiment is 700 × 460 pixels. Image scaling method is used to reduce the original image size to 224 × 224 pixels.

“Cross segmentation” breast cancer pathological image including original pathology of breast cancer (a) and breast cancer pathological image segmentation (b).
Set the ratio of the training set to the test set of benign and malignant pathological images as 7 : 3. Image noise, rotation (90 degrees, 180 degrees and 270 degrees) and mirror processing are used to expand the sub-image data set by 70 training sets and 30 test sets. The expansion of the sub-picture data set is shown in Fig. 6.

Sub-image data set expansion showing original sub-image (a) and processed images after adding noise (b), rotating 90° (c), 180° (d), 270° (e), respectively, and mirroring image (f).
The equipment used in the experiment is as follows: the processor is AMD RYZEN 3600; 16GB RAM; the experimental environment is Windows 10 operating system. The TensorFlow framework of python 3.7 is used for programming processing.
Experimental results and discussion
We can find that the DenseNet-201-MSD model is used to identify the expanded sub-image data set. The pooling layer in the convolutional neural network is replaced by multiple scaling decomposition. The multi-dimensional scaling of breast cancer pathological images can also achieve good classification results. Experimental model parameters are shown in Table 3.
Experimental model parameters
Experimental model parameters
Table 4 and Fig. 7 records and analyzes the experimental results of the DenseNet-201-MSD model applied to breast cancer pathological images with four different magnifications. From the experimental results, the image is divided based on the “cross method” and the two sub-images with the largest variance among the four sub-images are selected, which greatly reduces the time for the computer to classify and recognize the image. DenseNet-201 transfer learning fusion multi-scale decomposition is selected by the image segmentation method to maximize the variance. The application can effectively improve the efficiency of breast cancer pathological image classification.
Accuracy of 20 trainings at different magnifications for pathological images of breast cancer

Training curves of breast cancer pathological image datasets with different magnifications including 40X (a), 100X (b), 200X (c) and 400X (d).
It can be seen from Table 5 that in order to better illustrate the experimental effect of the proposed model. The literature [6, 27–29] and the DenseNet-201-MSD model are selected in this paper to compare the experimental results of different magnifications. Compared with the deep neural network and transfer learning methods used in the literature [6]. The method in this paper improves the accuracy of image classification by 4.1%–4.2%. Compared with the convolutional neural network, it is used in the literature [27] to extract image features. The method in this paper improves the accuracy of image classification by 1.2%–2%. Compared with the method of depth feature and feature fusion, it is adopted in the literature [28]. The method in this paper improves the accuracy of image classification by 14%–17.8%. Compared with the convolutional neural network, the extraction of image features is adopted in the literature [29]. The method in this paper improves the accuracy of image classification by 2.2%–3.8%.
Comparison of accuracy of breast cancer pathological images in different experimental methods
In summary, the deep learning method is used and researched in this study to realize the automatic classification and recognition of breast cancer pathological images. Excessive data dimensions can easily cause over-fitting. A DenseNet-201 with multiple scaling decomposition is proposed based on the DenseNet-201 model of convolutional neural network, namely DenseNet-201-MSD. The method of transfer learning is used by the model. First, part of the data set is used for a series of image preprocessing. Second, multiple scaling decomposition method is used to replace the pooling layer to classify and recognize medical images. By experimenting with the BreaKHis dataset, the effectiveness of the model is proven. In future work, we plan to conduct more comprehensive research focusing on the feature extraction method of the optimized image. For example, a variety of models are used for feature extraction of pathological images. Multi-classification of benign and malignant breast cancer tumors will be considered based on two classifications.
