Skip to content

TaarLab/SGG-Net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SGG-Net: Skeleton and Graph-Based Neural Network for Grasping Objects

Python PyTorch License DOI

An integrated framework combining geometric skeletonization with Graph Neural Networks for optimal 6-DoF grasp pose estimation

This repository contains the implementation of SGG-Net, an integrated framework that combines geometric skeletonization (3D-StSkel algorithm) with a Graph Neural Network (HGGQ-Net) to identify optimal grasp poses for robotic manipulation.


🎯 Key Features

  • Geometric Skeletonization: 3D-StSkel algorithm extracts geometrically salient regions for efficient grasp candidate generation
  • Graph Neural Network: HGGQ-Net evaluates and ranks grasp candidates based on quality
  • State-of-the-Art Performance: Achieves 90.74% on DexNet, 81.63% on EGAD, and 97.30% on YCB objects
  • Comprehensive Evaluation: Supports evaluation on GraspNet-1Billion, DexNet, EGAD, and YCB datasets
  • Modular Design: Clean, well-organized codebase ready for research and deployment

πŸ“‹ Overview

SGG-Net consists of two main components:

  1. 3D-StSkel Algorithm: Generates initial grasp pose candidates by extracting geometrically salient regions using straight skeleton computation
  2. Heatmap Graph Grasp Quality Network (HGGQ-Net): A graph neural network that evaluates and ranks these candidates based on their quality

Architecture

Point Cloud β†’ 3D-StSkel β†’ Grasp Candidates β†’ HGGQ-Net β†’ Ranked Grasps

The method significantly reduces the search space, enabling faster and more reliable 6-DoF grasp pose estimation.

πŸš€ Installation

Requirements

  • Python 3.8+
  • CUDA-capable GPU (recommended for training and inference)
  • PyTorch 2.0+
  • CUDA 11.4+ (for GPU support)

Quick Start

  1. Clone the repository:

    git clone https://github.com/TaarLab/SGG-Net.git
    cd SGG-Net
  2. Create a virtual environment (recommended):

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies:

    pip install -r requirements.txt
  4. Install PyTorch Geometric:

    pip install torch_geometric torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.5.1+cu124.html

    Note: Adjust the PyTorch version in the URL based on your installed PyTorch version.

πŸ’» Usage

Training

Train the HGGQ-Net model on GraspNet dataset:

python train.py \
    --dataset_root /path/to/graspnet \
    --camera realsense \
    --num_points 10000 \
    --batch_size 1 \
    --max_epoch 11 \
    --mode optimize_parameter

Key Arguments:

  • --dataset_root: Path to GraspNet dataset root directory
  • --camera: Camera type (realsense or kinect)
  • --num_points: Number of points to sample from point cloud
  • --batch_size: Batch size for training
  • --max_epoch: Maximum number of training epochs
  • --checkpoint_path: (Optional) Path to checkpoint for resuming training

Testing/Evaluation

Evaluate the model on GraspNet test set:

python test.py \
    --dataset_root /path/to/graspnet \
    --checkpoint_path /path/to/checkpoint.tar \
    --dump_dir /path/to/output \
    --camera realsense \
    --split seen \
    --num_point 4096 \
    --collision_thresh 0.01

Splits:

  • seen: Objects seen during training
  • similar: Similar objects to training set
  • novel: Novel objects not in training set

Demo

Run inference on a single point cloud:

python demo.py \
    --checkpoint_path /path/to/checkpoint.tar \
    --point_cloud /path/to/pointcloud.ply \
    --topk 50 \
    --collision_thresh 0.01

Supported Point Cloud Formats:

  • .ply (PLY format)
  • .pcd (PCD format)
  • .npy (NumPy array format)

πŸ“Š Dataset

This codebase is designed to work with the GraspNet-1Billion dataset. Please refer to the GraspNet repository for dataset download and setup instructions.

Dataset Structure

graspnet/
β”œβ”€β”€ scenes/
β”‚   β”œβ”€β”€ scene_0000/
β”‚   β”‚   β”œβ”€β”€ realsense/
β”‚   β”‚   └── kinect/
β”‚   └── ...
β”œβ”€β”€ models/
└── ...

