Add all paper figures to model card with arXiv:2606.22546
Browse files
README.md
CHANGED
|
@@ -17,6 +17,7 @@ library_name: pytorch
|
|
| 17 |
datasets:
|
| 18 |
- refcoco
|
| 19 |
- refcocog
|
|
|
|
| 20 |
---
|
| 21 |
|
| 22 |
# Venice-H1: Failure-Aware Query Re-Ranking for Referring Image Segmentation
|
|
@@ -26,13 +27,42 @@ datasets:
|
|
| 26 |
[](https://opensource.org/licenses/MIT)
|
| 27 |
|
| 28 |
**NicolΓ² Savioli, Ph.D.** β OdaxAI Research
|
| 29 |
-
nicolo.savioli@odaxai.com
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
---
|
| 32 |
|
| 33 |
## Model Description
|
| 34 |
|
| 35 |
-
Venice-H1 is a lightweight, backbone-decoupled re-ranking module for Referring Image Segmentation (RIS).
|
| 36 |
|
| 37 |
- **Multi-Scale Grid Signatures**: 4Γ4, 8Γ8, 16Γ16 spatial pooling β 675-dim descriptors
|
| 38 |
- **Failure Gate**: binary classifier predicting whether Query 0 is suboptimal
|
|
@@ -44,37 +74,74 @@ Venice-H1 is a lightweight, backbone-decoupled re-ranking module for Referring I
|
|
| 44 |
|
| 45 |
---
|
| 46 |
|
| 47 |
-
##
|
| 48 |
-
|
| 49 |
-
Venice-H1 operates as a post-hoc re-ranker on top of:
|
| 50 |
|
| 51 |
-
|
| 52 |
-
|-----------|-------|-------|
|
| 53 |
-
| Backbone | DeRIS-L | Dai et al. (2025) |
|
| 54 |
-
| Visual Encoder | Swin-Large | Liu et al. (2021) |
|
| 55 |
-
| Language Encoder | BEiT-3 | Wang et al. (2023) |
|
| 56 |
-
| Mask Generator | Mask2Former | Cheng et al. (2022) |
|
| 57 |
|
| 58 |
-
|
| 59 |
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
## Checkpoint: `venice_h1_deris_l.pt`
|
| 63 |
-
|
| 64 |
-
Trained on RefCOCO/RefCOCO+/RefCOCOg using DeRIS-L features. Evaluated on RefCOCO val split.
|
| 65 |
|
| 66 |
| Metric | Value |
|
| 67 |
|--------|-------|
|
| 68 |
| Parameters | **11,296,258** |
|
| 69 |
-
| Backbone | DeRIS-L |
|
| 70 |
-
| Epoch | 15 |
|
| 71 |
-
| Ο (threshold) | 0.90 |
|
| 72 |
| **Ξ_fail (mIoU on failures)** | **+1.824** |
|
| 73 |
| **AUC (failure detection)** | **0.778** |
|
| 74 |
| **Ξ_full (overall mIoU)** | **+0.039** |
|
| 75 |
| Q0 mIoU | 86.469 |
|
| 76 |
| Selected mIoU | 86.509 |
|
| 77 |
| Oracle mIoU | 89.691 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
---
|
| 80 |
|
|
@@ -84,7 +151,6 @@ Trained on RefCOCO/RefCOCO+/RefCOCOg using DeRIS-L features. Evaluated on RefCOC
|
|
| 84 |
import torch
|
| 85 |
from huggingface_hub import hf_hub_download
|
| 86 |
|
| 87 |
-
# Download checkpoint
|
| 88 |
ckpt_path = hf_hub_download(repo_id="OdaxAI/venice-h1", filename="venice_h1_deris_l.pt")
|
| 89 |
ckpt = torch.load(ckpt_path, map_location="cpu", weights_only=False)
|
| 90 |
|
|
@@ -93,51 +159,22 @@ print("Metrics:", ckpt["metrics"])
|
|
| 93 |
print("Parameters:", sum(v.numel() for v in ckpt["model"].values() if hasattr(v, "numel")))
|
| 94 |
```
|
| 95 |
|
| 96 |
-
**Reproduce paper results** (no dataset needed
|
| 97 |
|
| 98 |
```bash
|
| 99 |
git clone https://github.com/odaxai/Venice-H1.git
|
| 100 |
-
cd Venice-H1 && pip install -r requirements.txt
|
| 101 |
python reproduce_results.py --verify_only
|
| 102 |
```
|
| 103 |
|
| 104 |
-
Expected output:
|
| 105 |
-
```
|
| 106 |
-
ββ Architecture Verification ββββββββββββββββββββββββββββββ
|
| 107 |
-
Parameters : 11,296,258 β MATCH
|
| 108 |
-
|
| 109 |
-
ββ Paper Cross-Check (RefCOCO val) βββββββββββββββββββββββββ
|
| 110 |
-
β delta_fail : 1.8244 (paper: 1.824)
|
| 111 |
-
β auc_fail : 0.7776 (paper: 0.778)
|
| 112 |
-
β delta_full : 0.0392 (paper: 0.039)
|
| 113 |
```
|
|
|
|
|
|
|
| 114 |
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
import torch
|
| 120 |
-
from huggingface_hub import hf_hub_download
|
| 121 |
-
|
| 122 |
-
ckpt_path = hf_hub_download(repo_id="OdaxAI/venice-h1", filename="venice_h1_deris_l.pt")
|
| 123 |
-
ckpt = torch.load(ckpt_path, map_location="cpu", weights_only=False)
|
| 124 |
-
cfg = ckpt["config"]
|
| 125 |
-
|
| 126 |
-
model = VeniceH1Reranker(
|
| 127 |
-
query_feat_dim=cfg["query_feat_dim"],
|
| 128 |
-
hidden_dim=cfg["hidden_dim"],
|
| 129 |
-
n_layers=cfg["n_layers"],
|
| 130 |
-
n_heads=cfg["n_heads"],
|
| 131 |
-
tau=cfg["tau"],
|
| 132 |
-
)
|
| 133 |
-
model.load_state_dict(ckpt["model"], strict=False)
|
| 134 |
-
model.eval()
|
| 135 |
-
|
| 136 |
-
# features: (B, N=10, 936) β from scripts/extract_features.py
|
| 137 |
-
with torch.no_grad():
|
| 138 |
-
out = model(features, det_scores, mask_means)
|
| 139 |
-
p_fail = out["p_fail"] # (B,) failure probability
|
| 140 |
-
selected = model.rerank(features, det_scores, mask_means) # (B,) best query
|
| 141 |
```
|
| 142 |
|
| 143 |
---
|
|
|
|
| 17 |
datasets:
|
| 18 |
- refcoco
|
| 19 |
- refcocog
|
| 20 |
+
arxiv: 2606.22546
|
| 21 |
---
|
| 22 |
|
| 23 |
# Venice-H1: Failure-Aware Query Re-Ranking for Referring Image Segmentation
|
|
|
|
| 27 |
[](https://opensource.org/licenses/MIT)
|
| 28 |
|
| 29 |
**NicolΓ² Savioli, Ph.D.** β OdaxAI Research
|
| 30 |
+
nicolo.savioli@odaxai.com Β· [odaxai.com](https://odaxai.com)
|
| 31 |
+
|
| 32 |
+
---
|
| 33 |
+
|
| 34 |
+
## Architecture Overview
|
| 35 |
+
|
| 36 |
+

|
| 37 |
+
|
| 38 |
+
*Venice-H1 pipeline. A frozen DeRIS backbone generates N=10 candidate masks. Multi-scale grid signatures encode spatial quality. The Failure Re-Ranker gates intervention: it only overrides Query-0 when confident the default choice is wrong.*
|
| 39 |
+
|
| 40 |
+
---
|
| 41 |
+
|
| 42 |
+
## The Failure-Case Bottleneck
|
| 43 |
+
|
| 44 |
+
| | |
|
| 45 |
+
|---|---|
|
| 46 |
+
|  |  |
|
| 47 |
+
| *7β18% of samples generate 40β68% of total error* | *Failure cases form a "triangle of opportunity"* |
|
| 48 |
+
|
| 49 |
+
---
|
| 50 |
+
|
| 51 |
+
## Multi-Scale Grid Signatures
|
| 52 |
+
|
| 53 |
+

|
| 54 |
+
|
| 55 |
+
*Compact 675-dim spatial descriptors pooled at 4Γ4, 8Γ8, 16Γ16 grids per candidate mask.*
|
| 56 |
+
|
| 57 |
+

|
| 58 |
+
|
| 59 |
+
*Multi-scale grid cells inspired by entorhinal cortex representations.*
|
| 60 |
|
| 61 |
---
|
| 62 |
|
| 63 |
## Model Description
|
| 64 |
|
| 65 |
+
Venice-H1 is a lightweight, backbone-decoupled re-ranking module for Referring Image Segmentation (RIS). It detects when the default query selection fails and selects a better alternative using:
|
| 66 |
|
| 67 |
- **Multi-Scale Grid Signatures**: 4Γ4, 8Γ8, 16Γ16 spatial pooling β 675-dim descriptors
|
| 68 |
- **Failure Gate**: binary classifier predicting whether Query 0 is suboptimal
|
|
|
|
| 74 |
|
| 75 |
---
|
| 76 |
|
| 77 |
+
## Results
|
|
|
|
|
|
|
| 78 |
|
| 79 |
+
### On failure cases (where Venice-H1 intervenes)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
|
| 81 |
+

|
| 82 |
|
| 83 |
+
*Positive Ξ across all 8 evaluation splits.*
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
|
| 85 |
| Metric | Value |
|
| 86 |
|--------|-------|
|
| 87 |
| Parameters | **11,296,258** |
|
|
|
|
|
|
|
|
|
|
| 88 |
| **Ξ_fail (mIoU on failures)** | **+1.824** |
|
| 89 |
| **AUC (failure detection)** | **0.778** |
|
| 90 |
| **Ξ_full (overall mIoU)** | **+0.039** |
|
| 91 |
| Q0 mIoU | 86.469 |
|
| 92 |
| Selected mIoU | 86.509 |
|
| 93 |
| Oracle mIoU | 89.691 |
|
| 94 |
+
| Harmful-switch rate | < 0.6% |
|
| 95 |
+
|
| 96 |
+
### Failure Gate Analysis
|
| 97 |
+
|
| 98 |
+
| | |
|
| 99 |
+
|---|---|
|
| 100 |
+
|  |  |
|
| 101 |
+
| *ROC curves across splits. AUC 0.78β0.82* | *Coverage-risk trade-off at different Ο* |
|
| 102 |
+
|
| 103 |
+
---
|
| 104 |
+
|
| 105 |
+
## Qualitative Results
|
| 106 |
+
|
| 107 |
+

|
| 108 |
+
|
| 109 |
+
*Re-ranking on RefCOCO val. Each row: input, ground truth, default query (red, fails), Venice-H1 corrected selection (blue). Venice-H1 recovers IoU > 84% in all cases.*
|
| 110 |
+
|
| 111 |
+
---
|
| 112 |
+
|
| 113 |
+
## Ablation Study
|
| 114 |
+
|
| 115 |
+

|
| 116 |
+
|
| 117 |
+
| Configuration | Ξ_fail | Gate AUC |
|
| 118 |
+
|---|---|---|
|
| 119 |
+
| BASE only (no grid) | +1.01 | 0.812 |
|
| 120 |
+
| 4Γ4 only | +1.01 | 0.821 |
|
| 121 |
+
| 8Γ8 only | +0.87 | 0.790 |
|
| 122 |
+
| 16Γ16 only | +1.00 | 0.828 |
|
| 123 |
+
| **BASE + all grids (ours)** | **+1.22** | **0.807** |
|
| 124 |
+
|
| 125 |
+
---
|
| 126 |
+
|
| 127 |
+
## Medical Cross-Domain Transfer
|
| 128 |
+
|
| 129 |
+

|
| 130 |
+
|
| 131 |
+
*Zero-shot transfer to MS-CXR (+1.16 mIoU) and M3D-RefSeg-2D (+0.51 mIoU) without fine-tuning.*
|
| 132 |
+
|
| 133 |
+
---
|
| 134 |
+
|
| 135 |
+
## External Dependencies
|
| 136 |
+
|
| 137 |
+
| Component | Model | Paper |
|
| 138 |
+
|-----------|-------|-------|
|
| 139 |
+
| Backbone | DeRIS-L | Dai et al. (2025) |
|
| 140 |
+
| Visual Encoder | Swin-Large | Liu et al. (2021) |
|
| 141 |
+
| Language Encoder | BEiT-3 | Wang et al. (2023) |
|
| 142 |
+
| Mask Generator | Mask2Former | Cheng et al. (2022) |
|
| 143 |
+
|
| 144 |
+
Venice-H1 does **not** include these weights. You need a running DeRIS-L instance to extract features.
|
| 145 |
|
| 146 |
---
|
| 147 |
|
|
|
|
| 151 |
import torch
|
| 152 |
from huggingface_hub import hf_hub_download
|
| 153 |
|
|
|
|
| 154 |
ckpt_path = hf_hub_download(repo_id="OdaxAI/venice-h1", filename="venice_h1_deris_l.pt")
|
| 155 |
ckpt = torch.load(ckpt_path, map_location="cpu", weights_only=False)
|
| 156 |
|
|
|
|
| 159 |
print("Parameters:", sum(v.numel() for v in ckpt["model"].values() if hasattr(v, "numel")))
|
| 160 |
```
|
| 161 |
|
| 162 |
+
**Reproduce paper results** (no dataset needed):
|
| 163 |
|
| 164 |
```bash
|
| 165 |
git clone https://github.com/odaxai/Venice-H1.git
|
| 166 |
+
cd Venice-H1 && pip install -r requirements.txt && pip install -e .
|
| 167 |
python reproduce_results.py --verify_only
|
| 168 |
```
|
| 169 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
```
|
| 171 |
+
ββ Architecture Verification βββββββββββββββββββ
|
| 172 |
+
Parameters : 11,296,258 β MATCH
|
| 173 |
|
| 174 |
+
ββ Paper Cross-Check (RefCOCO val) βββββββββββββ
|
| 175 |
+
β delta_fail : 1.8244 (paper: 1.824)
|
| 176 |
+
β auc_fail : 0.7776 (paper: 0.778)
|
| 177 |
+
β delta_full : 0.0392 (paper: 0.039)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 178 |
```
|
| 179 |
|
| 180 |
---
|