ChipYTY commited on
Commit
3b4c87c
·
verified ·
1 Parent(s): caeb6c5

Add GliomaSAM3-MoE and SegMamba model weights

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +9 -0
  2. README.md +97 -0
  3. gliomasam3_moe/checkpoints/ckpt_step2000.pt +3 -0
  4. gliomasam3_moe/checkpoints/ckpt_step2600.pt +3 -0
  5. gliomasam3_moe/checkpoints/ckpt_step3000.pt +3 -0
  6. gliomasam3_moe/configs/train.yaml +76 -0
  7. gliomasam3_moe/eval_results/table4_et_absent.json +43 -0
  8. gliomasam3_moe/eval_results/table7_boundary_dice.json +26 -0
  9. gliomasam3_moe/vis_res/README.md +206 -0
  10. gliomasam3_moe/vis_res/ampmix/Fig8_a_ampmix_BraTS-GLI-00005-000.pdf +3 -0
  11. gliomasam3_moe/vis_res/ampmix/Fig8_a_ampmix_BraTS-GLI-00005-000.png +3 -0
  12. gliomasam3_moe/vis_res/boundary/Fig3_a_boundary_BraTS-GLI-00005-000.pdf +3 -0
  13. gliomasam3_moe/vis_res/boundary/Fig3_a_boundary_BraTS-GLI-00005-000.png +3 -0
  14. gliomasam3_moe/vis_res/boundary/Fig3_b_boundary_BraTS-GLI-00017-000.pdf +3 -0
  15. gliomasam3_moe/vis_res/boundary/Fig3_b_boundary_BraTS-GLI-00017-000.png +3 -0
  16. gliomasam3_moe/vis_res/concept_tokens/Fig6_a1_et_overview_BraTS-GLI-00005-000.pdf +0 -0
  17. gliomasam3_moe/vis_res/concept_tokens/Fig6_a1_et_overview_BraTS-GLI-00005-000.png +3 -0
  18. gliomasam3_moe/vis_res/concept_tokens/Fig6_a2_fragmentation_BraTS-GLI-00005-000.pdf +0 -0
  19. gliomasam3_moe/vis_res/concept_tokens/Fig6_a2_fragmentation_BraTS-GLI-00005-000.png +3 -0
  20. gliomasam3_moe/vis_res/concept_tokens/Fig6_a3_scale_BraTS-GLI-00005-000.pdf +0 -0
  21. gliomasam3_moe/vis_res/concept_tokens/Fig6_a3_scale_BraTS-GLI-00005-000.png +3 -0
  22. gliomasam3_moe/vis_res/concept_tokens/Fig6_b1_et_overview_BraTS-GLI-00006-000.pdf +3 -0
  23. gliomasam3_moe/vis_res/concept_tokens/Fig6_b1_et_overview_BraTS-GLI-00006-000.png +3 -0
  24. gliomasam3_moe/vis_res/concept_tokens/Fig6_b2_fragmentation_BraTS-GLI-00006-000.pdf +0 -0
  25. gliomasam3_moe/vis_res/concept_tokens/Fig6_b2_fragmentation_BraTS-GLI-00006-000.png +3 -0
  26. gliomasam3_moe/vis_res/concept_tokens/Fig6_b3_scale_BraTS-GLI-00006-000.pdf +0 -0
  27. gliomasam3_moe/vis_res/concept_tokens/Fig6_b3_scale_BraTS-GLI-00006-000.png +3 -0
  28. gliomasam3_moe/vis_res/dual_domain/Fig7_a_dual_domain_BraTS-GLI-00005-000.pdf +3 -0
  29. gliomasam3_moe/vis_res/dual_domain/Fig7_a_dual_domain_BraTS-GLI-00005-000.png +3 -0
  30. gliomasam3_moe/vis_res/dual_domain/Fig7_b_dual_domain_BraTS-GLI-00017-000.pdf +3 -0
  31. gliomasam3_moe/vis_res/dual_domain/Fig7_b_dual_domain_BraTS-GLI-00017-000.png +3 -0
  32. gliomasam3_moe/vis_res/et_absent/Fig2_a_et_absent_BraTS-GLI-00012-000.pdf +3 -0
  33. gliomasam3_moe/vis_res/et_absent/Fig2_a_et_absent_BraTS-GLI-00012-000.png +3 -0
  34. gliomasam3_moe/vis_res/failure/Fig9_a_failure_BraTS-GLI-00020-000.pdf +3 -0
  35. gliomasam3_moe/vis_res/failure/Fig9_a_failure_BraTS-GLI-00020-000.png +3 -0
  36. gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/gt_ET.png +3 -0
  37. gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/gt_TC.png +3 -0
  38. gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/gt_WT.png +3 -0
  39. gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/gt_overlay.png +3 -0
  40. gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/input_FLAIR.png +3 -0
  41. gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/input_T1.png +3 -0
  42. gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/input_T1ce.png +3 -0
  43. gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/input_T2.png +3 -0
  44. gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/pred_gliomasam_step2000_ET.png +3 -0
  45. gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/pred_gliomasam_step2000_TC.png +3 -0
  46. gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/pred_gliomasam_step2000_WT.png +3 -0
  47. gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/pred_gliomasam_step2000_overlay.png +3 -0
  48. gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/pred_gliomasam_step2600_ET.png +3 -0
  49. gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/pred_gliomasam_step2600_TC.png +3 -0
  50. gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/pred_gliomasam_step2600_WT.png +3 -0
