[FR] Decouple meshing (at least `pymeshlab`) from `ns-export`
Is your feature request related to a problem? Please describe.
I use nerfstudio, specifically splatfacto, to generate large splats via automated scripts, and in this workflow, meshing is typically not required. However, nearly every time I adjust dependencies in my pip or conda environment, ns-export fails with obscure binding-related errors. This occurs because certain exporter modules hard-import pymeshlab, even when the meshing functionality is not being used. As a result, environment management becomes fragile, and my automation is repeatedly interrupted. The relevant modules are:
nerfstudio/exporter/tsdf_utils.pynerfstudio/exporter/exporter_utils.py
If I comment out the import pymeshlab lines in these files, the errors disappear and the export runs successfully. Looking at existing issues, there seem to be several reports related to this same dependency, although in some of those cases, the root cause is something else: https://github.com/nerfstudio-project/nerfstudio/issues?q=is%3Aissue%20state%3Aopen%20pymeshlab.
Describe the solution you'd like
It would be great if meshing could be fully decoupled into its own utility, or if pymeshlab were treated as an optional dependency that is only imported when needed. This would avoid unnecessary breakage for workflows that do not require meshing.
Describe alternatives you've considered
- Manually commenting out
import pymeshlabin the source files (works, but not maintainable). - Pinning specific versions of
pymeshlab,Qt, and other dependencies, though this is fragile and often conflicts with other packages.
Additional context
Making pymeshlab optional could simplify environment management and reduce friction for users like me, who automate RF creation and do not need meshing.
Source: nerfstudio-project/nerfstudio