GithubHelp home page GithubHelp logo

smileyenot983 / reconstructor Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 329.74 MB

3d reconstruction from camera images

License: MIT License

CMake 2.26% C++ 97.74%
3d-reconstruction bundle-adjustment computer-vision feature-extraction feature-matching multiple-view-geometry sfm slam photogrammetry

reconstructor's Introduction

reconstructor

This project is aimed for 3d reconstruction(sparse up-to scale cloud + camera positions) using camera images. The focus of the whole project is on symbiosis between learning-based approaches and time-proven classic algorithms. Inspired by existing open-source approaches: Colmap, AliceVision, OpenMVG.

reconstructor features

At the moment there is cpp a wrapper over SuperPoint(https://github.com/magicleap/SuperPointPretrainedNetwork), also a cpp wrapper over SuperGlue matcher(https://github.com/magicleap/SuperGluePretrainedNetwork)

reconstructor results:

Fountain dataset. Taken from kaggle's image matching 2023 competition.

There is also corresponding cloud_fountain.ply file. It might be opened via Meshlab(renders colored pointcloud) or CloudCompare(renders uncolored pointcloud) or any other cloud viewer. Camera poses are visualized as green points.

Fountain(uncolored, opened in CloudCompare)

Fountaint(colored, opened in Meshlab)

what is done at the moment

  1. 2 feature extractors: SuperPoint, ORB + BaseClass for possible extension
  2. 2 feature matchers: SuperGlue, Flann + BaseClass for possible extension
  3. Feature filtering(based on epipolar geometry)
  4. Initial img pair choice and initial triangulation
  5. Separate class for end2end reconstruction
  6. Img matcher(which for now assumes all images are matched)
  7. 3d visualization of reconstructed cloud(up to scale) + camera positions
  8. incremental reconstruction via pnp + BA
  9. colored pointcloud, saved in *.ply format
  10. use openmp/tbb to make it faster

todo:

  1. code refactoring + add comments
  2. Add saving of intermediate steps(feature detection, image matching, feature matching) to avoid their computation in case of changes only in sfm part
  3. image matcher(apply some image retrieval, FAISS, metric learning)

todo later:

  1. use monocular depth estimating networks(for example https://github.com/isl-org/MiDaS) to obtain real scale and dense reconstruction

some notes on openmp:

It is currently added for feature extraction + feature matching + matches saving. Here are some results on sift + flann for 100 images(duration in seconds):

  • Openmp 4 threads + collapse(on double for): (7 + 76 + 171)
  • Without openmp : (7 + 180 + 406)

how to run

  1. install OpenCV 4.2+ https://docs.opencv.org/4.x/d7/d9f/tutorial_linux_install.html
  2. install libTorch https://pytorch.org/, choose Language: C++/Java, only CPU platform tested at the moment
  3. install PCL https://pointclouds.org/downloads/
  4. clone this repo and change path to libtorch in CMakeLists.txt "CMAKE_PREFIX_PATH"
  5. mkdir build && cd build
  6. cmake .. && make
  7. run ./reconstruct

reconstructor's People

Contributors

smileyenot983 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

flyinggh

reconstructor's Issues

Densification?

Hi, and thanks for making this code available!

Do you have any tips on how to create a dense cloud from the resulting sparse points?

Thanks!

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.