[FFmpeg-devel] [PATCH V7 2/3] lavfi/dnn: Modified DNN native backend related tools and docs.

2023-04-27 Thread Ting Fu
Will remove native backend, so change the default backend in filters, and also remove the python scripts which generate native model file. Signed-off-by: Ting Fu --- doc/filters.texi| 39 +- libavfilter/vf_derain.c | 2 +- libavfilter

[FFmpeg-devel] [PATCH V7 1/3] lavfi/dnn: modify dnn interface for removing native backend

2023-04-27 Thread Ting Fu
Native backend will be removed in following commits, so change the dnn interface and modify the error message in it first. Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_interface.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/libavfilter/dnn/dnn_interface.c b

[FFmpeg-devel] [PATCH 3/3] lavfi/dnn: add error info for TF backend filling task failure

2023-03-15 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_tf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/dnn/dnn_backend_tf.c b/libavfilter/dnn/dnn_backend_tf.c index 5d809a8694..bafd802abf 100644 --- a/libavfilter/dnn/dnn_backend_tf.c +++ b/libavfilter/dnn/dnn_backend_tf.c

[FFmpeg-devel] [PATCH 2/3] lavfi/dnn: fix mem leak in TF backend error handle

2023-03-15 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_tf.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavfilter/dnn/dnn_backend_tf.c b/libavfilter/dnn/dnn_backend_tf.c index fb1a5f1350..5d809a8694 100644 --- a/libavfilter/dnn/dnn_backend_tf.c +++ b/libavfilter/dnn

[FFmpeg-devel] [PATCH 1/3] lavfi/dnn: fix corruption when TF backend infer failed

2023-03-15 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_tf.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_tf.c b/libavfilter/dnn/dnn_backend_tf.c index 3b5084b67b..fb1a5f1350 100644 --- a/libavfilter/dnn/dnn_backend_tf.c +++ b

[FFmpeg-devel] [PATCH V6 2/3] lavfi/dnn: Modified DNN native backend related tools and docs.

2023-03-06 Thread Ting Fu
Deleted the native backend related files in 'tools' dir. Modify its' docs and codes mentioned in such docs. Signed-off-by: Ting Fu --- doc/filters.texi| 39 +- libavfilter/vf_derain.c | 2 +- libavfilter/vf_dnn_processing.

[FFmpeg-devel] [PATCH V6 1/3] lavfi/dnn: Mark native backend as unsupported

2023-03-06 Thread Ting Fu
Native is deprecated value for backed_type option. Modify related error message. Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_interface.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/libavfilter/dnn/dnn_interface.c b/libavfilter/dnn/dnn_interface.c index

[FFmpeg-devel] [PATCH V5 2/3] lavfi/dnn: Modified DNN native backend related tools and docs.

2023-02-06 Thread Ting Fu
Deleted the native backend related files in 'tools' dir. Modify its' docs and codes mentioned in such docs. Signed-off-by: Ting Fu --- doc/filters.texi| 43 +- libavfilter/vf_derain.c | 2 +- libavfilter/vf_dnn_processing.

[FFmpeg-devel] [PATCH V5 1/3] lavfi/dnn: Mark native backend as unsupported

2023-02-06 Thread Ting Fu
Native is deprecated value for backed_type option. Modify related error message. Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_interface.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/libavfilter/dnn/dnn_interface.c b/libavfilter/dnn/dnn_interface.c index

[FFmpeg-devel] [PATCH V4 2/3] lavfi/dnn: Delete DNN native backend releated tools and docs.

2023-01-06 Thread Ting Fu
Signed-off-by: Ting Fu --- doc/filters.texi| 43 +- tools/python/convert.py | 56 --- tools/python/convert_from_tensorflow.py | 607 tools/python/convert_header.py | 26 - 4 files changed, 4 insertions(+), 728 deletions

[FFmpeg-devel] [PATCH V4 1/3] lavfi/dnn: Mark native backend as unsupported

2023-01-06 Thread Ting Fu
Native is deprecated value for backed_type option. Modify realted error message. Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_interface.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/libavfilter/dnn/dnn_interface.c b/libavfilter/dnn/dnn_interface.c index

[FFmpeg-devel] [PATCH V3 2/3] lavfi/dnn: Delete DNN native backend releated tools and docs.

2023-01-06 Thread Ting Fu
Signed-off-by: Ting Fu --- doc/filters.texi| 43 +- tools/python/convert.py | 56 --- tools/python/convert_from_tensorflow.py | 607 tools/python/convert_header.py | 26 - 4 files changed, 4 insertions(+), 728 deletions

[FFmpeg-devel] [PATCH V3 1/3] lavfi/dnn: Mark native backend as deprecated

