# Two-Stage Deep Learning Method for Breast Cancer Detection Using High-Resolution Mammogram Images
## 3 Methodology
### RoI Generation
Although there is no exact design for the rescaling factor, having healthy tissue around the tumor helps the classifier identify the type of tumor better. In our study, 65% of healthy tissue and 35% of the detected breast tumor achieved the highest accuracy (scaling factor of 1.7 is derived by this idea). This notion is also presented by [PERSON] et al. (2018), where they concluded that around 70% of healthy tissue along with the segmented tumor increases tumor shape classification accuracy. We propose two CNN-based classification models with 256 \(\times\) 256 and 128 \(\times\) 128 input sizes to avoid information loss in downsampling of bigger breast tumors. Detected tumors are downsampled to one of two input sizes according to their initial size. The smaller model consists of three convolutional layers, followed by two fully connected layers. The kernel size for the first convolutional layer is 5 \(\times\) 5, and, for the rest, 3 \(\times\) 3. The size of the first and the second fully connected layers are 128 and 6 (the number of classes). After the flattening and the first fully connected layers, we used dropouts of 0.2 and 0.3, respectively. We used the ReLU activation function for all layers except the output layer, where softmax is used. The network with 256 \(\times\) 256 input size follows the same structure as the smaller network. The difference is that this network contains one more convolutional (kernel size of 3 \(\times\) 3)

Figure 3: Bounding box rescaling for the classification model. and max pooling layers prior to the fully-connected layers. We trained both networks with their corresponding inputs (e.g., upscaled bounding box by a factor of 1.7, as explained above) on our private dataset to achieve classification accuracy of 0.95 for both networks. In the experiment section, we show how this model improves the overall mean average precision of our proposed DL model. ### Transfer Learning

In the previous subsections, we discussed the overall flow of the proposed deep learning method from RoI generation, to improving classification accuracy of the object detection model with the help of a CNN-based classifier. All procedures are firstly performed on our private dataset as it has more and higher quality mammograms. Using the pre-trained model, we aim to fine-tune the network parameters for the INbreast database. However, before starting training on this dataset, some pre-processing procedures should be done. Firstly, two datasets contain mammograms with different intensities and contrast. Figure 4 shows two samples from each database for reference. In order to reduce the dataset difference for more accurate adoption, we enhance the texture and contrast (e.g., using CLAHE [29]) of INbreast mammograms. These pre-processing steps take place after breast region extraction but before square patch generation. Figure 5 shows samples before and after pre-processing operations. As seen from Figure 5, the enhanced image now displays clear tissue information and is quite similar to mammograms in our private dataset. Figure 4: Sample mammograms from two datasets: (**a**) \(R_{\text{CC}}\), (**b**) \(L_{\text{MLO}}\) from our dataset and (**c**) \(R_{\text{CC}}\), (**d**) \(L_{\text{MLO}}\) from the INbreast dataset. Figure 5: Texture and contrast enhancement. (**a**) original image; (**b**) enhanced image. Secondly, the INbreast database contains annotated RoI (segmentation) for each mammogram. Using corresponding files, segmentation contours are also converted into bounding boxes (XLM format), just like in our own private dataset, to directly apply the network for INbreast mammograms. For comparison purposes, we follow prior literature [10, 15, 17] and exclude patient studies with BI-RADS 3, and assign all images with BI-RADS 4, 5, 6 as positive samples and BI-RADS 1 and 2 as negative samples. Finally, we compare the experiment results with existing works. Both Faster R-CNN and CNN-based classifiers are fine-tuned on the INbreast dataset.