detect_object · Grounded-SAM
This skill IS the perception core — the real Grounding-DINO + SAM
implementation lives here in policy.py (module-level detect() pure
function, Detection dataclass, model singleton + per-frame cache). It is
NOT a thin wrapper over another module. Other consumers (find_pixel,
get_object_bbox, segment_object_pointcloud, multi_view_fusion,
propose_keypoints, localize_object_top_center, grasp_object) import
detect from detect_object.policy.
Models are lazy-loaded once per process (Grounding-DINO ~172M, SAM-base
~94M, both on CUDA). detect() is pure (numpy in → list[Detection] out)
and imports no sim/rollout code, so it stays free of circular imports.