lnstadrum / beatmup

Beatmup: image and signal processing library
GNU General Public License v3.0
199 stars 15 forks source link

How to generate GLSL? #1

Closed REDVM closed 4 years ago

REDVM commented 4 years ago

Hi,

Thanks for this nice project! How did you achieve to create the code for X2 resampler ConvNet in GLSL? Did you write it by hands or did you generate for your model?

Thank you!

lnstadrum commented 4 years ago

Hi Victor,

Thank you for your interest!

I used a Python script rendering GLSL code from a Keras model, which makes part of the following notebook containing the whole X2 experiment: https://gist.github.com/lnstadrum/0e2fec1e96bc6791f0ee3487969632ee

I am working now on the OpenGL backend running inference of user-defined networks and on the Python bindings of the library. With this, conversion tools generating GLSL from a keras model in Python naturally appear in the library. But this will take some time.

Thanks, lnstradrum

REDVM commented 4 years ago

I used a Python script rendering GLSL code from a Keras model, which makes part of the following notebook containing the whole X2 experiment: https://gist.github.com/lnstadrum/0e2fec1e96bc6791f0ee3487969632ee

Thank you for sharing that! I'm running a neural network on an old raspberry pi and wanted to execute that on the GPU.

I am working now on the OpenGL backend running inference of user-defined networks and on the Python bindings of the library. With this, conversion tools generating GLSL from a keras model in Python naturally appear in the library. But this will take some time.

That would be great. Other frameworks target mainly CUDA, so inference can be quite slow on edge devices. Keep up the good work!