[FFmpeg-devel] [PATCH 2/2] convert_from_tensorflow.py: support conv2d with dilation

Guo, Yejun yejun.guo at intel.com
Fri Aug 9 18:25:18 EEST 2019



> -----Original Message-----
> From: Guo, Yejun
> Sent: Tuesday, July 30, 2019 9:26 AM
> To: ffmpeg-devel at ffmpeg.org
> Cc: Guo, Yejun <yejun.guo at intel.com>
> Subject: [PATCH 2/2] convert_from_tensorflow.py: support conv2d with dilation
> 
> conv2d with dilation > 1 generates tens of nodes in graph, it is not
> easy to parse each node one by one, so we do special tricks to parse
> the conv2d layer.
> 
> Signed-off-by: Guo, Yejun <yejun.guo at intel.com>
> ---
>  tools/python/convert_from_tensorflow.py | 80
> ++++++++++++++++++++++++---------
>  1 file changed, 59 insertions(+), 21 deletions(-)

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 these new patches, I've uploaded to https://github.com/guoyejun/ffmpeg/tree/dnn0809. 
for your convenient, I also copy the oneline log here for each patch (from newer to older) with 4 patch sets.

7eced90 libavfilter/dnn: support multiple outputs for native mode
28a7054 libavfilter/dnn/dnn_backend_native: find the input operand according to input name

256e657 FATE/dnn: add unit test for layer maximum
8c616a0 libavfilter/dnn: add layer maximum for native mode.

8ec6c0c FATE/dnn: add unit test for dnn depth_to_space layer
09ef108 libavfilter/dnn: separate depth_to_space layer from dnn_backend_native.c to a new file
c65b59d FATE/dnn: add unit test for dnn conv2d layer
a5d69a7 libavfilter/dnn: separate conv2d layer from dnn_backend_native.c to a new file

202d323 dnn: export operand info in python script and load in c code
3c706a0 dnn: change .model file format to put layer number at the end of file
0256731 dnn: introduce dnn operand (in c code) to hold operand infos within network


Besides continuous dnn improvement, I also plan to add two generic video filters for dnn.
- a generic filter to process the content of AVFrame with different dnn networks.
and so the current specific filters such as vf_sr (some changes needed) and vf_derain are no longer needed, since they can be
included in this specific filter. And of course, in practice I'll not remove them.

- a generic filter to analyze the content of AVFrame to generate some side data with different dnn networks. The content of AVFrame does not change.
The application, which invokes the filter with a given dnn network, has the responsibility/knowledge to parse the side data (analyze result).



More information about the ffmpeg-devel mailing list