qqyang commited on
Commit
503b2dd
Β·
verified Β·
1 Parent(s): 6b969f5

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +39 -21
README.md CHANGED
@@ -4,27 +4,45 @@ library_name: pytorch
4
  tags:
5
  - tactile
6
  - contact-estimation
 
7
  - egocentric
8
  - touchanything
9
  ---
10
- # c2p β€” Stage-1 Contact Head (Ego2Contact)
11
-
12
- Standalone bimanual **contact-region** head from egocentric video β€” Stage-1 of the coarse-to-fine
13
- **contact -> pressure** pipeline built on TouchAnything + EgoTouch. Predicts a per-cell contact
14
- probability `p_c` on the 21x21 tactile grid (both hands) from a shared vision encoder (DINOv2) +
15
- WiLoR hand features. Trained with a boundary-aware **soft-target BCE + Dice + part-wise
16
- Center-of-Pressure** aux. It has **no pressure magnitude** (that is Stage-2).
17
-
18
- ## Files
19
- - `stage1_contact_head/best_model.pth` β€” checkpoint (contact head + its own temporal/pose/fusion trunk)
20
- - `eval/test_seen_metrics.json`, `eval/test_unseen_metrics.json` β€” full test-eval (grid space, per-seq pooled)
21
-
22
- ## Eval β€” contact metrics @0.05 (grid; `p_c>0.5` vs `gt>0.05`, per-seq pooled)
23
- | split | cIoU@.05 | T.Acc@.05 | Precision | Recall | F1 | CoP err |
24
- |---|---|---|---|---|---|---|
25
- | test_seen (179) | 0.5117 | 0.8909 | 0.5614 | 0.8541 | 0.6688 | 0.1840 |
26
- | test_unseen (85) | 0.4781 | 0.8561 | 0.5561 | 0.7826 | 0.6405 | 0.1658 |
27
-
28
- Reference bars (full **pressure** models, same space): v2_dit flow **0.5735 / 0.4812** (seen/unseen);
29
- TouchAnything regression 0.5064 / 0.4720. The magnitude-free contact head already matches the TA
30
- regression baseline on both splits and ties the flow model out-of-distribution.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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).