1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
FFmpeg/libavfilter/dnn
Guo, Yejun c4a3dbe726 dnn_backend_tf.c: add option sess_config for tf backend
TensorFlow C library accepts config for session options to
set different parameters for the inference. This patch exports
this interface.

The config is a serialized tensorflow.ConfigProto proto, so we need
two steps to use it:
1. generate the serialized proto with python (see script example below)
the output looks like: 0xab...cd
where 0xcd is the least significant byte and 0xab is the most significant byte.

2. pass the python script output into ffmpeg with
dnn_processing=options=sess_config=0xab...cd

The following script is an example to specify one GPU. If the system contains
3 GPU cards, the visible_device_list could be '0', '1', '2', '0,1' etc.
'0' does not mean physical GPU card 0, we need to try and see.
And we can also add more opitions here to generate more serialized proto.

script example to generate serialized proto which specifies one GPU:
import tensorflow as tf
gpu_options = tf.GPUOptions(visible_device_list='0')
config = tf.ConfigProto(gpu_options=gpu_options)
s = config.SerializeToString()
b = ''.join("%02x" % int(ord(b)) for b in s[::-1])
print('0x%s' % b)
2020-10-19 20:54:29 +08:00
..
dnn_backend_native_layer_avgpool.c dnn/native: add log error message 2020-08-25 13:03:46 +08:00
dnn_backend_native_layer_avgpool.h dnn/native: add log error message 2020-08-25 13:03:46 +08:00
dnn_backend_native_layer_conv2d.c dnn_backend_native_layer_conv2d.c: fix bug of loop boundary in single thread mode. 2020-09-20 12:30:47 +08:00
dnn_backend_native_layer_conv2d.h dnn/native: add native support for dense 2020-09-29 14:19:55 +08:00
dnn_backend_native_layer_dense.c dnn/native: add native support for dense 2020-09-29 14:19:55 +08:00
dnn_backend_native_layer_dense.h dnn/native: add native support for dense 2020-09-29 14:19:55 +08:00
dnn_backend_native_layer_depth2space.c dnn/native: add log error message 2020-08-25 13:03:46 +08:00
dnn_backend_native_layer_depth2space.h dnn/native: add log error message 2020-08-25 13:03:46 +08:00
dnn_backend_native_layer_mathbinary.c dnn/native: add log error message 2020-08-25 13:03:46 +08:00
dnn_backend_native_layer_mathbinary.h dnn/native: add log error message 2020-08-25 13:03:46 +08:00
dnn_backend_native_layer_mathunary.c dnn/native: add log error message 2020-08-25 13:03:46 +08:00
dnn_backend_native_layer_mathunary.h dnn/native: add log error message 2020-08-25 13:03:46 +08:00
dnn_backend_native_layer_maximum.c dnn/native: add log error message 2020-08-25 13:03:46 +08:00
dnn_backend_native_layer_maximum.h dnn/native: add log error message 2020-08-25 13:03:46 +08:00
dnn_backend_native_layer_pad.c dnn/native: add log error message 2020-08-25 13:03:46 +08:00
dnn_backend_native_layer_pad.h dnn/native: add log error message 2020-08-25 13:03:46 +08:00
dnn_backend_native_layers.c dnn/native: add native support for dense 2020-09-29 14:19:55 +08:00
dnn_backend_native_layers.h dnn/native: add log error message 2020-08-25 13:03:46 +08:00
dnn_backend_native.c libavfilter/dnn_backend_native: check mem allocation 2020-10-14 10:19:05 +08:00
dnn_backend_native.h dnn/native: add native support for dense 2020-09-29 14:19:55 +08:00
dnn_backend_openvino.c libavfilter/dnn/dnn_backend{openvino, tf}: check memory alloc non-NULL 2020-10-14 11:08:09 +08:00
dnn_backend_openvino.h dnn: put DNNModel.set_input and DNNModule.execute_model together 2020-09-21 21:26:56 +08:00
dnn_backend_tf.c dnn_backend_tf.c: add option sess_config for tf backend 2020-10-19 20:54:29 +08:00
dnn_backend_tf.h dnn: put DNNModel.set_input and DNNModule.execute_model together 2020-09-21 21:26:56 +08:00
dnn_interface.c dnn: add openvino as one of dnn backend 2020-07-02 09:36:34 +08:00
dnn_io_proc.c dnn: change dnn interface to replace DNNData* with AVFrame* 2020-09-21 21:26:56 +08:00
dnn_io_proc.h dnn: change dnn interface to replace DNNData* with AVFrame* 2020-09-21 21:26:56 +08:00
Makefile dnn/native: add native support for dense 2020-09-29 14:19:55 +08:00