# Region-of-Interest Optimization for Deep-Learning-Based Breast Cancer Detection in Mammograms
## 2 Materials and Methods
### Preprocessing Image Data  
The proposed breast cancer detection method is illustrated in Figure 2, utilizing DICOM images as input. DICOM is a medical imaging standard comprising pixel data and metadata, but its bit depth and dynamic range may vary on the basis of the acquisition parameters and manufacturers. Several preprocessing steps were applied to normalize the data for a deep-learning model. Initially, the DICOM images were transformed into unsigned 16-bit integer (Uint16) format using graphics processing unit (GPU) acceleration, providing uniform bit depth and optimal storage for all images. Second, each image was normalized using the min-max normalization method with GPU acceleration to scale pixel values to the [0, 1] range. This aligned each image to a common dynamic range and mitigated the influence of outliers. Lastly, the torch resized the images into 416 \(\times\) 416 pixels. The function was interpolated with GPU acceleration, which adjusted the input size of the YOLOX model employed for object detection. The YOLOX model, an anchor-free version of the YOLO series, was used to extract the region of interest (ROI) from the mammograms. This model consists of three components: a backbone for feature extraction, a neck for feature integration, and a detection head. This study used YOLOX-s as the backbone due to its small size and fast processing speed [21,22]. Figure 2: Flowchart of our method for breast cancer detection. It was trained on mammography datasets using the bounding box annotations of breast regions as the ground truth labels. Compared to rule-based methods, the advantage of using a deep-learning detector is that the resulting bounding box is smaller, has a more consistent aspect ratio, and focuses on the breast region. If the YOLOX model failed to detect objects in an image, an alternative method based on [PERSON]'s thresholding [23] and the findcontour function [24] was used to segment the objects of interest. Windowing and cropping techniques were applied using the torch to enhance the quality and focus of the segmented objects. The function was interpolated with GPU acceleration. Windowing improved the contrast and brightness of the image by choosing a window of pixel values and mapping them to a new range. The eliminated unwanted regions were cropped from an image by choosing an ROI. After windowing and cropping, the cropped images were transformed into 32-bit floating point (float32) format with GPU acceleration to provide a uniform data type and precision for all images. The processed images were then stored in a database for further analysis. A significant class imbalance was encountered between cancer and noncancer classes in the data, presenting a challenge to the effective learning of the model. Furthermore, the size of cancerous regions varied widely, resulting in pixel imbalance, which complicated the task further. Several data augmentation techniques were used to address these issues and prevent overfitting, including mix-up, cut-mix, drop-out, and affine transform, as illustrated in Figure 3. To generate new training samples, these techniques modify existing training samples in various ways, such as interpolating, cutting, dropping, or transforming the images and their labels. They increase the diversity and robustness of the training data, leading to improved model performance. * Mix up: A technique that generates new training samples by linearly interpolating between two images and their labels. This technique can produce high-quality inter-class examples that prevent the model from memorizing the training distribution and improve its generalization ability. * Cut-mix: A technique that generates new training samples by randomly cutting out patches from two images, pasting them together, and assigning the labels according to the area ratio of the patches. This technique can also produce interclass examples that enhance the model's robustness to occlusion and localization errors.