Dimios45 commited on
Commit
39aaa50
·
verified ·
1 Parent(s): f6b608d

Upload geomatch_v2_repro/EVAL_INFO.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. geomatch_v2_repro/EVAL_INFO.md +106 -0
geomatch_v2_repro/EVAL_INFO.md ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GeoMatch v2 — Reproduction Runs (epoch 50 checkpoints)
2
+
3
+ **Status: intermediate checkpoints from ongoing training.** These are epoch-50 snapshots from three
4
+ parallel training runs launched to reproduce the GeoMatch paper's (arXiv:2312.03864) reported Isaac
5
+ Gym success rates (EZGripper 75.0%, Barrett 90.0%, ShadowHand 72.5%). All three runs use the
6
+ **fixed keypoints** dataset (`grasp_gnn_v2`) — see "Bug History" below. Training continues to
7
+ epoch 200; these checkpoints are provided for early evaluation only, not as final models.
8
+
9
+ ## Which file is which
10
+
11
+ | File | Seed | LR | Batch size | Rationale |
12
+ |---|---|---|---|---|
13
+ | `runA_paper_exact_epoch50.pth` | 42 | 1e-4 | 256 | Exact paper-matching recipe (control) |
14
+ | `runB_seed123_epoch50.pth` | 123 | 1e-4 | 256 | Same recipe, different seed (init/data-order sensitivity check) |
15
+ | `runC_lr5e-5_bs128_epoch50.pth` | 7 | 5e-5 | 128 | Half LR, half batch — hedge against batch-size/LR sensitivity |
16
+
17
+ All three: Adam optimizer (β=0.9, 0.99), weight_decay=0, no AMP (FP32), 200 total epochs planned,
18
+ single-GPU (no DDP), `num_workers=0`.
19
+
20
+ ## Loss/accuracy at epoch 50 (as logged during training)
21
+
22
+ | Run | Train loss | Train acc | Val loss | Val acc |
23
+ |---|---|---|---|---|
24
+ | A | 1.690662 | 0.6269 | 1.699793 | 0.5926 |
25
+ | B | 1.691613 | 0.6280 | 1.694283 | 0.5801 |
26
+ | C | 1.701282 | 0.6126 | 1.713473 | 0.6481 |
27
+
28
+ **Caveat on val numbers:** the validation set is only 10 objects, so epoch-to-epoch val accuracy is
29
+ noisy (observed swings of ±0.05 between adjacent epochs in these runs). Don't read too much into
30
+ small val differences between runs at a single epoch — training (contact-map) loss/acc is the more
31
+ stable signal at this stage. Isaac Gym grasp success rate is the metric that actually matters; these
32
+ loss numbers are only a training-health sanity check.
33
+
34
+ ## Model architecture / loading
35
+
36
+ Checkpoints are **raw `state_dict`** (`collections.OrderedDict`), not wrapped in a dict with
37
+ metadata — load directly with `model.load_state_dict(...)`.
38
+
39
+ ```python
40
+ import torch, sys
41
+ sys.path.append(".") # repo root containing config.py and models/
42
+ import config
43
+ from models.geomatch import GeoMatch
44
+
45
+ model = GeoMatch(config).cuda()
46
+ model.load_state_dict(torch.load("runA_paper_exact_epoch50.pth", map_location="cuda"))
47
+ model.eval()
48
+ ```
49
+
50
+ Use the `config.py` and `models/geomatch.py` already at the repo root (unchanged from GeoMatch v1/v2 —
51
+ architecture is identical across all `geomatch_v2*` checkpoints). Key config values:
52
+ `obj_pc_n=2048`, `robot_pc_n=6`, `keypoint_n=6`, `hidden_n=256`, `obj_out_feats=512`,
53
+ `num_hidden=3`, `robot_weighting=500.0`, `matchnet_weighting=200.0`.
54
+
55
+ ## Dataset / keypoint files used for training (for exact reproduction)
56
+
57
+ These checkpoints were trained against a **regenerated** `robot_keypoints.json` /
58
+ `robot_centroids.json` that fixed two bugs in the original v1 keypoint generator (2× scale factor
59
+ applied to nothing else in the pipeline, and a ShadowHand axis-swap at the wrong pipeline stage).
60
+ If you need the exact keypoint files to reproduce inference/IK against these checkpoints:
61
+
62
+ - `robot_keypoints.json` — MD5 `8658b5cd2cb7ff4344398b7e8ae08a6a`
63
+ - `robot_centroids.json` — MD5 `d0a9ae0a74a29f9ce3348307b1b937d3`
64
+
65
+ Ask if you need these files uploaded too — they aren't yet in this repo.
66
+
67
+ **Robots covered:** `allegro`, `allegro_right` (alias), `barrett`, `ezgripper`, `robotiq_3finger`,
68
+ `shadowhand`.
69
+
70
+ **Train/validation object split** (from `CMapDataset-sqrt_align/split_train_validate_objects.json`,
71
+ GenDexGrasp's split): 48 train objects (YCB + ContactDB); **10 held-out validation/test objects**:
72
+ `contactdb+apple`, `contactdb+camera`, `contactdb+cylinder_medium`, `contactdb+rubber_duck`,
73
+ `contactdb+door_knob`, `contactdb+water_bottle`, `ycb+baseball`, `ycb+pear`,
74
+ `ycb+potted_meat_can`, `ycb+tomato_soup_can`. These 10 are the objects to use for Isaac Gym
75
+ evaluation (unseen at training time), matching the paper's protocol.
76
+
77
+ ## What's NOT yet implemented (matters for grasp generation, not for raw contact-map eval)
78
+
79
+ The inference pipeline (`generate_grasps_for_obj.py`) currently stops at the raw SciPy TRF IK
80
+ result. The paper describes an additional **contact-refinement step** (single Adam step, step size
81
+ 0.05, pulling fingers to within 5mm of the object surface) that is **not yet added** to this repo's
82
+ grasp-generation script. If you're evaluating via full grasp generation → Isaac Gym (not just raw
83
+ contact-map precision), be aware raw-IK grasps from these checkpoints may under-perform until that
84
+ refinement step is added.
85
+
86
+ ## Suggested evaluation protocol (matches paper)
87
+
88
+ - 10 held-out objects × 4 grasps per object-gripper (sampled from top-[0, 20, 50, 100] predicted
89
+ keypoint configurations) = 40 grasps per gripper.
90
+ - Isaac Gym test: apply 0.5 m/s² acceleration sequentially along ±x, ±y, ±z (1 second / 60 sim
91
+ steps each); success iff object displacement < 2cm on **all six** directions.
92
+ - Report per-gripper success rate for EZGripper, Barrett, ShadowHand against paper targets
93
+ 75.0% / 90.0% / 72.5%.
94
+ - `evaluate.py`'s contact precision metric is a useful cheap sanity check before running the full
95
+ Isaac Gym pipeline (should be far above the ~0.02 seen on the old corrupted-keypoint checkpoints).
96
+
97
+ ## Bug history (why this is "v2", not v1)
98
+
99
+ GeoMatch v1 (still on this repo under `geomatch_v1/`) was trained on keypoints with a bogus 2×
100
+ scale factor and a ShadowHand axis-swap applied at the wrong pipeline stage, producing corrupted
101
+ training labels and IK targets (0% Isaac Gym success across all grippers). The existing
102
+ `geomatch_v2/` checkpoints on this repo are **also invalid** — that run's DataLoader silently lost
103
+ workers (`num_workers=4` + `prefetch_factor=4` on ROCm), so it only saw ~7.3% of the training data
104
+ per epoch despite fixed keypoints. **These three `geomatch_v2_repro/` runs are the first properly
105
+ trained runs on the fixed-keypoint data** (full dataset per epoch, correct LR). Once one of the
106
+ three is confirmed via Isaac Gym eval, it will become the new canonical `geomatch_v2/`.