-
Notifications
You must be signed in to change notification settings - Fork 193
Add openvino_hggd module: HGGD OpenVINO iGPU enablement #1069
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
ba37374
50d3278
727b3ef
8f24be7
b616135
8b00fba
667902c
389568e
c46855f
a739643
bb5ddcd
68750d8
fa257ee
f15e408
05c7ff4
d22a75d
2614ebe
50b82e1
9b29951
7cff039
f996307
8c38ccb
ea3e99f
6a7a619
6bff275
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # Copyright (C) 2018-2026 Intel Corporation | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # OpenVINO exported models | ||
| openvino_models/ | ||
|
|
||
| # Inference outputs | ||
| output/ | ||
| *.npy | ||
|
|
||
| # Logs | ||
| *.log | ||
|
|
||
| # Compiled extensions | ||
| *.so | ||
|
|
||
| # Generated visualizations | ||
| viz_*.png | ||
|
|
||
| # Python | ||
| __pycache__/ | ||
| *.pyc | ||
| *.pyo | ||
| *.pyd | ||
|
|
||
| # Virtual environments | ||
| .venv/ | ||
| venv/ | ||
| env/ | ||
|
|
||
| # Build artifacts | ||
| build/ | ||
| dist/ | ||
| *.egg-info/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| <!-- | ||
| Copyright (C) 2018-2026 Intel Corporation | ||
| SPDX-License-Identifier: Apache-2.0 | ||
| --> | ||
|
|
||
| # HGGD — OpenVINO iGPU Enablement | ||
|
|
||
| OpenVINO inference enablement for [HGGD](https://github.com/THU-VCLab/HGGD) (Hybrid Grasp Detection and Generation) on Intel integrated GPU. | ||
|
|
||
| ## Prerequisites: Fetch Upstream HGGD Files | ||
|
|
||
| The `customgraspnetAPI`, `dataset`, and `models` directories are not included in this module — they are identical to the upstream repository and should be copied directly from there: | ||
|
|
||
| ```bash | ||
| git clone https://github.com/THU-VCLab/HGGD /tmp/HGGD_upstream | ||
| cp -r /tmp/HGGD_upstream/customgraspnetAPI path_to_openvino_hggd/ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This copies the complete |
||
| cp -r /tmp/HGGD_upstream/dataset path_to_openvino_hggd/ | ||
| cp -r /tmp/HGGD_upstream/models path_to_openvino_hggd/ | ||
| ``` | ||
|
|
||
| ## Setup | ||
|
|
||
| ```bash | ||
| cd path_to_openvino_hggd | ||
| bash setup.sh | ||
| conda activate hggd_intel | ||
| ``` | ||
|
|
||
| ## Export Models | ||
|
|
||
| ```bash | ||
| cd path_to_openvino_hggd | ||
| conda activate hggd_intel | ||
|
|
||
| python export_models.py \ | ||
| --checkpoint-path /path/to/HGGD_realsense_checkpoint \ | ||
| --output-dir openvino_models \ | ||
| --ov-device GPU | ||
| ``` | ||
|
|
||
| ## Run | ||
|
|
||
| ```bash | ||
| cd path_to_openvino_hggd | ||
| conda activate hggd_intel | ||
|
|
||
| bash run.sh \ | ||
| /path/to/HGGD_realsense_checkpoint \ | ||
| /path/to/dataset/6dto2drefine_realsense \ | ||
| /path/to/graspnet \ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The documented workflow requires GraspNet data and an HGGD checkpoint, but does not state their terms. GraspNet's official site restricts its data, labels, code, and models to non-commercial use under CC BY-NC-SA, while no explicit license was found for the referenced HGGD checkpoint. Document exact artifact URLs and terms and obtain legal approval before treating this as a generally usable Apache-2.0 module. |
||
| 100 GPU | ||
| ``` | ||
|
|
||
| ## Evaluation | ||
|
|
||
| Inference dumps per-frame grasp predictions under | ||
| `output/scene_<scene_id>/pred/`. To compute **Collision-Free AP** and | ||
| the collision rate, run the standalone evaluator: | ||
|
|
||
| ```bash | ||
| cd path_to_openvino_hggd | ||
| conda activate hggd_intel | ||
|
|
||
| python evaluate.py \ | ||
| --scene-path /path/to/graspnet \ | ||
| --pred-dir output/scene_100/pred \ | ||
| --scene-l 100 --scene-r 101 | ||
| ``` | ||
|
|
||
| The evaluator runs the standard GraspNet grasp pipeline (NMS, object | ||
| assignment, gripper-box collision and empty-grasp test, AP aggregation) | ||
| and counts a grasp as a success when it does not collide with any scene | ||
| point and is not "empty" (at least 10 object points held between the | ||
| fingers). It is fully standalone (numpy + open3d + transforms3d + | ||
| grasp-nms) and only needs `--scene-path` to contain `scenes/` and | ||
| `models/%03d/nontextured.ply` (no textured models required); | ||
| `--scene-path` is the same `/path/to/graspnet` passed to `run.sh`. | ||
| Results are printed to the console and saved to `eval_result_cf.npy` | ||
| next to the prediction directory. | ||
|
|
||
| Useful options: `--camera realsense` (default), `--top-k 50`, | ||
| `--proc N` (worker processes), `--result-path /custom/location.npy`. | ||
|
|
||
| Note: CF-AP is **not comparable** to the AP / AP@0.8 / AP@0.4 reported | ||
| in the HGGD paper (it has no friction-coefficient semantics) — treat it | ||
| as a separate metric. | ||
|
|
||
| To reproduce the AP / AP@0.8 / AP@0.4 as reported in the HGGD paper, | ||
| use the official evaluation toolkit from `graspnetAPI==1.2.11` | ||
| (`pip install --no-deps graspnetAPI==1.2.11`), which evaluates the | ||
| same prediction dumps from this module. | ||
|
|
||
| ## Output | ||
|
|
||
| Results are written under `output/scene_<scene_id>/`. | ||
|
|
||
| ``` | ||
| output/scene_100/ | ||
| ├── inference.log | ||
| ├── eval_result_cf.npy # written by evaluate.py | ||
| ├── logs/ | ||
| └── pred/ | ||
| ``` | ||
Uh oh!
There was an error while loading. Please reload this page.