GithubHelp home page GithubHelp logo

qq456cvb / ukpgan Goto Github PK

View Code? Open in Web Editor NEW
62.0 7.0 3.0 1.57 MB

UKPGAN: A General Self-Supervised Keypoint Detector (CVPR2022)

Python 65.59% CMake 0.61% C++ 33.80%
tensorflow unsupervised-learning local-features rotation-invariant-features keypoint-detection cvpr2022 computer-vision pytorch

ukpgan's Introduction

UKPGAN: A General Self-Supervised Keypoint Detector

Yang You, Wenhai Liu, Yanjie Ze, Yong-Lu Li, Weiming Wang, Cewu Lu

CVPR 2022

Paper PDF Project Page Video

UKPGAN is a self-supervised 3D keypoint detector on both rigid/non-rigid objects and real scenes. Note that our keypoint detector solely depends on local features and is both translational and rotational invariant.

News

  • [2022.05] Pytorch version is now supported! Try it in the branch pytorch!
  • [2022.05] SHOT descriptor is now supported with Pytorch, and it is much faster than the original PerfectMatch desciptor!

Change Logs

  • [2022.05.24] Upload Pytorch version of code and SHOT descriptors.

Contents

Overview

This repo is a TensorFlow implementation of our work UKPGAN.

Installation

Create Conda Environments
conda env create -f environment.yml
Compile smoothed density value (SDV) source files

First install Pybind11 and PCL C++ dependencies. Then run the following command to build the SDV feature extractor:

cd sdv_src
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
cd ../..

If you want to visualize keypoint results, you will need to install open3d.

Train on ShapeNet Models

Prepare Data

Download ShapeNet point clouds from KeypointNet and unzip pcds folder to the root.

Category Configuration

Change the category name cat_name to what you want in config/config.yaml.

Start Training

Open a separate terminal to monitor training process:

visdom -port 1080

Then run (e.g., chair):

python train.py cat_name=chair

Test on ShapeNet Models

Evaluate IoU

Once trained, to evaluate the IoU with human annotations, first download KeypointNet data (you may only download the category that you wish to evaluate), then run

python eval_iou.py --kpnet_root /your/kpnet/root
Visualization

To test and visualize on ShapeNet models, run:

python visualize.py --type shapenet --nms --nms_radius 0.1

Train on SMPL Models

Prepare Data

You should register on SMPL website and download the model. We follow this repo to pre-process the model to generate model.pkl. Place model.pkl into data/model.pkl.

Start Training

The following command start training on SMPL models on the fly:

python train.py cat_name=smpl symmetry_factor=0

Test on SMPL Models

Visualization

To test and visualize on SMPL models, run:

python visualize.py --type smpl --nms --nms_radius 0.2 --kp_num 10

Test on Real-world Scenes

For this task, we use the model that is trained on a large collection of ShapeNet models (across 10+ categories), called universal.

Prepare Data

You will need to download data from 3DMatch. We also provide a demo scene for visualization.

Visualization

To test and visualize on 3DMatch, run:

python visualize.py --type 3dmatch --nms --nms_radius 0.05

Pretrained Models

We provide pretrained models on Google Drive.

Pytorch Version

We have now implemented the Pytorch version of UKPGAN, and can be trained with SHOT descriptors, which are much faster than the PerfectMatch descriptors!

Training on ShapeNet Directly clone the repo and run `git checkout pytorch` to switch to the pytorch version. Then run `python train.py`. You would get the following results when trained on ShapeNet chairs:

Related Projects

Citation

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

@inproceedings{you2022ukpgan,
  title={UKPGAN: A General Self-Supervised Keypoint Detector},
  author={You, Yang and Liu, Wenhai and Ze, Yanjie and Li, Yong-Lu and Wang, Weiming and Lu, Cewu},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year={2022}
}

ukpgan's People

Contributors

qq456cvb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ukpgan's Issues

Inference is time-consuming

Though the sdv_cache is cached, the inference of the pre-trained model is very slow. Does the model run on CPU? I test it on a 3090/2080Ti GPU.

Dataset Split

Hello, thanks for your sharing. It's a nice job.
Can you share the dataset split file? I can not find the 'train/val/test.txt'.

SMPL model

What is the version of SMPL in your paper? 'version 1.0.0 for Python 2.7 (10 shape PCs)' or 'version 1.1.0 for Python 2.7 (male, female, neutral all with 300 shape PCs)'. Thanks.

How to train the 'universal' model on ShapeNet?

'The 'universal' model is trained on a large collection of ShapeNet models (across 10+ categories).' Does that mean the universal model is trained on the KeypointNet dataset (16 categories)? I cannot find the implementation of that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.