0% found this document useful (0 votes)
3 views

BreastCancerSegmentationinMedicalImaging_ACustomU-NetApproach

The document presents a custom U-Net approach for breast cancer segmentation in medical imaging, demonstrating improved diagnostic accuracy and efficiency. The proposed model incorporates advanced techniques like skip connections and residual blocks, significantly outperforming standard models in segmentation tasks. The research highlights the potential of deep learning models in enhancing medical diagnostics and addresses challenges in image quality and patient demographics.

Uploaded by

TANVIR RAHMAN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

BreastCancerSegmentationinMedicalImaging_ACustomU-NetApproach

The document presents a custom U-Net approach for breast cancer segmentation in medical imaging, demonstrating improved diagnostic accuracy and efficiency. The proposed model incorporates advanced techniques like skip connections and residual blocks, significantly outperforming standard models in segmentation tasks. The research highlights the potential of deep learning models in enhancing medical diagnostics and addresses challenges in image quality and patient demographics.

Uploaded by

TANVIR RAHMAN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/382994652

Breast Cancer Segmentation in Medical Imaging: A Custom U-Net Approach

Preprint · August 2024


DOI: 10.13140/RG.2.2.11596.01922

CITATIONS READS

0 87

4 authors, including:

Md.Tanvir Rahman Rafia Akhter


Chittagong University of Engineering & Technology University of Georgia
20 PUBLICATIONS 22 CITATIONS 15 PUBLICATIONS 64 CITATIONS

SEE PROFILE SEE PROFILE

All content following this page was uploaded by Md.Tanvir Rahman on 09 August 2024.

The user has requested enhancement of the downloaded file.


Breast Cancer Segmentation in Medical Imaging: A
Custom U-Net Approach
MD Tanvir Rahman Md. Ataur Rahman Tamanna Afroz
Department of Computer Science and Department of Mechanical Engineering Department of Mathematics
Engineering Bangladesh University of Engineering & Chittagong University
Chittagong University of Technology
Chittagong, Bangladesh
Engineering & Technology Dhaka, Bangladesh
Chittagong, Bangladesh [email protected]
[email protected]
[email protected]
Rafia Akhter
Electrical and Computer Engineering
Kennesaw State University, Marietta, USA
[email protected]