2023-01-06 Thread Ting Fu
Mark native as deprecated for backed_type option. Modify realted error message. Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_interface.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/libavfilter/dnn/dnn_interface.c b/libavfilter/dnn/dnn_interface.c index

[FFmpeg-devel] [PATCH V2 1/2] lavfi/dnn: Modify error message for incorrect backend_type

2023-01-02 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/dnn/dnn_interface.c b/libavfilter/dnn/dnn_interface.c index 554a36b0dc..fa484c0905 100644 --- a/libavfilter/dnn/dnn_interface.c +++ b/libavfilter/dnn

[FFmpeg-devel] [PATCH 1/2] lavfi/dnn: Modify error message for incorrect backend_type

2022-12-30 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/dnn/dnn_interface.c b/libavfilter/dnn/dnn_interface.c index 554a36b0dc..fa484c0905 100644 --- a/libavfilter/dnn/dnn_interface.c +++ b/libavfilter/dnn

[FFmpeg-devel] [PATCH] lavfi/dnn: Fix OpenVINO missing model file corrupt issue.

2022-08-04 Thread Ting Fu
DNN OpenVINO backend would not report missing model file if it does not exist. It would corrupt directly with out any error infomation. This commit would check both .xml and .bin file existance before loading model. Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_openvino.c | 20

[FFmpeg-devel] [PATCH V2] lavf/dnn: dump OpenVINO model input/output names to OVMdel struct.

2022-07-21 Thread Ting Fu
Dump all input/output names to OVModel struct. In case other funcs use them for reporting errors or locating issues. Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_openvino.c | 66 +++--- 1 file changed, 48 insertions(+), 18 deletions(-) diff --git a/libavfilter/dnn

[FFmpeg-devel] [PATCH] lavf/dnn: refine the error log of OpenVINO incorrect input/output name.

2022-06-27 Thread Ting Fu
Refine the error report of OpenVINO backend incorrect input or output node name, help the users to locate issue. Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_openvino.c | 54 ++ 1 file changed, 47 insertions(+), 7 deletions(-) diff --git a/libavfilter/dnn

[FFmpeg-devel] [PATCH] lavf/sr: fix the segmentation fault caused by incorrect input frame free.

2022-06-27 Thread Ting Fu
This issue would cause segmetaion fault when running srcnn model with sr filter by TensorFlow backend. This filter would free the frame incorectly. Signed-off-by: Ting Fu --- libavfilter/vf_sr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_sr.c b

[FFmpeg-devel] [PATCH 2/2] libavfi/dnn: add LibTorch as one of DNN backend

2022-05-23 Thread Ting Fu
, torch.jit.trace() is not recommanded, since it does not support ambiguous input size. Signed-off-by: Ting Fu --- configure | 7 +- libavfilter/dnn/Makefile | 1 + libavfilter/dnn/dnn_backend_torch.cpp | 567 ++ libavfilter/dnn

[FFmpeg-devel] [PATCH 1/2] libavfi/dnn: refine enum DNNColorOrder

2022-05-23 Thread Ting Fu
Change the DCO_RGB and DCO_BGR color order in DNNColorOrder to DCO_RGB_PACKED and DCO_GBR_PACKED for following RGB planar support. Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_openvino.c | 2 +- libavfilter/dnn/dnn_backend_tf.c | 2 +- libavfilter/dnn/dnn_io_proc.c | 4

[FFmpeg-devel] [PATCH 2/2] lavfi/vf_drawtext.c: fix CID 1485003

2021-06-03 Thread Ting Fu
CID 1485003: Memory - illegal accesses (UNINIT) Using uninitialized value "sd". Signed-off-by: Ting Fu --- libavfilter/vf_drawtext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index 382d589e26..c4c0989

[FFmpeg-devel] [PATCH 1/2] lavfi/vf_drawbox.c: fix CID 1485004

2021-06-03 Thread Ting Fu
CID 1485004: Uninitialized variables (UNINIT) Using uninitialized value "x" when calling "*pixel_belongs_to_region". Signed-off-by: Ting Fu --- libavfilter/vf_drawbox.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_drawbox.c b/liba

[FFmpeg-devel] [PATCH 3/3] libavfilter: vf_drawtext filter support draw text with detection bounding boxes in side_data

2021-05-14 Thread Ting Fu
label,drawbox=box_source= side_data_detection_bboxes,drawtext=text_source=side_data_detection_bboxes:fontcolor=green:\ fontsize=40, -y face_detect.jpeg Please note, the default fontsize of vf_drawtext is 12, which may be too small to be seen clearly. Signed-off-by: Ting Fu --- doc/filters

[FFmpeg-devel] [PATCH 2/3] libavfilter: vf_drawbox filter support draw box with detection bounding boxes in side_data

