Skip to content

Ali-Rashidi/GtG2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grasp the Graph 2.0

License: MIT arXiv

Overview

Table of Contents

Introduction

Grasp the Graph 2.0 (GtG2) is a pipeline for learning grasp quality from point clouds by turning local gripper-region points into graphs and training a graph neural network regressor. Preprint: arXiv:2505.02664

Method Overview

  • Generate grasp candidates from GraspNet scenes using GPG and GraspNet evaluation.
  • Convert each grasp to local gripper-frame point sets (inside and boundary points).
  • Build k-NN graphs from inside points and use them as model inputs.
  • Train a GNN regressor to predict grasp quality scores.

Important Files

  • Data_Gathering/main.py: Parallel data generation entry point (config is inside the script).
  • Data_Gathering/generate_data.py: Core pipeline for grasp sampling, evaluation, and dataset creation.
  • Data_Gathering/create_graph.py: Graph construction utilities (k-NN, labels).
  • Data_Gathering/graphize.py: Optional batch conversion of raw .npy to .pth graphs.
  • Data_Gathering/train_val_splti.py: K-fold scene splits and train/test export.
  • Training/train.py: Model training loop and checkpoints.
  • Training/models.py: GNN model definition.
  • Training/data_utils.py: Dataset loading and PyG DataLoader helpers.
  • Testing/gripper_params.cfg: Gripper geometry parameters (INI format).
  • Testing/gripper_params_gpg.cfg: GPG gripper parameters.

Requirements

  • Python 3.8+
  • PyTorch + PyTorch Geometric
  • numpy, scipy, tqdm
  • open3d
  • graspnetAPI
  • pygpg
  • fpsample

Usage

  1. Generate data (edit the config block in Data_Gathering/main.py for paths and scene ranges):
python Data_Gathering/main.py
  1. Create train/test folds:
python Data_Gathering/train_val_splti.py \
  --data-dir path/to/scene_npy_dir \
  --output-dir path/to/folds \
  --camera kinect \
  --k 10 \
  --num-scenes 100
  1. Train the GNN regressor:
python Training/train.py --fold-dir path/to/folds/fold0_kinect --output-dir runs/fold0

Optional: convert raw .npy to merged .pth graphs for inspection:

python Data_Gathering/graphize.py path/to/scene.npy path/to/output/graphs --proc 4

Dataset

This project builds on the GraspNet dataset. The data generation step saves per-scene .npy files containing entries of the form [inside_pts, outside_pts, score, width]. Training expects fold directories containing train.npy and test.npy produced by train_val_splti.py. Update paths and filenames in the scripts as needed for your dataset layout.

How to Cite

If you use this code or data, please cite the preprint:

@misc{moghadam2025gtg2,
  title={Grasp the Graph (GtG) 2.0: Ensemble of Graph Neural Networks for High-Precision Grasp Pose Detection in Clutter},
  author={Ali Rashidi Moghadam and Sayedmohammadreza Rastegari and Mehdi Tale Masouleh and Ahmad Kalhor},
  year={2025},
  eprint={2505.02664},
  archivePrefix={arXiv}
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published