alicevision / Meshroom

3D Reconstruction Software
http://alicevision.org
Other
11.13k stars 1.08k forks source link

[question] Why is commercial software that much faster? #1332

Closed ErfolgreichCharismatisch closed 3 years ago

ErfolgreichCharismatisch commented 3 years ago

I was using a trial of zephyr. It does not produce better results, but it is way faster. What took hours is minutes. What are they doing differently and how can this be used for meshroom?

natowi commented 3 years ago

What are they doing differently and how can this be used for meshroom?

Many have big teams of full time developers - some of them do nothing else than tweaking the code performance.

adam-bielanski commented 3 years ago

@natowi @ErfolgreichCharismatisch I'm not a coder, just a fan of new technologies we can use in "traditional" architecture work, but I think in this case it also may apply 80/20% rule. Correct me if i'm wrong, but I have an impression that DeptMap node works faster in 2021, whilst the feature extraction/matching are still painfully slow (especially with AKAZE). But.... as @ErfolgreichCharismatisch mentioned Zephyr - I've tested it too, it's really fast but sometimes gives worse/no result than Meshroom. On the other hand it has a library of "presets" for each type of reconstrution that gives probably better results. Is there anybody who really understands all settings of each node and could help me with creating preset pipelines for architecture/face reconstruction/other objects?

natowi commented 3 years ago

whilst the feature extraction/matching are still painfully slow

As far as I know this is because there were no code changes in this part targeted at improving the performance

creating preset pipelines

The pipelines really depend on your object properties, hardware, setup/workflows and what you will be using the model for.

Here you can find some details on the parameters improving the quality/performance https://github.com/alicevision/meshroom/wiki/Reconstruction-parameters

With the 2021 release, there is also the documentation tab in the node properties that will provide you sometimes recommendations.

ErfolgreichCharismatisch commented 3 years ago

Also, what is really handy is the video import feature with blurry image detection and a fps option to limit the amount of files.

adam-bielanski commented 3 years ago

@natowi @fabiencastan I tested recently the "competitor" - COLMAP recently and.... I had an impression that a sort of hybrid, blending these two softwares together would be "what I'm looking for".

  1. Colmap has really fast and efficient image detection phase, in minutes is calculating locations of phtos, whilst Meshroom is usually stuck for hours.
  2. Colmap has documentation/ tutorial more clear for non-professionals. This is one of big weaknesses of Meshroom - tons of parameters that nobody knows what and how they act.
  3. Meshroom seems to be more precise at the meshing phase and allows for quite precise tweaking of the mesh, if you finally understand at least some of parameters (see remark above). Don't get me wrong - I really like results that Meshroom is producing, equal or better than other software, but hours/days to get the result are NO GO for any serious use. Is there any chance to get an improvment on pre-SfM phases?
fabiencastan commented 3 years ago

@adam-bielanski Why are you using AKAZE? I really recommand to use the default parameters and only change them if you have a real reason to do it.

adam-bielanski commented 3 years ago

Hi @fabiencastan , generally I tend to stay with SIFT (with GPU computing) or DSPSIFT. I tested AKAZE only when SIFT gave poor results. I noticed that AKAZE sometimes deals better with specific areas, so I tested combined settings. But... even with SIFT or DSPSIFT only it's still slow. By the way - is there any site/book where I could understand how each of feature affects calculation? Meshroom help/tutorial is too concise to get it if one is not profi in 3D reconstruction.

natowi commented 3 years ago

is there any site/book where I could understand how each of feature affects calculation?

Start reading a few papers on the topic (there are a few linked in the documentation). There are theory books like Photogrammetric Computer Vision Statistics, Geometry, Orientation and Reconstruction by Förstner & Wrobel (I would not recommend to buy this, if you are not into mathematics, it´s a heavy read ;) ), but they won´t provide a step-by-step guide on what parameters to tweak. This information is provided in the associated advanced papers linked in the documentation. Tweaking one parameter requires some understanding on how it interacts with other parameters.

