OpenGL machine learning runs on low-end hardware


If you’ve studied any GPU-accelerated machine learning projects, you are certainly familiar with NVIDIA’s CUDA architecture. It also follows that you’ve checked prices online and know how expensive it can be to get a high-performance graphics card that supports this particular brand of parallel programming.

But what if you could do machine learning tasks on a GPU that didn’t use anything more exotic than OpenGL? That’s what [lnstadrum] It has been working on for some time as it would allow devices as lean as the original Raspberry Pi Zero to perform tasks like image classification much faster than they could with their CPU alone. The trick is to break up your math task into something that can be done using OpenGL shaders, which are generally designed to push video game graphics.

An example of the upscaling of X2’s neural network.

[lnstadrum] explains that OpenGL releases from the last decade or so are actually called Compute shader especially for executing any code. On boards like the Pi Zero, which only meets the OpenGL for Embedded Systems (GLES) 2.0 standard from 2007, this is unfortunately not an option.

Constructing the neural network to be compatible with these more constrained platforms was much more difficult, but the end result has far more interesting applications. In tests, both the Raspberry Pi Zero and several older Android smartphones were able to run a pre-trained image classification model at a respectable speed.

This is not just a thought experiment [lnstadrum] has an image processing framework called. released Beatmup Use these concepts that you can now play around with. The C ++ library has Java and Python bindings, and the documentation says it should run on pretty much anything. Included in the framework is a simple tool called X2 that can perform AI image upscaling on everything from your laptop’s integrated graphics card to your Raspberry Pi; This makes it a great way to learn about this fascinating application of machine learning.

To be honest, we’re a bit behind the ball in this case Beatmup published its first public release back in April of this year. It may have flown under the radar by now, but we believe this project has a lot of potential, and hope to see more of it as soon as it becomes known what impressive results it can produce even with the lowest hardware.

[Thanks to Ishan for the tip.]


Comments are closed.