Downloads · 30 days
0
ZhangqiSJTU/HealthiVert-GAN
HealthiVert-GAN is a machine learning model from ZhangqiSJTU. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
0
Access
Public
Updated Mar 11, 2025
Repo size
183 MB
Likes
0
Public
Click a slice to open those files.
.gz116 MB · 63%
From the Hugging Face model README
HealthiVert-GAN is a novel framework for synthesizing pseudo-healthy vertebral CT images from fractured vertebrae. By simulating pre-fracture states, it enables interpretable quantification of vertebral compression fractures (VCFs) through Relative Height Loss of Vertebrae (RHLV). The model integrates a two-stage GAN architecture with anatomical consistency modules, achieving state-of-the-art performance on both public and private datasets.

Preprocessing:
Two-Stage Generation:
Iterative Synthesis:
RHLV Calculation:
RHLV = \frac{H_{syn} - H_{ori}}{H_{syn}}
Segments vertebra into anterior/middle/posterior regions for detailed analysis.
SVM Classification: Uses RHLV values to classify fractures into mild/moderate/severe.

Interpretable Quantification Beyond Black-Box Models
Traditional end-to-end fracture classification models suffer from class imbalance and lack interpretability. HealthiVert-GAN addresses these by synthesizing pseudo-healthy vertebrae and quantifying height loss (RHLV) between generated and original vertebrae. This approach achieves superior performance (e.g., 72.3% Macro-F1 on Verse2019) while providing transparent metrics for clinical decisions.
Height Loss Distribution Mapping for Surgical Planning
HealthiVert-GAN generates cross-sectional height loss heatmaps that visualize compression patterns (wedge/biconcave/crush fractures). Clinicians can use these maps to assess fracture stability and plan interventions (e.g., vertebroplasty) with precision unmatched by single-slice methods.
Anatomic Prior Integration
Unlike conventional inpainting models, HealthiVert-GAN introduces adjacent vertebrae height variations as prior knowledge. The Self-adaptive Height Restoration Module (SHRM) dynamically adjusts generated vertebral heights based on neighboring healthy vertebrae, improving both interpretability and anatomic consistency.
git clone https://github.com/zhibaishouheilab/HealthiVert-GAN.git
cd HealthiVert-GAN
pip install -r requirements.txt # PyTorch, NiBabel, SimpleITK, OpenCV
Organize data as:
/dataset/
├── raw
├── 0001/
│ ├── 0001.nii.gz # Original CT
│ └── 0001_msk.nii.gz # Vertebrae segmentation
└── 0002/
├── 0002.nii.gz
└── 0002_msk.nii.gz
Note: You have to segment the vertebra firstly. Refer to CTSpine1K-nnUNet to obtain how to segment using nnU-Net.
Spine Straightening:
python straighten/location_json_local.py # Generate vertebral centroids
python straighten/straighten_mask_3d.py # Output: ./dataset/straightened/
Attention Map Generation:
python Attention/grad_CAM_3d_sagittal.py # Output: ./Attention/heatmap/
Configure JSON:
Update vertebra_data.json with patient IDs, labels, and paths.
Train Model:
python train.py \
--dataroot ./dataset/straightened \
--name HealthiVert_experiment \
--model pix2pix \
--direction BtoA \
--batch_size 16 \
--n_epochs 1000
Checkpoints saved in ./checkpoints/HealthiVert_experiment.
The pretrained weights will be released later.
Generate Pseudo-Healthy Vertebrae:
python eval_3d_sagittal_twostage.py # define the parameters in the code file
Outputs: ./output/CT_fake/ and ./output/label_fake/.
Fracture Grading
Calculate RHLV:
python evaluation/RHLV_quantification.py
Train SVM Classifier:
python evaluation/SVM_grading.py
Evaluate generation results:
python evaluation/generation_eval_sagittal.py
The generation visulization of different masking strategies.

The visulization heatmap of vertebral height loss distribution in axial view, and the curve of height loss.

| Metric | HealthiVert-GAN | AOT-GAN | 3D SupCon-SENet |
|---|---|---|---|
| Macro-P | 0.727 | 0.710 | 0.710 |
| Macro-R | 0.753 | 0.707 | 0.636 |
| Macro-F1 | 0.723 | 0.692 | 0.667 |
Comparison model codes: AOT-GAN 3D SupCon-SENet
@misc{zhang2025healthivertgannovelframeworkpseudohealthy,
title={HealthiVert-GAN: A Novel Framework of Pseudo-Healthy Vertebral Image Synthesis for Interpretable Compression Fracture Grading},
author={Qi Zhang and Shunan Zhang and Ziqi Zhao and Kun Wang and Jun Xu and Jianqi Sun},
year={2025},
eprint={2503.05990},
archivePrefix={arXiv},
primaryClass={eess.IV},
url={https://arxiv.org/abs/2503.05990},
}
If you have any questions about the codes or paper, please let us know via [email protected].
This project is licensed under the MIT License. See LICENSE for details.