Upload dbMiM neuron segmentation weights and model card
Browse files- README.md +313 -0
- README_zh.md +293 -0
- checksums.sha256 +4 -0
- configs/finetune_cremi_real_unetr_aniso_em_mse_maws_fullem_mixedmask_r33q.yaml +100 -0
- configs/finetune_cremi_real_unetr_aniso_em_mse_maws_publicem_r17q.yaml +95 -0
- configs/pretrain_em_full_mixedmask_dbmim_r33.yaml +70 -0
- configs/pretrain_public_em_membrane_r16.yaml +72 -0
- weights/fullem_mixedmask_dbmim_r33/finetuned_latest.pt +3 -0
- weights/fullem_mixedmask_dbmim_r33/pretrained_latest.pt +3 -0
- weights/publicem_dbmim_r17/finetuned_latest.pt +3 -0
- weights/publicem_dbmim_r17/pretrained_latest.pt +3 -0
README.md
ADDED
|
@@ -0,0 +1,313 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# dbMiM Neuron Segmentation
|
| 2 |
+
|
| 3 |
+
[](README_zh.md)
|
| 4 |
+
[](https://huggingface.co/che111/dbmim-neuron-segmentation)
|
| 5 |
+
|
| 6 |
+
This repository is the cleaned implementation used for our current dbMiM
|
| 7 |
+
neuron-segmentation experiments on CREMI. The maintained path is:
|
| 8 |
+
|
| 9 |
+
- self-supervised dbMiM / MAE-style pretraining on unlabeled EM volumes;
|
| 10 |
+
- anisotropic 3D UNETR affinity finetuning on CREMI;
|
| 11 |
+
- full-volume CREMI A/B/C evaluation with VOI and adapted Rand error (ARAND);
|
| 12 |
+
- waterz-based post-processing with calibration and threshold sweeps.
|
| 13 |
+
|
| 14 |
+
The old private cluster launchers, scratch reports, cached bytecode, legacy
|
| 15 |
+
models, and historical dataloaders have been removed from Git. Large data,
|
| 16 |
+
checkpoints, reports, and local experiment outputs are intentionally ignored.
|
| 17 |
+
|
| 18 |
+
## Current Method
|
| 19 |
+
|
| 20 |
+
The current best method is not the original minimal reproduction. It combines
|
| 21 |
+
the following changes that were stable in ablations:
|
| 22 |
+
|
| 23 |
+
1. **Anisotropic UNETR backbone**: `UNETRAnisotropicAffinityNet` with
|
| 24 |
+
`32x160x160` input crops, `patch_size=(4,16,16)`, transformer hidden states
|
| 25 |
+
used as UNETR skips, staged decoder upsampling, and a z-only anisotropic
|
| 26 |
+
transition before the final decoder block.
|
| 27 |
+
2. **dbMiM pretraining on EM volumes**: a ViT/MAE encoder is pretrained with
|
| 28 |
+
masked reconstruction, membrane-aware weighting, and a lightweight structure
|
| 29 |
+
consistency loss. The pretrained encoder keys are then loaded into UNETR.
|
| 30 |
+
3. **MSE + MAWS supervised finetuning**: CREMI labels are converted to z/y/x
|
| 31 |
+
nearest-neighbor affinities. Finetuning uses pure MSE with membrane-aware
|
| 32 |
+
spatial weighting (MAWS), channel weights `[1.35, 1.0, 1.0]`, and synchronized
|
| 33 |
+
image/label augmentations.
|
| 34 |
+
4. **Official-style waterz evaluation**: full CREMI A/B/C labeled volumes are
|
| 35 |
+
evaluated with `ignore_label=0`, CREMI-style XY boundary ignore distance `1`,
|
| 36 |
+
z boundary ignore `0`, logit calibration biases, and a waterz threshold sweep.
|
| 37 |
+
|
| 38 |
+
The most useful new finding is that **fixed mixed edge/random masking on full
|
| 39 |
+
EM data (R33)** improves over scratch, old fullEM dbMiM, pure edge masking, and
|
| 40 |
+
fullEM plain MAE. The best absolute VOI is still the smaller publicEM dbMiM
|
| 41 |
+
model (R17), so the README reports both.
|
| 42 |
+
|
| 43 |
+
## Model Zoo
|
| 44 |
+
|
| 45 |
+
Weights are hosted at:
|
| 46 |
+
|
| 47 |
+
**https://huggingface.co/che111/dbmim-neuron-segmentation**
|
| 48 |
+
|
| 49 |
+
| Model | HF path | Intended use |
|
| 50 |
+
|---|---|---|
|
| 51 |
+
| PublicEM dbMiM R17 pretrain | `weights/publicem_dbmim_r17/pretrained_latest.pt` | ViT/dbMiM encoder checkpoint for UNETR initialization |
|
| 52 |
+
| PublicEM dbMiM R17 finetune | `weights/publicem_dbmim_r17/finetuned_latest.pt` | Best current publicEM segmentation checkpoint |
|
| 53 |
+
| FullEM mixed-mask dbMiM R33 pretrain | `weights/fullem_mixedmask_dbmim_r33/pretrained_latest.pt` | Recommended full-data dbMiM pretraining checkpoint |
|
| 54 |
+
| FullEM mixed-mask dbMiM R33 finetune | `weights/fullem_mixedmask_dbmim_r33/finetuned_latest.pt` | Recommended full-data segmentation checkpoint |
|
| 55 |
+
|
| 56 |
+
The pretraining checkpoints contain the masked-image-modeling encoder and
|
| 57 |
+
decoder state. During finetuning we load only compatible encoder prefixes
|
| 58 |
+
(`pos_embed`, `patch_embed`, `encoder_blocks`, `norm`) into the anisotropic
|
| 59 |
+
UNETR. The finetuned checkpoints are full affinity segmentation models.
|
| 60 |
+
|
| 61 |
+
## Data
|
| 62 |
+
|
| 63 |
+
### Supervised CREMI Data
|
| 64 |
+
|
| 65 |
+
Finetuning and evaluation use the public labeled CREMI 2016 training volumes:
|
| 66 |
+
|
| 67 |
+
```text
|
| 68 |
+
data/CREMI/sample_A_20160501.hdf
|
| 69 |
+
data/CREMI/sample_B_20160501.hdf
|
| 70 |
+
data/CREMI/sample_C_20160501.hdf
|
| 71 |
+
```
|
| 72 |
+
|
| 73 |
+
The raw key is `volumes/raw`; the instance-label key is
|
| 74 |
+
`volumes/labels/neuron_ids`.
|
| 75 |
+
|
| 76 |
+
### Pretraining Data
|
| 77 |
+
|
| 78 |
+
Two unlabeled EM pretraining sets were used.
|
| 79 |
+
|
| 80 |
+
| Name | Contents | Config examples |
|
| 81 |
+
|---|---|---|
|
| 82 |
+
| publicEM | CREMI raw + public ISBI 2012 + SNEMI3D raw volumes | `configs/pretrain_public_em_membrane_r16.yaml`, `configs/pretrain_public_em_plain_mae_r23.yaml` |
|
| 83 |
+
| fullEM | CREMI raw + `cyd0806/EM_pretrain_data` groups: FAFB, FIB-25, Kasthuri, MitoEM, MB-MOC | `configs/pretrain_em_full_mixedmask_dbmim_r33.yaml`, `configs/pretrain_em_full_plain_mae_r23.yaml` |
|
| 84 |
+
|
| 85 |
+
No hidden CREMI challenge labels are used in this repository.
|
| 86 |
+
|
| 87 |
+
### Evaluation Split
|
| 88 |
+
|
| 89 |
+
The reported numbers are **official-style validation on the public labeled
|
| 90 |
+
CREMI A/B/C training volumes**, not challenge-server hidden-test results.
|
| 91 |
+
|
| 92 |
+
The protocol is:
|
| 93 |
+
|
| 94 |
+
- train supervised affinity models from random crops sampled from CREMI A/B/C;
|
| 95 |
+
- run full-volume sliding-window inference on A, B, and C;
|
| 96 |
+
- apply CREMI-style boundary ignore with `xy=1`, `z=0`;
|
| 97 |
+
- sweep calibration biases and waterz thresholds;
|
| 98 |
+
- report aggregate A/B/C `voi_sum` and `adapted_rand_error`.
|
| 99 |
+
|
| 100 |
+
This split is small but matches the controlled ablation goal: isolate whether
|
| 101 |
+
dbMiM pretraining improves the same anisotropic UNETR finetuning recipe over
|
| 102 |
+
scratch and plain MAE controls.
|
| 103 |
+
|
| 104 |
+
## Results
|
| 105 |
+
|
| 106 |
+
Lower VOI and lower ARAND are better. `ARAND at best VOI` is the adapted Rand
|
| 107 |
+
error at the threshold selected by lowest VOI. `Best ARAND` is selected
|
| 108 |
+
independently and is included because VOI and ARAND can prefer different
|
| 109 |
+
post-processing thresholds.
|
| 110 |
+
|
| 111 |
+
### PublicEM Pretraining
|
| 112 |
+
|
| 113 |
+
| Arm | VOI | ARAND at best VOI | Best ARAND | Conclusion |
|
| 114 |
+
|---|---:|---:|---:|---|
|
| 115 |
+
| R17 publicEM random-mask dbMiM | **1.002919** | **0.188832** | 0.188832 | Best publicEM VOI |
|
| 116 |
+
| R23 publicEM random-mask plain MAE | 1.027073 | 0.192763 | 0.189247 | Matched MAE baseline |
|
| 117 |
+
| R29 publicEM pure edge-mask dbMiM | 1.033564 | 0.186827 | **0.186827** | Best publicEM ARAND, worse VOI |
|
| 118 |
+
| R32 publicEM fixed mixed-mask dbMiM | 1.046538 | 0.206256 | 0.193183 | Negative vs R17/R23 |
|
| 119 |
+
| R34 publicEM adaptive mixed dbMiM | 1.067471 | 0.205437 | 0.200604 | Negative adaptive result |
|
| 120 |
+
| R30 publicEM pure edge-mask plain MAE | 1.077594 | 0.203182 | 0.198562 | Edge-mask MAE control |
|
| 121 |
+
| R17 scratch UNETR | 1.095164 | 0.213401 | 0.210442 | Scratch control |
|
| 122 |
+
|
| 123 |
+
Key deltas:
|
| 124 |
+
|
| 125 |
+
- R17 dbMiM beats matched publicEM plain MAE R23 by `-0.0242` VOI and about
|
| 126 |
+
`-0.0004` best ARAND.
|
| 127 |
+
- R29 edge-mask dbMiM beats same-mask plain MAE R30 by `-0.0440` VOI and
|
| 128 |
+
`-0.0117` best ARAND, but its VOI is worse than R17/R23.
|
| 129 |
+
|
| 130 |
+
### FullEM Pretraining
|
| 131 |
+
|
| 132 |
+
| Arm | VOI | ARAND at best VOI | Best ARAND | Conclusion |
|
| 133 |
+
|---|---:|---:|---:|---|
|
| 134 |
+
| R33 fullEM fixed mixed-mask dbMiM | **1.039372** | **0.191216** | **0.190932** | Best fullEM result |
|
| 135 |
+
| R31 fullEM pure edge-mask dbMiM | 1.055438 | 0.195125 | 0.195125 | Positive but weaker than R33 |
|
| 136 |
+
| R20 fullEM old dbMiM | 1.085331 | 0.195722 | 0.195722 | Older fullEM baseline |
|
| 137 |
+
| R35 fullEM adaptive mixed dbMiM | 1.089639 | 0.205551 | 0.205551 | Negative vs R33/R31/R20 |
|
| 138 |
+
| R17 scratch UNETR | 1.095164 | 0.213401 | 0.210442 | Scratch control |
|
| 139 |
+
| R23 fullEM plain MAE | 1.440684 | 0.281216 | 0.281216 | Negative fullEM MAE baseline |
|
| 140 |
+
|
| 141 |
+
Key deltas:
|
| 142 |
+
|
| 143 |
+
- R33 fullEM mixed-mask dbMiM beats fullEM plain MAE R23 by `-0.4013` VOI and
|
| 144 |
+
`-0.0903` best ARAND.
|
| 145 |
+
- R33 beats scratch by `-0.0558` VOI and `-0.0195` best ARAND.
|
| 146 |
+
- R33 beats old fullEM R20 by about `-0.0460` VOI.
|
| 147 |
+
- R33 is still slightly worse than R17 publicEM by VOI (`1.039372` vs
|
| 148 |
+
`1.002919`), so the full-data recipe is the best fullEM result but not the
|
| 149 |
+
best global checkpoint yet.
|
| 150 |
+
|
| 151 |
+
### Adaptive Masking
|
| 152 |
+
|
| 153 |
+
R34/R35 tested an adaptive mixed masking policy that chooses mask ratio and
|
| 154 |
+
edge fraction per crop. It did not improve downstream segmentation. After step
|
| 155 |
+
40k, the policy collapsed to sampled mask ratio `0.75`; the mean learned edge
|
| 156 |
+
fraction was `0.4456` for R34 and `0.3322` for R35. The current adaptive policy
|
| 157 |
+
is therefore kept as a negative ablation rather than the recommended method.
|
| 158 |
+
|
| 159 |
+
## Training Strategy
|
| 160 |
+
|
| 161 |
+
### Pretraining
|
| 162 |
+
|
| 163 |
+
Representative command:
|
| 164 |
+
|
| 165 |
+
```bash
|
| 166 |
+
python train_pretrain.py \
|
| 167 |
+
--config configs/pretrain_em_full_mixedmask_dbmim_r33.yaml
|
| 168 |
+
```
|
| 169 |
+
|
| 170 |
+
Main settings:
|
| 171 |
+
|
| 172 |
+
| Setting | Value |
|
| 173 |
+
|---|---|
|
| 174 |
+
| Crop | `32x160x160` |
|
| 175 |
+
| Patch size | `4x16x16` |
|
| 176 |
+
| Encoder | ViT, `embed_dim=192`, `depth=6`, `heads=6` |
|
| 177 |
+
| Mask ratio | `0.75` |
|
| 178 |
+
| R33 mask strategy | `edge_random_mix`, `edge_mask_fraction=0.5`, `edge_mask_power=1.25` |
|
| 179 |
+
| dbMiM losses | reconstruction + structure loss `0.2` + membrane weighting `1.35` |
|
| 180 |
+
| Batch size | 2 per GPU |
|
| 181 |
+
| Schedule | 160k optimizer steps, AdamW, lr `1.5e-4`, weight decay `0.05`, AMP |
|
| 182 |
+
|
| 183 |
+
Plain MAE controls set `architecture: plain_mae`, `structure_weight: 0.0`, and
|
| 184 |
+
`membrane_weight: 0.0` while keeping data, crop, model size, mask ratio, and
|
| 185 |
+
schedule matched.
|
| 186 |
+
|
| 187 |
+
### Finetuning
|
| 188 |
+
|
| 189 |
+
Representative command:
|
| 190 |
+
|
| 191 |
+
```bash
|
| 192 |
+
python train_finetune.py \
|
| 193 |
+
--config configs/finetune_cremi_real_unetr_aniso_em_mse_maws_fullem_mixedmask_r33q.yaml
|
| 194 |
+
```
|
| 195 |
+
|
| 196 |
+
Main settings:
|
| 197 |
+
|
| 198 |
+
| Setting | Value |
|
| 199 |
+
|---|---|
|
| 200 |
+
| Backbone | `unetr_aniso_em` |
|
| 201 |
+
| Output | 3 affinity channels: z, y, x |
|
| 202 |
+
| Crop | `32x160x160` |
|
| 203 |
+
| Loss | MSE + MAWS, no BCE/Dice in the current winning recipe |
|
| 204 |
+
| Label handling | synchronized image/label augmentation, 2D border widening radius 1 |
|
| 205 |
+
| Batch size | 2 per GPU |
|
| 206 |
+
| Schedule | 12k optimizer steps, lr `8e-5`, encoder lr `1e-5`, weight decay `0.01`, AMP |
|
| 207 |
+
| Pretrained prefixes | `pos_embed`, `patch_embed`, `encoder_blocks`, `norm` |
|
| 208 |
+
|
| 209 |
+
### Evaluation
|
| 210 |
+
|
| 211 |
+
Representative full-volume command:
|
| 212 |
+
|
| 213 |
+
```bash
|
| 214 |
+
python scripts/evaluate_cremi_segmentation.py \
|
| 215 |
+
--config configs/finetune_cremi_real_unetr_aniso_em_mse_maws_fullem_mixedmask_r33q.yaml \
|
| 216 |
+
--checkpoint outputs/finetune_cremi_real_unetr_aniso_em_mse_maws_fullem_mixedmask_r33q/finetuned_latest.pt \
|
| 217 |
+
--data-dir data/CREMI \
|
| 218 |
+
--output-dir outputs/eval_cremi_r33_waterz_abc \
|
| 219 |
+
--crop-size 0 0 0 \
|
| 220 |
+
--stride 16 80 80 \
|
| 221 |
+
--backends waterz \
|
| 222 |
+
--thresholds 0.35 0.40 0.45 0.50 0.55 \
|
| 223 |
+
--calibration-biases -0.50 -1.00 -1.00 -0.25 -0.50 -0.50 0.0 0.0 0.0 \
|
| 224 |
+
--metric-backend skimage \
|
| 225 |
+
--ignore-label 0 \
|
| 226 |
+
--cremi-boundary-ignore-distance-xy 1 \
|
| 227 |
+
--cremi-boundary-ignore-distance-z 0 \
|
| 228 |
+
--max-samples 0 \
|
| 229 |
+
--device cuda
|
| 230 |
+
```
|
| 231 |
+
|
| 232 |
+
The evaluation writes:
|
| 233 |
+
|
| 234 |
+
```text
|
| 235 |
+
cremi_segmentation_records.json
|
| 236 |
+
cremi_segmentation_metrics.csv
|
| 237 |
+
cremi_segmentation_summary.json
|
| 238 |
+
```
|
| 239 |
+
|
| 240 |
+
Use `best_by_voi_sum` for headline VOI and inspect `best_by_adapted_rand` as a
|
| 241 |
+
separate ARAND-selected operating point.
|
| 242 |
+
|
| 243 |
+
## Quick Start
|
| 244 |
+
|
| 245 |
+
Install the Python dependencies:
|
| 246 |
+
|
| 247 |
+
```bash
|
| 248 |
+
pip install -r requirements-dbMIM.txt
|
| 249 |
+
```
|
| 250 |
+
|
| 251 |
+
Run the synthetic smoke test:
|
| 252 |
+
|
| 253 |
+
```bash
|
| 254 |
+
bash scripts/run_smoke.sh
|
| 255 |
+
```
|
| 256 |
+
|
| 257 |
+
Compile the maintained entry points:
|
| 258 |
+
|
| 259 |
+
```bash
|
| 260 |
+
python -m py_compile \
|
| 261 |
+
dbmim/*.py \
|
| 262 |
+
train_pretrain.py \
|
| 263 |
+
train_finetune.py \
|
| 264 |
+
scripts/download_data.py \
|
| 265 |
+
scripts/inspect_hdf5.py \
|
| 266 |
+
scripts/prepare_public_em_pretrain_data.py \
|
| 267 |
+
scripts/prepare_em_pretrain_data.py \
|
| 268 |
+
scripts/evaluate_cremi_segmentation.py \
|
| 269 |
+
scripts/evaluate_cremi_blockwise_scale.py
|
| 270 |
+
```
|
| 271 |
+
|
| 272 |
+
Download weights from Hugging Face with `huggingface_hub`:
|
| 273 |
+
|
| 274 |
+
```python
|
| 275 |
+
from huggingface_hub import snapshot_download
|
| 276 |
+
|
| 277 |
+
snapshot_download(
|
| 278 |
+
repo_id="che111/dbmim-neuron-segmentation",
|
| 279 |
+
local_dir="outputs/hf_weights",
|
| 280 |
+
allow_patterns=["weights/**", "configs/**"],
|
| 281 |
+
)
|
| 282 |
+
```
|
| 283 |
+
|
| 284 |
+
## Repository Layout
|
| 285 |
+
|
| 286 |
+
```text
|
| 287 |
+
dbmim/ Core datasets, models, metrics, post-processing, utilities
|
| 288 |
+
configs/ Maintained smoke, recommended, and matched ablation configs
|
| 289 |
+
scripts/download_data.py CREMI download helper
|
| 290 |
+
scripts/prepare_*_data.py PublicEM / fullEM pretraining data preparation helpers
|
| 291 |
+
scripts/evaluate_*.py VOI/ARAND and blockwise-scale evaluation
|
| 292 |
+
train_pretrain.py dbMiM / MAE pretraining entry point
|
| 293 |
+
train_finetune.py affinity finetuning entry point
|
| 294 |
+
requirements-dbMIM.txt Python dependency list
|
| 295 |
+
```
|
| 296 |
+
|
| 297 |
+
## Citation
|
| 298 |
+
|
| 299 |
+
```bibtex
|
| 300 |
+
@inproceedings{chen2023self,
|
| 301 |
+
title={Self-supervised neuron segmentation with multi-agent reinforcement learning},
|
| 302 |
+
author={Chen, Yinda and Huang, Wei and Zhou, Shenglong and Chen, Qi and Xiong, Zhiwei},
|
| 303 |
+
booktitle={Proceedings of the Thirty-Second International Joint Conference on Artificial Intelligence},
|
| 304 |
+
pages={609--617},
|
| 305 |
+
year={2023}
|
| 306 |
+
}
|
| 307 |
+
```
|
| 308 |
+
|
| 309 |
+
## Data and Credential Notes
|
| 310 |
+
|
| 311 |
+
Use every external EM dataset under its original license and access policy.
|
| 312 |
+
Do not commit downloaded datasets, generated checkpoints, TOS credentials,
|
| 313 |
+
Hugging Face tokens, GitHub tokens, or cluster credentials.
|
README_zh.md
ADDED
|
@@ -0,0 +1,293 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# dbMiM 神经元分割
|
| 2 |
+
|
| 3 |
+
[](README.md)
|
| 4 |
+
[](https://huggingface.co/che111/dbmim-neuron-segmentation)
|
| 5 |
+
|
| 6 |
+
这个仓库是当前 dbMiM 神经元分割实验的清理版代码,主要面向 CREMI
|
| 7 |
+
复现、预训练收益验证、UNETR 结构改进和 VOI/ARAND 评测。当前维护的主线是:
|
| 8 |
+
|
| 9 |
+
- 在未标注 EM 体数据上做 dbMiM / MAE 风格自监督预训练;
|
| 10 |
+
- 在 CREMI 上用各向异性 3D UNETR 做 affinity 微调;
|
| 11 |
+
- 在 CREMI A/B/C 全体积上用 VOI 和 adapted Rand error (ARAND) 评测;
|
| 12 |
+
- 用 waterz 后处理,并做 calibration / threshold sweep。
|
| 13 |
+
|
| 14 |
+
旧的私有集群提交器、历史实验报告、缓存字节码、旧 dataloader、旧模型和临时脚本已经从 Git 中删除。大数据、权重、报告和本地实验输出会被 `.gitignore` 忽略。
|
| 15 |
+
|
| 16 |
+
## 当前方法
|
| 17 |
+
|
| 18 |
+
当前最好方法不是最早的简单复现,而是经过消融后稳定有效的一条主线:
|
| 19 |
+
|
| 20 |
+
1. **各向异性 UNETR backbone**:使用 `UNETRAnisotropicAffinityNet`,
|
| 21 |
+
输入 crop 为 `32x160x160`,`patch_size=(4,16,16)`,Transformer hidden
|
| 22 |
+
states 作为 UNETR skip,decoder 分阶段上采样,并在最后 decoder 前加入
|
| 23 |
+
z-only 的各向异性 transition。
|
| 24 |
+
2. **EM 体数据上的 dbMiM 预训练**:先训练 ViT/MAE encoder,目标包括 masked
|
| 25 |
+
reconstruction、membrane-aware weighting 和轻量 structure consistency loss,
|
| 26 |
+
再把 encoder 权重加载到 UNETR。
|
| 27 |
+
3. **MSE + MAWS 微调**:CREMI instance label 被转换成 z/y/x 三通道最近邻
|
| 28 |
+
affinity。当前获胜微调方案使用纯 MSE,加 membrane-aware spatial weighting
|
| 29 |
+
(MAWS),通道权重为 `[1.35, 1.0, 1.0]`,并保证图像和 label 的几何增强同步。
|
| 30 |
+
4. **official-style waterz 评测**:在 CREMI A/B/C 全体积上评测,使用
|
| 31 |
+
`ignore_label=0`,CREMI 风格 XY boundary ignore distance `1`,z 方向为 `0`,
|
| 32 |
+
并做 logit calibration bias 与 waterz threshold sweep。
|
| 33 |
+
|
| 34 |
+
最新有价值的正结果是:**fullEM 数据上的固定 mixed edge/random masking (R33)**
|
| 35 |
+
相比 scratch、旧 fullEM dbMiM、纯 edge mask 和 fullEM plain MAE 都有提升。
|
| 36 |
+
但当前全局最低 VOI 仍然来自更小 publicEM 数据上的 R17,所以文档同时报告
|
| 37 |
+
R17 和 R33。
|
| 38 |
+
|
| 39 |
+
## 权重
|
| 40 |
+
|
| 41 |
+
训练好的预训练权重和微调权重已经上传到:
|
| 42 |
+
|
| 43 |
+
**https://huggingface.co/che111/dbmim-neuron-segmentation**
|
| 44 |
+
|
| 45 |
+
| 模型 | HF 路径 | 用途 |
|
| 46 |
+
|---|---|---|
|
| 47 |
+
| PublicEM dbMiM R17 预训练 | `weights/publicem_dbmim_r17/pretrained_latest.pt` | ViT/dbMiM encoder 初始化权重 |
|
| 48 |
+
| PublicEM dbMiM R17 微调 | `weights/publicem_dbmim_r17/finetuned_latest.pt` | 当前 publicEM 最好分割权重 |
|
| 49 |
+
| FullEM mixed-mask dbMiM R33 预训练 | `weights/fullem_mixedmask_dbmim_r33/pretrained_latest.pt` | 推荐的 full-data dbMiM 预训练权重 |
|
| 50 |
+
| FullEM mixed-mask dbMiM R33 微调 | `weights/fullem_mixedmask_dbmim_r33/finetuned_latest.pt` | 推荐的 full-data 分割权重 |
|
| 51 |
+
|
| 52 |
+
预训练 checkpoint 包含 masked-image-modeling 的 encoder/decoder 状态。微调时只把兼容的 encoder 前缀加载到各向异性 UNETR:`pos_embed`、`patch_embed`、`encoder_blocks`、`norm`。微调 checkpoint 是完整 affinity 分割网络。
|
| 53 |
+
|
| 54 |
+
## 数据
|
| 55 |
+
|
| 56 |
+
### 有标注 CREMI 数据
|
| 57 |
+
|
| 58 |
+
微调和评测使用公开的 CREMI 2016 training volumes:
|
| 59 |
+
|
| 60 |
+
```text
|
| 61 |
+
data/CREMI/sample_A_20160501.hdf
|
| 62 |
+
data/CREMI/sample_B_20160501.hdf
|
| 63 |
+
data/CREMI/sample_C_20160501.hdf
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
raw key 是 `volumes/raw`,instance label key 是
|
| 67 |
+
`volumes/labels/neuron_ids`。
|
| 68 |
+
|
| 69 |
+
### 预训练数据
|
| 70 |
+
|
| 71 |
+
使用过两套未标注 EM 预训练数据。
|
| 72 |
+
|
| 73 |
+
| 名称 | 内容 | 配置示例 |
|
| 74 |
+
|---|---|---|
|
| 75 |
+
| publicEM | CREMI raw + public ISBI 2012 + SNEMI3D raw volumes | `configs/pretrain_public_em_membrane_r16.yaml`, `configs/pretrain_public_em_plain_mae_r23.yaml` |
|
| 76 |
+
| fullEM | CREMI raw + `cyd0806/EM_pretrain_data` 的 FAFB、FIB-25、Kasthuri、MitoEM、MB-MOC | `configs/pretrain_em_full_mixedmask_dbmim_r33.yaml`, `configs/pretrain_em_full_plain_mae_r23.yaml` |
|
| 77 |
+
|
| 78 |
+
本仓库没有使用 CREMI challenge hidden test labels。
|
| 79 |
+
|
| 80 |
+
### 训练和评测划分
|
| 81 |
+
|
| 82 |
+
本文档中的结果是 **public labeled CREMI A/B/C training volumes 上的 official-style validation**,不是 challenge server hidden-test 结果。
|
| 83 |
+
|
| 84 |
+
评测口径如下:
|
| 85 |
+
|
| 86 |
+
- 监督微调时从 CREMI A/B/C 中随机采样 crop;
|
| 87 |
+
- 评测时对 A/B/C 三个体数据做 full-volume sliding-window inference;
|
| 88 |
+
- metric 计算时启用 CREMI-style boundary ignore:`xy=1`,`z=0`;
|
| 89 |
+
- sweep calibration bias 和 waterz threshold;
|
| 90 |
+
- 报告 A/B/C 聚合后的 `voi_sum` 和 `adapted_rand_error`。
|
| 91 |
+
|
| 92 |
+
这个划分很小,但适合当前目标:在同一各向异性 UNETR、同一微调 recipe、同一后处理下,对比 dbMiM 预训练、scratch 和 plain MAE 控制组。
|
| 93 |
+
|
| 94 |
+
## 结果
|
| 95 |
+
|
| 96 |
+
VOI 和 ARAND 都是越低越好。`ARAND at best VOI` 是 VOI 最优阈值对应的
|
| 97 |
+
ARAND;`Best ARAND` 是单独按 ARAND 选出的最优阈值,因为 VOI 和 ARAND 有时会偏好不同后处理点。
|
| 98 |
+
|
| 99 |
+
### PublicEM 预训练
|
| 100 |
+
|
| 101 |
+
| 实验 | VOI | ARAND at best VOI | Best ARAND | 结论 |
|
| 102 |
+
|---|---:|---:|---:|---|
|
| 103 |
+
| R17 publicEM random-mask dbMiM | **1.002919** | **0.188832** | 0.188832 | publicEM 最好 VOI |
|
| 104 |
+
| R23 publicEM random-mask plain MAE | 1.027073 | 0.192763 | 0.189247 | matched MAE baseline |
|
| 105 |
+
| R29 publicEM pure edge-mask dbMiM | 1.033564 | 0.186827 | **0.186827** | publicEM 最好 ARAND,但 VOI 较差 |
|
| 106 |
+
| R32 publicEM fixed mixed-mask dbMiM | 1.046538 | 0.206256 | 0.193183 | 相比 R17/R23 为负 |
|
| 107 |
+
| R34 publicEM adaptive mixed dbMiM | 1.067471 | 0.205437 | 0.200604 | adaptive 为负 |
|
| 108 |
+
| R30 publicEM pure edge-mask plain MAE | 1.077594 | 0.203182 | 0.198562 | edge-mask MAE 控制组 |
|
| 109 |
+
| R17 scratch UNETR | 1.095164 | 0.213401 | 0.210442 | scratch 控制组 |
|
| 110 |
+
|
| 111 |
+
关键差值:
|
| 112 |
+
|
| 113 |
+
- R17 dbMiM 相比 matched publicEM plain MAE R23:VOI 降低 `0.0242`,best ARAND 约降低 `0.0004`。
|
| 114 |
+
- R29 edge-mask dbMiM 相比同 mask 的 plain MAE R30:VOI 降低 `0.0440`,best ARAND 降低 `0.0117`,但 VOI 不如 R17/R23。
|
| 115 |
+
|
| 116 |
+
### FullEM 预训练
|
| 117 |
+
|
| 118 |
+
| 实验 | VOI | ARAND at best VOI | Best ARAND | 结论 |
|
| 119 |
+
|---|---:|---:|---:|---|
|
| 120 |
+
| R33 fullEM fixed mixed-mask dbMiM | **1.039372** | **0.191216** | **0.190932** | 最好 fullEM 结果 |
|
| 121 |
+
| R31 fullEM pure edge-mask dbMiM | 1.055438 | 0.195125 | 0.195125 | 正收益,但弱于 R33 |
|
| 122 |
+
| R20 fullEM old dbMiM | 1.085331 | 0.195722 | 0.195722 | 旧 fullEM baseline |
|
| 123 |
+
| R35 fullEM adaptive mixed dbMiM | 1.089639 | 0.205551 | 0.205551 | 弱于 R33/R31/R20 |
|
| 124 |
+
| R17 scratch UNETR | 1.095164 | 0.213401 | 0.210442 | scratch 控制组 |
|
| 125 |
+
| R23 fullEM plain MAE | 1.440684 | 0.281216 | 0.281216 | fullEM MAE 明显为负 |
|
| 126 |
+
|
| 127 |
+
关键差值:
|
| 128 |
+
|
| 129 |
+
- R33 fullEM mixed-mask dbMiM 相比 fullEM plain MAE R23:VOI 降低 `0.4013`,best ARAND 降低 `0.0903`。
|
| 130 |
+
- R33 相比 scratch:VOI 降低 `0.0558`,best ARAND 降低 `0.0195`。
|
| 131 |
+
- R33 相比旧 fullEM R20:VOI 约降低 `0.0460`。
|
| 132 |
+
- R33 仍然略差于 publicEM R17 的最好 VOI (`1.039372` vs `1.002919`),所以 fullEM recipe 是当前最好 fullEM 方案,但还不是全局最好 checkpoint。
|
| 133 |
+
|
| 134 |
+
### Adaptive Masking
|
| 135 |
+
|
| 136 |
+
R34/R35 测试了每个 crop 自适应选择 mask ratio 和 edge fraction 的 mixed masking
|
| 137 |
+
policy。这个方向目前没有带来提升。40k step 之后,policy 基本收敛到
|
| 138 |
+
`sampled_mask_ratio=0.75`;R34 平均 `edge_fraction=0.4456`,R35 平均
|
| 139 |
+
`edge_fraction=0.3322`。因此当前 adaptive policy 作为负消融保留,不作为推荐方法。
|
| 140 |
+
|
| 141 |
+
## 训练策略
|
| 142 |
+
|
| 143 |
+
### 预训练
|
| 144 |
+
|
| 145 |
+
代表性命令:
|
| 146 |
+
|
| 147 |
+
```bash
|
| 148 |
+
python train_pretrain.py \
|
| 149 |
+
--config configs/pretrain_em_full_mixedmask_dbmim_r33.yaml
|
| 150 |
+
```
|
| 151 |
+
|
| 152 |
+
主要设置:
|
| 153 |
+
|
| 154 |
+
| 设置 | 值 |
|
| 155 |
+
|---|---|
|
| 156 |
+
| Crop | `32x160x160` |
|
| 157 |
+
| Patch size | `4x16x16` |
|
| 158 |
+
| Encoder | ViT, `embed_dim=192`, `depth=6`, `heads=6` |
|
| 159 |
+
| Mask ratio | `0.75` |
|
| 160 |
+
| R33 mask strategy | `edge_random_mix`, `edge_mask_fraction=0.5`, `edge_mask_power=1.25` |
|
| 161 |
+
| dbMiM loss | reconstruction + structure loss `0.2` + membrane weighting `1.35` |
|
| 162 |
+
| Batch size | 每张 GPU 2 |
|
| 163 |
+
| Schedule | 160k optimizer steps, AdamW, lr `1.5e-4`, weight decay `0.05`, AMP |
|
| 164 |
+
|
| 165 |
+
plain MAE 控制组使用 `architecture: plain_mae`,`structure_weight: 0.0`,
|
| 166 |
+
`membrane_weight: 0.0`,其它数据、crop、模型大小、mask ratio 和 schedule 保持匹配。
|
| 167 |
+
|
| 168 |
+
### 微调
|
| 169 |
+
|
| 170 |
+
代表性命令:
|
| 171 |
+
|
| 172 |
+
```bash
|
| 173 |
+
python train_finetune.py \
|
| 174 |
+
--config configs/finetune_cremi_real_unetr_aniso_em_mse_maws_fullem_mixedmask_r33q.yaml
|
| 175 |
+
```
|
| 176 |
+
|
| 177 |
+
主要设置:
|
| 178 |
+
|
| 179 |
+
| 设置 | 值 |
|
| 180 |
+
|---|---|
|
| 181 |
+
| Backbone | `unetr_aniso_em` |
|
| 182 |
+
| 输出 | 3 个 affinity channel:z、y、x |
|
| 183 |
+
| Crop | `32x160x160` |
|
| 184 |
+
| Loss | MSE + MAWS,当前获胜 recipe 不用 BCE/Dice |
|
| 185 |
+
| Label 处理 | 图像/label 几何增强同步,2D border widening radius 1 |
|
| 186 |
+
| Batch size | 每张 GPU 2 |
|
| 187 |
+
| Schedule | 12k optimizer steps, lr `8e-5`, encoder lr `1e-5`, weight decay `0.01`, AMP |
|
| 188 |
+
| 预训练加载前缀 | `pos_embed`, `patch_embed`, `encoder_blocks`, `norm` |
|
| 189 |
+
|
| 190 |
+
### 评测
|
| 191 |
+
|
| 192 |
+
代表性 full-volume 命令:
|
| 193 |
+
|
| 194 |
+
```bash
|
| 195 |
+
python scripts/evaluate_cremi_segmentation.py \
|
| 196 |
+
--config configs/finetune_cremi_real_unetr_aniso_em_mse_maws_fullem_mixedmask_r33q.yaml \
|
| 197 |
+
--checkpoint outputs/finetune_cremi_real_unetr_aniso_em_mse_maws_fullem_mixedmask_r33q/finetuned_latest.pt \
|
| 198 |
+
--data-dir data/CREMI \
|
| 199 |
+
--output-dir outputs/eval_cremi_r33_waterz_abc \
|
| 200 |
+
--crop-size 0 0 0 \
|
| 201 |
+
--stride 16 80 80 \
|
| 202 |
+
--backends waterz \
|
| 203 |
+
--thresholds 0.35 0.40 0.45 0.50 0.55 \
|
| 204 |
+
--calibration-biases -0.50 -1.00 -1.00 -0.25 -0.50 -0.50 0.0 0.0 0.0 \
|
| 205 |
+
--metric-backend skimage \
|
| 206 |
+
--ignore-label 0 \
|
| 207 |
+
--cremi-boundary-ignore-distance-xy 1 \
|
| 208 |
+
--cremi-boundary-ignore-distance-z 0 \
|
| 209 |
+
--max-samples 0 \
|
| 210 |
+
--device cuda
|
| 211 |
+
```
|
| 212 |
+
|
| 213 |
+
评测会输出:
|
| 214 |
+
|
| 215 |
+
```text
|
| 216 |
+
cremi_segmentation_records.json
|
| 217 |
+
cremi_segmentation_metrics.csv
|
| 218 |
+
cremi_segmentation_summary.json
|
| 219 |
+
```
|
| 220 |
+
|
| 221 |
+
主表使用 `best_by_voi_sum` 作为 VOI 汇报点,同时检查 `best_by_adapted_rand`
|
| 222 |
+
以避��只看单一阈值。
|
| 223 |
+
|
| 224 |
+
## 快速开始
|
| 225 |
+
|
| 226 |
+
安装依赖:
|
| 227 |
+
|
| 228 |
+
```bash
|
| 229 |
+
pip install -r requirements-dbMIM.txt
|
| 230 |
+
```
|
| 231 |
+
|
| 232 |
+
运行 synthetic smoke test:
|
| 233 |
+
|
| 234 |
+
```bash
|
| 235 |
+
bash scripts/run_smoke.sh
|
| 236 |
+
```
|
| 237 |
+
|
| 238 |
+
编译当前维护入口:
|
| 239 |
+
|
| 240 |
+
```bash
|
| 241 |
+
python -m py_compile \
|
| 242 |
+
dbmim/*.py \
|
| 243 |
+
train_pretrain.py \
|
| 244 |
+
train_finetune.py \
|
| 245 |
+
scripts/download_data.py \
|
| 246 |
+
scripts/inspect_hdf5.py \
|
| 247 |
+
scripts/prepare_public_em_pretrain_data.py \
|
| 248 |
+
scripts/prepare_em_pretrain_data.py \
|
| 249 |
+
scripts/evaluate_cremi_segmentation.py \
|
| 250 |
+
scripts/evaluate_cremi_blockwise_scale.py
|
| 251 |
+
```
|
| 252 |
+
|
| 253 |
+
用 `huggingface_hub` 下载权重:
|
| 254 |
+
|
| 255 |
+
```python
|
| 256 |
+
from huggingface_hub import snapshot_download
|
| 257 |
+
|
| 258 |
+
snapshot_download(
|
| 259 |
+
repo_id="che111/dbmim-neuron-segmentation",
|
| 260 |
+
local_dir="outputs/hf_weights",
|
| 261 |
+
allow_patterns=["weights/**", "configs/**"],
|
| 262 |
+
)
|
| 263 |
+
```
|
| 264 |
+
|
| 265 |
+
## 仓库结构
|
| 266 |
+
|
| 267 |
+
```text
|
| 268 |
+
dbmim/ 核心 dataset、model、metric、postprocess、utils
|
| 269 |
+
configs/ 当前保留的 smoke、推荐方法和 matched ablation 配置
|
| 270 |
+
scripts/download_data.py CREMI 下载辅助脚本
|
| 271 |
+
scripts/prepare_*_data.py publicEM / fullEM 预训练数据准备脚本
|
| 272 |
+
scripts/evaluate_*.py VOI/ARAND 和 blockwise-scale 评测脚本
|
| 273 |
+
train_pretrain.py dbMiM / MAE 预训练入口
|
| 274 |
+
train_finetune.py affinity 微调入口
|
| 275 |
+
requirements-dbMIM.txt Python 依赖
|
| 276 |
+
```
|
| 277 |
+
|
| 278 |
+
## 引用
|
| 279 |
+
|
| 280 |
+
```bibtex
|
| 281 |
+
@inproceedings{chen2023self,
|
| 282 |
+
title={Self-supervised neuron segmentation with multi-agent reinforcement learning},
|
| 283 |
+
author={Chen, Yinda and Huang, Wei and Zhou, Shenglong and Chen, Qi and Xiong, Zhiwei},
|
| 284 |
+
booktitle={Proceedings of the Thirty-Second International Joint Conference on Artificial Intelligence},
|
| 285 |
+
pages={609--617},
|
| 286 |
+
year={2023}
|
| 287 |
+
}
|
| 288 |
+
```
|
| 289 |
+
|
| 290 |
+
## 数据和密钥说明
|
| 291 |
+
|
| 292 |
+
外部 EM 数据请遵守其原始 license 和访问规则。不要把下载的数据、生成的
|
| 293 |
+
checkpoint、TOS 凭证、Hugging Face token、GitHub token 或集群凭证提交到仓库。
|
checksums.sha256
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
8b94dcbb4a6bed3590de145ddaa2604a1888b2dc11fea7d7e4ce860cd4c2cdd6 weights/publicem_dbmim_r17/pretrained_latest.pt
|
| 2 |
+
da2775fe7a0dbeaaa3ae68fabeb4ef786405dd1ff90a37eea30f157912adfd1c weights/publicem_dbmim_r17/finetuned_latest.pt
|
| 3 |
+
a86917528db0cf0106886e91c1f8564b8657f8c771209e6fda93f4374a10f364 weights/fullem_mixedmask_dbmim_r33/pretrained_latest.pt
|
| 4 |
+
fbdd97de7c9e4c27f21ffe74f12664829360e1d6b2395665fe1ac85458d11ecd weights/fullem_mixedmask_dbmim_r33/finetuned_latest.pt
|
configs/finetune_cremi_real_unetr_aniso_em_mse_maws_fullem_mixedmask_r33q.yaml
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
seed: 295
|
| 2 |
+
device: cuda
|
| 3 |
+
output_dir: /volume/med-train/users/dchen02/code/dbMiM/outputs/finetune_cremi_real_unetr_aniso_em_mse_maws_fullem_mixedmask_r33q
|
| 4 |
+
pretrained: /volume/med-train/users/dchen02/code/dbMiM/outputs/pretrain_em_full_mixedmask_dbmim_r33/pretrained_latest.pt
|
| 5 |
+
pretrained_include_prefixes:
|
| 6 |
+
- pos_embed
|
| 7 |
+
- patch_embed
|
| 8 |
+
- encoder_blocks
|
| 9 |
+
- norm
|
| 10 |
+
data:
|
| 11 |
+
synthetic: false
|
| 12 |
+
image_paths:
|
| 13 |
+
- /volume/med-train/users/dchen02/code/dbMiM/data/CREMI
|
| 14 |
+
label_paths:
|
| 15 |
+
- /volume/med-train/users/dchen02/code/dbMiM/data/CREMI
|
| 16 |
+
image_keys:
|
| 17 |
+
- volumes/raw
|
| 18 |
+
- raw
|
| 19 |
+
- main
|
| 20 |
+
label_keys:
|
| 21 |
+
- volumes/labels/neuron_ids
|
| 22 |
+
- labels
|
| 23 |
+
- label
|
| 24 |
+
- gt
|
| 25 |
+
volume_size:
|
| 26 |
+
- 32
|
| 27 |
+
- 160
|
| 28 |
+
- 160
|
| 29 |
+
length_multiplier: 2048
|
| 30 |
+
augment: true
|
| 31 |
+
widen_border: true
|
| 32 |
+
widen_border_radius: 1
|
| 33 |
+
augment_rotate_xy: true
|
| 34 |
+
augment_gamma: true
|
| 35 |
+
augment_gamma_range:
|
| 36 |
+
- 0.7
|
| 37 |
+
- 1.5
|
| 38 |
+
augment_noise_std: 0.035
|
| 39 |
+
model:
|
| 40 |
+
architecture: unetr_aniso_em
|
| 41 |
+
in_channels: 1
|
| 42 |
+
out_channels: 3
|
| 43 |
+
volume_size:
|
| 44 |
+
- 32
|
| 45 |
+
- 160
|
| 46 |
+
- 160
|
| 47 |
+
patch_size:
|
| 48 |
+
- 4
|
| 49 |
+
- 16
|
| 50 |
+
- 16
|
| 51 |
+
embed_dim: 192
|
| 52 |
+
depth: 6
|
| 53 |
+
num_heads: 6
|
| 54 |
+
feature_size: 32
|
| 55 |
+
dropout: 0.05
|
| 56 |
+
em_refine_depth: 2
|
| 57 |
+
channel_bias_init:
|
| 58 |
+
- -0.2
|
| 59 |
+
- 0.0
|
| 60 |
+
- 0.0
|
| 61 |
+
train:
|
| 62 |
+
batch_size: 2
|
| 63 |
+
epochs: 200
|
| 64 |
+
max_steps: 12000
|
| 65 |
+
num_workers: 8
|
| 66 |
+
lr: 8.0e-05
|
| 67 |
+
weight_decay: 0.01
|
| 68 |
+
amp: true
|
| 69 |
+
log_every: 20
|
| 70 |
+
eval_every: 0
|
| 71 |
+
eval_max_batches: 0
|
| 72 |
+
save_every: 0
|
| 73 |
+
save_steps: 1000
|
| 74 |
+
val_fraction: 0.0
|
| 75 |
+
clip_grad: 1.0
|
| 76 |
+
replicate_affinity_boundary: true
|
| 77 |
+
loss:
|
| 78 |
+
loss_type: mse
|
| 79 |
+
bce_weight: 1.0
|
| 80 |
+
dice_weight: 0.0
|
| 81 |
+
boundary_dice_weight: 0.0
|
| 82 |
+
bcar_weight: 0.0
|
| 83 |
+
bcar_calibration_weight: 0.0
|
| 84 |
+
membrane_weight: 0.75
|
| 85 |
+
membrane_axis_weights:
|
| 86 |
+
- 0.25
|
| 87 |
+
- 1.0
|
| 88 |
+
- 1.0
|
| 89 |
+
membrane_clip: 4.0
|
| 90 |
+
membrane_normalize: true
|
| 91 |
+
channel_weights:
|
| 92 |
+
- 1.35
|
| 93 |
+
- 1.0
|
| 94 |
+
- 1.0
|
| 95 |
+
encoder_lr: 1.0e-05
|
| 96 |
+
encoder_param_prefixes:
|
| 97 |
+
- pos_embed
|
| 98 |
+
- patch_embed
|
| 99 |
+
- encoder_blocks
|
| 100 |
+
- norm
|
configs/finetune_cremi_real_unetr_aniso_em_mse_maws_publicem_r17q.yaml
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
seed: 191
|
| 2 |
+
device: cuda
|
| 3 |
+
output_dir: /volume/med-train/users/dchen02/code/dbMiM/outputs/finetune_cremi_real_unetr_aniso_em_mse_maws_publicem_r17q
|
| 4 |
+
pretrained: /volume/med-train/users/dchen02/code/dbMiM/outputs/pretrain_public_em_membrane_dbmim_r16/pretrained_latest.pt
|
| 5 |
+
data:
|
| 6 |
+
synthetic: false
|
| 7 |
+
image_paths:
|
| 8 |
+
- /volume/med-train/users/dchen02/code/dbMiM/data/CREMI
|
| 9 |
+
label_paths:
|
| 10 |
+
- /volume/med-train/users/dchen02/code/dbMiM/data/CREMI
|
| 11 |
+
image_keys:
|
| 12 |
+
- volumes/raw
|
| 13 |
+
- raw
|
| 14 |
+
- main
|
| 15 |
+
label_keys:
|
| 16 |
+
- volumes/labels/neuron_ids
|
| 17 |
+
- labels
|
| 18 |
+
- label
|
| 19 |
+
- gt
|
| 20 |
+
volume_size:
|
| 21 |
+
- 32
|
| 22 |
+
- 160
|
| 23 |
+
- 160
|
| 24 |
+
length_multiplier: 2048
|
| 25 |
+
augment: true
|
| 26 |
+
widen_border: true
|
| 27 |
+
widen_border_radius: 1
|
| 28 |
+
augment_rotate_xy: true
|
| 29 |
+
augment_gamma: true
|
| 30 |
+
augment_gamma_range:
|
| 31 |
+
- 0.7
|
| 32 |
+
- 1.5
|
| 33 |
+
augment_noise_std: 0.035
|
| 34 |
+
model:
|
| 35 |
+
architecture: unetr_aniso_em
|
| 36 |
+
in_channels: 1
|
| 37 |
+
out_channels: 3
|
| 38 |
+
volume_size:
|
| 39 |
+
- 32
|
| 40 |
+
- 160
|
| 41 |
+
- 160
|
| 42 |
+
patch_size:
|
| 43 |
+
- 4
|
| 44 |
+
- 16
|
| 45 |
+
- 16
|
| 46 |
+
embed_dim: 192
|
| 47 |
+
depth: 6
|
| 48 |
+
num_heads: 6
|
| 49 |
+
feature_size: 32
|
| 50 |
+
dropout: 0.05
|
| 51 |
+
em_refine_depth: 2
|
| 52 |
+
channel_bias_init:
|
| 53 |
+
- -0.2
|
| 54 |
+
- 0.0
|
| 55 |
+
- 0.0
|
| 56 |
+
train:
|
| 57 |
+
batch_size: 2
|
| 58 |
+
epochs: 200
|
| 59 |
+
max_steps: 12000
|
| 60 |
+
num_workers: 8
|
| 61 |
+
lr: 8.0e-05
|
| 62 |
+
weight_decay: 0.01
|
| 63 |
+
amp: true
|
| 64 |
+
log_every: 20
|
| 65 |
+
eval_every: 0
|
| 66 |
+
eval_max_batches: 0
|
| 67 |
+
save_every: 0
|
| 68 |
+
save_steps: 1000
|
| 69 |
+
val_fraction: 0.0
|
| 70 |
+
clip_grad: 1.0
|
| 71 |
+
replicate_affinity_boundary: true
|
| 72 |
+
loss:
|
| 73 |
+
loss_type: mse
|
| 74 |
+
bce_weight: 1.0
|
| 75 |
+
dice_weight: 0.0
|
| 76 |
+
boundary_dice_weight: 0.0
|
| 77 |
+
bcar_weight: 0.0
|
| 78 |
+
bcar_calibration_weight: 0.0
|
| 79 |
+
membrane_weight: 0.75
|
| 80 |
+
membrane_axis_weights:
|
| 81 |
+
- 0.25
|
| 82 |
+
- 1.0
|
| 83 |
+
- 1.0
|
| 84 |
+
membrane_clip: 4.0
|
| 85 |
+
membrane_normalize: true
|
| 86 |
+
channel_weights:
|
| 87 |
+
- 1.35
|
| 88 |
+
- 1.0
|
| 89 |
+
- 1.0
|
| 90 |
+
encoder_lr: 1.0e-05
|
| 91 |
+
encoder_param_prefixes:
|
| 92 |
+
- pos_embed
|
| 93 |
+
- patch_embed
|
| 94 |
+
- encoder_blocks
|
| 95 |
+
- norm
|
configs/pretrain_em_full_mixedmask_dbmim_r33.yaml
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
seed: 295
|
| 2 |
+
device: cuda
|
| 3 |
+
output_dir: /volume/med-train/users/dchen02/code/dbMiM/outputs/pretrain_em_full_mixedmask_dbmim_r33
|
| 4 |
+
data:
|
| 5 |
+
synthetic: false
|
| 6 |
+
train_paths:
|
| 7 |
+
- /volume/med-train/users/dchen02/code/dbMiM/data/CREMI
|
| 8 |
+
- /volume/med-train/users/dchen02/code/dbMiM/data/EM_pretrain_data/all
|
| 9 |
+
image_keys:
|
| 10 |
+
- volumes/raw
|
| 11 |
+
- raw
|
| 12 |
+
- main
|
| 13 |
+
- data
|
| 14 |
+
volume_size:
|
| 15 |
+
- 32
|
| 16 |
+
- 160
|
| 17 |
+
- 160
|
| 18 |
+
length_multiplier: 8192
|
| 19 |
+
augment: true
|
| 20 |
+
augment_rotate_xy: true
|
| 21 |
+
augment_gamma: true
|
| 22 |
+
augment_gamma_range:
|
| 23 |
+
- 0.7
|
| 24 |
+
- 1.5
|
| 25 |
+
augment_noise_std: 0.025
|
| 26 |
+
model:
|
| 27 |
+
architecture: dbmim
|
| 28 |
+
in_channels: 1
|
| 29 |
+
volume_size:
|
| 30 |
+
- 32
|
| 31 |
+
- 160
|
| 32 |
+
- 160
|
| 33 |
+
patch_size:
|
| 34 |
+
- 4
|
| 35 |
+
- 16
|
| 36 |
+
- 16
|
| 37 |
+
embed_dim: 192
|
| 38 |
+
depth: 6
|
| 39 |
+
num_heads: 6
|
| 40 |
+
decoder_dim: 192
|
| 41 |
+
mask_ratio: 0.75
|
| 42 |
+
mask_strategy: edge_random_mix
|
| 43 |
+
edge_mask_fraction: 0.5
|
| 44 |
+
edge_mask_power: 1.25
|
| 45 |
+
edge_mask_noise: 0.05
|
| 46 |
+
structure_weight: 0.2
|
| 47 |
+
structure_axis_weights:
|
| 48 |
+
- 0.5
|
| 49 |
+
- 1.0
|
| 50 |
+
- 1.0
|
| 51 |
+
membrane_weight: 1.35
|
| 52 |
+
membrane_axis_weights:
|
| 53 |
+
- 0.25
|
| 54 |
+
- 1.0
|
| 55 |
+
- 1.0
|
| 56 |
+
membrane_clip: 5.0
|
| 57 |
+
decision:
|
| 58 |
+
enabled: false
|
| 59 |
+
train:
|
| 60 |
+
batch_size: 2
|
| 61 |
+
epochs: 200
|
| 62 |
+
max_steps: 160000
|
| 63 |
+
num_workers: 8
|
| 64 |
+
lr: 0.00015
|
| 65 |
+
weight_decay: 0.05
|
| 66 |
+
amp: true
|
| 67 |
+
log_every: 20
|
| 68 |
+
save_every: 5
|
| 69 |
+
save_steps: 2000
|
| 70 |
+
clip_grad: 1.0
|
configs/pretrain_public_em_membrane_r16.yaml
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
seed: 176
|
| 2 |
+
device: cuda
|
| 3 |
+
output_dir: /volume/med-train/users/dchen02/code/dbMiM/outputs/pretrain_public_em_membrane_dbmim_r16
|
| 4 |
+
data:
|
| 5 |
+
synthetic: false
|
| 6 |
+
train_paths:
|
| 7 |
+
- /volume/med-train/users/dchen02/code/dbMiM/data/CREMI
|
| 8 |
+
- /volume/med-train/users/dchen02/code/dbMiM/data/EM_pretrain_data/public_em
|
| 9 |
+
image_keys:
|
| 10 |
+
- volumes/raw
|
| 11 |
+
- raw
|
| 12 |
+
- main
|
| 13 |
+
- data
|
| 14 |
+
volume_size:
|
| 15 |
+
- 32
|
| 16 |
+
- 160
|
| 17 |
+
- 160
|
| 18 |
+
length_multiplier: 8192
|
| 19 |
+
augment: true
|
| 20 |
+
augment_rotate_xy: true
|
| 21 |
+
augment_gamma: true
|
| 22 |
+
augment_gamma_range:
|
| 23 |
+
- 0.7
|
| 24 |
+
- 1.5
|
| 25 |
+
augment_noise_std: 0.025
|
| 26 |
+
model:
|
| 27 |
+
in_channels: 1
|
| 28 |
+
volume_size:
|
| 29 |
+
- 32
|
| 30 |
+
- 160
|
| 31 |
+
- 160
|
| 32 |
+
patch_size:
|
| 33 |
+
- 4
|
| 34 |
+
- 16
|
| 35 |
+
- 16
|
| 36 |
+
embed_dim: 192
|
| 37 |
+
depth: 6
|
| 38 |
+
num_heads: 6
|
| 39 |
+
decoder_dim: 192
|
| 40 |
+
mask_ratio: 0.75
|
| 41 |
+
structure_weight: 0.2
|
| 42 |
+
structure_axis_weights:
|
| 43 |
+
- 0.5
|
| 44 |
+
- 1.0
|
| 45 |
+
- 1.0
|
| 46 |
+
membrane_weight: 1.35
|
| 47 |
+
membrane_axis_weights:
|
| 48 |
+
- 0.25
|
| 49 |
+
- 1.0
|
| 50 |
+
- 1.0
|
| 51 |
+
membrane_clip: 5.0
|
| 52 |
+
decision:
|
| 53 |
+
enabled: true
|
| 54 |
+
hidden_dim: 256
|
| 55 |
+
target_mask_ratio: 0.75
|
| 56 |
+
min_mask_ratio: 0.4
|
| 57 |
+
max_mask_ratio: 0.9
|
| 58 |
+
lr: 0.0005
|
| 59 |
+
policy_weight: 0.05
|
| 60 |
+
freeze_after_steps: 40000
|
| 61 |
+
train:
|
| 62 |
+
batch_size: 2
|
| 63 |
+
epochs: 200
|
| 64 |
+
max_steps: 160000
|
| 65 |
+
num_workers: 8
|
| 66 |
+
lr: 0.00015
|
| 67 |
+
weight_decay: 0.05
|
| 68 |
+
amp: true
|
| 69 |
+
log_every: 20
|
| 70 |
+
save_every: 5
|
| 71 |
+
save_steps: 2000
|
| 72 |
+
clip_grad: 1.0
|
weights/fullem_mixedmask_dbmim_r33/finetuned_latest.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fbdd97de7c9e4c27f21ffe74f12664829360e1d6b2395665fe1ac85458d11ecd
|
| 3 |
+
size 217580946
|
weights/fullem_mixedmask_dbmim_r33/pretrained_latest.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a86917528db0cf0106886e91c1f8564b8657f8c771209e6fda93f4374a10f364
|
| 3 |
+
size 39162622
|
weights/publicem_dbmim_r17/finetuned_latest.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:da2775fe7a0dbeaaa3ae68fabeb4ef786405dd1ff90a37eea30f157912adfd1c
|
| 3 |
+
size 217580818
|
weights/publicem_dbmim_r17/pretrained_latest.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8b94dcbb4a6bed3590de145ddaa2604a1888b2dc11fea7d7e4ce860cd4c2cdd6
|
| 3 |
+
size 42148110
|