Background: Females benefit from ultrasound screening and diagnosis of
breast cancer, and artificial intelligence has enabled the automatic
identification of medical conditions on medical imaging. Methods: This
study aimed to develop machine learning (ML) and deep learning (DL) models for
the detection and classification of breast cancer in a breast ultrasound image
(BUSI) and United States (US) ultrasound images datasets and to compare the
models’ performance to previous studies. The ultrasound scans were collected from
women between the ages of 25 and 75. The dataset contains 780 images with a
resolution of 500 500 pixels. There were 133 normal images with no
cancerous masses, 437 images with cancerous masses, and 210 images with benign
masses among the 780 cancerous images in the BUSI dataset whiles the US
ultrasound images includes 123 and 109 ultrasound images of malignant and benign
breast tumors. Two traditional ML models, random forest (RF) and K-Nearest
Neighbor (KNN), as well as a deep learning (DL) model using convolutional neural
networks (CNN), were trained to classify breast masses as benign, malignant, or
normal. Results: The CNN obtained an accuracy of 96.10%, the RF an
accuracy of 61.46%, and the KNN an accuracy of 64.39% with the BUSI dataset.
Standard evaluation measures were employed to assess the performance for
benignancy, malignancy, and normality classification. Furthermore, the models’
area under the curve-receiver operating characteristics (AUC-ROC) are 0.99 by the
CNN, 0.85 by the RF, and 0.65 by the KNN. Conclusions: The study’s
findings revealed that DL surpasses conventional ML when it comes to training
image datasets; hence, DL is suggested for breast cancer detection and
classification. Furthermore, the resilience of the models used in this study
overcomes data imbalance by allowing them to train both binary and multiclass
datasets.