BeamNG / BeamNGpy

Python API for BeamNG.tech
https://beamng.tech
MIT License
253 stars 45 forks source link

CUDA support for shared buffers? #204

Open MoreTore opened 1 year ago

MoreTore commented 1 year ago

Does beamng have the ability share GPU memory between processes for running inference on the cameras in real-time?

I need high-res, low latency YUV420 image stream at 20fps. The torque3d engine looks like it could support it but beamng needs to implement it

dstark481 commented 1 year ago

Hello,

We can use shared memory to achieve these streaming rates at those resolutions. Please have a look at the attached script which demonstrates how this can be done. You may need to adjust some numbers to get the rate set exactly as you like (this will depend on how powerful your hardware is), but the most important camera parameter here is to set the requested update time to 0.05s (20 FPS).

stream.zip

Best regards, BeamNG Tech Team