[go: nahoru, domu]

Skip to content

Meshroom in Google Colab (cloud)

Simon edited this page May 9, 2021 · 34 revisions

You don´t have a CUDA GPU or not enough Ressources? Now you can run Meshroom on Google Colab (in CLI mode only, no GUI). The only thing you need is a Google Account. (+ internet connection with a decent upload rate!)

Note: This solution is a user contribution and not officially supported.

Google Colab is a free to use Jupyter notebook, that allows you to use free Tesla K80 GPU (24 GB of GDDR5 memory) it also gives you a total of 12 GB of ram, and you can use it up to 12 hours in row(keep the browser tab open as it will reset sooner otherwise). *


GPU: 1xTesla K80 , having 2496 CUDA cores, compute 3.7, 12GB(11.439GB Usable) GDDR5 VRAM (some sources state Google now uses Nvidia T4s)

CPU: 1xsingle core hyper threaded i.e(1 core, 2 threads) Xeon Processors @2.3Ghz (No Turbo Boost) , 45MB Cache

RAM: ~12.6 GB Available

Disk: ~320 GB Available

For every 12hrs or so Disk, RAM, VRAM, CPU cache etc data that is on our alloted virtual machine will get erased *


Go to https://colab.research.google.com and login.

You can open this ready to use MeshroomColab Notebook. If you have any questions, please go to the MeshroomColab.ipynb GIST Before you can compute your own dataset, you NEED to change under Runtime->Change Runtime the selector to GPU. Otherwise it won't work!

gpu1 gpu2

To write your own Colab notebook, read (First steps with Colab)

Here is another Colab notebook by @donmahallem.

Here you can find a short overview of the CLI-Parameters

If you have written a more sophisticated script, we kindly ask you to share it with the community.

You can watch a video tutorial here: https://www.youtube.com/watch?v=xcN_UaZUKew


Here is a workflow shared by @vinayadatta

This solution was tested on Google Colab using a script from AB3D-Studio. Download the "RunMeshroom.ipynb" script file. You can check out the YouTube tutorial here for the complete setup.

Steps:

  1. Open your local Meshroom GUI and set up all the nodes and their parameters as per your desired requirements.

  2. Save your file as MyMESH.mg and copy it to your Google Drive (My Drive/Documents for example).

  3. Open Google Colab, upload the notebook script "RunMeshroom.ipynb" and follow the instructions to mount your google drive.

  4. Copy your input files to your folder in Google Drive.

  5. Copy the file paths of MyMesh.mg and your input files from Colab and replace all the file paths inside your MyMesh.mg file. You might have to be careful while doing this. Make sure you have completely replaced all the local paths to the Colab's reference paths. For example inputs > path: "C:\Users\USER_NAME\Documents" to path: "/content/drive/My Drive/Documents/".

  6. If you haven't set a custom output folder in your Publish Node, the output is saved in the default cache folder.

  7. Now run this command under 'Meshing' after you have performed the above steps correctly: !./meshroom/Meshroom-2020.1.0/meshroom_compute --forceCompute /content/drive/My Drive/Documents/MyMesh.mg

https://github.com/alicevision/meshroom/issues/851#issuecomment-727176535

How to save Meshroom files of Google Colab, so you can run it afterwards (the 12 hour time limit)

https://github.com/alicevision/meshroom/issues/767#issuecomment-736286949

https://github.com/alicevision/meshroom/issues/1218

https://medium.com/@aj7amigo/build-your-3d-models-with-ease-19078b50dcc