[FFmpeg-devel] [PATCH V2 1/2] libavfilter/dnn: add script to convert TensorFlow model (.pb) to native model (.model)
bygrandao at gmail.com
Tue Jun 11 22:43:22 EEST 2019
Em ter, 11 de jun de 2019 às 05:00, Guo, Yejun <yejun.guo at intel.com> escreveu:
> there are three options for the place to put these .py scripts.
> 1) at libavfilter/dnn/python/
> the point is to put all the dnn stuffs together
> 2) at tools/python/
> the point is that there is already a .py script under tools/
> 3) create a new project controlled by ffmpeg
> the point is that the python scripts should not be part of ffmpeg source tree.
> (btw, how to apply such sub project?)
I think option (2) is better as it is already there, even if (1) is
> My idea is that the script generates dnn native model file which is loaded by ffmpeg c code,
> it is better to put the script within the ffmpeg source tree, and all the dnn stuffs would be better to put together, thanks.
> anyway, I'm open to any option, just to make the progress continue ...
> > ping for review, thanks.
> > Here is my rough plan after this patch.
> > - move dnn relative .h/.c from libavfilter to libavfilter/dnn, it is expected there
> > will be more files for dnn module (code for both model loading and execution).
> > - add a layer for padding (tf.pad) for native mode and its fate test.
> > - change the script to add tf.pad support, and so the native model and the tf
> > model of vf_sr will be the same.
> > in current implementation, the two models have a little difference, it makes
> > the script not a general solution to convert tf model to native model.
> > - add layer maximum and fate test. This layer appears in tf model, but not in
> > native model, of vf_sr.
> > - introduce operand concept in native mode (both execution and model), to
> > support data split and merge/concat in the network, such split/concat is very
> > common.
> > it also makes possible to reuse memory for the intermediate data as the
> > output of the hidden layers.
> > - tune conv2d layer performance (it is very slow now) or add more layers for
> > native mode.
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-devel