[FFmpeg-devel] [PATCH 4/4] dnn: convert tf.pad to native model in python script, and load/execute it in the c code.

Guo, Yejun yejun.guo at intel.com
Wed Jul 24 10:34:20 EEST 2019



> -----Original Message-----
> From: Guo, Yejun
> Sent: Tuesday, July 16, 2019 1:56 PM
> To: ffmpeg-devel at ffmpeg.org
> Cc: Guo, Yejun <yejun.guo at intel.com>
> Subject: [PATCH 4/4] dnn: convert tf.pad to native model in python script, and
> load/execute it in the c code.
> 
> since tf.pad is enabled, the conv2d(valid) changes back to its original behavior.
> 
> Signed-off-by: Guo, Yejun <yejun.guo at intel.com>
> ---
>  libavfilter/dnn/dnn_backend_native.c    | 35
> +++++++++++++++++++++++++++++++++
>  libavfilter/dnn/dnn_backend_native.h    |  2 +-
>  tools/python/convert_from_tensorflow.py | 23 +++++++++++++++++-----
>  3 files changed, 54 insertions(+), 6 deletions(-)
> 
> diff --git a/libavfilter/dnn/dnn_backend_native.c
> b/libavfilter/dnn/dnn_backend_native.c
> index 82e900b..09c583b 100644
> --- a/libavfilter/dnn/dnn_backend_native.c
> +++ b/libavfilter/dnn/dnn_backend_native.c
> @@ -25,6 +25,7 @@

this patch set asks for review, thanks.

I've locally finished more patches to improve dnn module, plan to send more them set by set, since the patches have dependency.

Just in case you are interested in my new patches, I've uploaded to https://github.com/guoyejun/ffmpeg/tree/dnn0716. 
for your convenient, I also copy the oneline log here for each patch (from newer to older) with 3 patch sets.

50a3353 fate: add unit test for dnn depth_to_space layer
af9e3ab dnn: separate depth_to_space layer from dnn_backend_native.c to a new file
41b97e4 fate: add unit test for dnn conv2d layer
4143485 dnn: separate conv2d layer from dnn_backend_native.c to a new file

870383e dnn: export operand info in python script and load in c code
650d576 dnn: change .model file format to put layer number at the end of file
d029bf8 dnn: introduce dnn operand (in c code) to hold operand infos within network

c9b9e1c doc/filters: update how to generate native model for derain filter
064aa45 convert_from_tensorflow.py: support conv2d with dilation
1c419a5 convert_from_tensorflow.py: add option to dump graph for visualization in tensorboard




More information about the ffmpeg-devel mailing list