Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ontology-Grounded Structured Prediction for Dental CBCT Reporting

Code for the MICCAI paper "Ontology-Grounded Structured Prediction for Dental CBCT Reporting".

Contributions

  • A dental CBCT ontology for structured report labels: ontology/ontology.ttl.
  • A conversion pipeline from raw Italian reports to patient-level TTL labels.
  • An ontology-driven prediction model that adapts its heads to the ontology schema.

Steps

  1. Put raw reports in data/ToothFairy3/reportsTr/.

  2. Convert reports to structured TTL with the main script, ontology/extract.py:

    OPENAI_API_KEY=... python ontology/extract.py

    This combines all reports for each patient into one TTL. ontology/extract_single.py is only for one-report-per-TTL inter-agreement checks.

  3. Check outputs:

    • valid TTLs: data/ttl_reports/
    • generated single-report TTLs: data/ttl_reports_single/
    • SHACL/API errors: data/shacl_errors/
    • schema files: ontology/ontology.ttl, ontology/shapes.ttl
  4. Preprocess CBCT volumes into regional tokens:

    python main.py preprocess --dataset-root data/ToothFairy3 --output-dir data/preprocessed_tokens
  5. Train:

    python -m src.train --wandb_name experiment_name

    For a quick local run:

    python -m src.train --use_kfold false --max_epochs 5 --no_wandb

Notes

  • TTL filenames must match preprocessed token patient IDs.
  • Training only uses samples with both .pt tokens and .ttl labels.
  • Inspect label distribution before training:
    python -m src.scripts.histogram_ttl

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages