Home

Awesome

GraspNet graspness

Fork of implementation of paper "Graspness Discovery in Clutters for Fast and Accurate Grasp Detection" (ICCV 2021) by Zibo Chen.

[paper] [dataset] [API]

Requirements

Installation

Get the code.

git clone https://github.com/graspnet/graspness_unofficial.git
cd graspness_unofficial

Install packages via Pip.

pip install -r requirements.txt

Compile and install pointnet2 operators (code adapted from votenet).

cd pointnet2
python setup.py install

Compile and install knn operator (code adapted from pytorch_knn_cuda).

cd knn
python setup.py install

Install graspnetAPI for evaluation.

git clone https://github.com/graspnet/graspnetAPI.git
cd graspnetAPI
pip install .

For MinkowskiEngine, please refer https://github.com/NVIDIA/MinkowskiEngine

Point level Graspness Generation

Point level graspness label are not included in the original dataset, and need additional generation. Make sure you have downloaded the orginal dataset from GraspNet. The generation code is in dataset/generate_graspness.py.

cd dataset
python generate_graspness.py --dataset_root /data3/graspnet --camera_type kinect

Simplify dataset

original dataset grasp_label files have redundant data, We can significantly save the memory cost. The code is in dataset/simplify_dataset.py

cd dataset
python simplify_dataset.py --dataset_root /data3/graspnet

Training and Testing

Training examples are shown in command_train.sh. --dataset_root, --camera and --log_dir should be specified according to your settings. You can use TensorBoard to visualize training process.

Testing examples are shown in command_test.sh, which contains inference and result evaluation. --dataset_root, --camera, --checkpoint_path and --dump_dir should be specified according to your settings. Set --collision_thresh to -1 for fast inference.

Model Weights

We provide trained model weights. The model trained with RealSense data is available at Google drive (this model is recommended for real-world application). The model trained with Kinect data is available at Google drive.

Results

Results "In repo" report the model performance of my results without collision detection.

Evaluation results on Kinect camera:

SeenSimilarNovel
APAP<sub>0.8</sub>AP<sub>0.4</sub>APAP<sub>0.8</sub>AP<sub>0.4</sub>APAP<sub>0.8</sub>AP<sub>0.4</sub>
In paper61.1971.4656.0447.3956.7840.4319.0123.7310.60
In repo61.8373.2854.1451.1362.5341.5719.9424.9011.02

Troubleshooting

If you meet the torch.floor error in MinkowskiEngine, you can simply solve it by changing the source code of MinkowskiEngine: MinkowskiEngine/utils/quantization.py 262,from discrete_coordinates =_auto_floor(coordinates) to discrete_coordinates = coordinates

Acknowledgement

My code is mainly based on Graspnet-baseline https://github.com/graspnet/graspnet-baseline.