Skip to content

Commit 4026ae9

Browse files
authored
Merge pull request #2835 from alicevision/doc/updateInstall
[doc] Update `INSTALL.md`
2 parents 0362aab + 0244d34 commit 4026ae9

File tree

1 file changed

+90
-67
lines changed

1 file changed

+90
-67
lines changed

INSTALL.md

Lines changed: 90 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,52 @@
1-
# Meshroom installation
1+
# Meshroom Installation
22
This guide will help you setup a development environment to launch and contribute to Meshroom.
33

4+
## Table of Contents
5+
6+
1. [Use prebuilt release](#use-prebuilt-release)
7+
2. [Installation from source code](#installation-from-source-code)
8+
1. [Install minimal dependencies](#install-minimal-dependencies)
9+
1. [Python environment](#python-environment)
10+
2. [Qt/PySide](#qtpyside)
11+
2. [Install dependencies](#install-dependencies)
12+
1. [AliceVision](#alicevision)
13+
2. [QtAliceVision](#qtalicevision)
14+
3. [Install plugins](#install-plugins)
15+
1. [mrSegmentation plugin](#mrsegmentation-plugin)
16+
2. [MeshroomHub](#meshroomhub)
17+
4. [Start Meshroom](#start-meshroom)
18+
3. [Adding custom nodes, templates and plugins](#adding-custom-nodes-templates-and-plugins)
19+
1. [Custom nodes](#custom-nodes)
20+
2. [Custom templates](#custom-templates)
21+
3. [Custom plugins](#custom-plugins)
22+
23+
24+
## Use prebuilt release
25+
26+
To quickly run Meshroom without setting up a development environment, follow these simple steps:
27+
28+
1. **Download the prebuilt binaries**:
29+
* Visit the [Releases](https://github.com/alicevision/meshroom/releases) page.
30+
* Download the latest release that is suitable for your operating system.
31+
2. **Extract the archive**:
32+
* On Windows: right-click on the .zip file and select "Extract All", or run `unzip Meshroom-x.y.z.zip` in a terminal.
33+
* On Linux: in a terminal, run `tar -xzvf Meshroom.x.y.z.tar.gz`.
34+
3. **Run Meshroom**: in the extracted folder, double-click on the "Meshroom" executable to launch it.
435

536
## Installation from source code
637

738
Get the source code and install runtime requirements:
839
```bash
940
git clone --recursive https://github.com/alicevision/Meshroom.git
1041
cd meshroom
11-
pip install -r requirements.txt
1242
```
1343

44+
### Install minimal dependencies
1445

15-
## Start Meshroom
46+
To use Meshroom nodal system without any visualization option, you can rely on a minimal set of dependencies.
1647

17-
- __Launch the User Interface__
18-
19-
```bash
20-
# Windows
21-
set PYTHONPATH=%CD% && python meshroom/ui
22-
# Linux/macOS
23-
PYTHONPATH=$PWD python meshroom/ui
24-
```
2548

26-
On Ubuntu, you may have conflicts between native drivers and mesa drivers. In that case, you need to force usage of native drivers by adding them to the LD_LIBRARY_PATH:
27-
`LD_LIBRARY_PATH=/usr/lib/nvidia-340 PYTHONPATH=$PWD python meshroom/ui`
28-
You may need to adjust the folder `/usr/lib/nvidia-340` with the correct driver version.
29-
30-
- __Launch a 3D reconstruction in command line__
31-
32-
```bash
33-
# Windows: set PYTHONPATH=%CD% &&
34-
# Linux/macOS: PYTHONPATH=$PWD
35-
python bin/meshroom_batch --input INPUT_IMAGES_FOLDER --output OUTPUT_FOLDER
36-
```
37-
38-
39-
## Use prebuilt AliceVision
40-
41-
Download a [Release](https://github.com/alicevision/meshroom/releases) or extract files from a recent AliceVision build on [Dockerhub](https://hub.docker.com/r/alicevision/alicevision).
42-
43-
`LD_LIBRARY_PATH=~/foo/Meshroom-2023.2.0/aliceVision/lib/ PATH=$PATH:~/foo/Meshroom-2023.2.0/aliceVision/bin/ PYTHONPATH=$PWD python3 meshroom/ui`
44-
45-
You may need to checkout the corresponding Meshroom version/tag to avoid versions incompatibilities.
46-
47-
48-
## Install Requirements
49-
50-
### Python environment
49+
#### Python environment
5150

5251
* Windows: Python 3 (>=3.9)
5352
* Linux: Python 3 (>=3.9)
@@ -63,7 +62,7 @@ pip install -r requirements.txt -r dev_requirements.txt
6362
> It is recommended to use a [virtual Python environment](https://docs.python.org/3.9/library/venv.html), like `python -m venv meshroom_venv`.
6463
6564

66-
### Qt/PySide
65+
#### Qt/PySide
6766

6867
* PySide >= 6.7
6968

@@ -76,11 +75,19 @@ pip install -r requirements.txt -r dev_requirements.txt
7675
> - On Linux, the .so (here, Rocky9-based) can be directly downloaded [here](https://drive.google.com/uc?export=download&id=1dq7rm_Egc-sQF6j6_E55f60INyxt1ega). It then needs to be placed in `/path/to/pip/install/PySide6/Qt/qml/QtQuick/Scene3D`.
7776
7877

79-
### AliceVision
78+
### Install dependencies
79+
80+
You can install AliceVision to get access to 3D Computer Vision and Machine Learning nodes and pipelines. Additionally, you can install QtAliceVision to get access to Image and 3D data visualization within Meshroom.
8081

81-
Meshroom relies on the [AliceVision](https://github.com/alicevision/AliceVision) framework for visualization of images and 3D data.
82-
AliceVision's binaries must be in the path while running Meshroom.
83-
To build AliceVision, follow this [guide](https://github.com/alicevision/AliceVision/blob/develop/INSTALL.md) and add the installation in your PATH (and LD_LIBRARY_PATH on Linux/macOS).
82+
#### AliceVision
83+
84+
[AliceVision](https://github.com/alicevision/AliceVision)'s binaries must be in the path while running Meshroom.
85+
86+
The easiest way is to download prebuild binaries from the release. You can download a [Release](https://github.com/alicevision/AliceVision/releases) or extract files from a recent AliceVision build on [Dockerhub](https://hub.docker.com/r/alicevision/alicevision).
87+
88+
Alternatively, you can build AliceVision manually from the source code by following this [guide](https://github.com/alicevision/AliceVision/blob/develop/INSTALL.md).
89+
90+
Then add the `bin` and `lib` folders into your `PATH` (and `LD_LIBRARY_PATH` on Linux/macOS) environment variables.
8491

8592
The following environment variable must always be set with the location of AliceVision's install directory:
8693
```
@@ -93,27 +100,29 @@ MESHROOM_NODES_PATH={ALICEVISION_ROOT}/share/meshroom
93100
MESHROOM_PIPELINE_TEMPLATES_PATH={ALICEVISION_ROOT}/share/meshroom
94101
```
95102

96-
Meshroom also relies on specific files provided with AliceVision.
97-
* Sensor database: a text database of sensor width per camera model.
98-
Provided in AliceVision source tree: {ALICEVISION_REPOSITORY}/src/aliceVision/sensorDB/cameraSensors.db
99-
* Voctree (optional): for larger datasets (>200 images), greatly improves image matching performances.
100-
It can be downloaded [here](https://gitlab.com/alicevision/trainedVocabularyTreeData/raw/master/vlfeat_K80L3.SIFT.tree).
101-
* Sphere detection model (optional): for the automated sphere detection in stereo photometry.
102-
It can be downloaded [here](https://gitlab.com/alicevision/SphereDetectionModel/-/raw/main/sphereDetection_Mask-RCNN.onnx).
103-
* Semantic segmentation model (optional): for the semantic segmentation of objects.
104-
It can be downloaded [here](https://gitlab.com/alicevision/semanticSegmentationModel/-/raw/main/fcn_resnet50.onnx).
105-
* Color chart detection models (optional): for the detection of color charts.
106-
It can be downloaded [here](https://gitlab.com/alicevision/ColorchartDetectionModel).
107-
108-
Environment variables need to be set for Meshroom to find those files:
103+
Meshroom also relies on [specific files provided with AliceVision](https://github.com/alicevision/AliceVision/blob/develop/INSTALL.md#environment-variables-to-set-for-meshroom), set through environment variables.
104+
If these variables are not set, Meshroom will by default look for them in `{ALICEVISION_ROOT}/share/aliceVision`.
105+
106+
> [!NOTE]
107+
> You may need to checkout the corresponding Meshroom version/tag to avoid versions incompatibilities.
108+
109+
110+
#### QtAliceVision
111+
112+
[QtAliceVision](https://github.com/alicevision/QtAliceVision), an additional Qt plugin, can be built to extend Meshroom UI features.
113+
114+
Note that it is optional but highly recommended.
115+
116+
This plugin uses AliceVision to load and visualize intermediate reconstruction files and OpenImageIO as backend to read images (including RAW/EXR).
117+
It also adds support for Alembic file loading in Meshroom's 3D viewport, which allows to visualize sparse reconstruction results (point clouds and cameras).
118+
109119
```
110-
ALICEVISION_SENSOR_DB=/path/to/database
111-
ALICEVISION_VOCTREE=/path/to/voctree
112-
ALICEVISION_SPHERE_DETECTION_MODEL=/path/to/detection/model
113-
ALICEVISION_SEMANTIC_SEGMENTATION_MODEL=/path/to/segmentation/model
114-
ALICEVISION_COLORCHARTDETECTION_MODEL_FOLDER=/path/to/ColorChartDetectionModel
120+
QML2_IMPORT_PATH=/path/to/QtAliceVision/install/qml
121+
QT_PLUGIN_PATH=/path/to/QtAliceVision/install
115122
```
116-
If these variables are not set, Meshroom will by default look for them in `{ALICEVISION_ROOT}/share/aliceVision`.
123+
124+
125+
### Install plugins
117126

118127
#### mrSegmentation plugin
119128

@@ -127,18 +136,32 @@ For mrSegmentation nodes to be correctly detected by Meshroom, the following env
127136
MESHROOM_PLUGINS_PATH=/path/to/mrSegmentation
128137
```
129138

130-
### QtAliceVision plugin
139+
#### MeshroomHub
131140

132-
[QtAliceVision](https://github.com/alicevision/QtAliceVision), an additional Qt plugin, can be built to extend Meshroom UI features.
141+
You can find many experimental Machine Learning plugins on [MeshroomHub](https://github.com/meshroomHub).
133142

134-
Note that it is optional but highly recommended.
135143

136-
This plugin uses AliceVision to load and visualize intermediate reconstruction files and OpenImageIO as backend to read images (including RAW/EXR).
137-
It also adds support for Alembic file loading in Meshroom's 3D viewport, which allows to visualize sparse reconstruction results (point clouds and cameras).
144+
### Start Meshroom
145+
146+
- __Launch the User Interface__
138147

148+
```bash
149+
# Windows
150+
set PYTHONPATH=%CD% && python meshroom/ui
151+
# Linux/macOS
152+
PYTHONPATH=$PWD python meshroom/ui
139153
```
140-
QML2_IMPORT_PATH=/path/to/QtAliceVision/install/qml
141-
QT_PLUGIN_PATH=/path/to/QtAliceVision/install
154+
155+
On Ubuntu, you may have conflicts between native drivers and mesa drivers. In that case, you need to force usage of native drivers by adding them to the LD_LIBRARY_PATH:
156+
`LD_LIBRARY_PATH=/usr/lib/nvidia-340 PYTHONPATH=$PWD python meshroom/ui`
157+
You may need to adjust the folder `/usr/lib/nvidia-340` with the correct driver version.
158+
159+
- __Launch a 3D reconstruction in command line__
160+
161+
```bash
162+
# Windows: set PYTHONPATH=%CD% &&
163+
# Linux/macOS: PYTHONPATH=$PWD
164+
python bin/meshroom_batch --input INPUT_IMAGES_FOLDER --output OUTPUT_FOLDER
142165
```
143166

144167
## Adding custom nodes, templates and plugins

0 commit comments

Comments
 (0)