Comparative Analysis of Detection Transformers and YOLOv8 for Early Detection of Pulmonary Nodules

  • Victor Ferraz UFAL
  • Marcelo Oliveira UFAL
  • Nilson Carvalho UFAL
  • Tarcísio Ferreira UFAL


Lung cancer (LC) is the second most prevalent type of cancer worldwide and the deadliest, accounting for one in every five cancer-related deaths globally. The chances of survival for patients detected with this type of cancer increase considerably when the diagnosis is made early, with the 5-year survival rate reaching up to 70%. Radiologists perform LC diagnosis through Computed Tomography (CT) images, but such diagnosis is a complex and error-prone task. Through computer-aided tools, this diagnostic process can be automated, reducing time and effort for specialists, as well as improving confidence in the diagnosis. The objective of this work was to evaluate and compare the effectiveness of Convolutional Neural Network (CNN) and Transformer architectures in detecting small lung nodules (≤15mm), where the guiding research question of this work was “What is the impact of the size of lung nodules on the detection accuracy of CNN and Transformer architectures?”. The dataset used was based on the public database LUNA16, filtering the test set to include only sections with nodules smaller than 15mm. The models chosen for our comparisons were YOLOv8, a CNN considered state-of-the-art in object detection, and DEtection TRansformer (DETR), which combines the transformer architecture with a CNN layer, where we obtained results such as mAP50 = 0.70, Sensitivity = 0.91 and Λ = 0.85 for the DETR and mAP50 = 0.90, Sensitivity = 0.83 and Λ = 0.77 for the YOLOv8. We also assessed the impact of nodule size on the performance of both models, where the performance of YOLOv8 was impacted by the decrease in nodules size, while DETR continued to show satisfactory results regardless of how small the nodules were.


Adams, S. J., Henderson, R. D., Yi, X., and Babyn, P. (2021). Artificial intelligence solutions for analysis of x-ray images. Canadian Association of Radiologists Journal, 72(1):60–72.

Bandos, A. I., Rockette, H. E., Song, T., and Gur, D. (2009). Area under the free-response roc curve (froc) and a related summary index. Biometrics, 65(1):247–256.

Blandin Knight, S., Crosbie, P. A., Balata, H., Chudziak, J., Hussell, T., and Dive, C. (2017). Progress and prospects of early detection in lung cancer. Open biology, 7(9):170070.

Carion, N., Massa, F., Synnaeve, G., Usunier, N., Kirillov, A., and Zagoruyko, S. (2020). End-to-end object detection with transformers. In European conference on computer vision, pages 213–229. Springer.

Choi, W.-J. and Choi, T.-S. (2013). Automated pulmonary nodule detection system in computed tomography images: A hierarchical block classification approach. Entropy, 15(2):507–523.

Ferreira, J. R., Oliveira, M. C., and de Azevedo-Marques, P. M. (2018). Characterization of pulmonary nodules based on features of margin sharpness and texture. Journal of digital imaging, 31:451–463.

Firmino, M., Angelo, G., Morais, H., Dantas, M. R., and Valentim, R. (2016). Computer-aided detection (cade) and diagnosis (cadx) system for lung cancer with likelihood of malignancy. Biomedical engineering online, 15(1):1–17.

Halder, A., Dey, D., and Sadhu, A. K. (2020). Lung nodule detection from feature engineering to deep learning in thoracic ct images: a comprehensive review. Journal of digital imaging, 33(3):655–677.

Jocher, G., Chaurasia, A., and Qiu, J. (2023). YOLO by Ultralytics.

Li, S., Wu, C., and Xiong, N. (2022). Hybrid architecture based on cnn and transformer for strip steel surface defect classification. Electronics, 11(8):1200.

Liang, J., Ye, G., Guo, J., Huang, Q., and Zhang, S. (2021). Reducing false-positives in lung nodules detection using balanced datasets. Frontiers in Public Health, 9:671070.

Lima, L., Vieira, T., Costa, E., Azevedo-Marques, P., and Oliveira, M. (2020). Using support vector machine and features selection on classification of early lung nodules. In Anais do XX Simpósio Brasileiro de Computação Aplicada à Saúde (SBCAS), pages 60–71.

Lima, L. L., Ferreira Junior, J. R., and Oliveira, M. C. (2021). Toward classifying small lung nodules with hyperparameter optimization of convolutional neural networks. Computational Intelligence, 37(4):1599–1618.

McBee, M. P., Awan, O. A., Colucci, A. T., Ghobadi, C. W., Kadom, N., Kansagra, A. P., Tridandapani, S., and Auffermann, W. F. (2018). Deep learning in radiology. Academic radiology, 25(11):1472–1480.

Niu, C. and Wang, G. (2022). Unsupervised contrastive learning based transformer for lung nodule detection. Physics in Medicine & Biology, 67(20):204001.

Raví, D., Wong, C., Deligianni, F., Berthelot, M., Andreu-Perez, J., Lo, B., and Yang, G.-Z. (2016). Deep learning for health informatics. IEEE journal of biomedical and health informatics, 21(1):4–21.

Setio, A. A. A., Traverso, A., De Bel, T., Berens, M. S., Van Den Bogaard, C., Cerello, P., Chen, H., Dou, Q., Fantacci, M. E., Geurts, B., et al. (2017). Validation, comparison, and combination of algorithms for automatic detection of pulmonary nodules in computed tomography images: the luna16 challenge. Medical image analysis, 42:1–13.

Shaukat, F., Raja, G., and Frangi, A. F. (2019). Computer-aided detection of lung nodules: a review. Journal of Medical Imaging, 6(2):020901–020901.

Zhu, X., Wang, X., Shi, Y., Ren, S., and Wang, W. (2022). Channel-wise attention mechanism in the 3d convolutional network for lung nodule detection. Electronics, 11(10):1600.
FERRAZ, Victor; OLIVEIRA, Marcelo; CARVALHO, Nilson; FERREIRA, Tarcísio. Comparative Analysis of Detection Transformers and YOLOv8 for Early Detection of Pulmonary Nodules. In: SIMPÓSIO BRASILEIRO DE COMPUTAÇÃO APLICADA À SAÚDE (SBCAS), 24. , 2024, Goiânia/GO. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2024 . p. 296-307. ISSN 2763-8952. DOI: