Code Monkey home page Code Monkey logo

Comments (4)

dyisaev avatar dyisaev commented on September 6, 2024 1

just in case, for those who need to run the code not in Google Colab, but locally (or, worse, through SSH) - I figured it out. can share with those that might need it.

from gaze360.

horanyinora avatar horanyinora commented on September 6, 2024

Hey dyisaev,

I am currently having the same OpenGL.GL.shaders.ShaderValidationError. I would really appreciate it if you could share your code with me. I am planning to run this locally. Thanks in advance!

from gaze360.

dyisaev avatar dyisaev commented on September 6, 2024

Hi @horanyinora ,

here you go: visualization gist

It assumes you have already run DensePose (I did not follow the authors' installation instruction, used DensePose docker container instead).

The main trick is that Colab uses it's own specific libraries to work with OpenGL (lucid), and by some dark magic is able to compile and run OpenGL in the cloud without the screen access.

On a regular Ubuntu machine, OpenGL requires X-window subsystem to render).

So for that you need the 'glfw' library. (I don't remember exactly what I did - but I likely installed it through pip).

Then you need some dark magic of properly working with GLFW library, such as binding arrays of data to shaders. For that I edited a bit the render_frame function, you will see it's a little bit different from Colab version.

Finally, if you want to compile and run OpenGL remotely through ssh you will need VirtualGL package (since simple X forwarding will try to render OpenGL on your local machine).

Thanks, and let me know if this code gives you a correct visualization, since I am going to use it too.

from gaze360.

erkil1452 avatar erkil1452 commented on September 6, 2024

You can in principle get headless (no display) rendering working by switching the OpenGL to eGL (GPU accelerated) or OSMesa (SW only).

More info:

from gaze360.

Related Issues (20)

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.