apply some simple processing (rescaling, channel mix etc…) probably with OpenCV
feed a ComputationGraph
while staying GPU-side.
What’s the best way to do this while limiting memory copy/download/upload ? I can decode frames into OpenCV GpuMat, but then how to view the GpuMat as an INDArray (or the inverse : how to create a INDArray and build a GpuMat view ?)
AFAIK, that’s not possible at the moment because ND4J always requires GPU memory to be backed by a buffer in host memory, so you’ll need to transfer your data to CPU anyway.