# ===================== ToothCanal-SDF default config ===================== paths: # On AutoDL, the large data disk is /root/autodl-tmp (system disk /root is small). hf_repo: "zgy0823/label" raw_dir: "/root/autodl-tmp/toothcanal/data/raw" proc_dir: "/root/autodl-tmp/toothcanal/data/processed" out_dir: "/root/autodl-tmp/toothcanal/outputs" # Drop the supplementary 21-30 TOOTH-label zip's contents here (see run notes). # Files named by case number, e.g. 21.nii.gz ... 30.nii.gz (or a per-case folder). extra_tooth_dir: "/root/autodl-tmp/toothcanal/extra_tooth_labels" # Zips whose name contains any of these substrings are NOT downloaded/used. skip_zip_substrings: ["36-40"] label_scheme: n_teeth: 28 # 28 tooth positions canal_lo: 1 # canal/pulp labels: 1..28 (inner) canal_hi: 28 body_lo: 29 # tooth-body labels: 29..56 (outer) body_hi: 56 pair_offset: 28 # instance i: canal=label i, body=label i+28 pair_mode: geometric # geometric = assign each canal to the body it sits inside # (robust to mis-numbered annotations; fixes 032/035/013/014). # set to 'offset' to restore legacy canal=i / body=i+28 pairing. preprocess: spacing: [0.4, 0.4, 0.4] # mm; whole-volume working resolution (memory friendly) clip_hu: [-1000, 3000] # intensity clip before normalization descriptor_erode_iter: 3 # erosion iters to build separable tooth-core descriptors # ---- canal cleaning ---- speck_min_voxels: 30 # remove connected components smaller than this (keeps real multi-canals) closing_radius: 0 # 0 = no morphological closing (avoids canal dilation at 0.25mm). # set to 1 only if your canals have many artifact-induced breaks. fill_holes: true split: # Cases 1-30 -> training (5-fold CV). Cases 31-35 -> held-out eval. # 36-40 has no usable data and is excluded. train_range: [1, 30] test_range: [31, 35] exclude_range: [36, 99] exclude_cases: [26] # 026 has tooth labels but NO canal labels (would teach # the model "no canal" for 28 teeth). add 19,20 too if # you want to drop the near-empty partial annotations. n_folds: 5 seed: 42 stage1: # coarse semantic seg: 0 bg / 1 tooth / 2 canal / 3 descriptor-core patch_size: [96, 96, 96] batch_size: 2 num_classes: 4 channels: [16, 32, 64, 128, 256] lr: 2.0e-4 max_epochs: 300 samples_per_volume: 4 val_interval: 10 use_descriptor: true # use class-3 cores for instance localization at inference min_core_voxels: 80 # drop tiny spurious cores (false detections) core_merge_mm: 3.0 # merge over-split cores whose centroids are removes -0.12 undersize mc_level_canal: -0.2 # canal body; scan -0.2/-0.25/-0.3 against signed_rvd (Tier 2) tooth_watertight_postprocess: true # tooth: keep largest component + fill holes (good) canal_watertight_postprocess: false # canal: do NOT fill -> preserves apex foramen + fine branches (Tier 2) pad_roi: true # pad the SDF grid border so MC closes boundary openings roi_source: "oracle" # "oracle"=GT instances (upper bound); "predicted"=Stage-1 drives ROIs use_tto: false # main results use NO test-time optimization (avoids GT leakage) canal_min_component_frac: 0.02 # 0.08->0.02 (Tier 2): keep small apical branches; rely on # largest (removes SDF bridge stubs; lower it if real thin # accessory canals are being discarded) eval: n_surface_samples: 30000 apex_mm: 3.0 # apical region size (mm) for root-tip-only canal metrics gt_wise_predicted: true # predicted eval: score 1 best prediction per GT tooth gt_roi_vox: 144 # GT meshed at 24/144=0.167mm, FIXED regardless of model, gt_grid: 144 # so 96- and 144-voxel models are compared on the SAME GT