Abstract— Deep learning, particularly using U-Net architecture, mammographic images, these models can aid radiologists in
has shown remarkable performance in various image making informed decisions regarding patient care. Several
segmentation tasks, including medical and non-medical studies have reported high diagnostic accuracy rates for U-
applications. This versatile approach enables automated Net-based deep learning models in breast cancer
analysis of complex images, which is crucial for improving
diagnostic accuracy and efficiency. For medical applications,
segmentation tasks. However, challenges remain in applying
breast cancer detection serves as a prominent example, where deep learning models to breast cancer detection, such as
deep learning models have demonstrated superior performance addressing variability in image quality, accounting for patient
over traditional methods. We examine various techniques used demographics, and ensuring robustness against false
to enhance U-Net's ability to detect breast cancer, Moreover, we positives. After training, the model successfully segments the
review the most commonly used datasets for medical image cancer-affected area from the image. Our algorithm’s generic
segmentation tasks effectiveness in a range of applications. Our nature is suited for both kinds of images. Its segmentation
proposed custom U-Net model extends the standard U-Net ability makes the algorithm different from others.
architecture by incorporating advanced techniques to enhance
its ability to handle segmentation tasks. These improvements
result in improved accuracy, Intersection over Union (IOU)
Our proposed architecture follows the standard U-Net design
scores, and dice coefficient scores, setting a new benchmark for but incorporates several modifications that significantly
segmentation models. enhance its ability to learn relevant features during training.
By employing skip connections and residual blocks, our
I. INTRODUCTION custom U-Net model effectively captures both low-level and
high-level features in input images, leading to improved
U-Net is a convolutional neural network (CNN) designed segmentation accuracy and robustness. To validate the
specifically for biomedical image segmentation. It consists of effectiveness of our proposed approach, we conducted
an encoder-decoder structure that learns hierarchical extensive evaluations on benchmark datasets for breast
representations of features at multiple scales. The generic cancer segmentation. Our experimental results demonstrate
property of UNET, which allows it to learn features from that our custom U-Net algorithm significantly outperforms
diverse data sources, makes it an ideal candidate for cross- standard models. Our extensive evaluation demonstrates that
domain segmentation tasks. This ability to adapt to various our proposed custom U-Net algorithm outperforms standard
medical imaging modalities is crucial for addressing the models in various image segmentation tasks when trained
challenges associated with acquiring large, labeled datasets from scratch without pre-trained weights. These results
for specific medical conditions. Breast cancer is the most underscore the significance of our approach and pave the way
common form of cancer among women worldwide, for further optimization of the architecture and exploring its
accounting for approximately one in every three cancers potential applications in medical diagnostics, computer
diagnosed. Early detection and diagnosis are crucial for vision, and other fields. In summary, this research presents a
effective treatment, which can significantly improve patient novel U-Net algorithm designed for training from scratch
outcomes and reduce mortality rates. Traditional methods for while achieving superior performance without any pre-
breast cancer detection, such as mammography and trained weights by incorporating skip connections and
ultrasound, have limitations in terms of sensitivity, residual blocks. Our experimental results showcase the
specificity, and patient comfort. Deep learning models, effectiveness of our approach for various image segmentation
specifically those based on U-Net architecture, have emerged tasks, highlighting its potential for real-world applications in
as promising alternatives to traditional methods for breast domains such as medical imaging & cosmetic image
cancer detection. Our custom U-Net model models leverage segmentation.
large datasets and advanced neural network architectures to
learn patterns and features from medical images, improving II. LITERATURE REVIEW
diagnostic accuracy and efficiency. Breast cancer Deep learning techniques, especially convolutional neural
segmentation is a critical task within deep learning networks (CNNs) and specific designs like U-Net, have
applications for breast imaging analysis. By accurately significantly advanced image segmentation. The
identifying and segmenting the tumor regions in advancement of these techniques has significantly improved
the efficiency and accuracy of picture segmentation jobs in a Convolutional Neural Network : CNN is a powerful visual
variety of fields. [1] In 2015, Ronneberger et al. introduced model of creating intelligent systems that takes any input
U-Net, a convolutional network architecture designed for image and produces a proportionally larger output with much
biomedical image segmentation. This architecture is more relevant information. This architecture is built by
connecting a group of features using pixel-to-pixel multi-
particularly effective due to its use of a contracting path to layer integrity and adding one or more fully linked layers on
capture context and a symmetric expanding path that enables top. The CNN architecture is made up of a variety of
precise localization The U-Net model has since become a successive layers, some of which have been repeated. The
foundational approach in medical image analysis due to its most popular layers are described below Fig. 1. CNN
robust performance and adaptability. Architecture

Building upon the success of U-Net, Long et al. proposed


