### GraspMolmo Inference Example Source: https://github.com/abhaybd/graspmolmo/blob/main/README.md Shows how to use GraspMolmo to predict a grasp from an RGB image, point cloud, task description, and candidate grasps. The predicted grasp index is returned and the grasp is in the camera reference frame. ```python from graspmolmo.inference.grasp_predictor import GraspMolmo task = "..." rgb, depth = get_image() camera_intrinsics = np.array(...) point_cloud = backproject(rgb, depth, camera_intrinsics) # grasps are in the camera reference frame grasps = predict_grasps(point_cloud) # Using your favorite grasp predictor (e.g. M2T2) gm = GraspMolmo() idx = gm.pred_grasp(rgb, point_cloud, task, grasps) print(f"Predicted grasp: {grasps[idx]}") ``` -------------------------------- ### Preprocess ShapeNetSem meshes with graspmolmo/preprocess_shapenet.py Source: https://github.com/abhaybd/graspmolmo/blob/main/DATA.md Run this command to preprocess ShapeNetSem meshes and ACRONYM grasps, producing processed assets in . Requires downloaded ACRONYM grasps and ShapeNetSem meshes. ```bash python graspmolmo/preprocess_shapenet.py /grasps --blacklist asset_blacklist.txt --sampling-categories-file all_categories.txt ``` -------------------------------- ### CSV Columns for Task-Grasps Source: https://github.com/abhaybd/graspmolmo/blob/main/DATA.md Lists the columns of the pregenerated task-grasp CSV file, which serves as the dataset samples. ```text scene_path: The file name of the scene .hdf5 file generated by generate_obs.py scene_id: The scene ID view_id: The view ID, i.e. the key in the scene HDF5 obs_id: The observation ID, i.e. the key in the view group in the scene HDF5 task: The natural language task description original_grasp_desc: The original generated matching grasp description, included for posterity matching_grasp_desc: The matched grasp description, which is the same as //annot["grasp_description"] in the scene HDF5. ``` -------------------------------- ### scene.pkl Dictionary Structure Source: https://github.com/abhaybd/graspmolmo/blob/main/DATA.md Describes the dictionary structure inside each scene.pkl file, including annotations, lighting, views, glb, and img_size. ```python { "annotations": { : [Annotation object, 4x4 grasp pose in world frame, 3D point in world frame being grasped] }, "lighting": { [ { "type": "DirectionalLight", "args": { "name": "light", "color": [r, g, b] # 0-255 "intensity": float }, "transform": 4x4 pose matrix of light }, ... ] }, "views": [ { "cam_K": 3x3 camera intrinsics matrix, "cam_pose": 4x4 camera pose matrix (note that the camera z-axis points backwards), "annotations_in_view": list[str] of in annotations dict which are visible from this view }, ... ] "glb": base64-encoded GLB string of 3D scene, "img_size": (height, width) } ``` -------------------------------- ### Run datagen pipeline script Source: https://github.com/abhaybd/graspmolmo/blob/main/DATA.md Execute the full data generation pipeline after configuring variables in scripts/datagen_pipeline.sh. Generates new train and test data. ```bash ./scripts/datagen_pipeline.sh ``` -------------------------------- ### Scene Directory Structure Source: https://github.com/abhaybd/graspmolmo/blob/main/DATA.md Shows the directory layout of a pregenerated scene, containing scene.pkl and metadata.yaml. ```text scene.pkl (contains all scene information) metadata.yaml (contains list of graspable objects in scene) ``` -------------------------------- ### Render Observations Command Source: https://github.com/abhaybd/graspmolmo/blob/main/DATA.md Command to generate rendered observations from scene data using generate_obs.py. Requires scene_dir and out_dir arguments. ```bash python graspmolmo/datagen/generate_obs.py scene_dir= out_dir= ``` -------------------------------- ### GraspMolmo Citation (BibTeX) Source: https://github.com/abhaybd/graspmolmo/blob/main/README.md BibTeX entry for citing the GraspMolmo paper in academic work. ```bibtex @misc{deshpande2025graspmolmo, title={GraspMolmo: Generalizable Task-Oriented Grasping via Large-Scale Synthetic Data Generation}, author={Abhay Deshpande and Yuquan Deng and Arijit Ray and Jordi Salvador and Winson Han and Jiafei Duan and Kuo-Hao Zeng and Yuke Zhu and Ranjay Krishna and Rose Hendrix}, year={2025}, eprint={2505.13441}, archivePrefix={arXiv}, primaryClass={cs.RO}, url={https://arxiv.org/abs/2505.13441}, } ``` -------------------------------- ### HDF5 Output Structure Source: https://github.com/abhaybd/graspmolmo/blob/main/DATA.md Structure of the generated .hdf5 file per scene, containing views with RGB, XYZ, segmentation, and optional normals, plus observation data. ```text view_/ rgb: RGB image as (H,W,3) array xyz: Back-projected point-cloud (from RGB-D view) as (H,W,3) array of XYZ points seg: Segmentation map as (H,W) array where each pixel is index of object name in object_names object_names: List of object names visible in view normals (optional): Point-cloud normals as (H,W,3) array view_pose: Camera pose in world frame as (4,4) array cam_params: Camera intrinsics matrix as (3,3) array obs_/ grasp_pose: Grasp pose in camera frame as (4,4) array grasp_point: Point being grasped in camera frame as (3,) array grasp_point_px: Point being grasped projected onto image plane as (2,) array annot: YAML-formatted object with the following keys: ["annotation_id", "grasp_description", "object_description", "object_category", "object_id", "grasp_id"] ```