All Projects β†’ xingyizhou β†’ StarMap

xingyizhou / StarMap

Licence: GPL-3.0 License
StarMap for Category-Agnostic Keypoint and Viewpoint Estimation

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to StarMap

openpifpaf
Official implementation of "OpenPifPaf: Composite Fields for Semantic Keypoint Detection and Spatio-Temporal Association" in PyTorch.
Stars: ✭ 900 (+827.84%)
Mutual labels:  pose-estimation, keypoint-estimation
openpose-pytorch
πŸ”₯ OpenPose api wrapper in PyTorch.
Stars: ✭ 52 (-46.39%)
Mutual labels:  pose-estimation, keypoint-estimation
MSPN
Multi-Stage Pose Network
Stars: ✭ 321 (+230.93%)
Mutual labels:  pose-estimation
Indoor-SfMLearner
[ECCV'20] Patch-match and Plane-regularization for Unsupervised Indoor Depth Estimation
Stars: ✭ 115 (+18.56%)
Mutual labels:  pose-estimation
FashionAI-Keypoint
fashionAI clothes keypoint detection
Stars: ✭ 19 (-80.41%)
Mutual labels:  pose-estimation
awesome-6d-object
Awesome work on object 6 DoF pose estimation
Stars: ✭ 252 (+159.79%)
Mutual labels:  pose-estimation
OPVO
Sample code of BMVC 2017 paper: "Visual Odometry with Drift-Free Rotation Estimation Using Indoor Scene Regularities"
Stars: ✭ 40 (-58.76%)
Mutual labels:  pose-estimation
articulated-pose
[CVPR 2020, Oral] Category-Level Articulated Object Pose Estimation
Stars: ✭ 85 (-12.37%)
Mutual labels:  pose-estimation
ViPNAS
The official repo for CVPR2021β€”β€”ViPNAS: Efficient Video Pose Estimation via Neural Architecture Search.
Stars: ✭ 32 (-67.01%)
Mutual labels:  pose-estimation
sc depth pl
Pytorch Lightning Implementation of SC-Depth (V1, V2...) for Unsupervised Monocular Depth Estimation.
Stars: ✭ 86 (-11.34%)
Mutual labels:  pose-estimation
Barracuda-PoseNet
PoseNet Using Unity MLAgents Barracuda Engine
Stars: ✭ 31 (-68.04%)
Mutual labels:  pose-estimation
LEMO
Official Pytorch implementation for 2021 ICCV paper "Learning Motion Priors for 4D Human Body Capture in 3D Scenes" and trained models / data
Stars: ✭ 149 (+53.61%)
Mutual labels:  pose-estimation
LoFTR
Code for "LoFTR: Detector-Free Local Feature Matching with Transformers", CVPR 2021
Stars: ✭ 1,046 (+978.35%)
Mutual labels:  pose-estimation
MobileNetV2-PoseEstimation
Tensorflow based Fast Pose estimation. OpenVINO, Tensorflow Lite, NCS, NCS2 + Python.
Stars: ✭ 99 (+2.06%)
Mutual labels:  pose-estimation
Multi-Person-Pose-using-Body-Parts
No description or website provided.
Stars: ✭ 41 (-57.73%)
Mutual labels:  pose-estimation
EgoNet
Official project website for the CVPR 2021 paper "Exploring intermediate representation for monocular vehicle pose estimation"
Stars: ✭ 111 (+14.43%)
Mutual labels:  pose-estimation
label-studio-frontend
Data labeling react app that is backend agnostic and can be embedded into your applications β€” distributed as an NPM package
Stars: ✭ 230 (+137.11%)
Mutual labels:  pose-estimation
Primer-MotionCapture
A Primer on Motion Capture with Deep Learning:Principles, Pitfalls and Perspectives
Stars: ✭ 19 (-80.41%)
Mutual labels:  pose-estimation
tensorrt-examples
TensorRT Examples (TensorRT, Jetson Nano, Python, C++)
Stars: ✭ 31 (-68.04%)
Mutual labels:  pose-estimation
HRFormer
This is an official implementation of our NeurIPS 2021 paper "HRFormer: High-Resolution Transformer for Dense Prediction".
Stars: ✭ 357 (+268.04%)
Mutual labels:  pose-estimation

StarMap for Category-Agnostic Keypoint and Viewpoint Estimation

PyTorch implementation for category-agnostic keypoint and viewpoint estimation.

Xingyi Zhou, Arjun Karpur, Linjie Luo, Qixing Huang,
StarMap for Category-Agnostic Keypoint and Viewpoint Estimation
ECCV 2018 (arXiv:1803.09331)

Supplementary material with more qualitative results and higer resulution can be found here.

Contact: [email protected]. Any questions or discussions are welcomed!

Abstract

Previous methods for keypoints can only be applied to one specific category of fixed topology. As a result, this keypoint representation is not suitable when objects have a varying number of parts, e.g. chairs with varying number of legs. We propose a category-agnostic keypoint representation encoded with their 3D locations in the canonical object views. Our intuition is that the 3D locations of the keypoints in canonical object views contain rich semantic and compositional information. Our representation thus consists of a single channel, multi-peak heatmap (StarMap) for all the keypoints and their corresponding features as 3D locations in the canonical object view (CanViewFeature). Additionally, we show that when augmented with an additional depth channel (DepthMap) to lift the 2D keypoints to 3D, our representation can achieve state-of-the-art results in viewpoint estimation.

Installation

The code was tested with Anaconda Python 2.7 and PyTorch v0.1.12. After install Anaconda and Pytorch:

  1. Clone the repo:
STARMAP_ROOT=/path/to/clone/StarMap
git clone https://github.com/xingyizhou/StarMap STARMAP_ROOT
  1. Install dependencies (h5py, opencv, and progressbar):
conda install h5py
conda install --channel https://conda.anaconda.org/menpo opencv
conda install --channel https://conda.anaconda.org/auto progress
  1. Optionally, install tensorboard for visializing training.
pip install tensorflow

Demo

  • Download our pre-trained model (trained on Pascal3D+ dataset, or alternatively model trained on ObjectNet3D dataset) and move it to STARMAP_ROOT/models.
  • Run
cd STARMAP_ROOT/tools
python demo.py -demo /path/to/image [-loadModel /path/to/model/] [-GPU 0]

The demo code runs in CPU by default.

We provide example images in STARMAP_ROOT/images/. The results are shown with predicted canonical view (triangle), the predicted 3D keypoints (cross), and the rotated keypoints with the estimated viewpoint (star). If setup correctly, the output will look like:

We also provide some custom images of novel categories in STARMAP_ROOT/images/. The expected results should be:

Setup Datasets

If you want to reproduce the results in the paper for benchmark evaluation and training, you will need to setup dataset.

  1. Download and extract Pascal3D+ dataset (~7.5G).
cd STARMAP_ROOT/data
wget ftp://cs.stanford.edu/cs/cvgl/PASCAL3D+_release1.1.zip
unzip PASCAL3D+_release1.1.zip
  1. Setup the path.
mv STARMAP_ROOT/lib/paths.py.examples STARMAP_ROOT/lib/paths.py

You can change the dataset path in STARMAP_ROOT/lib/paths.py in put the dataset elsewhere.

  1. Convert the annotation.
cd STARMAP_ROOT/tools
python getPascal3DDataset.py

Optionally, setup the ObjectNet3D dataset (~7G) following the similar commands and run python getObjectNet3DDataset.py

Benchmark Evaluation

  • Evaluate viewpoint estimation on Pascal3D+ (Table. 2 in the paper):

    • Download our pre-trained model on Pascal3D+ and move it to STARMAP_ROOT/models.

    • Run the network to get the feature predictions (Our result here).

cd STARMAP_ROOT/tools
python main.py -expID Pascal3D -task starembdep -loadModel ../models/Pascal3D-cpu.pth -test
  • Align the predicted keypoints and the predicted features to solve viewpoint.
python EvalViewPoint.py ../exp/Pascal3DTEST/preds.pth
  • The result should be:
aeroplane bicycle boat bottle bus car chair diningtable motorbike sofa train tvmonitor Mean
Acc10 0.4982 0.3475 0.1466 0.5737 0.8896 0.6786 0.4549 0.2857 0.2794 0.4615 0.5929 0.3739 0.4851
Acc30 0.8218 0.8559 0.5043 0.9243 0.9740 0.9156 0.7910 0.6190 0.8750 0.9231 0.7699 0.8288 0.8235
Mid 10.05 14.50 29.42 9.02 3.02 6.29 11.13 23.66 14.23 10.97 7.41 13.14 10.38
  • Evaluate keypoint classification on Pascal3D+ (Table. 1 in the paper):
    • Run
 cd STARMAP_ROOT/tools
 python EvalPTPCK.py ../exp/Pascal3DTEST/preds.pth
  • The result should be:
aeroplane bicycle boat bottle bus car chair diningtable motorbike sofa train tvmonitor Mean
Acc 0.7505 0.8343 0.5529 0.8718 0.9439 0.8984 0.7545 0.5802 0.6867 0.7901 0.5385 0.8610 0.7858
  • Evaluate viewpoint evaluation on ObjectNet3D dataset. download our model, move it to STARMAP_ROOT/models, and run
cd STARMAP_ROOT/tools
python main.py -expID ObjectNet -dataset ObjectNet3D -task starembdep -loadModel ../models/ObjectNet3D-all-cpu.pth -test
python EvalViewPointObjectNet3D.py ../exp/ObjectNet3DTEST/preds.pth

Training

  • Training viewpoint estimation.
cd STARMAP_ROOT/tools
  1. Train the Starmap: log, model
python main.py -expID Pstar -task star
  1. Train Starmap and CanviewFeature: log, model
python main.py -expID Pstaremb -task staremb -loadModel ../exp/Pstar/model_last.pth -dropLR 60
  1. Train Starmap, CanviewFeature, and DepthMap: log, model
python main.py -expID Pstarembdep -task starembdep -loadModel ../exp/Pstaremb/model_last.pth -dropLR 60
  • For training on ObjectNet3D dataset, add -dataset ObjectNet3D to the above commends (and of course, change the expID and loadModel path). And set -ObjectNet3DTrainAll to train on all objects (by default it leaves 20 categories for testing only).

  • We also provide our implementation of the resnet baselines discussed in Table.2 following Viewpoint and Keypoint.

    • Category agnostic:
 python main.py -expID cls -task cls -arch resnet18 -trainBatch 32 -LR 0.01 -dropLR 20
  • Category specific:
 python main.py -expID clsSpec -task cls -arch resnet18 -trainBatch 32 -LR 0.01 -dropLR 20 -specificView
  • For more training options, see lib/opts.py

Citation

@InProceedings{zhou2018starmap,
author = {Zhou, Xingyi and Karpur, Arjun and Luo, Linjie and Huang, Qixing},
title = {StarMap for Category-Agnostic Keypoint and Viewpoint Estimation},
journal={European Conference on Computer Vision (ECCV)},
year={2018}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].