Compatibility nvenc and tensorflow

Video_Codec_SDK_11.0.10.zip

I have fork this project GitHub - jackersson/deep-learning-in-scale-workshop for my use case.

you must be add this option in command line -v /dev/shm:/dev/shm for start you docker and add export TF_ENABLE_GPU_GARBAGE_COLLECTION=false
pipeline 1 :
gst-launch-1.0 udpsrc port=9012 ! typefind ! queue ! tsdemux ! h264parse ! tee name=tee_nal tee_nal. ! queue ! nvh264dec ! capsfilter caps=video/x-raw(memory:GLMemory),format=NV12 ! glcolorconvert ! capsfilter caps=video/x-raw(memory:GLMemory),format=RGB
! gst_tf_detection name=detect config=“data/tf_object_api_cfg.yml” ! gldownload ! videoconvert ! capsfilter caps=“video/x-raw,format=NV12” ! shmsink socket-path=/dev/shm/input shm-size=159252480 wait-for-connection=false sync=true tee_nal. ! queue ! shmsink socket-path=/dev/shm/input_dec sync=true wait-for-connection=false

gst_tf_detection have been patched for accept this caps video/x-raw(memory:GLMemory)

start same docker with another pipeline :

gst-launch-1.0 shmsrc socket-path=/dev/shm/input_dec ! capssetter caps=video/x-h264 ! queue ! h264parse ! nvh264dec ! videoconvert ! autovideosink

when the tensorflow model is running, I observe freezes on the outputs ( /dev/shm/input_dec and /dev/shm/input). When it is not running, everything is functional