2021-05-14 Thread Ting Fu
label,\ drawbox=box_source=side_data_detection_bboxes -y face_detect.jpeg Signed-off-by: Ting Fu --- doc/filters.texi | 8 +++ libavfilter/vf_drawbox.c | 52 ++-- 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/doc/filters.texi

[FFmpeg-devel] [PATCH 1/3] lavfi/drawbox: refine code

2021-05-14 Thread Ting Fu
Extract common code of filter_frame() and drawgrid_filter_frame() to draw_region(). Signed-off-by: Ting Fu --- libavfilter/vf_drawbox.c | 160 ++- 1 file changed, 58 insertions(+), 102 deletions(-) diff --git a/libavfilter/vf_drawbox.c b/libavfilter

[FFmpeg-devel] [PATCH V2 4/4] dnn/vf_dnn_detect: add tensorflow output parse support

2021-05-06 Thread Ting Fu
, 458), label: 1, confidence: 8033/1. [Parsed_showinfo_1 @ 0x33e65f0] index: 3, region: (342, 0) -> (690, 325), label: 1, confidence: 5878/1. There are two boxes of dog with cores 94.05% & 93.45% and two boxes of person with scores 80.33% & 58.78%. Signed-of

[FFmpeg-devel] [PATCH V2 3/4] lavfi/dnn_backend_tensorflow: support detect model

2021-05-06 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_tf.c | 39 ++-- libavfilter/vf_dnn_detect.c | 32 +- 2 files changed, 63 insertions(+), 8 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_tf.c b/libavfilter/dnn/dnn_backend_tf.c

[FFmpeg-devel] [PATCH V2 2/4] lavfi/dnn_backend_tensorflow: add multiple outputs support

2021-05-06 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_tf.c | 49 ++--- libavfilter/dnn_filter_common.c | 53 ++-- libavfilter/dnn_filter_common.h | 6 ++-- libavfilter/vf_derain.c | 2 +- libavfilter/vf_sr.c | 2

[FFmpeg-devel] [PATCH V2 1/4] dnn: add DCO_RGB color order to enum DNNColorOrder

2021-05-06 Thread Ting Fu
Adding DCO_RGB color order to DNNColorOrder, since tensorflow model needs this kind of color oder as input. Signed-off-by: Ting Fu --- V2: Rebase patch to latest code libavfilter/dnn/dnn_backend_tf.c | 1 + libavfilter/dnn/dnn_io_proc.c| 14 +++--- libavfilter/dnn_interface.h

[FFmpeg-devel] [PATCH 4/4] dnn/vf_dnn_detect: add tensorflow output parse support

2021-04-29 Thread Ting Fu
, 458), label: 1, confidence: 8033/1. [Parsed_showinfo_1 @ 0x33e65f0] index: 3, region: (342, 0) -> (690, 325), label: 1, confidence: 5878/1. There are two boxes of dog with cores 94.05% & 93.45% and two boxes of person with scores 80.33% & 58.78%. Signed-of

[FFmpeg-devel] [PATCH 3/4] lavfi/dnn_backend_tensorflow: support detect model

2021-04-29 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_tf.c | 39 ++-- libavfilter/vf_dnn_detect.c | 32 +- 2 files changed, 63 insertions(+), 8 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_tf.c b/libavfilter/dnn/dnn_backend_tf.c

[FFmpeg-devel] [PATCH 2/4] lavfi/dnn_backend_tensorflow: add multiple outputs support

2021-04-29 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_tf.c | 49 libavfilter/dnn_filter_common.c | 45 + libavfilter/dnn_filter_common.h | 6 ++-- libavfilter/vf_derain.c | 2 +- libavfilter/vf_sr.c | 2

[FFmpeg-devel] [PATCH 1/4] dnn: add DCO_RGB color order to enum DNNColorOrder

2021-04-29 Thread Ting Fu
Adding DCO_RGB color order to DNNColorOrder, since tensorflow model needs this kind of color oder as input. Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_tf.c | 1 + libavfilter/dnn/dnn_io_proc.c| 14 +++--- libavfilter/dnn_interface.h | 1 + 3 files changed, 13

[FFmpeg-devel] [PATCH 3/3] lavfi/dnn_backend_tensorflow.c: fix mem leak in execute_model_tf

2021-03-24 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_tf.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavfilter/dnn/dnn_backend_tf.c b/libavfilter/dnn/dnn_backend_tf.c index c18cb4063f..c0aa510630 100644 --- a/libavfilter/dnn/dnn_backend_tf.c +++ b/libavfilter/dnn

[FFmpeg-devel] [PATCH 2/3] lavfi/dnn_backend_tensorflow.c: fix mem leak in load_native_model

