MaybeRichard commited on
Commit
14548aa
·
verified ·
1 Parent(s): 28cbf81

report: clarify per-class macro vs main-table Dice averaging convention

Browse files
code/framework/report/aggregate.py CHANGED
@@ -455,8 +455,11 @@ def to_html(rows, runs=None, title="SegGen benchmark", sig=None):
455
  if pcs.strip():
456
  h.append("<h2>4. Per-class Dice (%) — multi-class datasets</h2>")
457
  h.append("<div class='cap'>Mean per-class Dice over all test images/runs (0=background excluded; "
458
- "<b>bold</b>=best per class). The <i>macro</i> column averages over a dataset's own "
459
- "foreground classes (a within-dataset mean, not a cross-dataset one).</div>")
 
 
 
460
  h.append(pcs)
461
 
462
  h.append("<h2>5. Supplementary metrics — Sensitivity &amp; Precision (%) ↑</h2>")
 
455
  if pcs.strip():
456
  h.append("<h2>4. Per-class Dice (%) — multi-class datasets</h2>")
457
  h.append("<div class='cap'>Mean per-class Dice over all test images/runs (0=background excluded; "
458
+ "<b>bold</b>=best per class). The <i>macro</i> column weights each foreground class "
459
+ "equally (a within-dataset mean, not a cross-dataset one). It can differ by ~1 pt from "
460
+ "the §1 Dice — which is image-weighted (each image is first averaged over the classes it "
461
+ "contains) — whenever some images lack a class (e.g. ACDC's RV appears in only 335/380 "
462
+ "images); both conventions are standard, neither is an error.</div>")
463
  h.append(pcs)
464
 
465
  h.append("<h2>5. Supplementary metrics — Sensitivity &amp; Precision (%) ↑</h2>")
results/summary.html CHANGED
@@ -59,7 +59,7 @@ hr{border:none;border-top:1px solid #e3e3e3;margin:24px 0}
59
  <tr><td class='m'>U-Mamba</td><td>87.93±0.81</td><td><b>85.29±0.14</b></td><td>74.13±1.87</td><td>65.57±0.50</td><td>71.20±1.97</td><td>61.82±0.88</td><td><b>53.04±0.09</b></td><td>40.01±0.51</td><td>83.98±0.22</td><td>65.00±1.11</td></tr>
60
  </tbody></table></div>
61
  <h2>4. Per-class Dice (%) — multi-class datasets</h2>
62
- <div class='cap'>Mean per-class Dice over all test images/runs (0=background excluded; <b>bold</b>=best per class). The <i>macro</i> column averages over a dataset's own foreground classes (a within-dataset mean, not a cross-dataset one).</div>
63
  <h3>ACDC</h3>
64
  <div class='tw'><table class='rt'><thead><tr><th class='m'>Method</th><th>RV</th><th>Myocardium</th><th>LV</th><th class='avg'>macro</th></tr></thead><tbody>
65
  <tr><td class='m'>UNet</td><td>75.3</td><td>78.3</td><td>83.9</td><td class='avg'>79.2</td></tr>
 
59
  <tr><td class='m'>U-Mamba</td><td>87.93±0.81</td><td><b>85.29±0.14</b></td><td>74.13±1.87</td><td>65.57±0.50</td><td>71.20±1.97</td><td>61.82±0.88</td><td><b>53.04±0.09</b></td><td>40.01±0.51</td><td>83.98±0.22</td><td>65.00±1.11</td></tr>
60
  </tbody></table></div>
61
  <h2>4. Per-class Dice (%) — multi-class datasets</h2>
62
+ <div class='cap'>Mean per-class Dice over all test images/runs (0=background excluded; <b>bold</b>=best per class). The <i>macro</i> column weights each foreground class equally (a within-dataset mean, not a cross-dataset one). It can differ by ~1 pt from the §1 Dice — which is image-weighted (each image is first averaged over the classes it contains) — whenever some images lack a class (e.g. ACDC's RV appears in only 335/380 images); both conventions are standard, neither is an error.</div>
63
  <h3>ACDC</h3>
64
  <div class='tw'><table class='rt'><thead><tr><th class='m'>Method</th><th>RV</th><th>Myocardium</th><th>LV</th><th class='avg'>macro</th></tr></thead><tbody>
65
  <tr><td class='m'>UNet</td><td>75.3</td><td>78.3</td><td>83.9</td><td class='avg'>79.2</td></tr>