Git Product home page Git Product logo

robust-pose-estimator's Introduction

Robust Camera Pose Estimation for Endoscopic Videos

Visual Odometry for stereo endoscopic videos with breathing and tool deformations. For more details, please see our paper: Learning how to robustly estimate camera pose in endoscopic videos

Please cite us if you use our code for your research:

@article{hayoz2023pose,
title={Learning how to robustly estimate camera pose in endoscopic videos},
author={Michel Hayoz, Christopher Hahne, Mathias Gallardo, Daniel Candinas, Thomas Kurmann, Max Allan, Raphael Sznitman},
journal={International Journal of Computer Assisted Radiology and Surgery 2023}
doi={https://doi.org/10.1007/s11548-023-02919-w}
}

Alt text

Installation

you will need Python 3.8, which can be checked with

$ python3 --version

install all requirements with

$ pip install -r requirements.txt

for optional 3D visualizations install open3D with

$ pip install open3d

checkout thirdparty code with

$ git submodule update --init --recursive

$ pip install git+https://github.com/princeton-vl/lietorch.git

Prepare the data

  1. Download the StereoMIS dataset from here and unzip it in the data folder. Note, only provide the porcine sequences of StereMIS are public. Each sequence contains a stereo video file, camera calibration and camera poses.
  2. For training and (fast) inference you need to unpack and pre-process the stereo video files with:
$ cd scripts
$ python preprocess_video_data.py ../data/StereoMIS

Training

Train the pose estimator with

$ cd scripts
$ python train_posenet.py

you may need to adapt the training parameters in the configuration file in configuration/train.yaml

Inference

You can infer the camera trajectory for a sequence with were the data needs to be in the same format as the downloaded StereoMIS

$ cd scripts
$ python infer_trajectory.py path/to/sequence

benchmark on surgical scenarios with (only works on pre-processed StereoMIS data)

$ cd scripts
$ python benchmark_scenarios.py path/to/test_set

benchmark on test set with (only works on pre-processed StereoMIS data)

$ cd scripts
$ python benchmark_test.py path/to/test_set

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.