.gitattributes CHANGED
@@ -57,3 +57,12 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
57
  # Video files - compressed
58
  *.mp4 filter=lfs diff=lfs merge=lfs -text
59
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
57
  # Video files - compressed
58
  *.mp4 filter=lfs diff=lfs merge=lfs -text
59
  *.webm filter=lfs diff=lfs merge=lfs -text
60
+ gliomasam3_moe/vis_res/ampmix/Fig8_a_ampmix_BraTS-GLI-00005-000.pdf filter=lfs diff=lfs merge=lfs -text
61
+ gliomasam3_moe/vis_res/boundary/Fig3_a_boundary_BraTS-GLI-00005-000.pdf filter=lfs diff=lfs merge=lfs -text
62
+ gliomasam3_moe/vis_res/boundary/Fig3_b_boundary_BraTS-GLI-00017-000.pdf filter=lfs diff=lfs merge=lfs -text
63
+ gliomasam3_moe/vis_res/concept_tokens/Fig6_b1_et_overview_BraTS-GLI-00006-000.pdf filter=lfs diff=lfs merge=lfs -text
64
+ gliomasam3_moe/vis_res/dual_domain/Fig7_a_dual_domain_BraTS-GLI-00005-000.pdf filter=lfs diff=lfs merge=lfs -text
65
+ gliomasam3_moe/vis_res/dual_domain/Fig7_b_dual_domain_BraTS-GLI-00017-000.pdf filter=lfs diff=lfs merge=lfs -text
66
+ gliomasam3_moe/vis_res/et_absent/Fig2_a_et_absent_BraTS-GLI-00012-000.pdf filter=lfs diff=lfs merge=lfs -text
67
+ gliomasam3_moe/vis_res/failure/Fig9_a_failure_BraTS-GLI-00020-000.pdf filter=lfs diff=lfs merge=lfs -text
68
+ gliomasam3_moe/vis_res/qualitative/Fig1_qualitative_comparison.pdf filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SegMamba & GliomaSAM3-MoE Model Weights and Results
2
+
3
+ This repository contains pre-trained model weights, evaluation results, and visualization outputs for brain tumor segmentation on BraTS 2023 dataset.
4
+
5
+ ## Repository Structure
6
+
7
+ ```
8
+ .
9
+ ├── gliomasam3_moe/
10
+ │ ├── checkpoints/ # GliomaSAM3-MoE model weights
11
+ │ │ ├── ckpt_step2000.pt
12
+ │ │ ├── ckpt_step2600.pt
13
+ │ │ └── ckpt_step3000.pt # Best checkpoint
14
+ │ ├── configs/
15
+ │ │ └── train.yaml # Training configuration
16
+ │ ├── eval_results/
17
+ │ │ ├── table4_et_absent.json # ET presence classification results
18
+ │ │ └── table7_boundary_dice.json # Boundary-band Dice results
19
+ │ └── vis_res/ # Visualization results
20
+ │ ├── method_comparison/ # Side-by-side comparisons
21
+ │ ├── boundary/ # Boundary analysis figures
22
+ │ ├── moe_routing/ # MoE routing visualizations
23
+ │ └── ...
24
+
25
+ ├── segmamba/
26
+ │ ├── checkpoints/ # SegMamba model weights
27
+ │ │ ├── tmp_model_ep599_0.8295.pt
28
+ │ │ └── tmp_model_ep799_0.8498.pt # Best checkpoint (Dice=0.8498)
29
+ │ └── prediction_results/
30
+ │ ├── segmamba_brats23_ep799/ # Prediction NIfTI files
31
+ │ └── result_metrics/ # Evaluation metrics
32
+
33
+ └── README.md
34
+ ```
35
+
36
+ ## Model Performance
37
+
38
+ ### GliomaSAM3-MoE (ckpt_step3000)
39
+
40
+ **Boundary-band Dice (3-voxel band):**
41
+ | Region | Dice |
42
+ |--------|------|
43
+ | WT | 0.789 ± 0.057 |
44
+ | TC | 0.766 ± 0.154 |
45
+ | ET | 0.697 ± 0.161 |
46
+ | **Mean** | **0.750** |
47
+
48
+ **ET Presence Classification:**
49
+ | Metric | Value |
50
+ |--------|-------|
51
+ | AUROC | 0.896 |
52
+ | Accuracy | 0.795 |
53
+ | Sensitivity | 0.792 |
54
+ | Specificity | 1.000 |
55
+
56
+ ### SegMamba (ep799)
57
+
58
+ - Mean Dice: 0.8498
59
+ - Trained for 800 epochs on BraTS 2023
60
+
61
+ ## Usage
62
+
63
+ ### Loading GliomaSAM3-MoE
64
+
65
+ ```python
66
+ import torch
67
+
68
+ # Load checkpoint
69
+ ckpt = torch.load("gliomasam3_moe/checkpoints/ckpt_step3000.pt", map_location="cpu")
70
+
71
+ # Model state dict is in ckpt["model"]
72
+ model.load_state_dict(ckpt["model"])
73
+ ```
74
+
75
+ ### Loading SegMamba
76
+
77
+ ```python
78
+ import torch
79
+
80
+ # Load checkpoint
81
+ ckpt = torch.load("segmamba/checkpoints/tmp_model_ep799_0.8498.pt", map_location="cpu")
82
+
83
+ # Model state dict
84
+ model.load_state_dict(ckpt["model"])
85
+ ```
86
+
87
+ ## Data
88
+
89
+ Models were trained and evaluated on BraTS 2023 GLI Challenge dataset (122 cases in processed subset).
90
+
91
+ ## Citation
92
+
93
+ If you use these models, please cite the relevant papers.
94
+
95
+ ## License
96
+
97
+ Please refer to the original model repositories for licensing information.
gliomasam3_moe/checkpoints/ckpt_step2000.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:886d389ca84282d411b5a8643d578bc540ef32477c05b498a66d2ef8c62e6507
3
+ size 1821693123
gliomasam3_moe/checkpoints/ckpt_step2600.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5886858a63de35d717697158e747060ca9df3104a2d92637cb040966a8af96e2
3
+ size 1821693123
gliomasam3_moe/checkpoints/ckpt_step3000.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ffe568c3046807bb3b15bd36427ac935cd495acac15cd4937988b92f85cbab1a
3
+ size 1821693123
gliomasam3_moe/configs/train.yaml ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ seed: 42
2
+ device: "cuda"
3
+ amp: true
4
+ synthetic: false
5
+
6
+ data:
7
+ format: "segmamba_npz"
8
+ root_dir: "/data/yty/brats23_segmamba_processed"
9
+ modalities: ["t1n", "t1c", "t2f", "t2w"]
10
+ seg_name: "seg"
11
+ orientation: "RAS"
12
+ do_spacing: false
13
+ spacing: [1.0, 1.0, 1.0]
14
+ crop_size: [128, 128, 128]
15
+ num_samples: 1
16
+ rand_scale_prob: 0.1
17
+ rand_shift_prob: 0.1
18
+ batch_size: 6
19
+ synthetic_shape: [16, 128, 128]
20
+ synthetic_cases: 16
21
+ train_rate: 0.7
22
+ val_rate: 0.1
23
+ test_rate: 0.2
24
+ segmamba_unpack: true
25
+
26
+ model:
27
+ patch_size: 14
28
+ token_dim: 128
29
+ depth: 3
30
+ heads: 4
31
+ mlp_ratio: 4.0
32
+ slice_attn_k: 6
33
+ slice_attn_random_dir: true
34
+ spectral_bins: 24
35
+ spectral_q: 3
36
+ msda_scales: [3, 5, 7]
37
+ moe_experts: 5
38
+ moe_topk: 2
39
+ decoder_hidden: 96
40
+ prompt_mlp_hidden: 128
41
+ use_sam3_backbone: true
42
+ sam3_ckpt_path: "/data/yty/sam3/sam3.pt"
43
+ sam3_freeze: true
44
+ sam3_in_chans: 7
45
+ sam3_input_mean: [0.5, 0.5, 0.5]
46
+ sam3_input_std: [0.5, 0.5, 0.5]
47
+
48
+ loss:
49
+ dice_weight: 1.0
50
+ bce_weight: 1.0
51
+ et_focal_weight: 0.5
52
+ focal_gamma: 2.0
53
+ pres_weight: 0.1
54
+ hier_weight: 0.1
55
+ moe_weight: 0.01
56
+
57
+ train:
58
+ epochs: 300
59
+ max_steps: 10000
60
+ lr: 0.0002
61
+ weight_decay: 0.00001
62
+ log_every: 20
63
+ save_every: 200
64
+ ckpt_dir: "./logs/segmamba/model"
65
+ fourier_mix_prob: 0.2
66
+ num_workers: 4
67
+ use_label_prompt: true
68
+ test_every_epochs: 5
69
+ test_max_cases: 0
70
+
71
+ infer:
72
+ roi_size: [128, 128, 128]
73
+ sw_batch_size: 1
74
+ overlap: 0.5
75
+ threshold: 0.5
76
+ et_cc_min_size: 50
gliomasam3_moe/eval_results/table4_et_absent.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "et_absent_subset": {
3
+ "n": 2,
4
+ "fp_volume_mm3": {
5
+ "mean": 74.5,
6
+ "std": 74.5,
7
+ "min": 0.0,
8
+ "max": 149.0
9
+ },
10
+ "fp_components": {
11
+ "mean": 0.5,
12
+ "std": 0.5,
13
+ "min": 0,
14
+ "max": 1
15
+ }
16
+ },
17
+ "et_absent_cases": [
18
+ {
19
+ "case_id": "BraTS-GLI-00017-001",
20
+ "fp_volume_mm3": 149,
21
+ "fp_components": 1
22
+ },
23
+ {
24
+ "case_id": "BraTS-GLI-00048-001",
25
+ "fp_volume_mm3": 0,
26
+ "fp_components": 0
27
+ }
28
+ ],
29
+ "classification": {
30
+ "n": 122,
31
+ "n_et_present": 120,
32
+ "n_et_absent": 2,
33
+ "auroc": 0.8958333333333333,
34
+ "optimal_threshold": 0.9947388768196106,
35
+ "accuracy_optimal": 0.7950819672131147,
36
+ "sensitivity_optimal": 0.7916666666666666,
37
+ "specificity_optimal": 1.0
38
+ },
39
+ "config": {
40
+ "min_size": 50,
41
+ "threshold": 0.5
42
+ }
43
+ }
gliomasam3_moe/eval_results/table7_boundary_dice.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "stats": {
3
+ "WT": {
4
+ "mean": 0.7889820841743286,
5
+ "std": 0.05687755328186895,
6
+ "n": 122
7
+ },
8
+ "TC": {
9
+ "mean": 0.7656578316169296,
10
+ "std": 0.1538429439512892,
11
+ "n": 122
12
+ },
13
+ "ET": {
14
+ "mean": 0.6964991356739063,
15
+ "std": 0.1612273062938224,
16
+ "n": 122
17
+ },
18
+ "Mean": {
19
+ "mean": 0.7503796838217216
20
+ }
21
+ },
22
+ "config": {
23
+ "radius": 3,
24
+ "min_size": 50
25
+ }
26
+ }
gliomasam3_moe/vis_res/README.md ADDED
@@ -0,0 +1,206 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GliomaSAM3-MoE 可视化结果总结
2
+
3
+ 本文档总结了各可视化实验的内容、目的和主要结论。
4
+
5
+ ---
6
+
7
+ ## 1. 主定性对比 (qualitative/)
8
+
9
+ **文件**: `Fig1_qualitative_comparison.png`
10
+
11
+ **内容**:
12
+ - 多模态输入(T1, T1ce, T2, FLAIR)
13
+ - Ground Truth 与预测结果对比
14
+ - 我们的方法 (GliomaSAM3-MoE) vs SegMamba
15
+ - WT/TC/ET 三区域分割叠加显示
16
+
17
+ **结论**: 展示模型在不同病例上的定性分割效果,通过彩色叠加可以直观比较各方法在肿瘤边界、区域完整性上的差异。
18
+
19
+ ---
20
+
21
+ ## 2. ET Gate 研究 (et_absent/)
22
+
23
+ **文件**: `Fig2_a_et_absent_BraTS-GLI-00012-000.png`
24
+
25
+ **内容**:
26
+ - ET Before Gate: 经过 gate 前的 ET 预测概率图
27
+ - ET After Gate: 经过 gate 后的 ET 预测概率图
28
+ - π_ET 值: 模型预测的 ET 存在概率
29
+
30
+ **结论**:
31
+ - π_ET 值反映模型对 ET(增强肿瘤)存在性的判断置信度
32
+ - 当 π_ET > 0.5 时,模型认为存在 ET;反之则抑制 ET 预测
33
+ - 此机制可帮助减少 ET 假阳性,但在当前训练下效果较弱(大多数 π_ET 接近 0.97-0.98)
34
+
35
+ ---
36
+
37
+ ## 3. 边界误差分析 (boundary/)
38
+
39
+ **文件**:
40
+ - `Fig3_a_boundary_BraTS-GLI-00005-000.png`
41
+ - `Fig3_b_boundary_BraTS-GLI-00017-000.png`
42
+
43
+ **内容**:
44
+ - 左侧: T1ce 图像 + Ground Truth 边界(白色)+ 预测边界(黑色)
45
+ - 右侧: 边界误差热力图(红色=假阳性FP,蓝色=假阴性FN)
46
+
47
+ **结论**:
48
+ - 边界误差热力图直观展示分割误差的空间分布
49
+ - 可用于分析 HD95 指标的改善区域
50
+ - 误差主要集中在肿瘤边缘模糊区域
51
+
52
+ ---
53
+
54
+ ## 4. 微小/碎片 ET 分析 (tiny_et/)
55
+
56
+ **文件**:
57
+ - `Fig4_a_tiny_et_BraTS-GLI-00005-000.png`
58
+ - `Fig4_b_tiny_et_BraTS-GLI-00006-000.png`
59
+
60
+ **内容**:
61
+ - 局部 ROI 放大显示
62
+ - Ground Truth vs 我们的方法 vs SegMamba
63
+ - 专注于 ET 极小或碎片化区域
64
+
65
+ **结论**: 展示模型对微小 ET 区域的捕获能力,验证是否能保留碎片化结构而不丢失或过度平滑。
66
+
67
+ ---
68
+
69
+ ## 5. MoE 路由可解释性 (moe_routing/)
70
+
71
+ **文件**:
72
+ - `Fig5_a_moe_routing_BraTS-GLI-00018-000.png`
73
+ - `Fig5_b_moe_routing_BraTS-GLI-00012-000.png`
74
+
75
+ **内容**:
76
+ - 柱状图展示各专家对 WT/TC/ET 三个区域的贡献权重
77
+ - X 轴: 专家索引 (E0-E4),激活的专家用 "(active)" 标注
78
+ - Y 轴: 贡献值
79
+ - 颜色区分: WT(青色), TC(品红), ET(黄色)
80
+ - 黑色折线: 路由权重 γ,激活专家标注具体值
81
+ - 非激活专家显示为半透明(alpha=0.3)
82
+
83
+ **重要说明**:
84
+ - 模型配置 `moe_topk: 2`,即采用 **Top-2 稀疏门控**
85
+ - 每次推理**只激活 2 个专家**,其余专家权重为 0
86
+ - 这是 Mixture-of-Experts 的标准设计,不是 bug
87
+
88
+ **结论**:
89
+ - Top-2 稀疏门控使计算效率提高,同时保持模型容量
90
+ - 不同案例可能激活不同的专家组合(如 E0+E2 或其他)
91
+ - 路由权重 γ 显示各激活专家的相对重要性
92
+
93
+ ---
94
+
95
+ ## 6. 概念 Token 可解释性 (concept_tokens/)
96
+
97
+ 每个病例生成 3 张图:
98
+
99
+ ### 6.1 ET 预测概览 (Fig6_X1_et_overview_*.png)
100
+ - 左: T1ce 原始输入
101
+ - 右: ET 预测 mask 叠加 + 体素总数
102
+
103
+ ### 6.2 碎片化分析 (Fig6_X2_fragmentation_*.png)
104
+ - 左: 连通域可视化(不同颜色标识各组件)
105
+ - 中: 各组件大小柱状图
106
+ - 右: FRAG_BIN 分类(None/Low/Medium/High)
107
+
108
+ ### 6.3 规模分析 (Fig6_X3_scale_*.png)
109
+ - 左: ET 区域可视化
110
+ - 右: SCALE_BIN 分类(Tiny/Small/Medium/Large)
111
+
112
+ **结论**:
113
+ - **FRAG_BIN**: 根据 ET 连通域数量判断碎片化程度
114
+ - n ≤ 1 → None, n ≤ 3 → Low, n ≤ 5 → Medium, n > 5 → High
115
+ - **SCALE_BIN**: 根据 ET 体素总数判断规模
116
+ - voxels ≤ 50 → Tiny, ≤ 200 → Small, ≤ 500 → Medium, > 500 → Large
117
+ - 这些概念 token 与肿瘤形态特征直接关联,可用于辅助临床决策
118
+
119
+ ---
120
+
121
+ ## 7. 双域增强效果 (dual_domain/)
122
+
123
+ **文件**:
124
+ - `Fig7_a_dual_domain_BraTS-GLI-00005-000.png`
125
+ - `Fig7_b_dual_domain_BraTS-GLI-00017-000.png`
126
+
127
+ **内容**:
128
+ - 左: 原始图像的傅里叶幅度谱
129
+ - 右: 增强后的傅里叶幅度谱
130
+ - 统一色标便于比较
131
+
132
+ **结论**:
133
+ - 频域可视化展示模型如何利用频谱信息
134
+ - 增强后的幅度谱可能显示高频成分增强,有助于边界检测
135
+ - 体现双域(空域+频域)融合的效果
136
+
137
+ ---
138
+
139
+ ## 8. AmpMix 增强鲁棒性 (ampmix/)
140
+
141
+ **文件**: `Fig8_a_ampmix_BraTS-GLI-00005-000.png`
142
+
143
+ **内容**:
144
+ - 左: 原始图像 + 预测
145
+ - 中: AmpMix 扰动后的图像
146
+ - 右: 扰动后的预测结果
147
+
148
+ **结论**:
149
+ - AmpMix 通过混合不同样本的傅里叶幅度谱进行数据增强
150
+ - 展示模型在幅度谱扰动下的预测稳定性
151
+ - 理想情况下,扰动前后预测应保持一致,边界不发生显著漂移
152
+
153
+ ---
154
+
155
+ ## 9. 失败案例分析 (failure/)
156
+
157
+ **文件**: `Fig9_a_failure_BraTS-GLI-00020-000.png`
158
+
159
+ **内容**:
160
+ - 左: Ground Truth
161
+ - 右: 预测结果
162
+ - 标注: 失败原因说明
163
+
164
+ **结论**:
165
+ - 展示模型的局限性
166
+ - 典型失败原因包括:
167
+ - 边界模��区域的判断困难
168
+ - 低对比度区域的误分割
169
+ - 伪影或异常强度影响
170
+ - 诚实展示模型限制有助于后续改进方向
171
+
172
+ ---
173
+
174
+ ## 文件结构
175
+
176
+ ```
177
+ vis_res/
178
+ ├── README.md # 本文档
179
+ ├── qualitative/ # 主定性对比
180
+ ├── et_absent/ # ET Gate 研究
181
+ ├── boundary/ # 边界误差分析
182
+ ├── tiny_et/ # 微小 ET 分析
183
+ ├── moe_routing/ # MoE 路由可解释性
184
+ ├── concept_tokens/ # 概念 Token 可解释性
185
+ ├── dual_domain/ # 双域增强效果
186
+ ├── ampmix/ # AmpMix 鲁棒性
187
+ ├── failure/ # 失败案例
188
+ └── aux_cache/ # 中间结果缓存(内部使用)
189
+ ```
190
+
191
+ ---
192
+
193
+ ## 生成方式
194
+
195
+ 所有可视化由 `visualizations/vis_publication.py` 生成,配置文件为 `visualizations/vis_config.yaml`。
196
+
197
+ ```bash
198
+ cd /root/githubs/gliomasam3_moe
199
+ PYTHONPATH=/root/githubs/sam3:$PYTHONPATH python visualizations/vis_publication.py \
200
+ --config visualizations/vis_config.yaml \
201
+ --model-config configs/train.yaml \
202
+ --checkpoint ./logs/segmamba/model/ckpt_step600.pt \
203
+ --run all
204
+ ```
205
+
206
+ 可通过 `--run <name>` 单独生成特定可视化(如 `--run moe,dual_domain`)。
gliomasam3_moe/vis_res/ampmix/Fig8_a_ampmix_BraTS-GLI-00005-000.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a4e155669c0f2ae5ba5340a49a6a131afdba8873a179db1efb67b7fdf3c022e1
3
+ size 132112
gliomasam3_moe/vis_res/ampmix/Fig8_a_ampmix_BraTS-GLI-00005-000.png ADDED

