Code Monkey home page Code Monkey 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

robust-pose-estimator's People

Contributors

hahnec avatar mhayoz avatar

Stargazers

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

Watchers

 avatar  avatar

Forkers

yikyph

robust-pose-estimator's Issues

about train_posenet.py<from lietorch import SE3>

Train_ The line from liestore import SE3 in posenet.py cannot be loaded and there is no online message about how to adjust it. Do you know how to fix this? The SE3 function is not available in liestore

about depth data

Thanks for your great job! I download the dataset from the link https://zenodo.org/records/8154924.
There just is RGB video, and I want to know how can I get the depth image that you used.

Would you consider making the depth data publicly available, I would appreciate it if you could provide it!

a question

Thanks to the you for your work!
But i got some question when i use it.
When i run python train_posenet.py,this will appear,
ValueError: no calibration file found in ..\data\StereoMIS\H1
And there is no folder named StereoMIS\H1 in StereoMIS,just P1 P2 and
P3.
I downloaded it in https://zenodo.org/record/8154924,is this address right?
Or the train.yaml need to be Revised?
How can i deal with it?

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.