grind โ visual_grind_grading checkpoints
Trained artifacts for the visual_grind_grading approach of the
grind repo. Gitignored there; hydrate a
fresh clone with ./pull_checkpoints.sh.
Grading model (RNC)
outputs/rnc_grader/rnc_sandpaper_grader.pt โ the RNC sandpaper Ra grader.
torch.load gives a dict: Enc encoder state_dict (3-conv CNN, dim 32) +
per-grit anchors + grit_classes + Ra_by_grit. Inference:
import torch, torch.nn.functional as F, numpy as np
c = torch.load("rnc_sandpaper_grader.pt", weights_only=False)
# rebuild Enc (see scripts/shared_grading.py: class Enc), load c["state_dict"]
def illum_norm(x): m=x.mean((2,3),keepdim=True); s=x.std((2,3),keepdim=True)+1e-4; return (x-m)/s
z = F.normalize(net(illum_norm(x)), dim=1).cpu().numpy() # x: (N,3,64,64) [0,1]
w = np.exp(z @ c["anchors"].T / c["tau"]); w /= w.sum(1, keepdims=True)
grade = w @ c["grit_classes"].astype("float32") # soft ordinal, 0..6
Validated leave-angle-out rho ~0.93 vs true grit (real, texture-grounded).
Other artifacts
outputs/roi_cnn/roi_cnn.ptโ TinyNet ROI CNN weights (grinding ROI, state_dict).cache/*.npzโ p27โp38 embedding caches (multisession / SupCon / RNC experiments) for reproducing analyses without recompute.