In this blog post, I’m going to run through the new free software AliceVision Meshroom. I’ve been keeping my eyes on this for the past month or so, but until now it’s required compiling yourself, and a mismatch between CUDA and visual studio meant it was more complicated than I was willing to devote time to (It would require me installing an older version of visual studio).
Anyway, thanks to this thread on reddit, I was made aware that binaries are now available, so here we go testing them on my Styracosaurus dataset.
Let’s download the win64 binaries from here: https://github.com/alicevision/meshroom/releases
I’ve downloaded the zip file, then unzipped to my desktop for now, in a folder called ‘Meshroom’. Inside there is Meshroom.exe, and I double click that to start the program. It’s a nice looking interface:
Import images by dragging and dropping a folder or files onto the left pane.
Before beginning, I’ve saved the project to my D:\ drive, so that temporary files go there, instead of my small C:\ drive.
I’m just going to run through without changing any settings, so I click the enticing green ‘start’ button at the top.
As Meshroom processes the data, the bar at the top moves to the right, and the graph at the bottom changes colour as each stage completes.
When structure from motion is complete, you’ll see the sparse point cloud and camera positions on the right:
During this time, Meshroom was utilizing both my CPU and GPU:
When the progress bar finishes, a small ‘load model’ button will appear in the 3D View:
Hit that, and the model will load (surprisingly enough):
Buttons in the lower left of the 3D view will switch between solid, wireframe, and textured. The final model, plus textures, was located in D:\MeshroomCache\Texturing (a cache folder had been created where I saved the file).
The final model is excellent:
However, here’s the catch in the form of timings (labelled according to each part of the meshroom process):
- CameraInit: <negligible>
- FeatureDetection: 50 seconds
- ImageMatching: 3 seconds
- FeatureMatching: 42 seconds
- StructureFromMotion: 1 minute 27 seconds
- PrepareDenseScene: 53 seconds
- CameraConnection: 4 seconds
- DepthMap: 44 minutes
- DepthMapFilter: 1 minute 11 seconds
- Meshing: 5 minutes 59 seconds
- MeshFiltering: 14 seconds
- Texturing: 2 minutes, 1 second
Total Time: 65 minutes
Clearly, that’s significantly longer than other software I’ve tested. I’m also under the impression that Meshroom is more reliant on EXIF data in images than some other processes, but I haven’t tested that. It’s worth noting that Meshroom failed to match 7 of the 53 images (only 46 were matched), though the model is pretty nicely complete.
All that being said, there’s a tonne of scope for altering parameters and changing the workflow. Modules can be added to the graph at the bottom of the screen, and clicking on any module will present all of the attributes available to change.
I tried again with DepthMap set to downscale 4 and 16 (default 2), as well as reducing some of the iterations and sampling variables, and that reduced the time taken a little. I also added a mesh decimation feature, and lowered texture resolution from 8192 to 4096, and the resulting model was still excellent, and much smaller file size.
I also added a ‘publish’ module which allows direct export of the model to a folder of your choice, rather than digging into the cache folder. (connect outputMesh, outputMaterial, and outputTextures from the Texturing module into the input of Publish):
+Really nice interface
+Extremely customizable parameters
-Quite slow on default settings
-But changing parameters requires a fair bit of knowledge
-Potentially not as robust to images without EXIF data (but not tested for that yet)
-Lacking masking features from e.g. Photoscan.