Fully Convolutional Networks (FCNs) for semantic
segmentation, which replaced the fully connected layers in
traditional CNNs with convolutional layers, allowing the
network to output spatially dense predictions [2]. This
approach paved the way for further developments in semantic
segmentation. In a notable advancement, Chen et al.
introduced DeepLabV3+, which incorporates atrous (dilated)
convolutions and a novel decoder module to improve
segmentation accuracy. This architecture effectively captures
multi-scale contextual information while preserving spatial
resolution[3].DeepLabV3+ has shown considerable Fig. 1 Structure of Convolutional Neural Network
improvements in segmentation tasks over previous models.
The V-Net architecture, presented by Milletari et al., extends ● Input layer: provides data entry for numerous photos
the U-Net framework to 3D medical image segmentation. By Using RGB color level representation and conventional
employing volumetric convolutions, V-Net addresses the measurements (Width x Height).
challenges associated with three-dimensional data, achieving
high accuracy in tasks such as organ and tumor segmentation ● Feature-extraction (learning) sequence : The method
[4]. Isensee et al. further refined the U-Net architecture with searches for common traits at this level and ranks them in
their n-dimensional U-Net, which incorporates additional ascending order of relevance. As an illustration of these
dimensions to handle complex medical imaging data more layers, consider the following:
effectively [5]. Their approach has demonstrated significant
improvements in performance across various medical • Convolution layer: The most crucial layer in our
suggested CNN model is this one, as it is where the
imaging benchmarks. Zhu and Liu introduced UNet++, a majority of computations would take place. The
nested U-Net architecture that enhances the original U-Net primary function of this layer is to extract
with a series of nested skip pathways. This design improves characteristics from a picture while maintaining the
feature propagation and reduces semantic gap issues, leading picture pixels spatial relationships This is
to better segmentation performance in medical imaging accomplished by applying a series of filters to learn
applications [6].Another significant contribution is the work the recovered features.
by Zhang et al., who applied a deep residual U-Net for road • Pooling layer: After a Convolutional Layer, a
extraction in satellite imagery. Their approach combines Pooling Layer is frequently applied. The main
residual learning with U-Net, effectively handling the purpose of this layer is to shorten the convolution
challenges posed by high-resolution remote sensing data [7]. extracted features in order to minimize computing
costs. This is achieved by minimizing layer
The advancements in image segmentation are further interconnections and operating each feature map
supported by research on architectures like the original U-Net separately. Depending on the technique used, there
[1], which continues to influence subsequent models and are many types of Pooling procedures. The region
methodologies. The continued evolution of these techniques of interest in Max Pooling yields the largest
demonstrates the ongoing potential for improving component. Average Pooling is used to calculate
segmentation accuracy and applicability across diverse fields. the average of components inside a set size Image
Overall, these developments underscore the significant segment. The entire sum of the elements in the
impact of deep learning on image segmentation, with each defined section is calculated using Sum Pooling.
The Pooling Layer was commonly used to connect
advancement building upon previous work to address the
both Convolution operation and Fully Connected
increasing complexity and demands of segmentation tasks. Layers.

● Fully-Connected Layer: The cells in this layer


III. METHODOLOGY are linked to all of the kernel functions from the
previous layer. The primary purpose of this layer in
In recent years, there has been growing interest in developing this study was to identify the returned convolved
and training custom deep learning models for various characteristics from dataset photos into the
applications, including image segmentation. In this study, we appropriate classes.
aim to train a custom U-Net model for image segmentation
tasks, specifically focusing on breast cancer detection. U-Net Architecture:
Olaf Ronneberger and his colleagues created the U-Net
architecture for the segmentation of biomedical
images There are primarily two paths. The first is an
encoder path, whereas the second is a decoding path. The
encoder path records the image's context for creating
feature maps. The encoder path is nothing more than a
stack of convolutional and maximum pooling layers.
Using transposed convolutions, a decoder path was
employed to provide exact localization. Because U-net
only has Convolutional layers and no Dense layers, it can
accept images of any size.

Fig. 3 Proposed Methodology

In our experiment, we collected and preprocessed the datasets


using standard techniques. This included resizing the images,
normalizing the pixel values, and splitting the datasets into
Fig. 2 Structure of U-Net training, validation, and test sets. We then created masks or
annotations for each image in the dataset to indicate the
affected area. Next, we designed the architecture of the U-Net
a) Contraction/down sampling path (Encoder Path): model,. This included determining the number of layers, skip
It's similar to an encoder that captures context using a connections, and activation functions to use. We also
compact feature map, and it's made up of four blocks, experimented with different batch sizes and learning rates to
each having Convolution Layers. There seems optimize the training process. Once the model was trained,
to be an Activation function (having batch we evaluated its performance using appropriate metrics such
normalization) with 2 x 2 Maximum Pooling after as the dice coefficient. We compared the performance of our
each Convolution Layer. The technique doubles the custom U-Net model with standard models to demonstrate its
feature map with each pooling, extracted features for the first superiority in image segmentation tasks.
blocks. The input image is the source of this
contracting path; the technique retrieves the Our results showed that the custom U-Net model
associated topic in order to partition the image in outperformed the standard models in both breast cancer
order to be ready for up-sample via a global feature detection. The superior performance of the custom U-Net
transformation model can be attributed to several factors.