Supported Datasets

  • GraspNet-1Billion: Large-scale dataset with 190 scenes and over 1 billion grasp poses
  • DexNet: 54 objects for evaluation
  • EGAD: 49 objects categorized by complexity
  • YCB: 37 household objects

πŸ“ Project Structure

SGG-NET/
β”œβ”€β”€ sggnet/                          # Main package
β”‚   β”œβ”€β”€ skeleton/                     # Skeleton generation module
β”‚   β”‚   β”œβ”€β”€ keypoint_generation.py   # 3D-StSkel algorithm
β”‚   β”‚   └── skeleton_grasp.py        # Main skeleton grasp interface
β”‚   β”œβ”€β”€ models/                      # Neural network models
β”‚   β”‚   β”œβ”€β”€ hggqnet.py              # HGGQ-Net architecture
β”‚   β”‚   └── loss.py                 # Loss functions
β”‚   β”œβ”€β”€ dataset/                     # Dataset handling
β”‚   β”‚   β”œβ”€β”€ graspnet_dataset.py     # GraspNet dataset loader
β”‚   β”‚   └── data_utils.py           # Data utilities
β”‚   β”œβ”€β”€ evaluation/                  # Evaluation modules
β”‚   β”‚   β”œβ”€β”€ graspnet_evaluator.py   # GraspNet evaluation
β”‚   β”‚   β”œβ”€β”€ collision_detector.py   # Collision detection
β”‚   β”‚   └── average_precision.py    # AP calculation
β”‚   β”œβ”€β”€ dexnet_evaluation/            # DexNet evaluation
β”‚   β”œβ”€β”€ preprocessing/spnet/          # SPNet depth completion
β”‚   β”œβ”€β”€ utils/                       # Utility functions
β”‚   β”œβ”€β”€ visualization/               # Visualization tools
β”‚   └── graspnetAPI/                 # GraspNet API
β”œβ”€β”€ train.py                         # Training script
β”œβ”€β”€ test.py                          # Testing/evaluation script
β”œβ”€β”€ demo.py                          # Demo script
β”œβ”€β”€ requirements.txt                 # Dependencies
β”œβ”€β”€ setup.py                        # Package setup
└── README.md                        # This file

πŸ“ˆ Results

Performance Metrics

Dataset Success Rate Description
YCB 97.30% 36/37 objects successfully grasped
DexNet 90.74% 49/54 objects successfully grasped
EGAD 81.63% 40/49 objects successfully grasped

GraspNet-1Billion Evaluation

Split AP (%) APβ‚€.β‚ˆ (%) APβ‚€.β‚„ (%)
Seen 46.99 58.55 32.22
Unseen 42.27 52.21 30.39
Novel 21.14 25.55 11.92

Note: Results are based on Kinect camera evaluation. See the paper for detailed comparisons with other methods.


πŸ“š Citation

If you use this code in your research, please cite:

@article{sggnet2025,
  title={SGG-Net: Skeleton and Graph-Based Neural Network Approaches for Grasping Objects},
  author={Beigy, AliReza and Azimmohseni, Farbod and Sabzejou, Ali and Tale Masouleh, Mehdi and Kalhor, Ahmad},
  journal={2025 33rd International Conference on Electrical Engineering (ICEE)},
  year={2025},
  doi={10.1109/ICEE67339.2025.11213553}
}

DOI: 10.1109/ICEE67339.2025.11213553

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“„ License

This project is licensed under the MIT License. See the LICENSE file for details.

πŸ™ Acknowledgments

  • GraspNet dataset and API for providing comprehensive evaluation framework
  • PyTorch Geometric for efficient graph neural network operations
  • Open3D for 3D point cloud processing and visualization
  • SPNet authors for depth completion preprocessing

πŸ‘₯ Authors

Human and Robot Interaction Lab, University of Tehran

πŸ“§ Contact

For questions or issues, please:

  • Open an issue on GitHub
  • Contact the authors via email

Made with ❀️ by the TaarLab Team

GitHub β€’ Paper

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages