Step-by-Step Approach to Design Image Classifiers in AI: An Exemplary Application of the CNN Architecture for Breast Cancer Diagnosis

Authors

  • Ahamadullah Lohani Centre of Excellence for Data Science, Artificial Intelligence, and Modelling (DAIM), University of Hull, UK
  • Bhupesh Kumar Mishra Centre of Excellence for Data Science, Artificial Intelligence, and Modelling (DAIM), University of Hull, UK https://orcid.org/0000-0003-3430-8989
  • Kenneth Y. Wertheim Centre of Excellence for Data Science, Artificial Intelligence, and Modelling (DAIM), University of Hull, UK https://orcid.org/0000-0002-4152-2898
  • Temitayo Matthew Fagbola Centre of Excellence for Data Science, Artificial Intelligence, and Modelling (DAIM), University of Hull, UK https://orcid.org/0000-0001-6631-1002

DOI:

https://doi.org/10.47852/bonviewAIA52025938

Keywords:

convolutional neural network (CNN), deep learning (DL), image classification, breast cancer, ultrasound images, transfer learning (TL), data augmentation (DA)

Abstract

Convolutional neural networks (CNNs) are commonly applied for image classification, but there is no standard protocol to facilitate comparison and synergy. This paper presents the first attempt at a step-by-step protocol for these purposes, exemplified by the problem of classifying ultrasound images for breast cancer diagnosis. Following this protocol, three datasets—Breast Ultrasound Image Dataset (BUSI), Breast Ultrasound Image (BUI), and Ultrasound Breast Images for Breast Cancer (UBIBC)—were used to build custom CNNs and fine-tune pre-trained CNNs by transfer learning. Then, they were optimized by data augmentation techniques, including random cropping, flipping, shifting, shearing, rotation, and zooming. Hyperparameters (batch size, learning rate, dropout rates, optimizer, and more) were tuned in a grid search in combination with learning rate scheduling and early stopping. Following these, ensemble modeling is also applied as a part of protocol and hence fusion-data. Cross-dataset evaluations were further conducted, where BUSI was used for training/validation and UBIBC for independent testing, and vice versa, to assess robustness and generalization. The obtained results indicate that the custom CNN and VGG19 (Visual Geometry Group 19-layer CNN) are most suitable for this problem. The custom sequential model achieved the highest performance level with an accuracy of 92%, precision of 93%, recall of 92%, F1-score of 92%, and area under the receiver operating characteristic curve of 99%. Employing the step-by-step approach not only results in a higher accuracy performing CNN-based classifier but also results in justifiable and resilient conclusions regarding image classification tasks to enhance the robustness and generalization capabilities of CNN-based classifiers. Beyond medical image classification tasks, the step-by-step approach offers a structured methodology that can enhance reproducibility, comparability, and clinical applicability classification tasks. By following this approach, researchers participating in different projects can produce comparable results, thus facilitating knowledge transfer and model reuse. 

 

Received: 15 April 2025 | Revised: 19 September 2025 | Accepted: 1 April 2026

 

Conflicts of Interest

The authors declare that they have no conflicts of interest to this work.

 

Data Availability Statement

The data that support the findings of this study are openly available in the BUSI at https://doi.org/10.1016/j.dib.2019.104863, BUIdata at https://doi.org/10.17632/wmy84gzngw.1, and UBIBC in Kaggle at https://www.kaggle.com/datasets/vuppalaadithyasairam/ultrasound-breast-images-for-breast-cancer/

 

Author Contribution Statement

Ahamadullah Lohani: Conceptualization, Methodology, Software, Formal analysis, Investigation, Data curation, Writing – original draft, Writing – review & editing, Visualization. Bhupesh Kumar Mishra: Conceptualization, Methodology, Validation, Investigation, Writing – review & editing, Supervision, Project administration. Kenneth Y. Wertheim: Validation, Investigation, Writing – review & editing. Temitayo Matthew Fagbola: Validation, Investigation, Writing – review & editing.


Downloads

Published

2026-05-19

Issue

Section

Research Article

How to Cite

Lohani, A., Mishra, B. K., Wertheim, K. Y., & Fagbola, T. M. (2026). Step-by-Step Approach to Design Image Classifiers in AI: An Exemplary Application of the CNN Architecture for Breast Cancer Diagnosis. Artificial Intelligence and Applications. https://doi.org/10.47852/bonviewAIA52025938