Skip to content

Code for: Deep Learning for Odontoid Fractures: The Critical Role of Patient-Level Partitioning and Grad-CAM Verification in Model Generalization

Sep 2026 · Zenodo (CERN European Organization for Nuclear Research)

Abstract

Description This repository contains the complete, reproducible PyTorch source code for the study "Deep Learning for Odontoid Fractures: The Critical Role of Patient-Level Partitioning and Grad-CAM Verification in Model Generalization". The codebase implements an end-to-end deep learning framework designed to eliminate data leakage and selection bias in cervical spine CT fracture detection, benchmark six transfer learning CNN architectures, visualize anatomical decision-making via Explainable AI (XAI), and perform rigorous patient-level statistical validation. What's New in Version 1.1.0 Version 1.1.0 incorporates critical methodological and statistical updates addressing peer-review requirements for clinical validation rigor: 3-Way Patient-Level Zero-Leakage Split: Data partitioning is strictly enforced at the patient level into three mutually disjoint subsets: Training (60 patients, 326 CT slices), Validation (16 patients, 92 CT slices), and an independent held-out Test set (20 patients, 122 CT slices). Untouched Held-Out Test Evaluation: Early stopping loss is strictly monitored on the independent Validation cohort with a patience of 40 epochs. The held-out Test set remains completely isolated during training and hyperparameter optimization, being queried exactly once per trained model solely for final inference. Multiple Comparison Correction (Holm-Bonferroni): Pairwise patient-level bootstrap hypothesis testing (N = 1000 iterations) relative to DenseNet121 now integrates the step-down Holm-Bonferroni procedure to control the family-wise error rate (FWER) across candidate comparisons. Slice Capping: Standardized patient sampling enforces a maximum of 10 slices per subject to prevent dominant scan bias. Repository Structure & Pipeline Scripts 01_data_preparation.py: Reads raw DICOM volumes and applies Min-Max normalization to generate 8-bit PNG images. Executes patient-level 3-way partitioning (Train/, Val/, Test/) with random slice capping (≤ 10 slices/patient). Generates sample composite grid visualizations (Figure 1). 02_model_training_and_testing.py: Implements standardized label-agnostic upper-neck ROI cropping (top=5%, left=15%, height=65%, width=60%) and ImageNet normalization. Trains and fine-tunes 6 CNN architectures: SqueezeNet 1.1, AlexNet, VGG19, GoogLeNet, ResNet18, and DenseNet121. Applies class-weighted cross-entropy loss based on training distribution to handle class imbalance. Enforces fully deterministic seed control (seed=42) and validation-monitored early stopping checkpoints. Evaluates the saved checkpoints on the held-out test cohort to output confusion matrix metrics (TP, TN, FP, FN, Accuracy, Sensitivity, Specificity). 03_gradcam_visualization.py: Computes Gradient-weighted Class Activation Mapping (Grad-CAM) heatmaps across the final convolutional layer of each trained architecture. Visually verifies whether models localize the C1–C2 articulation and dens axis or rely on confounding soft-tissue artifacts. 04_result_plots.py: Exports publication-ready multi-panel Confusion Matrices and comparative ROC curves. Executes 1,000-iteration patient-level bootstrapping with replacement to calculate 95% Confidence Intervals (CI) for Accuracy and AUC. Performs pre-specified one-sided pairwise hypothesis testing against DenseNet121, outputting both raw p-values and Holm-adjusted padj values. System Requirements & Dependencies Python ≥ 3.10 PyTorch ≥ 2.0.0 / Torchvision ≥ 0.15.0 (CUDA enabled) Core libraries: pydicom, opencv-python, pytorch-grad-cam, scikit-learn, numpy, pandas, matplotlib, seaborn Citation & Academic Attribution If you utilize this codebase, experimental protocol, or pipeline in your research, please cite this repository: BibTeX: @software{kiymaz2026odontoid_code, author = {K{\i}ymaz, Yunus Emre and Ta{\c{s}}demir, {\c{S}}akir and Gezer, Burak and Uyar P{\i}nar, K{\"u}bra}, title = {{Deep Learning for Odontoid Fractures: The Critical Role of Patient-Level Partitioning and Grad-CAM Verification in Model Generalization}}, month = sep, year = 2026, publisher = {Zenodo}, version = {v1.1.0}, doi = {10.5281/zenodo.22677577}, url = {https://doi.org/10.5281/zenodo.22677577} } APA Style: Kıymaz, Y. E., Taşdemir, Ş., Gezer, B., & Uyar Pınar, K. (2026). Deep Learning for Odontoid Fractures: The Critical Role of Patient-Level Partitioning and Grad-CAM Verification in Model Generalization (Version 1.1.0) [Software]. Zenodo. https://doi.org/10.5281/zenodo.21950279