2021-03-24 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_tf.c | 55 ++-- 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_tf.c b/libavfilter/dnn/dnn_backend_tf.c index e016571304..c18cb4063f 100644 --- a/libavfilter/dnn

[FFmpeg-devel] [PATCH 1/3] lavfi/dnn_backend_tensorflow.c: fix mem leak in load_tf_model

2021-03-24 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_tf.c | 8 1 file changed, 8 insertions(+) diff --git a/libavfilter/dnn/dnn_backend_tf.c b/libavfilter/dnn/dnn_backend_tf.c index 750a476726..e016571304 100644 --- a/libavfilter/dnn/dnn_backend_tf.c +++ b/libavfilter/dnn

[FFmpeg-devel] [PATCH V3 3/3] dnn/openvino: support model input resize

2021-01-17 Thread Ting Fu
video_name.mp4 -vf dnn_processing=dnn_backend=openvino:\ model=model_name.xml:input=input_name:output=output_name:\ options=device=CPU\&input_resizable=1 -y output_video_name.mp4 Signed-off-by: Ting Fu --- V3: rebase to latest code and add missing code libavfilter

[FFmpeg-devel] [PATCH V3 2/3] dnn/openvino: refine code for better model initialization

2021-01-17 Thread Ting Fu
Move openvino model/inference request creation and initialization steps from ff_dnn_load_model_ov to new function init_model_ov, for later input resize support. Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_openvino.c | 203 ++--- 1 file changed, 118 insertions

[FFmpeg-devel] [PATCH V3 1/3] dnn/openvino: remove unnecessary code

2021-01-17 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_openvino.c | 8 1 file changed, 8 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn/dnn_backend_openvino.c index 5271d1caa5..8476f4fb38 100644 --- a/libavfilter/dnn/dnn_backend_openvino.c +++ b

[FFmpeg-devel] [PATCH V2 2/3] dnn/openvino: refine code for better model initialization

2021-01-15 Thread Ting Fu
Move openvino model/inference request creation and initialization steps from ff_dnn_load_model_ov to new function init_model_ov, for later input resize support. Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_openvino.c | 196 ++--- 1 file changed, 111 insertions

[FFmpeg-devel] [PATCH V2 1/3] dnn/openvino: remove unnecessary code

2021-01-15 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_openvino.c | 8 1 file changed, 8 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn/dnn_backend_openvino.c index 5271d1caa5..8476f4fb38 100644 --- a/libavfilter/dnn/dnn_backend_openvino.c +++ b

[FFmpeg-devel] [PATCH V2 3/3] dnn/openvino: support model input resize

2021-01-15 Thread Ting Fu
video_name.mp4 -vf dnn_processing=dnn_backend=openvino:\ model=model_name.xml:input=input_name:output=output_name:\ options=device=CPU\&input_resizable=1 -y output_video_name.mp4 Signed-off-by: Ting Fu --- V2: rebase to latest code libavfilter/dnn/dnn_backend_openvino.c

[FFmpeg-devel] [PATCH 3/3] dnn/openvino: support model input resize

2021-01-10 Thread Ting Fu
video_name.mp4 -vf dnn_processing=dnn_backend=openvino:\ model=model_name.xml:input=input_name:output=output_name:\ options=device=CPU\&input_resizable=1 -y output_video_name.mp4 Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_openvino.c | 21 +++-- 1 file changed

[FFmpeg-devel] [PATCH 2/3] dnn/openvino: refine code for better model initialization

2021-01-10 Thread Ting Fu
Move openvino model/inference request creation and initialization steps from ff_dnn_load_model_ov to new function init_model_ov, for later input resize support. Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_openvino.c | 153 +++-- 1 file changed, 93 insertions

[FFmpeg-devel] [PATCH 1/3] dnn/openvino: remove unnecessary code

2021-01-10 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_openvino.c | 8 1 file changed, 8 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn/dnn_backend_openvino.c index d27e451eea..050be97209 100644 --- a/libavfilter/dnn/dnn_backend_openvino.c +++ b

[FFmpeg-devel] [PATCH] dnn: add NV12 pixel format support

2020-12-18 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_io_proc.c | 2 ++ libavfilter/vf_dnn_processing.c | 30 +- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/libavfilter/dnn/dnn_io_proc.c b/libavfilter/dnn/dnn_io_proc.c index c9b49be3bd..2744cb6502

[FFmpeg-devel] [PATCH 1/2] dnn/openvino: support run inference via GPU

2020-09-08 Thread Ting Fu
detailed steps please refer: https://github.com/openvinotoolkit/openvino/blob/master/build-instruction.md inference model with GPU please add: optioins=device=GPU Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_openvino.c | 52 ++ 1 file changed, 44 insertions(+), 8

