Coder Social home page Coder Social logo

Correct version of open3d about stereodemo HOT 9 CLOSED

Seneral avatar Seneral commented on June 13, 2024
Correct version of open3d

from stereodemo.

Comments (9)

nburrus avatar nburrus commented on June 13, 2024

Thanks for the report, I've just added minimal versions to setup.cfg.

About the "nothing happens", are you running it with --oak? It might be failing to detect the device for some reasons? Can you try giving it files with e.g. stereodemo datasets/? Or just stereodemo if you installed the latest pip, that will load some images embedded in the pypi package.

from stereodemo.

Seneral avatar Seneral commented on June 13, 2024

Yep, ran it with --oak as shown in the logs (it seems it can find the camera). Running without arguments (since I installed with pip) still resulted in a blank window (e.g. no rendering, shows whatever was in the framebuffer before). Verified all other requirements were automatically installed to version equal or higher than the requirements listed.
One final, perhaps obvious idea, does it need an nvidia gpu? I'm running this on a laptop with AMD integrated graphics. Can try this on a PC /w nvidia graphics tomorrow as well.

from stereodemo.

nburrus avatar nburrus commented on June 13, 2024

Interesting, an Nvidia GPU should not be required no, besides my Linux with an Nvidia RTX 3090 I actually also tested it on my macbook, which has an AMD GPU. If CUDA can't be used, it should just fallback to CPU inference.

You might want to try open3d example visualization/text3d on the command line to see if the problem is actually with open3d. This should show a window with some text in 3D (it can take a long time to load on the first run).

from stereodemo.

Seneral avatar Seneral commented on June 13, 2024

Yep, that examples seems to work just fine, and started up immediately.

Just to confirm, it does download models at the beginning?
Again, it does say INFO: will store downloaded models in /home/user/.cache/stereodemo/models, but that folder is empty.
So maybe that fails or just takes very long (though I do have a decent internet connection)
EDIT: Network is barely used so I doubt it. Seems to use exactly one full thread (12.5%) and ~468MB of RAM though, and stays there.

from stereodemo.

Seneral avatar Seneral commented on June 13, 2024

Btw trying to run build_release.sh (modified to use bash) fails with No module named build.
I am unfamiliar with python build systems and have not found any relevant results, what do I need to do to install from source to debug this?

from stereodemo.

nburrus avatar nburrus commented on June 13, 2024

The models are downloaded as needed when you select a different algorithm in the UI. When you launch the program the default algorithm with OpenCV BM, which does not need to download anything. So it's normal that the folder stays empty at first.

build_release.sh is to build a wheel for pypi, if you just want to debug the code you can install it locally in edit mode:
pip install -e . while being in the top-level directory. Then I'd recommend something like Visual Studio Code to edit the code and run it in debug mode.

from stereodemo.

Seneral avatar Seneral commented on June 13, 2024

Ok found that the following two lines in visualizer.py make it hang forever:

cv2.namedWindow ("Input image", cv2.WINDOW_KEEPRATIO)
cv2.imshow ("Input image", np.hstack([input.left_image, input.right_image]))

First line hangs, if I comment it, the second line still hangs.
Without it I see the Open3D window saying "computing OpenCV BM" but that's hanging, too.
Python OpenCV reports a version of 4.5.1
However I also have libopencv installed via apt (4.2.0)
will definitely try on a different rig tomorrow

from stereodemo.

Seneral avatar Seneral commented on June 13, 2024

After commenting out all occurences of cv2 windows and imshow's, all methods seem to work fine (and no other cv2 methods are affected). Weird...

from stereodemo.

nburrus avatar nburrus commented on June 13, 2024

Ran into this issue today myself. It seems that OpenCV does not like to be initialized after importing the Open3D gui modules, I suspect some GL context snafu or something like that. Since OpenCV GUI was just being used to display a couple images we now use Open3D for that as well and the issue is gone.

For the records another fragile workaround was to call cv2.namedWindow once before importing the Open3D gui module to make sure OpenCV initialized the GUI stuff early enough.

from stereodemo.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.