Soumojit048 commited on
Commit
baba802
·
verified ·
1 Parent(s): 4aaf190

Update card: RNC grader

Browse files
Files changed (1) hide show
  1. README.md +22 -7
README.md CHANGED
@@ -1,16 +1,31 @@
1
  ---
2
  license: mit
3
- tags: [robotics, surface-roughness, grinding, contrastive-learning]
4
  ---
5
 
6
  # grind — visual_grind_grading checkpoints
7
 
8
  Trained artifacts for the `visual_grind_grading` approach of the
9
- [grind](https://github.com/BabaYaga840/grind) repo. Gitignored there; hydrate
10
- a fresh clone with `./pull_checkpoints.sh`.
11
 
12
- Contents:
13
- - `outputs/roi_cnn/roi_cnn.pt` — TinyNet ROI CNN weights (state_dict).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  - `cache/*.npz` — p27–p38 embedding caches (multisession / SupCon / RNC
15
- experiments + sandpaper validation embeddings) for reproducing analyses
16
- without recompute.
 
1
  ---
2
  license: mit
3
+ tags: [robotics, surface-roughness, grinding, contrastive-learning, RNC]
4
  ---
5
 
6
  # grind — visual_grind_grading checkpoints
7
 
8
  Trained artifacts for the `visual_grind_grading` approach of the
9
+ [grind](https://github.com/BabaYaga840/grind) repo. Gitignored there; hydrate a
10
+ fresh clone with `./pull_checkpoints.sh`.
11
 
12
+ ## Grading model (RNC)
13
+ `outputs/rnc_grader/rnc_sandpaper_grader.pt` — the RNC sandpaper Ra grader.
14
+ `torch.load` gives a dict: `Enc` encoder `state_dict` (3-conv CNN, dim 32) +
15
+ per-grit `anchors` + `grit_classes` + `Ra_by_grit`. Inference:
16
+
17
+ ```python
18
+ import torch, torch.nn.functional as F, numpy as np
19
+ c = torch.load("rnc_sandpaper_grader.pt", weights_only=False)
20
+ # rebuild Enc (see scripts/shared_grading.py: class Enc), load c["state_dict"]
21
+ def illum_norm(x): m=x.mean((2,3),keepdim=True); s=x.std((2,3),keepdim=True)+1e-4; return (x-m)/s
22
+ z = F.normalize(net(illum_norm(x)), dim=1).cpu().numpy() # x: (N,3,64,64) [0,1]
23
+ w = np.exp(z @ c["anchors"].T / c["tau"]); w /= w.sum(1, keepdims=True)
24
+ grade = w @ c["grit_classes"].astype("float32") # soft ordinal, 0..6
25
+ ```
26
+ Validated leave-angle-out rho ~0.93 vs true grit (real, texture-grounded).
27
+
28
+ ## Other artifacts
29
+ - `outputs/roi_cnn/roi_cnn.pt` — TinyNet ROI CNN weights (grinding ROI, state_dict).
30
  - `cache/*.npz` — p27–p38 embedding caches (multisession / SupCon / RNC
31
+ experiments) for reproducing analyses without recompute.