Git LFS Details

  • SHA256: 10742ad4350591843a837443f0343a161fda1a01076ba8399bfd9acb6084ad5a
  • Pointer size: 131 Bytes
  • Size of remote file: 194 kB
gliomasam3_moe/vis_res/boundary/Fig3_a_boundary_BraTS-GLI-00005-000.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:410b3dddbb75fa28373d0fa9bb245bba0be27fa3e794ae23cb0c3b084cdec6bd
3
+ size 128886
gliomasam3_moe/vis_res/boundary/Fig3_a_boundary_BraTS-GLI-00005-000.png ADDED

Git LFS Details

  • SHA256: 9fa9e51fcc272da6c13594d405d37aed81b3d15021d073eaf73fba550a5b3a96
  • Pointer size: 131 Bytes
  • Size of remote file: 237 kB
gliomasam3_moe/vis_res/boundary/Fig3_b_boundary_BraTS-GLI-00017-000.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:674e7fdabbf5d1cb909d03a46472aee1ee31c07b1b4126a5e508b3983269c74b
3
+ size 132941
gliomasam3_moe/vis_res/boundary/Fig3_b_boundary_BraTS-GLI-00017-000.png ADDED

Git LFS Details

  • SHA256: e9712f42aea7e96a0df82e88dc8c40010fd3aaf0be01cc66a9982ecc395d4f35
  • Pointer size: 131 Bytes
  • Size of remote file: 237 kB
