MCPcopy Index your code
hub / github.com/THU-DA-6D-Pose-Group/GDR-Net

github.com/THU-DA-6D-Pose-Group/GDR-Net @v1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.1 ↗ · + Follow
1,283 symbols 4,145 edges 206 files 484 documented · 38%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

GDR-Net

This repo provides the PyTorch implementation of the work:

Gu Wang, Fabian Manhardt, Federico Tombari, Xiangyang Ji. GDR-Net: Geometry-Guided Direct Regression Network for Monocular 6D Object Pose Estimation. In CVPR 2021. [Paper][ArXiv][Video][bibtex]

News

Overview

Requirements

  • Ubuntu 16.04/18.04, CUDA 10.1/10.2, python >= 3.6, PyTorch >= 1.6, torchvision
  • Install detectron2 from source
  • sh scripts/install_deps.sh
  • Compile the cpp extension for farthest points sampling (fps): sh core/csrc/compile.sh

Datasets

Download the 6D pose datasets (LM, LM-O, YCB-V) from the BOP website and VOC 2012 for background images. Please also download the image_sets and test_bboxes from here (BaiduNetDisk, OneDrive, password: qjfk).

The structure of datasets folder should look like below:

# recommend using soft links (ln -sf)
datasets/
├── BOP_DATASETS
    ├──lm
    ├──lmo
    ├──ycbv
├── lm_imgn  # the OpenGL rendered images for LM, 1k/obj
├── lm_renders_blender  # the Blender rendered images for LM, 10k/obj (pvnet-rendering)
├── VOCdevkit

Training GDR-Net

./core/gdrn_modeling/train_gdrn.sh <config_path> <gpu_ids> (other args)

Example:

./core/gdrn_modeling/train_gdrn.sh configs/gdrn/lm/a6_cPnP_lm13.py 0  # multiple gpus: 0,1,2,3
# add --resume if you want to resume from an interrupted experiment.

Our trained GDR-Net models can be found here (BaiduNetDisk, OneDrive, password: kedv).

(Note that the models for BOP setup in the supplement were trained using a refactored version of this repo (not compatible), they are slightly better than the models provided here.)

Evaluation

./core/gdrn_modeling/test_gdrn.sh <config_path> <gpu_ids> <ckpt_path> (other args)

Example:

./core/gdrn_modeling/test_gdrn.sh configs/gdrn/lmo/a6_cPnP_AugAAETrunc_BG0.5_lmo_real_pbr0.1_40e.py 0 output/gdrn/lmo/a6_cPnP_AugAAETrunc_BG0.5_lmo_real_pbr0.1_40e/gdrn_lmo_real_pbr.pth

Citation

If you find this useful in your research, please consider citing:

@InProceedings{Wang_2021_GDRN,
    title     = {{GDR-Net}: Geometry-Guided Direct Regression Network for Monocular 6D Object Pose Estimation},
    author    = {Wang, Gu and Manhardt, Fabian and Tombari, Federico and Ji, Xiangyang},
    booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    month     = {June},
    year      = {2021},
    pages     = {16611-16621}
}

Core symbols most depended-on inside this repo

format
called by 595
lib/utils/logger.py
print
called by 232
core/utils/my_setup.py
write
called by 56
lib/utils/setup_logger.py
bind
called by 31
lib/meshrenderer/gl_utils/vao.py
get_fps_and_center
called by 27
core/utils/data_utils.py
render
called by 24
lib/meshrenderer/meshrenderer.py
update
called by 23
lib/meshrenderer/gl_utils/window.py
add
called by 18
lib/utils/time_utils.py

Shape

Function 666
Method 496
Class 121

Languages

Python96%
C3%
C++2%

Modules by API surface

lib/pysixd/misc.py58 symbols
lib/pysixd/transform.py55 symbols
lib/meshrenderer/gl_utils/texture.py43 symbols
core/utils/pose_utils.py40 symbols
core/utils/rot_reps.py34 symbols
core/csrc/fps/_ext.c33 symbols
lib/pysixd/inout.py29 symbols
lib/utils/utils.py25 symbols
lib/pysixd/pose_error.py24 symbols
lib/meshrenderer/gl_utils/camera.py24 symbols
lib/pysixd/RT_transform.py23 symbols
core/csrc/fps/src/farthest_point_sampling.cpp23 symbols

For agents

$ claude mcp add GDR-Net \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page