youngsm commited on
Commit
baf6f37
·
verified ·
1 Parent(s): 535dbe3

Add pimm export (repackaged from DeepLearnPhysics/panda)

Browse files
Files changed (3) hide show
  1. README.md +45 -1
  2. model.safetensors +3 -0
  3. training_config.json +133 -0
README.md CHANGED
@@ -1,3 +1,47 @@
1
  ---
2
- license: mit
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ library_name: pimm
3
+ tags:
4
+ - particle-physics
5
+ - lartpc
6
+ - point-cloud
7
+ - point-transformer-v3
8
  ---
9
+
10
+ # Panda — particle panoptic detector
11
+
12
+ A query-based panoptic detector that segments individual particle
13
+ instances in LArTPC images with per-particle PID, over a PTv3 backbone with a
14
+ masked cross-attention decoder.
15
+
16
+ - **pimm type:** `detector-v4`
17
+ - **queries:** 32 · **classes:** 6 (PID) · **stuff classes:** [5]
18
+ - **decoder depth:** 3 · **hidden:** 256 · **heads:** 16 · MLP heads.
19
+
20
+ ## Loading
21
+
22
+ ```python
23
+ import pimm
24
+ model = pimm.from_pretrained("hf://deeplearnphysics/panda-particle")
25
+ ```
26
+
27
+ The architecture and all hyper-parameters are carried in `training_config.json`,
28
+ so no config file is needed. Weights are bitwise-identical to the original
29
+ checkpoint.
30
+
31
+ ## Input
32
+
33
+ A pimm `Point` dict for LArTPC (PILArNet) point clouds: `coord` (xyz) + `energy`,
34
+ collected as `feat_keys=("coord", "energy")` (4 input channels). Coordinates are
35
+ normalized in the model forward.
36
+
37
+ ## Notes
38
+
39
+ - Config sets `enable_flash=True`. On CPU or non-FlashAttention setups, override
40
+ it (e.g. pass `enable_flash=False` to `from_pretrained`, or for detectors set it
41
+ on the `backbone`).
42
+
43
+ ## Provenance
44
+
45
+ Repackaged from the original [`DeepLearnPhysics/panda`](https://github.com/DeepLearnPhysics/panda) checkpoints into the
46
+ [`pimm`](https://github.com/youngsm/particle-imaging-models) export format. Inherits
47
+ the license of the source repository.
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:305ef5440f9f9e7980f333823fe9f7bd12b7c941a031de1d16fe7f22ab9dee68
3
+ size 380715132
training_config.json ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model": {
3
+ "type": "detector-v4",
4
+ "labels": [
5
+ "particle"
6
+ ],
7
+ "num_queries": 32,
8
+ "num_classes": 6,
9
+ "use_stuff_head": true,
10
+ "stuff_classes": [
11
+ 5
12
+ ],
13
+ "mlp_point_proj": true,
14
+ "full_in_channels": 1232,
15
+ "hidden_channels": 256,
16
+ "num_heads": 16,
17
+ "depth": 3,
18
+ "mlp_ratio": 4.0,
19
+ "qkv_bias": true,
20
+ "qk_scale": null,
21
+ "layer_scale": null,
22
+ "pre_norm": true,
23
+ "query_type": "learned",
24
+ "pos_emb": true,
25
+ "supervise_attn_mask": true,
26
+ "enable_flash": false,
27
+ "upcast_attention": false,
28
+ "upcast_softmax": false,
29
+ "backbone": {
30
+ "type": "PT-v3m2",
31
+ "in_channels": 4,
32
+ "order": [
33
+ "hilbert",
34
+ "hilbert-trans",
35
+ "z",
36
+ "z-trans"
37
+ ],
38
+ "stride": [
39
+ 2,
40
+ 2,
41
+ 2,
42
+ 2
43
+ ],
44
+ "enc_depths": [
45
+ 3,
46
+ 3,
47
+ 3,
48
+ 9,
49
+ 3
50
+ ],
51
+ "enc_channels": [
52
+ 48,
53
+ 96,
54
+ 192,
55
+ 384,
56
+ 512
57
+ ],
58
+ "enc_num_head": [
59
+ 3,
60
+ 6,
61
+ 12,
62
+ 24,
63
+ 32
64
+ ],
65
+ "enc_patch_size": [
66
+ 256,
67
+ 256,
68
+ 256,
69
+ 256,
70
+ 256
71
+ ],
72
+ "dec_depths": [
73
+ 2,
74
+ 2,
75
+ 2,
76
+ 2
77
+ ],
78
+ "dec_channels": [
79
+ 64,
80
+ 96,
81
+ 192,
82
+ 384
83
+ ],
84
+ "dec_num_head": [
85
+ 4,
86
+ 6,
87
+ 12,
88
+ 24
89
+ ],
90
+ "dec_patch_size": [
91
+ 256,
92
+ 256,
93
+ 256,
94
+ 256
95
+ ],
96
+ "mlp_ratio": 4,
97
+ "qkv_bias": true,
98
+ "qk_scale": null,
99
+ "layer_scale": 1e-05,
100
+ "attn_drop": 0.0,
101
+ "proj_drop": 0.0,
102
+ "drop_path": 0.3,
103
+ "shuffle_orders": true,
104
+ "pre_norm": true,
105
+ "enable_rpe": false,
106
+ "enable_flash": true,
107
+ "upcast_attention": false,
108
+ "upcast_softmax": false,
109
+ "traceable": false,
110
+ "mask_token": false,
111
+ "enc_mode": true,
112
+ "freeze_encoder": false
113
+ },
114
+ "criteria": [
115
+ {
116
+ "type": "FastUnifiedInstanceLoss",
117
+ "cost_mask": 1.0,
118
+ "cost_dice": 1.0,
119
+ "cost_class": 1.0,
120
+ "loss_weight_focal": 2.0,
121
+ "loss_weight_dice": 5.0,
122
+ "cls_weight_matched": 2.0,
123
+ "cls_weight_noobj": 0.5,
124
+ "focal_alpha": 0.25,
125
+ "focal_gamma": 2.0,
126
+ "aux_loss_weight": 1.0,
127
+ "num_points": 100000,
128
+ "truth_label": "instance",
129
+ "noobj_mask_loss_weight": 0.0
130
+ }
131
+ ]
132
+ }
133
+ }