gliomasam3_moe/vis_res/concept_tokens/Fig6_a1_et_overview_BraTS-GLI-00005-000.pdf ADDED
Binary file (92.5 kB). View file
 
gliomasam3_moe/vis_res/concept_tokens/Fig6_a1_et_overview_BraTS-GLI-00005-000.png ADDED

Git LFS Details

  • SHA256: 1f370ed17fde0a589799f821c5ef981a99d26fe3252ab9efd232eeccac726dd3
  • Pointer size: 131 Bytes
  • Size of remote file: 140 kB
gliomasam3_moe/vis_res/concept_tokens/Fig6_a2_fragmentation_BraTS-GLI-00005-000.pdf ADDED
Binary file (56.1 kB). View file
 
gliomasam3_moe/vis_res/concept_tokens/Fig6_a2_fragmentation_BraTS-GLI-00005-000.png ADDED

Git LFS Details

  • SHA256: 4a623d29f4f7dd900c986ac7f885ae8962a48f0f7270e197937e78c919032944
  • Pointer size: 131 Bytes
  • Size of remote file: 186 kB
gliomasam3_moe/vis_res/concept_tokens/Fig6_a3_scale_BraTS-GLI-00005-000.pdf ADDED
Binary file (77.1 kB). View file
 
gliomasam3_moe/vis_res/concept_tokens/Fig6_a3_scale_BraTS-GLI-00005-000.png ADDED