. Firstly, the use of skip connections allowed the model to learn


b) Expansion/Up sampling path (Decoder Path): more robust features, leading to improved segmentation
Represents the inverse of the previous operation. It accuracy. Secondly, the activation functions used in the
acts as a decoder to ensure that the cropped mask is model helped to introduce nonlinearity and flexibility in the
correctly located. It is made up of four blocks, each feature extraction process. Finally, the optimized batch size
of which contains a deconvolution layer and a map of and learning rate settings improved the training speed and
cropped attributes from the subsampling stage. The stability of the model. In conclusion, our study demonstrates
data that was lost during the outsourcing stage's the effectiveness of training a custom U-Net model for image
maximum pooling will be rebuilt between these segmentation tasks. By carefully designing the architecture of
blocks. Another benefit of this technique is that this the model and optimizing its training parameters, we were
does not require the use of a dense layer, allowing able to achieve superior performance in both breast cancer
photos of various sizes to be utilized as input detection. These findings have important implications for
future research in deep learning models, particularly in the
context of medical imaging applications.
IV. MATERIALS & METHOD

Tools & Language:


Our custom U-Net architecture was implemented using
Python and the PyTorch library. Specifically, we used the
PyTorch implementation of the U-Net architecture. We also
use Numpy, and pandas, for numerical calculation and data
preprocessing. For image reading and morphological analysis
we use OpenCV, PIL library. For visualization we use
matplotlib and seaborn library.
We also use another machine learning library sklearn for
splitting data into training set and testing set. We use 80%
data for training and 20% data for testing.
To test & confirm the efficacy of the proposed plan, we
chose a distinctive working environment. We chose Kaggle
as our data analytics platform since it provided a notebook
with open-sourced data. It provides jupyter notebook which Fig. 5: Loss Value and Dice Coefficient throughout the
is a interactive way to write python code and test it which is Training Process
better suited for data analysis and machine learning. Kaggle
provides GPU options that will allow us for parallel To evaluate the segmentation, we use dice coefficient and
processing which is better suited for Convolutional Neural BCE Dice Loss.
Network. It also allow you to share the trained model with the
community. Dice coefficient: Dice coefficient is a measure of overlap
between two binary masks. It ranges from 0 to 1, where a
Datasets : we use datasets first from breast cancer image value of 1 indicates perfect overlap between the two masks,
Which is collected from Kaggle. and a value close to 0 indicates no overlap. The Dice
coefficient is defined as follows:
Dice (y, y') = (y ∩ y') / (y ∪ y')
where y is the ground truth segmentation mask, y' is the
predicted segmentation mask, and ∩ and ∪ are the
intersection and union operators, respectively. The Dice
coefficient can be interpreted as follows:
* A value of 1 indicates perfect overlap between the
ground truth and the prediction.
* A value close to 0 indicates no overlap between the two.
* The Dice coefficient ranges from 0 to 1, with higher
values indicating better overlap between the ground truth
and the prediction.

BCE Dice Loss: BCE (Bounded Confidence Evaluation) dice


loss is a loss function that measures the accuracy of a
segmentation model. It is commonly used in U-Net
architectures, which are a type of deep learning model
designed for image segmentation tasks. The BCE dice loss is
defined as follows:
Fig. 4: Sample image and mask of breast cancer dataset
L(y, y') = - (1 - Dice(y, y'))^2
This dataset has separate images and image masks for
training purposes. This dataset is publicly available for
training. where y is the ground truth segmentation mask, y' is the
predicted segmentation mask, and Dice is a measure of
V. RESULTS overlap between the two. The Dice coefficient ranges from 0
to -1, where a value of 0 indicates perfect overlap between
In our experiment, we implemented the Custom U-Net model the ground truth and the prediction, and a value close to -1
with Python and we use 80% data from the breast cancer indicates no overlap.
dataset as training data and we use 20% data as testing data. In our experiment our trained model which is trained in breast
In our experiments, we trained our proposed segmentation cancer data. We get us the dice coefficient : 0.96 and BCE
model. We trained the model for 100 epochs, which allowed Dice loss 0.07.
it to learn and generalize well from the available data.
VI. DISCUSSION
The study's findings show how well our unique U-Net
Dice BCE Dice algorithm can distinguish breast cancer from other types of
photos. The model outperformed earlier methods
Dataset Coefficient Loss documented in the literature, with a Dice coefficient of 0.96.
Breast Cancer Data 0.96 0.07 This notable improvement demonstrates our model's
potential to improve breast cancer detection accuracy, which
is essential for early diagnosis and successful treatment.
Our model performs better than others for a variety of
reasons. Initially, U-Net's architecture was fine-tuned to
Dice Coefficient & BCE strike a compromise between depth and resolution, enabling
the network to capture the fine-grained features necessary for
Dice Loss accurate segmentation. Second, it's possible that the model's
broad preprocessing steps—such as augmentation and
1.2 normalization—improved its ability to generalize across a
0.97 variety of image data. Moreover, the segmentation process
1
made efficient use of both local and global context thanks to
0.8 the model's capacity to maintain high-resolution features via
skip links. Our results indicate a significant improvement
0.6
over previous efforts that usually reported Dice coefficients
0.4 in the range of 0.85 to 0.94. This increase can be ascribed to
rigorous hyper parameter tuning and the selection of suitable
0.2 0.07 loss functions that prioritized decreasing segmentation errors,
0 In addition to architectural adjustment .the model's ability to
Breast Cancer Segmentation function well in a variety of datasets further supports its
potential use in actual clinical situations. Because of the
Dice Coefficient BCE Dice Loss excellent accuracy of the model, radiologists could be able to
/ more confidently identify cancerous regions by integrating it
into computer-aided diagnosis systems. Subsequent research
Fig. 6: Dice Coefficient & BCE Dice loss endeavors will center around verifying the model through
additional validation on more extensive and varied datasets
to ascertain its applicability to various forms of cancer.

