Lumbar Spine Multi-view Annotations with Pfirrmann Grading,
Quantitative Measurements and Structured Radiological Reports
- Abstract
- Highlights
- Dataset at a Glance
- Mathematical Framework
- Dataset Contents and Structure
- Annotation Specifications
- Clinical Metadata
- Quality Assurance
- Baseline Benchmarks
- Research Applications
- Getting Started
- Repository Structure
- Limitations
- Citation
- License
Automated analysis of lumbar spine MRI remains constrained by the absence of a comprehensive dataset integrating pixel-level anatomy, quantitative markings and radiological notes within a unified framework. We present LSMA-PQR, a clinically validated lumbar spine MRI dataset comprising N = 515 patients with dual-plane, dual-sequence imaging (axial and sagittal T1/T2-weighted; 4,120 total images) and comprehensive multi-modal annotations. Pixel-level segmentation masks for seven anatomical structures are provided in multiple interoperable formats (YOLO polygon, semantic) with verified cross-format spatial consistency (mean IoU = 0.994 ± 0.008). Beyond anatomy, the dataset integrates quantitative disc markings including 1,545 Pfirrmann degeneration grades (L3-L4, L4-L5, L5-S1) and intervertebral disc height measurements with pixel-coordinate provenance, as well as structured radiological reports derived from 515 free-text documents through systematic natural language processing that identified and corrected 340 transcription errors across 59% of reports.
Baseline experiments on three downstream tasks -- multi-plane segmentation (mean Dice = 0.946), disc-aware Pfirrmann grading (quadratic weighted κ = 0.51) and structured clinical findings extraction (weighted F1 = 0.59) -- demonstrate the dataset's utility for training and evaluating automated lumbar spine analysis systems.
Data Access: https://data.mendeley.com/datasets/p3r4xd2488/2
| # | Highlight |
|---|---|
| 1 | 4,120 annotated lumbar spine MRI images (3,090 axial + 1,030 sagittal) at 384×384 resolution |
| 2 | Validated disc heights (MAE = 0.31 mm) and Pfirrmann degeneration grades across 1,545 discs |
| 3 | 515 structured, error-corrected radiology reports enabling joint image-text analysis |
| 4 | Baseline experiments on segmentation (Dice = 0.946), grading (κ = 0.51) and findings extraction (F1 = 0.59) |
| 5 | Open-access dataset supporting multi-modal fusion: segmentation, grading, regression and NLP |
| Metric | Axial | Sagittal | Total |
|---|---|---|---|
| Total images | 3,090 | 1,030 | 4,120 |
| T1-weighted | 1,545 | 515 | 2,060 |
| T2-weighted | 1,545 | 515 | 2,060 |
| Images per patient | 6 | 2 | 8 |
| Disc levels covered | D3, D4, D5 | Mid-sagittal | -- |
| Anatomical classes | 3 | 4 | 7 |
| Plane | Class | ID | Label Files | Objects | Objects/Image |
|---|---|---|---|---|---|
| Axial | Intervertebral Disc (IVD) | c0 | 3,090 | 3,090 | 1.0 |
| Axial | Posterior Elements (PE) | c1 | 3,090 | 3,090 | 1.0 |
| Axial | Spinal Canal (SC) | c2 | 3,090 | 3,090 | 1.0 |
| Axial subtotal | 3,090 | 9,270 | 3.0 | ||
| Sagittal | Vertebral Bodies (VB) | c3 | 1,030 | 6,766 | 6.6 ± 1.2 |
| Sagittal | Intervertebral Discs (IVD) | c4 | 1,030 | 7,047 | 6.8 ± 1.1 |
| Sagittal | Sacrum (S) | c5 | 1,030 | 1,030 | 1.0 |
| Sagittal | Spinal Canal (SC) | c6 | 1,030 | 1,030 | 1.0 |
| Sagittal subtotal | 1,030 | 15,873 | 15.4 | ||
| Combined | 4,120 | 25,143 | 6.1 |
Each patient
Mid-sagittal slice selection follows:
All images are resampled to a standardised 384 × 384 resolution via bicubic interpolation:
$$I_{\text{std}}(u,v) = \mathcal{T}I_{\text{raw}} = \sum_{x,y} I_{\text{raw}}(x,y) \cdot K!\left(\frac{u \cdot H}{384} - x,; \frac{v \cdot W}{384} - y\right)$$
where
Axial classes:
Sagittal classes:
The axial segmentation mask assigns each pixel a class label:
Polygon annotations are rasterised using the even-odd rule:
$$\mathcal{R}\mathbf{V} = \begin{cases} 1 & \text{if } \left(\sum_{i=1}^{n} \mathbb{1}!\left[\ell_{(u,v)} \cap e_i \neq \emptyset\right]\right) \bmod 2 = 1 \\[4pt] 0 & \text{otherwise} \end{cases}$$
Spatial consistency between YOLO-polygon and semantic-mask formats is verified per class
Aggregated across both imaging planes:
Result: Mean IoU = 0.994 ± 0.008 across 4,120 images.
Disc height is computed as the Euclidean distance between superior and inferior end-plate midpoints, scaled by pixel spacing
For oblique disc orientations, the perpendicular height is obtained by projecting onto the disc mid-plane normal:
Severity classification:
Disc Height Index (DHI):
The Pfirrmann system is a five-point ordinal scale assessed on T2-weighted MRI. Quantitative grading integrates three complementary metrics:
Disc Signal Intensity Index:
Coefficient of Variation:
The quantitative grading function combines these with DHI:
Calibration against expert labels: accuracy = 92.3%, κw = 0.89, ρs = 0.94 (p < 0.001).
Intraclass Correlation Coefficient for inter-observer reliability:
Lexical correction uses the Levenshtein edit distance against a 2,847-term RadLex vocabulary:
where the recursive Levenshtein distance is:
Phonetic matching via Double Metaphone handles terms beyond the Levenshtein threshold:
Named Entity Recognition (hybrid pattern-based + medical terminology matching):
Severity ordinal mapping:
$$\mathcal{Q}: \text{Severity} \rightarrow \{0, 1, 2, 3\} = \begin{cases} 0 & \text{normal'', unremarkable'', intact''} \\\\[2pt] 1 & \text{mild'', minimal'', slight''} \\[2pt] 2 & \text{moderate'', intermediate''} \\[2pt] 3 & \text{severe'', marked'', ``advanced''} \end{cases}$$
Pathology prevalence estimation:
Each patient's structured clinical record integrates all modalities:
After downloading from Mendeley Data, the dataset has the following structure:
LSMA-PQR/
├── images_png/ # 4,120 MRI images (384×384 PNG)
│ ├── T1_0001_D3.png # Axial T1, Patient 0001, L3-L4
│ ├── T2_0001_D5.png # Axial T2, Patient 0001, L5-S1
│ ├── T1_0001_S8.png # Sagittal T1, Patient 0001
│ └── ...
├── labels_yolo/ # YOLO polygon annotations (.txt)
├── masks_indexed/ # Semantic segmentation masks (.png)
├── overlay_visuals/ # Pre-rendered annotation overlays
├── PfirrmannGrade.csv # Pfirrmann grades (515 × 3 discs)
├── IVDHeights.csv # Disc heights with coordinates
└── structured_notes.csv # NLP-processed radiology reports
File Naming Convention:
| View | Pattern | Example |
|---|---|---|
| Axial | {Modality}_{PatientID}_{DiscLevel}.png |
T2_0042_D4.png |
| Sagittal | {Modality}_{PatientID}_S{SliceNumber}.png |
T1_0042_S8.png |
Each .txt label file contains one polygon per line:
<class_id> <x1> <y1> <x2> <y2> ... <xn> <yn>
All coordinates are normalised to [0, 1] relative to image dimensions.
Single-channel indexed PNG where pixel value = class ID:
| Pixel Value | Class (Axial) | Class (Sagittal) |
|---|---|---|
| 0 | Background | Background |
| 1 | IVD | -- |
| 2 | PE | -- |
| 3 | SC | -- |
| 4 | -- | VB |
| 5 | -- | IVD |
| 6 | -- | Sacrum |
| 7 | -- | SC |
Loading example (Python):
import numpy as np
from PIL import Image
mask = np.array(Image.open("masks_indexed/T2_0042_D4.png"))
ivd_region = (mask == 1) # Binary mask for IVDGrading scale (assessed on T2-weighted MRI):
| Grade | MRI Characteristics |
|---|---|
| 1 | Homogeneous bright white IVD; normal height; clear nucleus/annulus boundary |
| 2 | Inhomogeneous with horizontal bands; normal height; visible nucleus/annulus distinction |
| 3 | Inhomogeneous gray IVD; normal to slightly decreased height; unclear nucleus/annulus boundary |
| 4 | Inhomogeneous dark gray; moderate height loss (30--40%); no nucleus/annulus distinction |
| 5 | Inhomogeneous black IVD; collapsed disc space (>40% loss); no signal intensity |
Grade distribution (N = 1,545 disc assessments across 515 patients):
| Grade | D3 (L3-L4) n (%) | D4 (L4-L5) n (%) | D5 (L5-S1) n (%) | Total n (%) |
|---|---|---|---|---|
| 1 | 10 (1.9) | 10 (1.9) | 3 (0.6) | 23 (1.5) |
| 2 | 341 (66.2) | 240 (46.6) | 252 (48.9) | 833 (53.9) |
| 3 | 94 (18.3) | 158 (30.7) | 124 (24.1) | 376 (24.3) |
| 4 | 63 (12.2) | 99 (19.2) | 112 (21.8) | 274 (17.7) |
| 5 | 7 (1.4) | 8 (1.6) | 24 (4.7) | 39 (2.5) |
| Total | 515 | 515 | 515 | 1,545 |
Key findings:
- Severe degeneration (Grades 4--5) increases caudally: 13.6% at L3-L4 to 26.4% at L5-S1 (χ²(2) = 27.8, p < 0.001)
- D5 (L5-S1) is the primary pathology driver in 71.5% of patients
- D4-D3 Pearson correlation: r = 0.556; D5-D4: r = 0.299
- Inter-rater agreement: κw = 0.83 (95% CI: 0.74--0.91)
Disc height is measured using a validated two-point methodology on T2-weighted mid-sagittal images (see Section 4.4).
CSV structure (IVDHeights.csv):
| Column | Description |
|---|---|
Patient_ID |
Integer patient identifier |
D5_Ht |
L5-S1 disc height (mm) |
D4_Ht |
L4-L5 disc height (mm) |
D3_Ht |
L3-L4 disc height (mm) |
D5_Coord |
Endpoint coordinates: top_x,top_y;bottom_x,bottom_y |
D4_Coord |
Endpoint coordinates |
D3_Coord |
Endpoint coordinates |
Summary statistics:
| Level | Mean (mm) | Median (mm) | IQR (mm) | Severe (<6 mm) |
|---|---|---|---|---|
| D3 (L3-L4) | 9.72 | 9.72 | 2.42 | 3.1% |
| D4 (L4-L5) | 9.88 | -- | -- | 4.5% |
| D5 (L5-S1) | 9.00 | 9.16 | 3.05 | 11.3% |
Inter-observer reliability (n = 20 patients, 60 disc levels):
- ICC(2,1) = 0.94 (excellent)
- MAE = 0.31 mm (relative error 2.9%)
- Exceeds Frobin et al. clinical tolerance threshold of 4.15%
Correlation: Disc height vs. Pfirrmann grade: ρs = −0.72 (p < 0.001)
515 free-text radiology reports were processed through a five-stage NLP pipeline (see Section 4.6):
- Lexical standardisation and spell correction (340 errors in 59% of reports)
- Phonetic matching (Double Metaphone)
- Named Entity Recognition (8.7 ± 3.2 entities/report, 96.3% precision)
- Severity quantification (4-level ordinal encoding)
- Structured record assembly
Pathology prevalence:
| Pathology | Count | Prevalence |
|---|---|---|
| Disc compression/degeneration | 403 | 78.3% |
| Disc bulge (diffuse protrusion) | 277 | 53.8% |
| Paraspinal muscle spasm | 201 | 39.0% |
| Facet joint arthropathy | 156 | 30.3% |
| Disc herniation (focal extrusion) | 72 | 14.0% |
| Neural foraminal stenosis | 68 | 13.2% |
| Central canal stenosis | 45 | 8.7% |
| Endplate changes (Modic type I/II) | 34 | 6.6% |
| Annular fissure/tear | 28 | 5.4% |
| Spondylolisthesis (degenerative) | 19 | 3.7% |
| Ligamentum flavum hypertrophy | 17 | 3.3% |
Laterality distribution: Bilateral 24.7% | Left 17.3% | Right 14.4% | None 43.7%
| Validation Metric | Value |
|---|---|
| Cross-format IoU (YOLO vs. Mask) | 0.994 ± 0.008 |
| Pfirrmann inter-rater κw | 0.83 (95% CI: 0.74--0.91) |
| Disc height ICC(2,1) | 0.94 |
| Disc height MAE | 0.31 mm (2.9% relative) |
| Quantitative Pfirrmann accuracy | 92.3% (κw = 0.89) |
| Quantitative Pfirrmann 5-fold CV | 90.1 ± 1.8% (κw = 0.86 ± 0.03) |
| NLP correction accuracy | 98.8% |
| NER pattern precision | 96.3% |
| Spearman severity vs. Pfirrmann | ρs = 0.68 (p < 0.001) |
| Spearman disc height vs. Pfirrmann | ρs = −0.72 (p < 0.001) |
| Total annotation effort | ~550 person-hours (488 annotation + 62 QA) |
All experiments: NVIDIA RTX 4070 (8 GB), PyTorch 2.5.1, CUDA 12.1, seed = 42. Train/val/test split: 70%/15%/15%, stratified by patient ID. Detailed architecture descriptions and training configurations are documented in scripts/benchmarks/README.md.
Architecture: YOLO11m backbone with multi-scale feature fusion; 54.1M total parameters, 17% trainable (frozen encoder).
| View | Class | Dice | IoU | Precision | Recall |
|---|---|---|---|---|---|
| Axial | IVD (c0) | 0.978 | 0.956 | 0.976 | 0.979 |
| Axial | PE (c1) | 0.935 | 0.878 | 0.936 | 0.935 |
| Axial | SC (c2) | 0.919 | 0.850 | 0.921 | 0.917 |
| Axial mean | 0.944 | 0.895 | 0.944 | 0.944 | |
| Sagittal | VB (c3) | 0.958 | 0.919 | 0.953 | 0.963 |
| Sagittal | IVD (c4) | 0.936 | 0.879 | 0.934 | 0.937 |
| Sagittal | Sacrum (c5) | 0.958 | 0.920 | 0.960 | 0.957 |
| Sagittal | SC (c6) | 0.939 | 0.884 | 0.941 | 0.936 |
| Sagittal mean | 0.948 | 0.901 | 0.947 | 0.948 | |
| Overall | 0.946 | 0.898 | 0.946 | 0.946 |
Architecture: DINOv2 vision encoder + LoRA (r = 8) + ordinal regression head + disc-level positional embeddings; ~2.39M trainable parameters.
| Setting | n | Accuracy | κw | F1 (Weighted) |
|---|---|---|---|---|
| D3 (L3-L4), Test | 79 | 64.6% | 0.592 | 0.641 |
| D4 (L4-L5), Test | 83 | 44.6% | 0.379 | 0.451 |
| D5 (L5-S1), Test | 69 | 30.4% | 0.408 | 0.293 |
| Overall, Test | 231 | 47.2% | 0.505 | 0.482 |
| Best Validation | -- | -- | 0.585 | -- |
| Ablation (non disc-aware) | -- | -- | 0.358 | -- |
Disc-aware positional embeddings improve κ by +63% over ablation baseline (0.358 → 0.585). Error analysis: 93% single-grade errors, 7% two-grade; Grade 2 ↔ 3 confusion accounts for 50% of errors.
Architecture: ResNet-18 encoder + MultiDiscAggregator (4-head cross-attention) + multi-head classifiers; 12.28M parameters.
| Category | Metric | Score |
|---|---|---|
| Global multi-label | Hamming Loss | 0.261 |
| F1 (Macro) | 0.318 | |
| F1 (Micro) | 0.500 | |
| F1 (Weighted) | 0.585 | |
| Auxiliary targets | L4-L5 Type Accuracy | 57.1% |
| L5-S1 Type Accuracy | 66.2% | |
| Severity Accuracy | 54.5% | |
| Top label-wise F1 | L4-L5 Involvement | 0.822 |
| Thecal Sac Compression | 0.821 | |
| L4-L5 Compression | 0.796 | |
| Disc Bulge | 0.729 | |
| Disc Protrusion | 0.556 |
LSMA-PQR is designed to support the following research directions:
| Application | Description | Relevant Data |
|---|---|---|
| Multi-plane segmentation | Train and evaluate models that handle axial + sagittal views jointly | images_png/, labels_yolo/, masks_indexed/ |
| Degeneration classification | Pfirrmann grade prediction from sagittal MRI | PfirrmannGrade.csv, sagittal images |
| Disc height regression | Predict quantitative disc heights from images | IVDHeights.csv, sagittal images |
| Multi-view learning | Fuse axial and sagittal features for improved pathology detection | All image data |
| Report-guided supervision | Use structured reports as weak supervisory signals for image models | structured_notes.csv |
| Clinical cross-validation | Validate imaging biomarkers against radiologist reports and quantitative measurements | All metadata CSVs |
| Radiology NLP | Develop and benchmark radiology NLP systems | structured_notes.csv |
- Surgical planning: Quantitative disc height measurements with coordinate provenance inform disc replacement sizing and approach planning.
- Longitudinal monitoring: The severity classification framework provides standardised vocabulary for tracking degeneration progression across visits.
- Radiology training: Graded Pfirrmann examples (Grades 1--5) with corresponding T2-weighted imaging serve as a structured teaching resource.
- Multi-metric cross-validation: Imaging findings, degeneration grades, disc heights and clinical reports can be jointly validated, enabling integrated clinical decision support research.
numpy>=1.24
pandas>=2.0
matplotlib>=3.7
Pillow>=10.0
scipy>=1.11
opencv-python>=4.8
Install:
pip install -r scripts/requirements.txtBrowse images:
python scripts/visualization/visualize_images.py --browse --sequence T2 --images_dir <path_to>/images_pngView semantic masks:
python scripts/visualization/visualize_semantic_masks.py --browse --sequence T2 \
--images_dir <path_to>/images_png --masks_dir <path_to>/masks_indexedView YOLO annotations:
python scripts/visualization/visualize_yolo_annotations.py --browse --sequence T2 \
--images_dir <path_to>/images_png --labels_dir <path_to>/labels_yoloLoad Pfirrmann grades:
import pandas as pd
grades = pd.read_csv("PfirrmannGrade.csv")
print(grades.describe())
# Columns: Patient_ID, D5, D4, D3 (grades 1-5)Load IVD heights:
heights = pd.read_csv("IVDHeights.csv")
print(f"Mean D5 height: {heights['D5_Ht'].mean():.2f} mm")PyTorch Dataset (segmentation):
from torch.utils.data import Dataset
from PIL import Image
import numpy as np
import torch
import glob
class LSMAPQRSegmentation(Dataset):
def __init__(self, images_dir, masks_dir, transform=None):
self.images = sorted(glob.glob(f"{images_dir}/*.png"))
self.masks_dir = masks_dir
self.transform = transform
def __len__(self):
return len(self.images)
def __getitem__(self, idx):
img = np.array(Image.open(self.images[idx]).convert("RGB"))
stem = self.images[idx].rsplit("/", 1)[-1]
mask = np.array(Image.open(f"{self.masks_dir}/{stem}"))
if self.transform:
transformed = self.transform(image=img, mask=mask)
img, mask = transformed["image"], transformed["mask"]
return (torch.from_numpy(img).permute(2, 0, 1).float() / 255.0,
torch.from_numpy(mask).long())LSMA-PQR/
├── README.md # This file
├── CITATION.cff # Machine-readable citation
├── LICENSE # CC BY 4.0
├── .gitignore
│
├── assets/ # Figures for documentation
│ ├── Figure_01_dataset_overview_infographic.png
│ ├── Figure_02_multiview_comparison.png
│ ├── Figure_03_pfirrmann_grades.png
│ ├── Figure_04_annotation_formats.png
│ ├── Figure_05_pfirrmann_distribution.png
│ ├── Figure_06A_ivd_measurement.png
│ ├── Figure_06B_ivd_distribution.png
│ └── Figure_07_multipatient_ivd.png
│
├── scripts/
│ ├── requirements.txt # Python dependencies
│ ├── visualization/ # Dataset exploration tools
│ │ ├── visualize_images.py # MRI image browser
│ │ ├── visualize_semantic_masks.py # Mask overlay viewer
│ │ └── visualize_yolo_annotations.py # YOLO bbox viewer
│ │
│ ├── ivd_height/ # IVD height extraction pipeline
│ │ ├── README.md # Pipeline documentation
│ │ ├── inspect_mat_structure.py # .mat file structure inspector
│ │ ├── convert_mat_to_csv.py # Batch .mat → CSV extraction
│ │ ├── verify_csv.py # CSV integrity verification
│ │ ├── resolve_duplicates.py # Duplicate Patient_ID resolution
│ │ ├── merge_manual_measurements.py # JSON manual measurement merge
│ │ ├── validate_corrected.py # Final 515-patient validation
│ │ └── visualize_ivd_heights.py # Measurement overlay visualisation
│ │
│ ├── pfirrmann_grading/ # Pfirrmann grading pipeline
│ │ ├── README.md # Pipeline documentation
│ │ ├── convert_mat_to_csv.py # .mat → CSV conversion
│ │ ├── add_patient_id.py # Patient_ID column injection
│ │ ├── pfirrmann_validator.py # Interactive validation GUI
│ │ └── analyze_grades.py # Statistical analysis
│ │
│ └── benchmarks/ # Baseline experiment documentation
│ └── README.md # Architecture and training details
│
└── docs/
└── DATASET_CARD.md # Formal dataset documentation card
- Class imbalance: Pfirrmann Grades 1 and 5 are scarce (1.5% and 2.5%, respectively); augmentation or class-balanced sampling is recommended.
- Single centre: All data are from a single imaging centre; scanner-specific biases may limit direct generalisability without domain adaptation.
- Symptomatic cohort: Patients were consecutive symptomatic cases (low back pain, radiculopathy); the distribution does not represent the general population.
- Cross-sectional: No longitudinal follow-up; temporal progression cannot be modelled from this data.
- 2D slices: Single mid-sagittal slice per patient constrains volumetric modelling.
- Demographics: Granular demographics (age, sex, BMI) are unavailable from the original anonymised DICOM archive.
- Low-prevalence entities: Pathologies with <10% prevalence yield near-zero F1 in current findings extraction models.
If you use LSMA-PQR in your research, please cite:
@article{Masood2026LSMAPQR,
author = {Masood, Rao Farhat and Taj, Imtiaz Ahmad},
title = {LSMA-PQR: A Comprehensive Dataset of Lumbar Spine Multi-View Annotations with Pfirrmann Grading, Quantitative Measurements, and Structured Radiological Reports},
journal = {Journal of Imaging Informatics in Medicine},
year = {2026},
publisher = {Springer},
doi = {10.1007/s10278-026-02125-5},
url = {https://doi.org/10.1007/s10278-026-02125-5}
}
@dataset{Masood2025LSMA_PQR,
author = {Masood, Rao Farhat and Taj, Imtiaz Ahmad and Talha, Muhammad and Khan, M. Babar},
title = {LSMA-PQR: Lumbar Spine Multi-view Annotations with Pfirrmann grading, Quantitative measurements and structured Radiological reports},
year = {2025},
publisher = {Mendeley Data},
version = {V2},
doi = {10.17632/p3r4xd2488.2},
url = {https://doi.org/10.17632/p3r4xd2488.2}
}This dataset and all accompanying code are released under the Creative Commons Attribution 4.0 International License (CC BY 4.0).
You are free to share and adapt the material for any purpose, including commercial use, provided appropriate credit is given.







