Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -4,27 +4,45 @@ library_name: pytorch
|
|
| 4 |
tags:
|
| 5 |
- tactile
|
| 6 |
- contact-estimation
|
|
|
|
| 7 |
- egocentric
|
| 8 |
- touchanything
|
| 9 |
---
|
| 10 |
-
# c2p β
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
**
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
##
|
| 19 |
-
|
| 20 |
-
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
|
| 24 |
-
|
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
tags:
|
| 5 |
- tactile
|
| 6 |
- contact-estimation
|
| 7 |
+
- pressure-estimation
|
| 8 |
- egocentric
|
| 9 |
- touchanything
|
| 10 |
---
|
| 11 |
+
# c2p β Coarse-to-Fine Contact β Pressure (Ego2Contact)
|
| 12 |
+
|
| 13 |
+
Bimanual tactile estimation from egocentric video, built on **TouchAnything + EgoTouch**. A decoupled
|
| 14 |
+
two-stage design: **Stage-1** trains a standalone contact head (per-cell contact probability `p_c` on the
|
| 15 |
+
21Γ21 grid, both hands) from a frozen **DINOv2** view + **WiLoR** hand features; **Stage-2/3** add pressure
|
| 16 |
+
*magnitude* with a flow-matching GridDiT that consumes the Stage-1 contact map. This repo holds the
|
| 17 |
+
checkpoints + full test-eval metrics for every stage.
|
| 18 |
+
|
| 19 |
+
## Model families
|
| 20 |
+
| dir | model | one-line |
|
| 21 |
+
|---|---|---|
|
| 22 |
+
| `stage1_contact_head/` | **Stage-1 head** | contact prob only, no magnitude (soft-BCE + Dice + part-CoP) |
|
| 23 |
+
| `stage2a/` | **Stage-2a** | frozen head (detached) β DiT-from-scratch, p_c as zero-init conditioning |
|
| 24 |
+
| `stage2_gate/` | **Stage-2 GATE** | frozen head `p_c` **soft-gates** the DiT output (floor 0.3), gate trained in-loop |
|
| 25 |
+
| `stage3/` | **Stage-3 JOINT** | init from GATE, **unfreeze** head + let the gated-final gradient co-train it (0.1Γ LR) |
|
| 26 |
+
|
| 27 |
+
Each `stageX/` has `best_model.pth` (+ `last_model.pth` for stage2a/stage3), and `eval/stageX/test_{seen,unseen}_metrics.json`.
|
| 28 |
+
|
| 29 |
+
## Test eval β grid space, threshold @0.05, per-seq pooled (179 seen / 85 unseen)
|
| 30 |
+
Contact metrics for the pressure models are on the **final pressure** map; Stage-1 scores `p_c>0.5` vs `gt>0.05`.
|
| 31 |
+
|
| 32 |
+
| model | cIoU s | cIoU u | T.Acc s | T.Acc u | vIoU s | vIoU u | MAEβ s | MAEβ u | CoPβ s | CoPβ u |
|
| 33 |
+
|---|---|---|---|---|---|---|---|---|---|---|
|
| 34 |
+
| Stage-1 head | 0.5117 | 0.4781 | 0.891 | 0.856 | β | β | β | β | 0.184 | 0.166 |
|
| 35 |
+
| Stage-2a | 0.5428 | 0.4647 | 0.889 | 0.835 | 0.442 | 0.315 | 0.042 | 0.061 | β | β |
|
| 36 |
+
| **Stage-2 GATE** | **0.5585** | **0.4739** | 0.898 | 0.838 | 0.479 | 0.325 | 0.039 | 0.060 | 0.164 | 0.155 |
|
| 37 |
+
| Stage-3 JOINT | 0.5680 | 0.4631 | **0.903** | 0.837 | 0.493 | 0.322 | **0.038** | 0.059 | 0.149 | 0.144 |
|
| 38 |
+
| _v2_dit (single-stage bar)_ | _0.5735_ | _0.4812_ | _0.902_ | _0.854_ | _0.496_ | _0.342_ | _0.038_ | _0.059_ | _β_ | _β_ |
|
| 39 |
+
| _ta_base (regression bar)_ | _0.5064_ | _0.4720_ | _0.890_ | _0.838_ | _0.425_ | _0.345_ | _0.049_ | _0.064_ | _β_ | _β_ |
|
| 40 |
+
|
| 41 |
+
## Findings
|
| 42 |
+
- **Stage-2a** (conditioning) improves *seen* but its from-scratch DiT overfits seen magnitude and **degrades unseen** (0.4647, below the head) β the DiT re-learns localization from scratch.
|
| 43 |
+
- **Stage-2 GATE** (learned in-loop gate) is the **best-balanced two-stage model**: it fixes Stage-2a's OOD collapse (unseen +.009 *and* seen +.016 vs 2a) and beats the whole contact-prior family + a post-hoc late-fusion gate. It trails single-stage v2_dit but ties it on unseen.
|
| 44 |
+
- **Stage-3 JOINT** (unfreeze + co-train the head) gives the **best in-distribution** numbers (seen cIoU 0.568, edging v2_dit on seen T.Acc/MAE) and lifts the head's own contact cIoU 0.518β0.55, **but sacrifices OOD** β unseen drops to the family's lowest (0.4631). A clean demonstration that freezing the contact prior protects generalization.
|
| 45 |
+
|
| 46 |
+
**Takeaway:** the two-stage contact-prior closes most of the gap to a well-optimized single-stage flow model but does not overtake it; among two-stage variants, **freeze-the-head (GATE)** is the right default for OOD, while **co-training (Stage-3)** trades OOD robustness for in-distribution accuracy.
|
| 47 |
+
|
| 48 |
+
Demo videos (GT vs predicted pressure): [qqyang/ego2contact-demo-videos](https://huggingface.co/qqyang/ego2contact-demo-videos).
|