Git LFS Details

  • SHA256: c9b8eeaff07154945c696b7e7f717f90c9e25b32e710f432e4519ef571fe12d0
  • Pointer size: 131 Bytes
  • Size of remote file: 205 kB
gliomasam3_moe/vis_res/concept_tokens/Fig6_b1_et_overview_BraTS-GLI-00006-000.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c89698cb5dae181364d13a93fda036899144c3e52494b58bc635c11d1a29fcd4
3
+ size 102141
gliomasam3_moe/vis_res/concept_tokens/Fig6_b1_et_overview_BraTS-GLI-00006-000.png ADDED

Git LFS Details

  • SHA256: 7d63a67a2a1383e80e947d2472f5ae03c63c64e44dc7bdc320aa83e0532bb96c
  • Pointer size: 131 Bytes
  • Size of remote file: 150 kB
gliomasam3_moe/vis_res/concept_tokens/Fig6_b2_fragmentation_BraTS-GLI-00006-000.pdf ADDED
Binary file (59.8 kB). View file
 
gliomasam3_moe/vis_res/concept_tokens/Fig6_b2_fragmentation_BraTS-GLI-00006-000.png ADDED

Git LFS Details

  • SHA256: 3dc1d19490bceff5ea0b1eea55f9f6c56c2bac90196aa2649d4bcfc718ec9df5
  • Pointer size: 131 Bytes
  • Size of remote file: 191 kB
