Daniel Resendiz-Ventura, Moisés Márquez-Olivera, Viridiana Hernández-Herrera, Laura Marrujo-García, Antonio-Gustavo Juárez-Gracia, Irlanda Pacheco-Bravo
Background/Objectives: Lung cancer outcomes depend strongly on early detection, highlighting the need for accurate, robust, and interpretable methods for identifying pulmonary nodules on computed tomography (CT). This study proposes a multi-organ anatomical-contextual framework based on YOLOv8-YOLOv12, in which supporting thoracic structures are incorporated as spatial references during training while the pulmonary nodule is retained as a single invariant pathological class. Methods: The models were trained and internally validated on 5000 2D axial CT slices from 320 patients in the LUNG-PET-CT-DX dataset and externally evaluated on an independent LIDC-IDRI subset comprising 700 axial slices from 70 patients, without retraining or fine-tuning. A controlled ablation study comparing Nodule-only with Nodule + Anatomical Context was performed. Results: The anatomical-contextual scheme showed consistent improvements across all five architectures, with mean absolute gains of +0.078 in Precision, +0.122 in Recall, +0.101 in F1-score, +0.079 in mAP@50, and +0.190 in mAP@50-95. During internal validation, YOLOv10m achieved the highest Precision (0.979) and mAP@50 (0.987), as well as the shortest inference time (9.25 ms), whereas YOLOv11m achieved the highest Recall (0.971) and F1-score (0.962). During external evaluation, YOLOv10m retained the highest Precision (0.924) and mAP@50 (0.956), while YOLOv8m achieved the highest Recall (0.930) and mAP@50-95 (0.845); both models achieved an F1-score of 0.922. Conclusions: These findings provide experimental evidence that anatomical-contextual learning improves pulmonary nodule detection while maintaining competitive performance across datasets, supporting its potential as an anatomically informed and interpretable strategy for AI-assisted thoracic CT analysis.