Files
ffmpeg/libavfilter
Guo, Yejun 9bcf2aa477 vf_dnn_processing.c: add dnn backend openvino
We can try with the srcnn model from sr filter.
1) get srcnn.pb model file, see filter sr
2) convert srcnn.pb into openvino model with command:
python mo_tf.py --input_model srcnn.pb --data_type=FP32 --input_shape [1,960,1440,1] --keep_shape_ops

See the script at https://github.com/openvinotoolkit/openvino/tree/master/model-optimizer
We'll see srcnn.xml and srcnn.bin at current path, copy them to the
directory where ffmpeg is.

I have also uploaded the model files at https://github.com/guoyejun/dnn_processing/tree/master/models

3) run with openvino backend:
ffmpeg -i input.jpg -vf format=yuv420p,scale=w=iw*2:h=ih*2,dnn_processing=dnn_backend=openvino:model=srcnn.xml:input=x:output=srcnn/Maximum -y srcnn.ov.jpg
(The input.jpg resolution is 720*480)

Also copy the logs on my skylake machine (4 cpus) locally with openvino backend
and tensorflow backend. just for your information.

$ time ./ffmpeg -i 480p.mp4 -vf format=yuv420p,scale=w=iw*2:h=ih*2,dnn_processing=dnn_backend=tensorflow:model=srcnn.pb:input=x:output=y -y srcnn.tf.mp4
…
frame=  343 fps=2.1 q=31.0 Lsize=    2172kB time=00:00:11.76 bitrate=1511.9kbits/s speed=0.0706x
video:1973kB audio:187kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.517637%
[aac @ 0x2f5db80] Qavg: 454.353
real    2m46.781s
user    9m48.590s
sys     0m55.290s

$ time ./ffmpeg -i 480p.mp4 -vf format=yuv420p,scale=w=iw*2:h=ih*2,dnn_processing=dnn_backend=openvino:model=srcnn.xml:input=x:output=srcnn/Maximum -y srcnn.ov.mp4
…
frame=  343 fps=4.0 q=31.0 Lsize=    2172kB time=00:00:11.76 bitrate=1511.9kbits/s speed=0.137x
video:1973kB audio:187kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.517640%
[aac @ 0x31a9040] Qavg: 454.353
real    1m25.882s
user    5m27.004s
sys     0m0.640s

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2020-07-02 09:56:55 +08:00
..
2020-02-14 09:59:27 +01:00
2020-05-23 15:50:20 +02:00
2019-10-01 14:55:43 +02:00
2020-05-30 19:02:34 +08:00
2019-05-14 15:17:14 +02:00
2020-04-30 12:18:36 +02:00
2019-12-10 16:09:14 +01:00
2020-03-17 22:46:36 +01:00
2020-05-30 18:04:14 +02:00
2020-02-07 17:07:30 +01:00
2020-03-17 22:46:36 +01:00
2018-11-15 14:44:24 +01:00
2018-06-21 00:31:42 +01:00
2018-05-05 21:50:22 +02:00
2020-03-17 22:46:36 +01:00
2020-05-23 15:50:20 +02:00
2020-05-30 18:04:14 +02:00
2020-02-14 21:49:47 +01:00
2019-10-23 12:37:46 +02:00
2019-09-30 16:39:39 +02:00
2020-03-17 22:46:36 +01:00
2020-02-04 18:28:04 +01:00
2019-07-28 22:34:33 +01:00
2018-06-21 00:31:42 +01:00
2020-02-29 22:31:01 +01:00
2019-10-01 14:55:43 +02:00
2020-05-30 18:04:14 +02:00
2020-03-17 22:46:36 +01:00
2019-09-26 08:10:31 +08:00
2020-03-17 22:46:36 +01:00
2020-03-17 22:46:36 +01:00
2019-04-20 00:20:07 +02:00
2020-03-17 22:46:36 +01:00
2019-10-18 21:57:20 +02:00
2020-03-17 22:46:36 +01:00
2020-03-17 22:46:36 +01:00
2020-03-17 22:46:36 +01:00
2020-02-04 18:28:04 +01:00
2019-10-20 18:06:26 +02:00
2020-05-23 15:52:27 +02:00
2020-03-17 22:46:36 +01:00
2020-04-18 12:34:49 +02:00
2020-03-17 22:46:36 +01:00
2020-03-17 22:46:36 +01:00