[FFmpeg-devel] [PATCH 2/2] dnn/openvino: add input/output name info

2020-09-08 Thread Ting Fu
show all input/output names when the input or output name not correct Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_openvino.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn

[FFmpeg-devel] [PATCH 1/2] dnn/openvino: add log error message

2020-08-26 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_openvino.c | 51 ++ 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn/dnn_backend_openvino.c index 034dee1839..5d6d3ed542 100644 --- a/libavfilter

[FFmpeg-devel] [PATCH 2/2] dnn/tensorflow: add log error message

2020-08-26 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_tf.c | 59 ++-- 1 file changed, 57 insertions(+), 2 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_tf.c b/libavfilter/dnn/dnn_backend_tf.c index bdc90d5063..5e7f37bb12 100644 --- a/libavfilter/dnn

[FFmpeg-devel] [PATCH V5 2/2] dnn/native: add log error message

2020-08-24 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native.c | 55 +++ libavfilter/dnn/dnn_backend_native.h | 5 ++ .../dnn/dnn_backend_native_layer_avgpool.c| 10 +++- .../dnn/dnn_backend_native_layer_avgpool.h| 2 +- .../dnn

[FFmpeg-devel] [PATCH V5 1/2] dnn/native: unify error return to DNN_ERROR

2020-08-24 Thread Ting Fu
Unify all error return as DNN_ERROR, in order to cease model executing when return error in ff_dnn_execute_model_native layer_func.pf_exec Signed-off-by: Ting Fu --- V5: rebase to latest code libavfilter/dnn/dnn_backend_native.c | 10 ++ libavfilter/dnn

[FFmpeg-devel] [PATCH V4 2/2] dnn/native: add log error message

2020-08-23 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native.c | 59 +++ libavfilter/dnn/dnn_backend_native.h | 5 ++ .../dnn/dnn_backend_native_layer_avgpool.c| 10 +++- .../dnn/dnn_backend_native_layer_avgpool.h| 2 +- .../dnn

[FFmpeg-devel] [PATCH V4 1/2] dnn/native: unify error return to DNN_ERROR

2020-08-23 Thread Ting Fu
Unify all error return as DNN_ERROR, in order to cease model executing when return error in ff_dnn_execute_model_native layer_func.pf_exec Signed-off-by: Ting Fu --- V4: Rename NetworkContext to NativeContext Move pf_exec return DNN_ERROR from PATCH 2/2 to 1/2 libavfilter/dnn

[FFmpeg-devel] [PATCH V3 2/2] dnn/native: add log error message

2020-08-20 Thread Ting Fu
Signed-off-by: Ting Fu --- V3: 1. modify log_ctx of NativeModel to non-pointer 2. modify log_ctx of NativeModel to ctx 3. delete empty line libavfilter/dnn/dnn_backend_native.c | 67 ++- libavfilter/dnn/dnn_backend_native.h | 5 ++ .../dnn

[FFmpeg-devel] [PATCH V3 1/2] dnn/native: unify error return to DNN_ERROR

2020-08-20 Thread Ting Fu
Unify all error return as DNN_ERROR, in order to cease model executing when return error in ff_dnn_execute_model_native layer_func.pf_exec Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native_layer_avgpool.c | 2 +- libavfilter/dnn/dnn_backend_native_layer_conv2d.c | 4

[FFmpeg-devel] [PATCH] dnn/native: rename struct ConvolutionalNetwork to NativeModel

2020-08-19 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native.c | 112 +-- libavfilter/dnn/dnn_backend_native.h | 4 +- libavfilter/dnn/dnn_backend_tf.c | 24 +++--- 3 files changed, 70 insertions(+), 70 deletions(-) diff --git a/libavfilter/dnn

[FFmpeg-devel] [PATCH V2] dnn/native: add log error message

2020-08-16 Thread Ting Fu
Signed-off-by: Ting Fu --- V2: Fix the issue in V1: make fate failed libavfilter/dnn/dnn_backend_native.c | 74 +++ libavfilter/dnn/dnn_backend_native.h | 5 ++ .../dnn/dnn_backend_native_layer_avgpool.c| 2 +- .../dnn

[FFmpeg-devel] [PATCH] dnn/native: add log error message

2020-08-14 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native.c | 74 +++ libavfilter/dnn/dnn_backend_native.h | 5 ++ .../dnn/dnn_backend_native_layer_avgpool.c| 2 +- .../dnn/dnn_backend_native_layer_avgpool.h| 2 +- .../dnn

[FFmpeg-devel] [PATCH V7 2/2] FATE/dnn: add unit test for dnn avgpool layer