gliomasam3_moe/vis_res/concept_tokens/Fig6_b3_scale_BraTS-GLI-00006-000.pdf ADDED
Binary file (86 kB). View file
 
gliomasam3_moe/vis_res/concept_tokens/Fig6_b3_scale_BraTS-GLI-00006-000.png ADDED

Git LFS Details

  • SHA256: 91e60a5a415f15482ced3532caf54b74da33e29bc2acf48739f285538705989a
  • Pointer size: 131 Bytes
  • Size of remote file: 219 kB
gliomasam3_moe/vis_res/dual_domain/Fig7_a_dual_domain_BraTS-GLI-00005-000.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fbae61c80f8bf576c539fae47daf8c65e84997288a4a636fad1b4dce637ce118
3
+ size 113416
gliomasam3_moe/vis_res/dual_domain/Fig7_a_dual_domain_BraTS-GLI-00005-000.png ADDED

Git LFS Details

  • SHA256: d2c86b90f2af47f75e63b01d0f387e46847e63fd4d5499856d558d1d000c2a43
  • Pointer size: 131 Bytes
  • Size of remote file: 304 kB
gliomasam3_moe/vis_res/dual_domain/Fig7_b_dual_domain_BraTS-GLI-00017-000.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:64d31767498b3c52967f9cd3e9edec59e97a0fa41a46d8767350dff97685316c
3
+ size 131093
gliomasam3_moe/vis_res/dual_domain/Fig7_b_dual_domain_BraTS-GLI-00017-000.png ADDED