If you are interested in the theory behind Photogrammetry, I can strongly recommend the Lectures: Photogrammetry I&II

Also useful: https://www.researchgate.net/publication/323561586_A_comparative_analysis_of_SIFT_SURF_KAZE_AKAZE_ORB_and_BRISK https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_feature2d/py_sift_intro/py_sift_intro.html (and the opencv documentation in general) https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_feature2d/py_features_meaning/py_features_meaning.html#features-meaning

https://peterfalkingham.com/2021/03/02/meshroom-2021-1-0-whats-new-and-what-parameters-to-tweak/

ErfolgreichCharismatisch commented 3 years ago

@natowi I am sick of germans speaking english. Torture for me as a native german to listen to this.

adam-bielanski commented 3 years ago

@ErfolgreichCharismatisch don't complain, they're at least quite clear to understand, much better than some other nations, believe me. And, if you're tired with "German English" you can always try to listen in Italian French or Polish language to relax.

ErfolgreichCharismatisch commented 3 years ago

@adam-bielanski Italian, french and polish english is more comfortable to listen to than german english. Italian, french and polish include english into their language, germans fight against english while speaking it.

adam-bielanski commented 3 years ago

Wir sind jetzt zu weit von dem Haupthema weggegangen....

ErfolgreichCharismatisch commented 3 years ago

Sag halt gleich, daß du Deutscher bist. Ich habe COLMAP ausprobiert. Es war schnell, die Genauigkeit aber sehr gering.

adam-bielanski commented 3 years ago

@ErfolgreichCharismatisch Tu as tort, je ne suis pas du tout Allemand, même si je peux écrire quelques mots en cette langue. For me COLMAP had guite fast image positioning, maybe too fast. My guess is that it may affect poor final meshing result, but it's just a guess of the ignorant.

ErfolgreichCharismatisch commented 3 years ago

@adam-bielanski Peut-être que je ne suis pas allemand...

natowi commented 3 years ago

I am sick of germans speaking english. Torture for me as a native german to listen to this.

@ErfolgreichCharismatisch This is the only complete series of lectures I could find on the topic. 🤷 Did you find something better?

Meshroom goes for the highest quality mesh over computation speed. The results for many models can be compared quality wise to commercial grade software. Meshroom is being run on a renderfarm (by the main devs), so the lack of code optimization that is required for fast computation on a personal computer has only a small impact. Improving the reconstruction speed is not a trivial task, as code changes that speed up the reconstruction impact the quality of the reconstruction significantly (in many cases). It is possible to tweak the parameters in the pipeline to balance speed and quality, but this requires some knowledge on the properties of the dataset and the parameters.

Your original question has been answered, and those by @adam-bielanski as well.

Damit auch internationale Nutzer etwas von der Unterhaltung haben, schreibe ich hier grundsätzlich in Englisch. ;)

ErfolgreichCharismatisch commented 3 years ago

@natowi Nein, die Frage wurde nicht beantwortet. Die Frage ist: "What are they doing differently and how can this be used for meshroom?" und antwortest mit "Geschwindigkeit ist keine Priorität, weil wir alle Berechnungen auslagern". Und daß alles so schwer zu implementieren sei. Und die Antwort "It is possible to tweak the parameters in the pipeline to balance speed and quality, but this requires some knowledge on the properties of the dataset and the parameters." ist keine hilfreiche Antwort auf "how can this be used for meshroom"

ErfolgreichCharismatisch commented 3 years ago

Hilfreich wären Einstellungen für bestimmte Szenarien. Ich habe etwa ein Haus aufgenommen - ohne fixe Belichtungszeit und Shutter und alle Räume nacheinander, also nicht ideal. Ich frage mich daher, wie ich diesen Datensatz dennoch rekonstruieren könnte. Nachdem diese und andere Probleme immer wieder auftauchen wäre es sinnvoll, sie in einer FAQ zu adressieren. EDIT: Bitte auf Urdu, um die netten Mitleser aus Pakistan, Indien, Afghanistan, Bangladesch, Nepal, den Vereinigten Arabischen Emiraten, dem Vereinigten Königreich und dem Iran nicht auszuschließen. ;)

