CodeReview is a Git GUI tool to perform code review (Diff Viewer) written in Python3 and Qt5. ITerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + Powerlevel10k - (macOS) - iterm2-solarized.md.
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.
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/deviceQuery
and 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¶
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 pip3
instead 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:¶
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.
Modified for the Meshroom documentation 2019-07-25
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).
Mac OS X comes with Python 2.7 out of the box.
You do not need to install or configure anything else to use Python 2. Theseinstructions document the installation of Python 3.
The version of Python that ships with OS X is great for learning, but it’s notgood for development. The version shipped with OS X may be out of date from theofficial current Python release,which is considered the stable production version.
Doing it Right¶
Let’s install a real version of Python.
Before installing Python, you’ll need to install GCC. GCC can be obtainedby downloading Xcode, the smallerCommand Line Tools (must have anApple account) or the even smaller OSX-GCC-Installerpackage.
Note
If you already have Xcode installed, do not install OSX-GCC-Installer.In combination, the software can cause issues that are difficult todiagnose.
Note
If you perform a fresh install of Xcode, you will also need to add thecommandline tools by running xcode-select--install
on the terminal.
While OS X comes with a large number of Unix utilities, those familiar withLinux systems will notice one key component missing: a package manager.Homebrew fills this void.
To install Homebrew, open Terminal
oryour favorite OS X terminal emulator and run
The script will explain what changes it will make and prompt you before theinstallation begins.Once you’ve installed Homebrew, insert the Homebrew directory at the topof your PATH
environment variable. You can do this by adding the followingline at the bottom of your ~/.profile
file
If you have OS X 10.12 (Sierra) or older use this line instead
Linux Python 3.7 Install
Now, we can install Python 3:
Linux Python 3.7
This will take a minute or two.
Pip¶
Homebrew installs pip
pointing to the Homebrew’d Python 3 for you.
Working with Python 3¶
At this point, you have the system Python 2.7 available, potentially theHomebrew version of Python 2 installed, and the Homebrewversion of Python 3 as well.
will launch the Homebrew-installed Python 3 interpreter.
will launch the Homebrew-installed Python 2 interpreter (if any).
will launch the Homebrew-installed Python 3 interpreter.
If the Homebrew version of Python 2 is installed then pip2
will point to Python 2.If the Homebrew version of Python 3 is installed then pip
will point to Python 3.
The rest of the guide will assume that python
references Python 3.
Pipenv & Virtual Environments¶
The next step is to install Pipenv, so you can install dependencies and manage virtual environments.
A Virtual Environment is a tool to keep the dependencies required by different projectsin separate places, by creating virtual Python environments for them. It solves the“Project X depends on version 1.x but, Project Y needs 4.x” dilemma, and keepsyour global site-packages directory clean and manageable.
For example, you can work on a project which requires Django 1.10 while alsomaintaining a project which requires Django 1.8.
So, onward! To the Pipenv & Virtual Environments docs!
This page is a remixed version of another guide,which is available under the same license.