Step-by-Step Approach to Design Image Classifiers in AI: An Exemplary Application of the CNN Architecture for Breast Cancer Diagnosis - Lohani, Ahamadullah; Mishra, Bhupesh Kumar; Wertheim, Kenneth Y.; Fagbola, Temitayo Matthew (Artificial Intelligence and Applications, 2026)
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 InterestThe authors declare that they have no conflicts of interest to this work. Data Availability StatementThe 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 StatementAhamadullah 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.
Keywords: convolutional neural network (CNN); deep learning (DL); image classification; breast cancer; ultrasound images; transfer learning (TL); data augmentation (DA)