after trying several workarounds to have a more or less performant (not freezing the network for too long) way of getting the channel values of a Float texture in TD (top.sample() / toptochop), I feel like there should/must be a better way to access the texture data within python for further manipulation on the cpu.
We do download the texture data is the most performant way possible using GL. Texture downloads are just slow on current GPUs, and particularly slow on Geforce level cards.
On the Python side though things could potentially get faster if we had a way to get an entire image into a single Python object, rather than requiring multiple calls to top.sample(). We’ve been considering this for a while, as well as a way to get texture data into a OpenCV python object directly. So far this work hasn’t been scheduled yet though. Thanks for your feedback!
I know this introduces some probably unwanted dependency, but a numpy array would probably be the fastest* anyways and that would already work for openCV if I’m not mistaken