Views
No views yet
best.ckpt:| Model | mIoU | pixel-acc |
|---|---|---|
| UNet baseline | 0.4655 | 0.8672 |
| UNet + retrieval | 0.5648 | 0.8894 |
| Δ | +0.0993 | +0.0222 |
bird +0.25, bottle +0.19, dog +0.16, cow
+0.16, cat +0.15.baseline/
best.ckpt # 390 MB — UNet baseline, best epoch 48
hparams.yaml
training_metrics.csv # per-epoch CSVLogger log (50 epochs)
retrieval/
best.ckpt # 510 MB — UNet + cross-attention fusion, epoch 49
hparams.yaml
training_metrics.csv
retriever/
best.ckpt # 39 MB — MobileNet-v3-Large + SupCon head
memory_bank.pt # 1.3 GB — 1587 L2-normalized support embeddings + masks
hparams.yaml
training_metrics.csv
eval/
comparison.csv # fp32 re-eval baseline vs retrieval on VOC val
per_class_iou.csv # per-class IoU for both modelsL_ret = 0.8·L_Boundary-IoU + 0.2·L_CS-Jaccard — a soft-target SupCon
in which pair relevance is defined by mask geometry rather than class
labels, aligning retrieval with what cross-attention actually consumes.1# 1. Get the code
2git clone https://github.com/Yeetmq/retrieval-augmented-segmentation.git
3cd retrieval-augmented-segmentation
4pip install -e .
5
6# 2. Download this bundle
7pip install huggingface_hub
8huggingface-cli download yeetmq/retrieval-augmented-segmentation \
9 --local-dir weights_release
10
11# 3. Rebuild the runs/ layout the scripts expect
12mkdir -p runs/baseline runs/retrieval runs/retriever
13cp weights_release/baseline/best.ckpt runs/baseline/best.ckpt
14cp weights_release/retrieval/best.ckpt runs/retrieval/best.ckpt
15cp weights_release/retriever/best.ckpt runs/retriever/best.ckpt
16cp weights_release/retriever/memory_bank.pt runs/retriever/memory_bank.pt
17
18# 4. Re-evaluate on Pascal VOC val (needs the dataset — see prepare_data.py)
19python Experiments/pascal_voc/prepare_data.py
20python Experiments/pascal_voc/build_h5.py
21python Experiments/pascal_voc/build_splits.py
22python Experiments/pascal_voc/compare_results.pytraining_metrics.csv values were logged live under
precision="16-mixed". The headline numbers above and in
eval/comparison.csv are an fp32 re-evaluation of the same
best.ckpt on the same val split. The gap is small (e.g. retrieval
mIoU 0.5648 fp32 vs 0.5634 fp16-mixed live) but non-zero due to the
precision regime.1@misc{ren2026retrievalseg,
2 title = {Retrieval-augmented semantic segmentation with a mask-similarity-trained retriever},
3 author = {Ren, Jianan and Payunen, D. A. and Matyushenko, Ya. and Tatarnikova, T. M.},
4 year = {2026},
5 note = {Preprint},
6}