2020-08-09 Thread Ting Fu
'make fate-dnn-layer-avgpool' to run the test Signed-off-by: Ting Fu --- tests/dnn/.gitignore | 1 + tests/dnn/Makefile | 1 + tests/dnn/dnn-layer-avgpool-test.c | 197 + tests/fate/dnn.mak | 5 + 4 fil

[FFmpeg-devel] [PATCH V7 1/2] dnn/native: add native support for avg_pool

2020-08-09 Thread Ting Fu
Not support pooling strides in channel dimension yet. Signed-off-by: Ting Fu --- libavfilter/dnn/Makefile | 1 + libavfilter/dnn/dnn_backend_native.h | 2 + .../dnn/dnn_backend_native_layer_avgpool.c| 141 ++ .../dnn

[FFmpeg-devel] [PATCH V6 2/2] FATE/dnn: add unit test for dnn avgpool layer

2020-08-04 Thread Ting Fu
'make fate-dnn-layer-avgpool' to run the test Signed-off-by: Ting Fu --- V6: Fix the issue of make fate failed in V4&V5 tests/dnn/.gitignore | 1 + tests/dnn/Makefile | 1 + tests/dnn/dnn-layer-avgpool-test.c | 198 +++

[FFmpeg-devel] [PATCH V6 1/2] dnn/native: add native support for avg_pool

2020-08-04 Thread Ting Fu
/python/convert.py to generate image_process.model\n") output = sess.run(y, feed_dict={x: in_data}) imageio.imsave("out.jpg", np.squeeze(output)) Signed-off-by: Ting Fu --- libavfilter/dnn/Makefile | 1 + libavfilter/dnn/dnn_backend_native.h

[FFmpeg-devel] [PATCH V5 2/2] FATE/dnn: add unit test for dnn avgpool layer

2020-08-04 Thread Ting Fu
'make fate-dnn-layer-avgpool' to run the test Signed-off-by: Ting Fu --- V5: Fix the issue V4 make fate failed. tests/dnn/.gitignore | 1 + tests/dnn/Makefile | 1 + tests/dnn/dnn-layer-avgpool-test.c | 202 + tests/fa

[FFmpeg-devel] [PATCH V5 1/2] dnn/native: add native support for avg_pool

2020-08-04 Thread Ting Fu
/python/convert.py to generate image_process.model\n") output = sess.run(y, feed_dict={x: in_data}) imageio.imsave("out.jpg", np.squeeze(output)) Signed-off-by: Ting Fu --- libavfilter/dnn/Makefile | 1 + libavfilter/dnn/dnn_backend_native.h

[FFmpeg-devel] [PATCH V4 1/2] dnn/native: add native support for avg_pool

2020-08-04 Thread Ting Fu
/python/convert.py to generate image_process.model\n") output = sess.run(y, feed_dict={x: in_data}) imageio.imsave("out.jpg", np.squeeze(output)) Signed-off-by: Ting Fu --- libavfilter/dnn/Makefile | 1 + libavfilter/dnn/dnn_backend_native.h

[FFmpeg-devel] [PATCH V4 2/2] FATE/dnn: add unit test for dnn avgpool layer

2020-08-04 Thread Ting Fu
'make fate-dnn-layer-avgpool' to run the test Signed-off-by: Ting Fu --- tests/dnn/.gitignore | 1 + tests/dnn/Makefile | 1 + tests/dnn/dnn-layer-avgpool-test.c | 202 + tests/fate/dnn.mak | 5 + 4 fil

[FFmpeg-devel] [PATCH V3 2/2] FATE/dnn: add unit test for dnn avgpool layer

2020-07-30 Thread Ting Fu
'make fate-dnn-layer-avgpool' to run the test Signed-off-by: Ting Fu --- tests/dnn/.gitignore | 1 + tests/dnn/Makefile | 1 + tests/dnn/dnn-layer-avgpool-test.c | 202 + tests/fate/dnn.mak | 5 + 4 fil

[FFmpeg-devel] [PATCH V3 1/2] dnn/native: add native support for avg_pool

2020-07-30 Thread Ting Fu
/python/convert.py to generate image_process.model\n") output = sess.run(y, feed_dict={x: in_data}) imageio.imsave("out.jpg", np.squeeze(output)) Signed-off-by: Ting Fu --- libavfilter/dnn/Makefile | 1 + libavfilter/dnn/dnn_backend_native.h

[FFmpeg-devel] [PATCH V2 1/2] dnn/native: add native support for avg_pool

2020-07-29 Thread Ting Fu
/python/convert.py to generate image_process.model\n") output = sess.run(y, feed_dict={x: in_data}) imageio.imsave("out.jpg", np.squeeze(output)) Signed-off-by: Ting Fu --- libavfilter/dnn/Makefile | 1 + libavfilter/dnn/dnn_backend_native.h

