Giter Site home page Giter Site logo

posenet-pytorch's Introduction

PoseNet-Pytorch

This is the implementation of PoseNet, Bayesian PoseNet, PoseNet with Geometric Loss. For PoseNet with Geometric Loss, we only implemented homoscedastic uncertainty based automatic weight scaling on loss function. We selected ResNet34 as base architecture, and it resulted in the better performance than the original papers. The code is inspired by DejavuGAN and MapNet.

TODO

  • Minimal implementation of PoseNet
  • Minimal implementation of Bayesian PoseNet
  • Minimal implementation of PoseNet with Geometric loss
  • Complete Readme
  • Automatic save and load the configuration
  • Visualization of Saliency

Prerequisites (Tested environment)

  • Ubuntu 16.04
  • Python 3.5
  • Pytorch 0.4.x
  • Tensorboard (optional for visualization)
  • TensorboardX (optional for visualization)

Data

The dataset loader is based on dataset of original PoseNet. Please download on of the dataset in PoseNet Dataset. Also, you can use other datasets your own. Or, you can download by running the following script (KingsCollege Dataset from PoseNet).

wget https://www.repository.cam.ac.uk/bitstream/handle/1810/251342/KingsCollege.zip?sequence=4&isAllowed=y

Training

  • Train a model

    python3 train.py --image_path ./posenet/KingsCollege --metadata_path ./posenet/KingsCollege
    
    • Trained models are saved in ./models_{Last Folder name of image path} and the summaries (optional) are save in ./summaries_{Last Folder name of image path}.
    • (Optinal) To visualize the training procedure, run tensorboard --logdir ./summaries_{Last Folder name of image path} and check the URL http://localhost:6006.
  • Continue training

    python3 train.py --image_path ./posenet/KingsCollege --metadata_path ./posenet/KingsCollege --pretrained_model {desired epoch}
    

Optimization Scheme

Optimization Scheme

  • The above figure represent the example of optimziation scheme of training. The loss function is based on Adam optimizaer with rotation weigh parameter (beta) 500.
  • Currently, we add homoscedastic uncertainty based automatic weight scaling used in PoseNet with Geometric Loss (Maybe not same the original paper). Thus, you can check the change of s_x and s_q on training.

Test

  • Test a model with best model from validation

    python3 test.py
    
  • Test a model with the selected epoch

    python3 test.py --test_model {Desired Epoch}
    
  • Test a model as Baysian Inference (Dropout Inference)

    python3 test.py --baysian True
    

Related Project

  • We also try to implement other learning based pose regression methods

posenet-pytorch's People

Contributors

youngguncho avatar

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.