Git LFS Details

  • SHA256: 292748beae8ad166b4560953cc863050c0c13a2f8ffd7155b165f6134de7947a
  • Pointer size: 131 Bytes
  • Size of remote file: 349 kB
gliomasam3_moe/vis_res/et_absent/Fig2_a_et_absent_BraTS-GLI-00012-000.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1faf4ae3266d69db1efddae19f4ff18ea5b54333dcbe4587b4fe5859ec3e3d46
3
+ size 144235
gliomasam3_moe/vis_res/et_absent/Fig2_a_et_absent_BraTS-GLI-00012-000.png ADDED

Git LFS Details

  • SHA256: 3aed350076481bf4bf63c053f78632528b3d4e48ed129a0c868de074ea9e97a3
  • Pointer size: 131 Bytes
  • Size of remote file: 224 kB
gliomasam3_moe/vis_res/failure/Fig9_a_failure_BraTS-GLI-00020-000.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:400eb6bd7ee79191f9a7dab3825d65aefdbfbd3495be2cc8bdaffa7fee3856de
3
+ size 138511
gliomasam3_moe/vis_res/failure/Fig9_a_failure_BraTS-GLI-00020-000.png ADDED

Git LFS Details

  • SHA256: b01a4e18635a08290c4d73aa3d210b012c4285576951c9c69627e4b67867d38c
  • Pointer size: 131 Bytes
  • Size of remote file: 175 kB
gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/gt_ET.png ADDED

Git LFS Details

  • SHA256: 53ba96fa433cb44a5ace3114692cd91668b0f8c1e198f99b2c1fa8761765111a
  • Pointer size: 130 Bytes
  • Size of remote file: 55.2 kB
gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/gt_TC.png ADDED

Git LFS Details

  • SHA256: fd09ec5caee93904fb26d7a3227b61606908a19cebc90f0040e18f21aa467bb1
  • Pointer size: 130 Bytes
  • Size of remote file: 56 kB
gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/gt_WT.png ADDED

Git LFS Details

  • SHA256: 5c52099fed944e0ee13570ad26311a2c3552ca33113a431ebeb2a39abb04d6f1
  • Pointer size: 130 Bytes
  • Size of remote file: 56.8 kB
gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/gt_overlay.png ADDED

Git LFS Details

  • SHA256: 91c82a1e289becc48d5b371d023607f1de21e7530a5e030b6d62fe5fe267456f
  • Pointer size: 130 Bytes
  • Size of remote file: 59.7 kB
gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/input_FLAIR.png ADDED

Git LFS Details

  • SHA256: e87c2791f9969e590e9bad918813722a226920559ff2e17e73a62728c67a7ba0
  • Pointer size: 130 Bytes
  • Size of remote file: 48.4 kB
gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/input_T1.png ADDED

Git LFS Details

  • SHA256: 25d02dcb215ed701388415ea167f71603a6a8554ef724b757dc0511e8d3259f0
  • Pointer size: 130 Bytes
  • Size of remote file: 51.4 kB
gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/input_T1ce.png ADDED

Git LFS Details

  • SHA256: 6d9adb71bebac3529c03f0f5588faae9d7f916f9356185b881f6ca01b3d573ca
  • Pointer size: 130 Bytes
  • Size of remote file: 55.4 kB
gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/input_T2.png ADDED

Git LFS Details

  • SHA256: 71952a937f5f6ec650aa138fc82a5e677afcfad05a38093efb0b6c2651db28c1
  • Pointer size: 130 Bytes
  • Size of remote file: 50.6 kB
gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/pred_gliomasam_step2000_ET.png ADDED

Git LFS Details

  • SHA256: 368f77a112ea30afcd883cf4cf20fbe28a5dffe658608eab9bfbd2f250970337
  • Pointer size: 130 Bytes
  • Size of remote file: 67.5 kB
gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/pred_gliomasam_step2000_TC.png ADDED

Git LFS Details

  • SHA256: 37119349168a73c5af436bccb78555eb4bf2b5264b9aa1767dc5698630427d00
  • Pointer size: 130 Bytes
  • Size of remote file: 67.9 kB
gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/pred_gliomasam_step2000_WT.png ADDED

Git LFS Details

  • SHA256: abf3e85acade637f77e64674061110149f040c5c9ed0a439da889f4cae0faebc
  • Pointer size: 130 Bytes
  • Size of remote file: 69 kB
gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/pred_gliomasam_step2000_overlay.png ADDED

Git LFS Details

  • SHA256: 1f20f7651174b10cf916eb98b4491ccca0c215cf1595633dba559ae7cf34ee95
  • Pointer size: 130 Bytes
  • Size of remote file: 70.8 kB
gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/pred_gliomasam_step2600_ET.png ADDED

Git LFS Details

  • SHA256: 155109469a51a5aef7b21298ebdf22d85d637e63800762c090bcb8db2cf4dc9f
  • Pointer size: 130 Bytes
  • Size of remote file: 67.7 kB
gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/pred_gliomasam_step2600_TC.png ADDED

Git LFS Details

  • SHA256: b0c626a8f67118ad7acdad39578dd299c4c772a7fda451643684f857247af29c
  • Pointer size: 130 Bytes
  • Size of remote file: 68.2 kB
gliomasam3_moe/vis_res/method_comparison/BraTS-GLI-00005-000/pred_gliomasam_step2600_WT.png ADDED

Git LFS Details

  • SHA256: 3bb762a9f47c16954e85b488fc0f3814ca346762f43db0c701b09388b76656d2
  • Pointer size: 130 Bytes
  • Size of remote file: 69.3 kB