[FFmpeg-devel] [PATCH V2 2/2] FATE/dnn: add unit test for dnn avgpool layer

2020-07-29 Thread Ting Fu
'make fate-dnn-layer-avgpool' to run the test Signed-off-by: Ting Fu --- tests/dnn/.gitignore | 1 + tests/dnn/Makefile | 1 + tests/dnn/dnn-layer-avgpool-test.c | 202 + tests/fate/dnn.mak | 5 + 4 fil

[FFmpeg-devel] [PATCH 2/2] FATE/dnn: add unit test for dnn avgpool layer

2020-07-17 Thread Ting Fu
'make fate-dnn-layer-avgpool' to run the test Signed-off-by: Ting Fu --- tests/dnn/.gitignore | 1 + tests/dnn/Makefile | 1 + tests/dnn/dnn-layer-avgpool-test.c | 202 + tests/fate/dnn.mak | 5 + 4 fil

[FFmpeg-devel] [PATCH 1/2] dnn/native: add native support for avg_pool

2020-07-17 Thread Ting Fu
l\n") output = sess.run(y, feed_dict={x: in_data}) imageio.imsave("out.jpg", np.squeeze(output)) Signed-off-by: Ting Fu --- libavfilter/dnn/Makefile | 1 + libavfilter/dnn/dnn_backend_native.h | 2 + .../dnn/dnn_backend_native_layer_avgpool.c|

[FFmpeg-devel] [PATCH V3] tests/dnn/mathunary: fix the issue of NAN

2020-07-07 Thread Ting Fu
When one of output[i] & expected_output is NAN, the unit test will always pass. Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-te

[FFmpeg-devel] [PATCH V2] tests/dnn/mathunary: fix the issue of NAN

2020-07-07 Thread Ting Fu
When one of output[i] & expected_output is NAN, the unit test will always pass. Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-te

[FFmpeg-devel] [PATCH] tests/dnn/mathunary: fix the issue of NAN

2020-07-02 Thread Ting Fu
When one of output[i] & expected_output is NAN, the unit test will always pass. Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-te

[FFmpeg-devel] [PATCH V2 12/12] dnn-layer-math-unary-test: add unit test for atanh

2020-06-29 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index 5587e47ad5..683e623d95 100644 --- a/tests/dnn/dnn-layer-mathunary

[FFmpeg-devel] [PATCH V2 08/12] dnn-layer-math-unary-test: add unit test for asinh

2020-06-29 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index 6885b4d318..90fce71a0c 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn

[FFmpeg-devel] [PATCH V2 07/12] dnn_backend_native_layer_mathunary: add asinh support

2020-06-29 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native_layer_mathunary.c | 4 libavfilter/dnn/dnn_backend_native_layer_mathunary.h | 1 + tools/python/convert_from_tensorflow.py | 2 +- tools/python/convert_header.py | 2 +- 4 files changed, 7

[FFmpeg-devel] [PATCH V2 11/12] dnn_backend_native_layer_mathunary: add atanh support

2020-06-29 Thread Ting Fu
t']) tf.train.write_graph(graph_def, '.', 'image_process.pb', as_text=False) print("image_process.pb generated, please use \ path_to_ffmpeg/tools/python/convert.py to generate image_process.model\n") output = sess.run(y, feed_dict={x: in_data}) imageio.imsave("

[FFmpeg-devel] [PATCH V2 09/12] dnn_backend_native_layer_mathunary: add acosh support

2020-06-29 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native_layer_mathunary.c | 4 libavfilter/dnn/dnn_backend_native_layer_mathunary.h | 1 + tools/python/convert_from_tensorflow.py | 2 +- tools/python/convert_header.py | 2 +- 4 files changed, 7

[FFmpeg-devel] [PATCH V2 06/12] dnn-layer-math-unary-test: add unit test for tanh

2020-06-29 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index 0280debc0b..6885b4d318 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn

[FFmpeg-devel] [PATCH V2 10/12] dnn-layer-math-unary-test: add unit test for acosh

2020-06-29 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index 90fce71a0c..5587e47ad5 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn

[FFmpeg-devel] [PATCH V2 05/12] dnn_backend_native_layer_mathunary: add tanh support

2020-06-29 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native_layer_mathunary.c | 4 libavfilter/dnn/dnn_backend_native_layer_mathunary.h | 1 + tools/python/convert_from_tensorflow.py | 2 +- tools/python/convert_header.py | 2 +- 4 files changed, 7

[FFmpeg-devel] [PATCH V2 04/12] dnn-layer-math-unary-test: add unit test for cosh