natowi commented 3 years ago

Mein letzter Post war eine erweiterte Antwort zu dem bereits zuvor Gesagten. "What are they doing differently and how can this be used for meshroom?" ist auch sehr unspezifisch. Was macht das Programm anders? Es verwendet andere Algoritmen bzw. auf Geschwindigkeit optimierte Algoritmen. Wie kann das für Meshroom verwendet werden? Gar nicht, da die kommerziellen Programme closed source sind. Ja, manche Kommerziellen Pakete bieten optimierte Einstellungen für bestimmte Workflows an, wenn es das ist was du meinst.

Der Standard-Graph ist so optimiert, das er aus den meisten Datensätzen brauchbare Ergebnisse liefert. Die einfach zugänglichen Parameteranpassungen sind hier dokumentiert https://github.com/alicevision/meshroom/wiki/Reconstruction-parameters

Die meisten anderen Parameter sind sehr speziell und erfordern etwas umfangreichere Erklärungen.

Du kannst dich gerne selber dran machen und für Indoor-Datasets die optimalen Parameter austesten. Genau dafür ist das Node-basierte Inferface gedacht.

Ich frage mich daher, wie ich diesen Datensatz dennoch rekonstruieren könnte.

Hier greift erst einmal die GIGO Regel. Wenn beispielsweise die Übergänge zwischen den Räumen nicht ausreichend erfasst wurden, helfen auch Parameter nicht mehr. Meshroom ist diesbezüglich etwas empfindlich. Dazu lassen sich aber z.B. die Fehlertoleranzen in einigen Nodes anpassen. Standardmäßig sind sie auf hohe Qualität ausgelegt.

Nachdem diese und andere Probleme immer wieder auftauchen wäre es sinnvoll, sie in einer FAQ zu adressieren.

Es gibt es an allen Ecken und Enden Dinge zu dokumentieren. Du kannst wie gesagt gerne deinen Beitrag leisten.

adam-bielanski commented 3 years ago

Guys, switch back to present "lingua fanca" please, I understand that all the information should help not only @ErfolgreichCharismatisch or myself, but slightly wider community. A.

ErfolgreichCharismatisch commented 3 years ago

Dazu lassen sich aber z.B. die Fehlertoleranzen in einigen Nodes anpassen. Standardmäßig sind sie auf hohe Qualität ausgelegt.

Das ist eine gute Antwort in die richtige Richtung.

PS: GIGO hängt vom Algorithmus ab.

ErfolgreichCharismatisch commented 3 years ago

Guys, switch back to present "lingua fanca" please, I understand that all the information should help not only @ErfolgreichCharismatisch or myself, but slightly wider community. A.

کوئی حرج نہیں ، ہم آپ کی طرف توجہ دیں گے۔

natowi commented 3 years ago

My last post was an extended response to what was said before. "What are they doing differently and how can this be used for meshroom?" is also very non-specific. What does the program do differently? It uses different algorithms or algorithms optimized for speed. How can this be used for meshroom? Not at all, because the commercial programs are closed source. Yes, some commercial packages offer optimized settings for certain workflows, if that's what you mean.

The default graph is optimized to give usable results from most datasets. The easily accessible parameter tweaks are documented here https://github.com/alicevision/meshroom/wiki/Reconstruction-parameters.

Most of the other parameters are very specific and require a bit more explanation.

Feel free to try it yourself and test out the optimal parameters for indoor datasets. That's exactly what the node-based interface is for.

So I wonder how I could reconstruct this dataset anyway.

This is where the GIGO rule kicks in. If, for example, the transitions between rooms have not been sufficiently captured, optimizing parameters won't help either. Meshroom is somewhat sensitive in this respect. However, the error tolerances in some nodes can be adjusted for this purpose. By default, the parameters are optimized for high quality.

Since these and other problems come up again and again it would make sense to address them in a FAQ.

There are things to document in all corners. As I said, feel free to contribute.