Code Monkey home page Code Monkey logo

mesh_fusion_gpu's Introduction

Tutorial: Install and run mesh_fusion on a local PC (Ubuntu20.04)

modified mesh fusion for personal use

Source: https://github.com/davidstutz/mesh-fusion

Step 0 -- Create a python 3.7 environment

create an environment

conda create -n environment_name python=3.7.4

activate the environment

conda activate environment_name

Step 1 -- Basic Installation

Install glut and opengl

sudo apt install freeglut3-dev mesa-utils

Install GLEW (The OpenGL Extension Wrangler Library)

sudo apt-get install libglew-dev

Install cmake

sudo apt install cmake

Install cython, h5py, scipy

conda install -c anaconda cython=0.29.2 h5py=2.9.0 scipy=1.1.0

Install pymeshlab

pip3 install pymeshlab

Step 2 -- Install and build mesh_fusion_gpu

Install mesh_fusion

git clone https://github.com/UncleTom111/mesh_fusion_gpu.git

Build mesh_fusion

build pyfusion

cd mesh_fusion_gpu
cd libfusiongpu
mkdir build
cd build
cmake ..
make
cd ..
python setup.py build_ext --inplace
cd ..

build pyrender

cd librender
python setup.py build_ext --inplace
cd ..

build PyMCubes

cd libmcubes
python setup.py build_ext --inplace
cd ..

Modify mesh_fusion

In order to import librender, libfusion, libmcubes in 2_fusion.py conveniently, we need to modify this repository a little bit.

!!!! The name of generated .so files are various in different PC system and environment. !!!!

  • Step 1 -- find thsese .so files under directories librender, libmcubes and libfusiongpu
  • Step 2 -- change the file name below according to the .so files you have found
  • example: pyrender.cpython-38-x86_64-linux-gnu.so
cp -i ./librender/pyrender.cpython-37m-x86_64-linux-gnu.so ./pyrender.so
cp -i ./libfusiongpu/cyfusion.cpython-37m-x86_64-linux-gnu.so ./cyfusion.so
cp -i ./libmcubes/mcubes.cpython-37m-x86_64-linux-gnu.so ./mcubes.so

Step 3 -- Run mesh_fusion (demo)

Scale an Object

python 1_scale.py --in_dir=examples/0_in/ --out_dir=examples/1_scaled/

Render depth views

python 2_fusion.py --mode=render --in_dir=examples/1_scaled/ --depth_dir=examples/2_depth/ --out_dir=examples/2_watertight/

make mesh watertight

python 2_fusion.py --mode=fuse --in_dir=examples/1_scaled/ --depth_dir=examples/2_depth/ --out_dir=examples/2_watertight/

make mesh watertight and simplified

python 3_simplify.py --in_dir=examples/2_watertight/ --out_dir=examples/3_out/

mesh_fusion_gpu's People

Contributors

uncletom111 avatar

Watchers

 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.