HaiwangYu commited on
Commit
e4b16bb
·
verified ·
1 Parent(s): 6fc4876

Upload README.md

Browse files
Files changed (1) hide show
  1. dnn-roi/pdhd/20260615/README.md +69 -0
dnn-roi/pdhd/20260615/README.md ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # `l1sp_dnn_pdhd_v1.ts` — PDHD L1SP DNN ROI tagger
2
+
3
+ TorchScript (`.ts`) model loaded by the wire-cell-toolkit L1SP deep-learning
4
+ ROI tagger for ProtoDUNE-HD. It is a **per-ROI binary classifier** (not a
5
+ per-pixel segmentation U-Net like the `dnnroi/` models): for each candidate ROI
6
+ it consumes a short waveform window plus 29 hand-engineered scalar features and
7
+ emits a single `sigmoid` score in `[0, 1]`, which is cut at a default threshold
8
+ to keep or drop the ROI.
9
+
10
+ Full machine-readable spec: [`l1sp_dnn_pdhd_v1.meta.json`](l1sp_dnn_pdhd_v1.meta.json).
11
+
12
+ | field | value |
13
+ |---|---|
14
+ | file | `l1sp/pdhd/l1sp_dnn_pdhd_v1.ts` |
15
+ | size | 917,502 bytes (≈896 KB) |
16
+ | task | per-ROI binary classification (keep / drop) |
17
+ | output | `score` = `sigmoid` in `[0, 1]`, cut at `default_threshold` |
18
+ | **default threshold** | **0.9945** |
19
+ | precision | FP32 |
20
+
21
+ ## Inputs
22
+
23
+ The model `forward` takes **two** tensors (C++ `Pytorch::from_itensor` 4-D
24
+ convention, batch `B`):
25
+
26
+ | input | shape | dtype | contents |
27
+ |---|---|---|---|
28
+ | `waveform` | `(B, 1, 2, 256)` | float32 | channel 0 = `raw/scale`, channel 1 = `decon/scale`, where `scale = max(|raw|.max, |decon|.max, 1.0)`. Window = full ROI right-padded to 256, **or** ±128 ticks centered on `argmax(|decon|)` clamped to ROI bounds. The dim-1 axis is a dummy to satisfy WCT's 4-D requirement. |
29
+ | `scalars` | `(B, 1, 1, 29)` | float32 | the 29 scalar features in `scalar_feature_order` (see meta JSON) |
30
+
31
+ `nbin = 256`, `amp_floor = 1.0`.
32
+
33
+ ### Scalar feature order (29)
34
+
35
+ ```
36
+ nbin_fit, temp_sum, temp1_sum, temp2_sum, max_val, min_val, prev_gap, next_gap,
37
+ flag, ratio, temp_sum_pos, temp_sum_neg, n_above_pos, n_above_neg, argmax_tick,
38
+ argmin_tick, sig_peak, sig_integral, gmax, gauss_fill, gauss_fwhm_frac,
39
+ roi_energy_frac, raw_asym_wide, core_lo, core_hi, core_length, core_fill,
40
+ core_fwhm_frac, core_raw_asym_wide
41
+ ```
42
+
43
+ The 30th feature (`vae_kl`, `kl_index = 29`) appears in the full
44
+ `feature_order` but is **not** part of the model's scalar input — it is the KL
45
+ term from the stage-B VAE (`model_n16.pt`, `vae_n_lat = 16`) used in training,
46
+ not consumed at inference.
47
+
48
+ ## Output
49
+
50
+ `score` of shape `(B, 1, 1, 1)`, a `sigmoid` probability in `[0, 1]`. An ROI is
51
+ kept when `score ≥ default_threshold = 0.9945`. The threshold convention is the
52
+ p99.9 of the data-corpus score distribution from the training run; see the
53
+ experiment dir's `notes.md` for the promoted value.
54
+
55
+ ## Provenance
56
+
57
+ | field | value |
58
+ |---|---|
59
+ | experiment dir | `/nfs/data/1/xqian/toolkit-dev/l1sp_dl_tagger/experiments/stage_a_pu_round4` |
60
+ | VAE checkpoint | `…/experiments/stage_b_vae/model_n16.pt` (`vae_n_lat = 16`) |
61
+ | git sha | `708b942b199e2cc7395e9e3468b926b8146e171b` |
62
+
63
+ ## Note on the PDVD sibling
64
+
65
+ `l1sp/pdvd/l1sp_dnn_pdvd_v1.ts` is the same architecture and I/O layout. The
66
+ differences are the training corpus / detector (PDVD `stage_a_pu_round2_pdvd`)
67
+ and a much lower `default_threshold` (**0.16** vs 0.9945 here) — the two are
68
+ **not** interchangeable; always use the model matching the detector and its
69
+ own threshold.