2020-06-29 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index a1ff05e5fb..0280debc0b 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn

[FFmpeg-devel] [PATCH V2 02/12] dnn-layer-math-unary-test: add unit test for sinh

2020-06-29 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index bf77c44bbe..a1ff05e5fb 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn

[FFmpeg-devel] [PATCH V2 01/12] dnn_backend_native_layer_mathunary: add sinh support

2020-06-29 Thread Ting Fu
Signed-off-by: Ting Fu --- V2: Add more test number Fix incorrect atanh unit test libavfilter/dnn/dnn_backend_native_layer_mathunary.c | 4 libavfilter/dnn/dnn_backend_native_layer_mathunary.h | 1 + tools/python/convert_from_tensorflow.py | 2 +- tools/python

[FFmpeg-devel] [PATCH V2 03/12] dnn_backend_native_layer_mathunary: add cosh support

2020-06-29 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native_layer_mathunary.c | 4 libavfilter/dnn/dnn_backend_native_layer_mathunary.h | 1 + tools/python/convert_from_tensorflow.py | 2 +- tools/python/convert_header.py | 2 +- 4 files changed, 7

[FFmpeg-devel] [PATCH 12/12] dnn-layer-math-unary-test: add unit test for atanh

2020-06-28 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index 5587e47ad5..1815f79f34 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn

[FFmpeg-devel] [PATCH 11/12] dnn_backend_native_layer_mathunary: add atanh support

2020-06-28 Thread Ting Fu
t']) tf.train.write_graph(graph_def, '.', 'image_process.pb', as_text=False) print("image_process.pb generated, please use \ path_to_ffmpeg/tools/python/convert.py to generate image_process.model\n") output = sess.run(y, feed_dict={x: in_data}) imageio.imsave("

[FFmpeg-devel] [PATCH 09/12] dnn_backend_native_layer_mathunary: add acosh support

2020-06-28 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native_layer_mathunary.c | 4 libavfilter/dnn/dnn_backend_native_layer_mathunary.h | 1 + tools/python/convert_from_tensorflow.py | 2 +- tools/python/convert_header.py | 2 +- 4 files changed, 7

[FFmpeg-devel] [PATCH 10/12] dnn-layer-math-unary-test: add unit test for acosh

2020-06-28 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index 90fce71a0c..5587e47ad5 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn

[FFmpeg-devel] [PATCH 06/12] dnn-layer-math-unary-test: add unit test for tanh

2020-06-28 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index 0280debc0b..6885b4d318 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn

[FFmpeg-devel] [PATCH 07/12] dnn_backend_native_layer_mathunary: add asinh support

2020-06-28 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native_layer_mathunary.c | 4 libavfilter/dnn/dnn_backend_native_layer_mathunary.h | 1 + tools/python/convert_from_tensorflow.py | 2 +- tools/python/convert_header.py | 2 +- 4 files changed, 7

[FFmpeg-devel] [PATCH 04/12] dnn-layer-math-unary-test: add unit test for cosh

2020-06-28 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index a1ff05e5fb..0280debc0b 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn

[FFmpeg-devel] [PATCH 01/12] dnn_backend_native_layer_mathunary: add sinh support

2020-06-28 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native_layer_mathunary.c | 4 libavfilter/dnn/dnn_backend_native_layer_mathunary.h | 1 + tools/python/convert_from_tensorflow.py | 2 +- tools/python/convert_header.py | 2 +- 4 files changed, 7

[FFmpeg-devel] [PATCH 08/12] dnn-layer-math-unary-test: add unit test for asinh

2020-06-28 Thread Ting Fu
Signed-off-by: Ting Fu --- tests/dnn/dnn-layer-mathunary-test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c index 6885b4d318..90fce71a0c 100644 --- a/tests/dnn/dnn-layer-mathunary-test.c +++ b/tests/dnn/dnn

[FFmpeg-devel] [PATCH 03/12] dnn_backend_native_layer_mathunary: add cosh support

2020-06-28 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native_layer_mathunary.c | 4 libavfilter/dnn/dnn_backend_native_layer_mathunary.h | 1 + tools/python/convert_from_tensorflow.py | 2 +- tools/python/convert_header.py | 2 +- 4 files changed, 7

[FFmpeg-devel] [PATCH 05/12] dnn_backend_native_layer_mathunary: add tanh support

2020-06-28 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/dnn/dnn_backend_native_layer_mathunary.c | 4 libavfilter/dnn/dnn_backend_native_layer_mathunary.h | 1 + tools/python/convert_from_tensorflow.py | 2 +- tools/python/convert_header.py | 2 +- 4 files changed, 7

  1   2   >