View source

Similar papers

#computer vision Review Sep 2017

Agile Software Development Methods: Review and Analysis

This publication proposes a definition and a classification of agile software development approaches and analyses ten software development methods that can be characterized as being "agile" against the defined criterion.

P. Abrahamsson, O. Salo, Jussi Ronkainen et al. · 727 citations · ⚡54
#computer vision Jun 2008

The impact of agile practices on communication in software development

The study shows that agile practices improve both informal and formal communication, but indicates that, in larger development situations involving multiple external stakeholders, a mismatch of adequate communication mechanisms can sometimes even hinder the communication.

M. Pikkarainen, Jukka Haikara, O. Salo et al. · 401 citations · ⚡48
#machine learning Review Open access Oct 2014

Software development in startup companies: A systematic mapping study

The results indicate that software engineering work practices are chosen opportunistically, adapted and configured to provide value under the constrains imposed by the startup context.

Nicolò Paternoster, Carmine Giardino, M. Unterkalmsteiner et al. · 394 citations · ⚡54
#computer vision Review Mar 2008

Agile methods in European embedded software development organisations: a survey on the actual use and usefulness of Extreme Programming and Scrum

The results show that the embedded industry has been able to apply agile methods in its development processes and that the appreciation of the agile methods and their individual practices appears to increase once adopted and applied in practice.

O. Salo, P. Abrahamsson · 238 citations · ⚡9
#computer vision Open access Jul 2017

What happens when software developers are (un)happy

Consequences of happiness and unhappiness that are beneficial and detrimental for developers' mental well-being, the software development process, and the produced artifacts are found.

D. Graziotin, Fabian Fagerholm, Xiaofeng Wang et al. · 236 citations · ⚡13
#computer vision Open access Oct 2004

Mobile-D: an agile approach for mobile application development

The Mobile-D approach is briefly outlined here and the experiences gained from four case studies are discussed, which helped develop an agile development approach for mobile application development.

P. Abrahamsson, Antti Hanhineva, H. Hulkko et al. · 225 citations · ⚡18

Related blog posts

Microsoft Research Blog Oct 12, 2026

Simulating student learning for better AI tutoring

StudentSim is a research system for evaluating and improving AI tutoring tools before they are tested with learners. It models how individuals may engage with tutors, giving feedback to improve tutor performance across subjects like chess, writing, and mathematics. The post Simulating student learning for better AI tutoring appeared first on Microsoft Research.

GPT-Lab Sep 23, 2026

Requirements Don’t Live in Isolation: What We’re Exploring with Req-Space

Requirements in large systems rarely exist in isolation. Their meaning depends on the wider project context - other requirements, policies, decisions, tests, and implementation details. That becomes especially important when AI is used for review, because spotting a possible conflict or gap is only the beginning. ReqSpace explores how AI, visualisation, and connected project context can help reviewers understand those findings, trace the relationships behind them, and focus on the questions that…

GPT-Lab Sep 17, 2026

Beyond Prompt Engineering: The Role of Tacit Knowledge in Software Engineering

AI is making software generation faster, but speed does not remove the need for expertise. As more work is delegated to AI, tacit knowledge may become one of the most important human advantages in software engineering. The post Beyond Prompt Engineering: The Role of Tacit Knowledge in Software Engineering appeared first on GPT-Lab.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.