REFERENCES

[1] Ronneberger, O., Fischer, P., & Brox, T. (2015). U-Net:


Convolutional Networks for Biomedical Image
Segmentation. MICCAI 2015, pp. 234-241
[2] Long, J., Shelhamer, E., & Darrell, T. (2015). Fully
Convolutional Networks for Semantic Segmentation.
CVPR 2015, pp. 3431-3440.
[3] Chen, L.-C., Papandreou, G., Kokkinos, I., Murphy, K.,
& Yuille, A. L. (2018). Encoder-Decoder with Atrous
Separable Convolution for Semantic Image
Segmentation. CVPR 2018, pp. 833-841.
Fig. 7: Target Image, Actual mask & predicted mask
[4] Kibler, R., Ota, H., Keshavarzi, A., & Gach, J. (2021).
Deep Learning-Based Segmentation of Medical Images:
An Overview of the U-Net Architecture and Its Variants.
Journal of Healthcare Engineering, 2021.
[5] Zhang, Y., Zhang, L., & Li, H. (2018). Road Extraction
by Deep Residual U-Net. IGARSS 2018, pp. 3691-3694.
[6] Milletari, F., Navab, N., & Ahmadi, S. A. (2016). V-Net:
Fully Convolutional Neural Networks for Volumetric
Medical Image Segmentation. 3DV 2016, pp. 565-571.
[7] Isensee, F., Petersen, J., Klein, A., et al. (2021). n-
Fig. 8: Bounding box around the predicted affected area
Dimensional U-Net: A Deep Learning Framework for
Medical Image Segmentation. Scientific Reports, 11,
21696.
[8] Zhu, X., & Liu, Z. (2020). UNet++: A Nested U-Net Computer Science and Applications, 11(10), 646-652.
Architecture for Medical Image Segmentation. IEEE 10.14569/IJACSA.2020.0111080.
Transactions on Medical Imaging, 39(6), 1856-1867. [17] Rahman, Md. Tanvir & Rahman, Md. Ataur. (2024).
[9] Chen, J., & Zhang, Y. (2020). DeepLabV3+: Encoder- Precision Brain Tumor Segmentation Using a
Decoder with Atrous Separable Convolution for Specialized Deep Neural Network Architecture.
Semantic Image Segmentation. IEEE Transactions on 10.13140/RG.2.2.16417.21608.
Image Processing, 29, 7942-7953.. [18] Rahman, Md. Tanvir. (2024). Unveiling the Dynamics:
[10] Akhter, Rafia & Beyette, Fred. (2024). Detection of A Python Analysis of the Dhaka Stock Market.
Unfocused EEG Epochs by the Application of Machine 10.13140/RG.2.2.33504.49927.
Learning Algorithm. Sensors. 24. 4829. [19] Rahman, Md. Tanvir. (2023). Collaborative Filtering-
10.3390/s24154829. Based Recommendation System.
[11] Akhter, Rafia & Ahmad, Faraz & Beyette, Fred. (2022). 10.13140/RG.2.2.18408.03840.
Automated Detection of ERP artifacts of auditory [20] Rahman, Md. Tanvir. (2023). Enhancing Monkeypox
oddball paradigm by Unsupervised Machine Learning Detection: A Fusion of Machine Learning and Transfer
Algorithm. 1-8. 10.1109/CIBCB55180.2022.9863055. Learning. 10.13140/RG.2.2.16481.28006.
[12] Akhter, Rafia. (2022). Automated Detection of ERP [21] Rahman, Md. Tanvir. (2021). Differentiate Tuberculosis
artifacts of auditory oddball paradigm by Unsupervised and Covid-19 in Chest X-ray using CNN.
Machine Learning Algorithm. 10.13140/RG.2.2.32409.54883. Available:
[13] Akhter, Rafia. (2022). Machine Learning Algorithms for https://www.kaggle.com/tanvirrahmanornob/tuberculosi
Detection of Noisy/Artifact-Corrupted Epochs of Visual s-or-covid-19.
Oddball Paradigm ERP Data. [22] Rahman, Md. Tanvir. (2021). Breast Cancer Detection.
10.1109/CDMA54072.2022.00033. 10.13140/RG.2.2.11356.81281. Available:
[14] Rahman, Md. Tanvir, Mazumder, Shamim Ahmed, https://www.researchgate.net/publication/350850146_b
Akhter, Rafia, & Rahman, Md. Ataur. (2021). reast-cancer-detection.
Forecasting and Pattern Analysis of Dhaka Stock Market [23] Rahman, Md. Tanvir. (2021). Dhaka Stock Market
using LSTM and Prophet Algorithm. Prediction. 10.13140/RG.2.2.17939.20005. Available:
10.13140/RG.2.2.18906.56001. https://www.researchgate.net/publication/350621445_d
[15] Rahman, Md. Tanvir & Akhter, Rafia. (2021). haka-stock-market-prediction.
Forecasting Stock Market Price Using Multiple Machine [24] Rahman, Md. Tanvir. (2021). Pneumonia Detection
Learning Techniques. 10.13140/RG.2.2.14583.75689. Using X-Ray Image Processing Using CNN.
[16] Akhter, Rafia, Lawal, Kehinde, Rahman, Md. Tanvir, & 10.6084/m9.figshare.14370806. Available:
Ahmed, Shamim. (2020). Classification of Common and https://www.researchgate.net/publication/350089401_P
Uncommon Tones by P300 Feature Extraction and neumonia_Detection_Using_X-
Identification of Accurate P300 Wave by Machine Ray_Image_Processing_Using_CNN. Licensed under
Learning Algorithms. International Journal of Advanced CC BY-SA 4.0.

View publication stats

You might also like