Osx Python3

Most of macOS workstations do not have any NVIDIA graphic boards, hence they cannot run CUDA, for MVS part.So compiling and using Meshroom isnot exactly straightforward.However, Ryan Baumann has compiled his ownHomebrew tap which includesthe necessary formulae, and you can use this post to get an idea of how to usethem to get up and running. Note that this is intended as a first stepfor Mac users wishing to experiment with and improve theAliceVision/Meshroom software, and as a result these instructions maybecome outdated with time.

Doing it Right¶. Let’s install a real version of Python. Before installing Python, you’ll need to install GCC. GCC can be obtained by downloading Xcode, the smaller Command Line Tools (must have an Apple account) or the even smaller OSX-GCC-Installer package. System Requirements¶. First off, your Mac will currently need some NVIDIA GPU with a CUDA compute capability of 2.0 or greater. This is probably a pretty small portion of all Macs available, but you can check your GPU by looking in “About This Mac” from the Apple icon in the top left corner of the screen, under “Graphics”. ITerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + Powerlevel10k - (macOS) - iterm2-solarized.md.

System Requirements¶

First off, your Mac will currently need some NVIDIA GPU with a CUDAcompute capability of 2.0 or greater. This is probably a pretty smallportion of all Macs available, but you can check your GPU by looking in“About This Mac” from the Apple icon in the top left corner of thescreen, under “Graphics”. If you have an NVIDIA GPU listed there, youcan check its compute capability on the NVIDIA CUDA GPUspage.

Second, you’re going to need to install the latest CUDAtoolkit. As of thiswriting, that’s CUDA 10.1, which is only officially compatible with OS X10.13 (High Sierra), so you may also need to upgrade to the latestversion of High Sierra (but not Mojave!) if you haven’t already.Alongside this it is aloso suggested to instal the latest NVIDIA CUDA GPUwebdriver, which as of this writing is387.10.10.10.40.118.

Third, CUDA 10.1 is only compatible with the version of ``clang`distributed with Xcode10.1 <https://docs.nvidia.com/cuda/cuda-installation-guide-mac-os-x/index.html>`__,and will refuse to compile against anything else. You may have an olderor newer version of Xcode installed. As of this writing, if you fullyupdate Xcode within a fully updated OS X install, you’ll have Xcode10.1. To get back to Xcode 10.1, what you can do is go to Apple’sDeveloper Downloads page(for which you’ll need a free Apple developer account), then search for“Xcode 10.1”, then install the Command Line Tools for Xcode 10.1 packagefor your OS version. After installing, runsudoxcode-select--switch/Library/Developer/CommandLineTools andthen verify that clang--version showsAppleLLVMversion10.0.0.

Once you’ve done all this, you can verify a working CUDA install bygoing to /Developer/NVIDIA/CUDA-10.1/samples/1_Utilities/deviceQueryand running sudomake&&./deviceQuery, which should output your GPUinformation. If it doesn’t build correctly (i.e. you seenvccfatal:Theversion('??.?')ofthehostcompiler('Appleclang')isnotsupported),or deviceQuery errors or doesn’t list your GPU, you may need to lookover the steps above and check that everything is up to date (you canalso check the CUDA panel in System Preferences).

The following instructions also assume a workingHomebrew install.

macOS Installation¶

If you’ve followed all the above setup instructions and requirements,installing the AliceVision libraries/framework should be as easy as:

Meshroom Installation & Usage¶

Osx python 3

Linux Python 3.7 Install

This tutorial does not provide a Homebrew formulae for the Meshroom packageitself, as it’s all Pythonand doesn’t seem particularly difficult to install/use once AliceVisionis installed and working correctly. Just follow the install instructionsthere (for my specific Python configuration/installation I used pip3instead of pip and python3 instead of python):

Note

The CUDA-linked AliceVision binaries invoked by Meshroom don’t automatically find the CUDA libraries on the DYLD_LIBRARY_PATH, and setting the DYLD_LIBRARY_PATH from the shell launching Meshroom doesn’t seem to get the variable passed into the shell environment Meshroom uses to spawn commands. Without this, you’ll get an error like:

In order to get around this, you can symlink the CUDA libraries into/usr/local/lib (most of the other workarounds I found forpermanently modifying the DYLD_LIBRARY_PATH seemed more confusing orfragile than this simplerapproach):1

You can undo/uninstall this with:

You may also want to download the voctree dataset:

Then launch with:

Import some photos, click “Start”, wait a while, and hopefully youshould end up with a reconstructed and textured mesh (here’s an exampleof my own which I uploaded to SketchFab). Bydefault, the output will be in MeshroomCache/Texturing/ (relative towhere you saved the project file).

By default, the output will be in MeshroomCache/Texturing/(relative to where you saved the project file).

When you launch Meshroomwithoutsudo, the temp path will be something like this:

When starting with sudo, it will be /tmp/MeshroomCache by default

Footnotes:¶

Linux Python 3.6

  1. Previously, I suggested modifying meshroom/core/desc.py so thatthe return value at the end of the ``buildCommandLine`method <https://github.com/alicevision/meshroom/blob/develop/meshroom/core/desc.py#L368>`__instead reads:

    ` <https://ryanfb.github.io/etc/2018/08/17/alicevision_and_meshroom_on_mac_os_x.html#fnref:dyldpath>`__

Originally published on 2018-08-17 by RyanBaumann

This guide was updated on 2019-03-20 to reflect the latest CUDA 10.1 andXcode 10.1 versions. The Homebrew formula was also updated toAliceVision 2.1.0 to support Meshroom 2019.1.0.

How to make bootable usb from mac. Modified for the Meshroom documentation 2019-07-25

Linux Python 3.7

Baumann, Ryan. “AliceVision and Meshroom on Mac OS X.” Ryan Baumann -/etc (blog), 17 Aug 2018,https://ryanfb.github.io/etc/2018/08/17/alicevisionandmeshroomonmacosx.html(accessed 25 Jul 2019).