Open juanjosse opened 2 years ago
It is really strange because without doing anything new (just a passthrough node), the depthMapFilter exit the computation without any error message:
[10:02:07.062795][info] Found 1 image dimension(s): [10:02:07.064612][info] - [1080x1920] [10:02:07.064612][info] Overall maximum dimension: [1080x1920] [10:02:07.064612][info] Filter depth maps. [10:02:07.064612][info] Precomputing groups.
I created my own passthrough node and it works without problems. What happens when you place it between Structurefrommotion and Preparedenscene for example? What code did you use prior the class?
If I put it between the DepthMap and DepthMapFilter it does not fail, in any other place it will fail. Could you send me the .py file to see if I am doing something wrong? My code is the following:
I only removed the two lines for the CustomLibs and the comma following the closing bracket for desc.File() No problems so far. If you need some code samples, take a look at my (messy ;) ) Meshroom node playground: https://github.com/natowi/meshroom_external_plugins/wiki/2-DevDoc
__version__ = "1.1"
import json
import os
from meshroom.core import desc
import sys
class passthroughNode(desc.Node):
inputs = [
desc.File(
name="input",
label="Input",
description="Input",
value="",
uid=[0],
)
]
def processChunk(self, chunk):
print ("Hi there")
I tested your exact code in a new file called the same as the function, but it continues happening... in Meshroom 2021, 2020 and 2019 (Windows). Have you tried it in Windows? Otherwise I can't see what could be the problem.
Maybe a conflict with your installed python environment?
But why it shows up in that condition and not in other? And how could I solve a conflict like this? (I tried deleting my Python environment variables for user and global and error continues happening).
This is something I also wanted to ask: If some node calls to a python which uses numpy, it gives me an error of not existing module. So how would I use external libraries? Can I install numpy in meshroom python? Or should I call a command line order to call my python.
This depends on how you run Meshroom. Do you run Meshroom from sources or from the binaries? In the first case it will run with your installed system libs, in the second case libs need to be added to a specific Meshroom folder.
I am running from the binaries, so some nodes don't have problem in calling python functions, but other (which uses numpy) does. So where and how should I include the Python numpy and other packages I want to use? Thank you.
Option 1 "patch" Meshroom
It is possible to add python packages to the binary installation by placing the needed libs in Meshroom-2021.1.0\lib Go to https://pypi.org/ and download the WHL (x64 and correct python version) Rename the whl to zip and extract it. Copy the extracted package folder (the one without the '.dist-info' at the end) into the 'lib' folder
Note on writing new nodes in this setup: For new python nodes, that are placed in Meshroom-2021.1.0\lib\meshroom\nodes\aliceVision Python will build .cpython-37.pyc files from the .py nodes It is not mendatory to use the same python in all nodes. You could use a custom python/virtualenv that you call from your node.
Option 2 Run Meshroom from Source
Download the Source Code here: https://github.com/alicevision/meshroom/archive/refs/tags/v2021.1.0.zip
Then add the aliceVision and qtPlugins folders with the binaries to the directory of the source code folder where the start.bat resides.
Install the dependencies: pip install -r requirements.txt -r dev_requirements.txt
Now you can start Meshroom from the start.bat
To build Meshroom binaries navigate to the Meshroom Source Folder and set the python path
set PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
Install dependencies:
pip install -r requirements.txt -r dev_requirements.txt --timeout 45
Build Meshroom UI
python setup.py build
Describe the bug DepthMapFilter node fails when adding a node (even if the node is empty) between CameraInit node and FeatureExtraction node.
To Reproduce Steps to reproduce the behavior:
Expected behavior I would expect it to work the same since I am not doing anything.
Screenshots
Desktop (please complete the following and other pertinent information):
Log
[08:45:11.280676][info] Found 1 image dimension(s): [08:45:11.281654][info] - [1080x1920] [08:45:11.284579][info] Overall maximum dimension: [1080x1920] [08:45:11.284579][info] Filter depth maps. [08:45:11.284579][info] Precomputing groups.
WARNING:root:Retrying to obtain clipboard.