Building a DenseNet-Based Neural Network with Transformer and MBConv Blocks for Penile Cancer Classification
Abstract
:1. Introduction
- Development of Hybrid Models: We introduced hybrid architectures based on DenseNet-201 that combine MBConv and Transformer blocks. These models are designed to enhance feature extraction, capturing both local and global patterns within histopathological images;
- Evaluation of Block Combinations: We studied the effects of combining MBConv and Transformer blocks within the network, providing insights into how each contributes to performance metrics and feature representation for medical image analysis.
2. Literature Review
3. Materials and Methods
3.1. Datasets
3.2. Preprocessing
3.3. Neural Network Architecture
- I + D + D + M: The second dense block and the transition layer from DenseNet-201 are used in stage S2. The process is completed with two MBConv blocks, operating with 768 channels in stage S3. This network has 8,959,874 learnable parameters.
- I + D + D + T: The second dense block and the transition layer from DenseNet-201 are used in stage S2. Stage S3 of the chain utilizes two Transformer blocks with 768 channels. This network has 9,309,714 learnable parameters.
- I + D + T + T: Stage S2 includes five Transformer blocks with 384 channels. The process concludes with an additional two Transformer blocks with 768 channels for greater depth in stage S3. This network has 16,219,002 learnable parameters.
- I + D + M + T: It includes five MBConv blocks with 384 channels in stage S2. The design is completed with two Transformer blocks with 768 channels in stage S3. This network has 15,577,746 learnable parameters.
- I + D + T + M: It includes five Transformer blocks with 384 channels in stage S2. The sequence ends with two MBConv blocks with 768 channels in stage S3. This network has 15,875,306 learnable parameters.
- I + D + M + M: It includes five MBConv blocks with 384 channels in stage S2 and concludes with two additional MBConv blocks with 768 channels in stage S3. This network has 15,234,050 learnable parameters.
3.4. Experiments
4. Results and Discussion
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- ACS. Tests for Penile Cancer—American Cancer Society. 2024. Available online: https://www.cancer.org/cancer/penile-cancer/detection-diagnosis-staging/how-diagnosed.html (accessed on 13 June 2024).
- Coelho, R.; Pinho, J.; Moreno, J.; Garbis, D.; Nascimento, A.; Larges, J.; Calixto, J.; Ramalho, L.; Silva, A.; Nogueira, L.; et al. Penile cancer in Maranhão, Northeast Brazil: The highest incidence globally? BMC Urol. 2018, 18, 50. [Google Scholar] [CrossRef] [PubMed]
- INCA. Types of Cancer|National Cancer Institute—José Alencar Gomes da Silva—INCA. 2024. Available online: https://www.gov.br/inca/pt-br/assuntos/cancer/tipos/penis (accessed on 13 June 2024).
- Fischer, A.H.; Jacobson, K.A.; Rose, J.; Zeller, R. Hematoxylin and eosin staining of tissue and cell sections. CSH Protoc. 2008, 2008, pdb.prot4986. [Google Scholar] [CrossRef] [PubMed]
- Melo, R.C.N.; Raas, M.W.D.; Palazzi, C.; Neves, V.H.; Malta, K.K.; Silva, T.P. Whole Slide Imaging and Its Applications to Histopathological Studies of Liver Disorders. Front. Med. 2020, 6, 310. [Google Scholar] [CrossRef] [PubMed]
- Atabansi, C.C.; Nie, J.; Liu, H.; Song, Q.; Yan, L.; Zhou, X. A survey of Transformer applications for histopathological image analysis: New developments and future directions. BioMedical Eng. OnLine 2023, 22, 96. [Google Scholar] [CrossRef]
- de Matos, J.; Ataky, S.T.M.; de Souza Britto, A.; Soares de Oliveira, L.E.; Lameiras Koerich, A. Machine Learning Methods for Histopathological Image Analysis: A Review. Electronics 2021, 10, 562. [Google Scholar] [CrossRef]
- Srinidhi, C.L.; Ciga, O.; Martel, A.L. Deep neural network models for computational histopathology: A survey. Med. Image Anal. 2021, 67, 101813. [Google Scholar] [CrossRef]
- Zhou, X.; Li, C.; Rahaman, M.M.; Yao, Y.; Ai, S.; Sun, C.; Wang, Q.; Zhang, Y.; Li, M.; Li, X.; et al. A Comprehensive Review for Breast Histopathology Image Analysis Using Classical and Deep Neural Networks. IEEE Access 2020, 8, 90931–90956. [Google Scholar] [CrossRef]
- Komura, D.; Ishikawa, S. Machine Learning Methods for Histopathological Image Analysis. Comput. Struct. Biotechnol. J. 2018, 16, 34–42. [Google Scholar] [CrossRef]
- Lauande, M.G.M.; Teles, A.M.; Lima da Silva, L.; Matos, C.E.F.; Braz Júnior, G.; Cardoso de Paiva, A.; Sousa de Almeida, J.D.; da Costa Oliveira, R.M.G.; Brito, H.O.; dos Nascimento, A.P.S.A.; et al. Classification of Histopathological Images of Penile Cancer using DenseNet and Transfer Learning. In Proceedings of the 17th International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications (VISIGRAPP 2022)—Volume 4: VISAPP, Virtual, 6–8 February 2022; INSTICC: Lisboa, Portugal; SciTePress: Setúbal, Portugal, 2022; pp. 976–983. [Google Scholar] [CrossRef]
- Belfort, F.C.; Silva, I.F.S.d.; Silva, A.C.; Paiva, A.C.d. Detecção de Câncer Peniano em Imagens Histopatológicas usando Redes Neurais Convolucionais em Cascata. In Proceedings of the Anais do XXIII Simpósio Brasileiro de Computação Aplicada à Saúde (SBCAS 2023), Salvador, Brazil, 27 June 2023; Brazilian Computing Society—SBC: Porto Alegre, Brazil, 2023. [Google Scholar] [CrossRef]
- Vale, J.G.A.d.; Silva, I.F.S.d.; Matos, C.E.F.; Braz Júnior, G.; Lauande, M.G.M. Redes DenseNet com Mecanismos de Atenção Múltipla aplicadas à Classificação Automática de Câncer Peniano em Imagens Histopatológicas. In Proceedings of the Anais do XXIV Simpósio Brasileiro de Computação Aplicada à Saúde (SBCAS 2024), Goiânia, Brazil, 25–28 June 2024; Brazilian Computing Society—SBC: Porto Alegre, Brazil, 2024. [Google Scholar] [CrossRef]
- Dai, Z.; Liu, H.; Le, Q.V.; Tan, M. CoAtNet: Marrying Convolution and Attention for All Data Sizes. In Proceedings of the Advances in Neural Information Processing Systems, Online, 6–14 December 2021; Ranzato, M., Beygelzimer, A., Dauphin, Y., Liang, P., Vaughan, J.W., Eds.; Curran Associates, Inc.: New York, NY, USA, 2021; Volume 34, pp. 3965–3977. [Google Scholar]
- Huang, G.; Liu, Z.; Van Der Maaten, L.; Weinberger, K.Q. Densely Connected Convolutional Networks. In Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017; pp. 2261–2269. [Google Scholar] [CrossRef]
- Borkowski, A.A.; Bui, M.M.; Thomas, L.B.; Wilson, C.P.; DeLand, L.A.; Mastorides, S.M. Lung and Colon Cancer Histopathological Image Dataset (LC25000). arXiv 2019, arXiv:1912.12142. [Google Scholar]
- Wu, Y.; Cheng, M.; Huang, S.; Pei, Z.; Zuo, Y.; Liu, J.; Yang, K.; Zhu, Q.; Zhang, J.; Hong, H.; et al. Recent Advances of Deep Learning for Computational Histopathology: Principles and Applications. Cancers 2022, 14, 1199. [Google Scholar] [CrossRef]
- Gupta, I.; Nayak, S.; Gupta, S.; Singh, S.; Verma, K.D.; Gupta, A.; Prakash, D. A deep learning based approach to detect IDC in histopathology images. Multimed. Tools Appl. 2022, 81, 36309–36330. [Google Scholar] [CrossRef]
- Vikranth, C.S.; Jagadeesh, B.; Rakesh, K.; Mohammad, D.; Krishna, S.; Remya Ajai, A.S. Computer Assisted Diagnosis of Breast Cancer Using Histopathology Images and Convolutional Neural Networks. In Proceedings of the 2022 2nd International Conference on Artificial Intelligence and Signal Processing (AISP), Vijayawada, India, 12–14 February 2022; pp. 1–6. [Google Scholar] [CrossRef]
- Spanhol, F.A.; Oliveira, L.S.; Petitjean, C.; Heutte, L. A Dataset for Breast Cancer Histopathological Image Classification. IEEE Trans. Biomed. Eng. 2016, 63, 1455–1462. [Google Scholar] [CrossRef] [PubMed]
- Aresta, G.; Araújo, T.; Kwok, S.; Chennamsetty, S.S.; Safwan, M.; Alex, V.; Marami, B.; Prastawa, M.; Chan, M.; Donovan, M.; et al. BACH: Grand challenge on breast cancer histology images. Med. Image Anal. 2019, 56, 122–139. [Google Scholar] [CrossRef]
- Iqbal, S.; Qureshi, A.N.; Alhussein, M.; Aurangzeb, K.; Kadry, S. A Novel Heteromorphous Convolutional Neural Network for Automated Assessment of Tumors in Colon and Lung Histopathology Images. Biomimetics 2023, 8, 370. [Google Scholar] [CrossRef]
- Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; et al. An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale. arXiv 2020, arXiv:2010.11929. [Google Scholar]
- Kumar, A.; Mehta, R.; Reddy, B.R.; Singh, K.K. Vision Transformer Based Effective Model for Early Detection and Classification of Lung Cancer. SN Comput. Sci. 2024, 5, 839. [Google Scholar] [CrossRef]
- Liu, Z.; Lin, Y.; Cao, Y.; Hu, H.; Wei, Y.; Zhang, Z.; Lin, S.; Guo, B. Swin Transformer: Hierarchical Vision Transformer using Shifted Windows. In Proceedings of the 2021 IEEE/CVF International Conference on Computer Vision (ICCV), Montreal, QC, Canada, 10–17 October 2021; pp. 9992–10002. [Google Scholar] [CrossRef]
- Tummala, S.; Kim, J.; Kadry, S. BreaST-Net: Multi-Class Classification of Breast Cancer from Histopathological Images Using Ensemble of Swin Transformers. Mathematics 2022, 10, 4109. [Google Scholar] [CrossRef]
- Sriwastawa, A.; Arul Jothi, J.A. Vision transformer and its variants for image classification in digital breast cancer histopathology: A comparative study. Multimed. Tools Appl. 2024, 83, 39731–39753. [Google Scholar] [CrossRef]
- Cruz-Roa, A.; Gilmore, H.; Basavanhally, A.; Feldman, M.; Ganesan, S.; Shih, N.; Tomaszewski, J.; González, F.; Madabhushi, A. Accurate and reproducible invasive breast cancer detection in whole-slide images: A Deep Learning approach for quantifying tumor extent. Sci. Rep. 2017, 7, 46450. [Google Scholar] [CrossRef]
- Li, Y.; Zhang, K.; Cao, J.; Timofte, R.; Gool, L.V. LocalViT: Bringing Locality to Vision Transformers. arXiv 2021, arXiv:2104.05707. [Google Scholar]
- Kou, Y.; Xia, C.; Jiao, Y.; Zhang, D.; Ge, R. DACTransNet: A Hybrid CNN-Transformer Network for Histopathological Image Classification of Pancreatic Cancer. In Proceedings of the Artificial Intelligence: Third CAAI International Conference, CICAI 2023, Fuzhou, China, 22–23 July 2023; Revised Selected Papers, Part II. Springer: Berlin/Heidelberg, Germany, 2024; pp. 422–434. [Google Scholar] [CrossRef]
- Mahmood, T.; Wahid, A.; Hong, J.S.; Kim, S.G.; Park, K.R. A novel convolution transformer-based network for histopathology-image classification using adaptive convolution and dynamic attention. Eng. Appl. Artif. Intell. 2024, 135, 108824. [Google Scholar] [CrossRef]
- Hosna, A.; Merry, E.; Gyalmo, J.; Alom, Z.; Aung, Z.; Azim, M.A. Transfer learning: A friendly introduction. J. Big Data 2022, 9, 102. [Google Scholar] [CrossRef] [PubMed]
- Aitazaz, T.; Tubaishat, A.; Al-Obeidat, F.; Shah, B.; Zia, T.; Tariq, A. Transfer learning for histopathology images: An empirical study. Neural Comput. Appl. 2022, 35, 7963–7974. [Google Scholar] [CrossRef]
- Sharmay, Y.; Ehsany, L.; Syed, S.; Brown, D.E. HistoTransfer: Understanding Transfer Learning for Histopathology. In Proceedings of the 2021 IEEE EMBS International Conference on Biomedical and Health Informatics (BHI), Athens, Greece, 27–30 July 2021; pp. 1–4. [Google Scholar] [CrossRef]
- Villán, A. Mastering OpenCV 4 with Python: A Practical Guide Covering Topics from Image Processing, Augmented Reality to Deep Learning with OpenCV 4 and Python 3.7; Packt Publishing: Birmingham, UK, 2019; p. 185. [Google Scholar]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar] [CrossRef]
- Sandler, M.; Howard, A.; Zhu, M.; Zhmoginov, A.; Chen, L.C. MobileNetV2: Inverted Residuals and Linear Bottlenecks. In Proceedings of the 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018; pp. 4510–4520. [Google Scholar] [CrossRef]
- Tan, M.; Le, Q. EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks. In Proceedings of the 36th International Conference on Machine Learning, Long Beach, CA, USA, 9–15 June 2019; Chaudhuri, K., Salakhutdinov, R., Eds.; MLResearchPress, 2019; Volume 97, pp. 6105–6114. [Google Scholar]
- Hu, J.; Shen, L.; Sun, G. Squeeze-and-Excitation Networks. In Proceedings of the 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018; pp. 7132–7141. [Google Scholar] [CrossRef]
- Raffel, C.; Shazeer, N.; Roberts, A.; Lee, K.; Narang, S.; Matena, M.; Zhou, Y.; Li, W.; Liu, P.J. Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer. J. Mach. Learn. Res. 2020, 21, 1–67. [Google Scholar]
- Ansel, J.; Yang, E.; He, H.; Gimelshein, N.; Jain, A.; Voznesensky, M.; Bao, B.; Bell, P.; Berard, D.; Burovski, E.; et al. PyTorch 2: Faster Machine Learning Through Dynamic Python Bytecode Transformation and Graph Compilation. In Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, New York, NY, USA, 27 April–1 May 2024; ASPLOS ’24. Volume 2, pp. 929–947. [Google Scholar] [CrossRef]
- Selvaraju, R.R.; Cogswell, M.; Das, A.; Vedantam, R.; Parikh, D.; Batra, D. Grad-CAM: Visual Explanations from Deep Networks via Gradient-Based Localization. In Proceedings of the 2017 IEEE International Conference on Computer Vision (ICCV), Venice, Italy, 22–29 October 2017; pp. 618–626. [Google Scholar] [CrossRef]
Category | Images |
---|---|
Lung—benign | 5000 |
Lung—adenocarcinoma | 5000 |
Lung—squamous cell carcinoma | 5000 |
Colon—benign | 5000 |
Colon—adenocarcinoma | 5000 |
Total | 25,000 |
Category/Magnification | 40× | 100× |
---|---|---|
Normal | 42 | 42 |
Cancer (squamous cell carcinoma) | 55 | 55 |
Total | 97 | 97 |
Exp. | Network | Magnification | Accuracy | Recall | Precision | F1-Score |
---|---|---|---|---|---|---|
1 | I * + D * + D * + M | 40× | 93.95% (7.34) | 94.55% (7.27) | 94.70% (7.20) | 94.54% (6.68) |
2 | I * + D * + D * + T | 40× | 92.89% (6.06) | 96.36% (4.45) | 91.77% (7.19) | 93.91% (5.23) |
3 | I * + D * + T + T | 40× | 87.58% (4.32) | 87.27% (7.27) | 90.51% (0.81) | 88.73% (4.36) |
4 | I * + D * + M + T | 40× | 93.74% (3.95) | 98.18% (3.64) | 91.77% (4.89) | 94.78% (3.27) |
5 | I * + D * + T + M | 40× | 90.68% (2.17) | 96.36% (4.45) | 88.95% (6.04) | 92.23% (1.53) |
6 | I * + D * + M + M | 40× | 94.95% (5.48) | 98.18% (3.64) | 94.05% (8.38) | 95.78% (4.39) |
Exp. | Network | Magnification | Accuracy | Recall | Precision | F1-Score |
---|---|---|---|---|---|---|
1 | I * + D * + D * + M | 100× | 93.79% (5.18) | 100.00% (0.00) | 90.71% (6.88) | 94.99% (3.88) |
2 | I * + D * + D * + T | 100× | 87.68% (5.09) | 90.91% (9.96) | 88.19% (4.90) | 89.09% (5.17) |
3 | I * + D * + T + T | 100× | 89.74% (4.54) | 94.55% (7.27) | 88.26% (3.57) | 91.13% (4.19) |
4 | I * + D * + M + T | 100× | 93.79% (2.16) | 98.18% (3.64) | 91.92% (4.88) | 94.77% (1.56) |
5 | I * + D * + T + M | 100× | 89.74% (7.19) | 92.73% (8.91) | 89.62% (6.29) | 90.97% (6.56) |
6 | I * + D * + M + M | 100× | 89.74% (3.09) | 94.55% (4.45) | 88.29% (3.56) | 91.22% (2.76) |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Lauande, M.G.M.; Braz Junior, G.; de Almeida, J.D.S.; Silva, A.C.; Gil da Costa, R.M.; Teles, A.M.; da Silva, L.L.; Brito, H.O.; Vidal, F.C.B.; do Vale, J.G.A.; et al. Building a DenseNet-Based Neural Network with Transformer and MBConv Blocks for Penile Cancer Classification. Appl. Sci. 2024, 14, 10536. https://doi.org/10.3390/app142210536
Lauande MGM, Braz Junior G, de Almeida JDS, Silva AC, Gil da Costa RM, Teles AM, da Silva LL, Brito HO, Vidal FCB, do Vale JGA, et al. Building a DenseNet-Based Neural Network with Transformer and MBConv Blocks for Penile Cancer Classification. Applied Sciences. 2024; 14(22):10536. https://doi.org/10.3390/app142210536
Chicago/Turabian StyleLauande, Marcos Gabriel Mendes, Geraldo Braz Junior, João Dallyson Sousa de Almeida, Aristófanes Corrêa Silva, Rui Miguel Gil da Costa, Amanda Mara Teles, Leandro Lima da Silva, Haissa Oliveira Brito, Flávia Castello Branco Vidal, João Guilherme Araújo do Vale, and et al. 2024. "Building a DenseNet-Based Neural Network with Transformer and MBConv Blocks for Penile Cancer Classification" Applied Sciences 14, no. 22: 10536. https://doi.org/10.3390/app142210536
APA StyleLauande, M. G. M., Braz Junior, G., de Almeida, J. D. S., Silva, A. C., Gil da Costa, R. M., Teles, A. M., da Silva, L. L., Brito, H. O., Vidal, F. C. B., do Vale, J. G. A., Rodrigues Junior, J. R. D., & Cunha, A. (2024). Building a DenseNet-Based Neural Network with Transformer and MBConv Blocks for Penile Cancer Classification. Applied Sciences, 14(22), 10536. https://doi.org/10.3390/app142210536