MCPcopy Index your code
hub / github.com/Gorilla-Lab-SCUT/AffordanceNet

github.com/Gorilla-Lab-SCUT/AffordanceNet @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
132 symbols 346 edges 37 files 36 documented · 27%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

3D AffordanceNet

This repository is the official experiment implementation of 3D AffordanceNet benchmark.

3D AffordanceNet is a 3D point cloud benchmark consisting of 23k shapes from 23 semantic object categories, annotated with 56k affordance annotations and covering 18 visual affordance categories.

This repository implements two baseline methods: PointNet++ and DGCNN on four proposed affordance understanding tasks: Full-Shape, Partial-View, Rotation-Invariant, Semi-Supervised Affordance Estimation.

You can reproduce the performances described in the origin paper by simply running a command down below.

[CVPR 2021 Paper] [Dataset Download Link] [Project Page]

GroundTruth

Requirements

All the codes are tested in the following environment:

  • Linux (tested on Ubuntu 16.04)
  • Python 3.7+
  • PyTorch 1.0.1
  • Gorilla-Core
  • CUDA 10.0 or higher

You can install the required packages by running the following command:

pip install -r requirements.txt

To install the cuda kernel, go to models/pointnet2_ops and run the following command:

python setup.py build_ext --inplace

Quick Start

The following set up is for DGCNN, you can change to PointNet++ accordingly.

First download the whole dataset from here and extract the files to the data_root, then modify the dataset data_root in configuration(full-shape for example), the dataset data_root should obey the data structure below:

data_root
    ├── task_train_data.pkl
    ├── task_val_data.pkl
    └── task_test_data.pkl

Then to train a model from scratch:

python train.py config/dgcnn/estimation_cfg.py --work_dir TPATH_TO_LOG_DIR --gpu 0,1

After training, to test a model:

python test.py config/dgcnn/estimation_cfg.py --work_dir PATH_TO_LOG_DIR --gpu 0,1 --checkpoint PATH_TO_CHECKPOINT

Currently Support

  • Models
    • [x] DGCNN
    • [x] PointNet++
  • Tasks
    • [x] Full-Shape Affordance Estimation
    • [x] Partial-View Affordance Estimation
    • [x] Rotation-Invariant Affordance Estimation
    • [x] Semi-Supervised Affordance Estimation

Cite Us

@inproceedings{deng20213d,
  title={3D AffordanceNet: A Benchmark for Visual Object Affordance Understanding},
  author={Deng, Shengheng and Xu, Xun and Wu, Chaozheng and Chen, Ke and Jia, Kui},
  booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
  year={2021}
}

Core symbols most depended-on inside this repo

cprint
called by 17
utils/utils.py
index_points
called by 7
models/pointnet_util.py
_l2_normalize
called by 4
loss.py
get_graph_feature
called by 4
models/dgcnn.py
ball_query
called by 3
models/pointnet2_ops/pointnet2/_ext-src/src/ball_query.cpp
MSELoss
called by 2
loss.py
evaluation
called by 2
utils/eval.py
set_random_seed
called by 2
utils/utils.py

Shape

Method 56
Function 53
Class 23

Languages

Python91%
C++9%

Modules by API surface

models/pointnet2_ops/pointnet2/pointnet2_utils.py24 symbols
models/pointnet_util.py17 symbols
utils/provider.py16 symbols
loss.py14 symbols
dataset/AffordanceNet.py12 symbols
utils/utils.py11 symbols
models/dgcnn.py8 symbols
utils/trainer.py6 symbols
utils/builder.py5 symbols
models/pointnet2_ops/pointnet2/_ext-src/src/sampling.cpp3 symbols
models/pointnet2_ops/pointnet2/_ext-src/src/interpolate.cpp3 symbols
models/pn2.py3 symbols

For agents

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

⬇ download graph artifact