Guo Yejun
3ac7d99428
lavfi/dnn/dnn_io_proc.c: fix CID 1484955
...
CID 1484955: Memory - corruptions (ARRAY_VS_SINGLETON)
2021-06-05 17:15:29 +08:00
Shubhanshu Saxena
e41255cddb
lavfi/dnn_backend_openvino.c: Correct Pointer Type while Freeing
...
This commit corrects the type of pointer of elements from the
inference queue in ff_dnn_free_model_ov.
Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2021-05-28 08:40:07 +08:00
Guo, Yejun
4c705a2775
lavfi/dnn: refine code to separate processing and detection in backends
2021-05-24 09:09:34 +08:00
Guo, Yejun
3fb1d2e71c
lavfi/dnn/dnn_io_proc.c: fix Improper use of negative value (NEGATIVE_RETURNS)
...
fix coverity CID 1473511 and 1473566
2021-05-18 09:20:08 +08:00
Guo, Yejun
bd6ea9ed1d
lavfi/dnn/dnn_io_proc.c: Fix Out-of-bounds access (ARRAY_VS_SINGLETON)
...
fix coverity CID 1473571, 1473577 and 1482089
2021-05-18 09:20:08 +08:00
Shubhanshu Saxena
11b489d592
lavfi/dnn_backend_native_layer_mathunary.h: Documentation
...
Add documentation for Unary Math Layer
Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2021-05-17 09:33:40 +08:00
Shubhanshu Saxena
57fe5c1412
lavfi/dnn_backend_native_layer_depth2space.h: Documentation
...
Add documentation for Depth to Space Layer
Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2021-05-17 09:33:40 +08:00
Shubhanshu Saxena
58de2b9eb3
lavfi/dnn_backend_native_layer_dense.h: Documentation
...
Add documentation for Dense Layer
Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2021-05-17 09:33:40 +08:00
Shubhanshu Saxena
a61b7654a2
lavfi/dnn_backend_native_layer_conv2d.h: Documentation
...
Add documentation for 2D Convolution Layer
Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2021-05-17 09:33:40 +08:00
Shubhanshu Saxena
0bdd677c5f
lavfi/dnn_backend_native_layer_avgpool.h: Documentation
...
Add documentation for Average Pool Layer
Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2021-05-14 10:21:15 +08:00
Limin Wang
2899fb61d2
avfilter/dnn/dnn_backend_tf: fix cross library usage
...
duplicate ff_hex_to_data() function from avformat and rename it to
hex_to_data() as static function.
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-05-11 18:46:14 +08:00
Ting Fu
e42125edab
lavfi/dnn_backend_tensorflow: support detect model
...
Signed-off-by: Ting Fu <ting.fu@intel.com>
2021-05-11 10:28:35 +08:00
Ting Fu
1b1064054c
lavfi/dnn_backend_tensorflow: add multiple outputs support
...
Signed-off-by: Ting Fu <ting.fu@intel.com>
2021-05-11 10:28:35 +08:00
Ting Fu
f02928eb5a
dnn: add DCO_RGB color order to enum DNNColorOrder
...
Adding DCO_RGB color order to DNNColorOrder, since tensorflow model
needs this kind of color oder as input.
Signed-off-by: Ting Fu <ting.fu@intel.com>
2021-05-11 10:28:35 +08:00
Guo, Yejun
fc26dca64e
lavfi/dnn: add classify support with openvino backend
...
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2021-05-06 10:50:44 +08:00
Guo, Yejun
a3b74651a0
lavfi/dnn: refine dnn interface to add DNNExecBaseParams
...
Different function type of model requires different parameters, for
example, object detection detects lots of objects (cat/dog/...) in
the frame, and classifcation needs to know which object (cat or dog)
it is going to classify.
The current interface needs to add a new function with more parameters
to support new requirement, with this change, we can just add a new
struct (for example DNNExecClassifyParams) based on DNNExecBaseParams,
and so we can continue to use the current interface execute_model just
with params changed.
2021-05-06 10:50:44 +08:00
Guo, Yejun
7eb9accc37
lavfi/dnn_backend_openvino.c: move the logic for batch mode earlier
2021-05-06 10:50:44 +08:00
Guo, Yejun
e37cc72387
lavfi/dnn_backend_openvino.c: add InferenceItem between TaskItem and RequestItem
...
There's one task item for one function call from dnn interface,
there's one request item for one call to openvino. For classify,
one task might need multiple inference for classification on every
bounding box, so add InferenceItem.
2021-05-06 10:50:44 +08:00
Guo, Yejun
1b5dc712cd
lavfi/dnn_backend_openvino.c: unify code for infer request for sync/async
2021-05-06 10:50:44 +08:00
Shubhanshu Saxena
26d3fe1a52
lavfi/dnn_backend_native_layer_avgpool.c: Correct Spelling of Pixel
...
Correct spelling of word `pixel` from `pxiels`
Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2021-05-06 10:17:57 +08:00
Limin Wang
f183d6555e
avfilter/dnn/dnn_backend_tf: simplify the code with ff_hex_to_data
...
please use tools/python/tf_sess_config.py to get the sess_config after that.
note the byte order of session config is in normal order.
bump the MICRO version for the config change.
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-04-29 20:02:29 +08:00
Shubhanshu Saxena
4b79416dc4
lavfi/dnn/queue.h: Add Documentation to Queue
...
Documentation for Queue
Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2021-04-27 10:01:56 +08:00
Shubhanshu Saxena
5b8e828dee
lavfi/dnn/safe_queue.h: Add Documentation to SafeQueue
...
Documentation for SafeQueue
Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2021-04-27 10:01:20 +08:00
shubhanshu02
d98884be41
lavfi/dnn_backend_openvino.c: Spelling Correction in OpenVino Backend
...
Correct Spelling of the word `descibe` to `describe`
in init_model_ov
Signed-off-by: shubhanshu02 <shubhanshu.e01@gmail.com>
2021-04-25 09:02:54 +08:00
Guo, Yejun
13bf797ced
lavfi/dnn: add post process for detection
2021-04-08 09:23:02 +08:00
Guo, Yejun
59021d79a2
lavfi/dnn: refine code for frame pre/proc processing
2021-04-08 09:23:02 +08:00
Guo, Yejun
d2ccbc966b
lavfi/dnn_backend_openvino.c: only allow DFT_PROCESS_FRAME to get output dim
2021-04-08 09:23:02 +08:00
Ting Fu
637bdefdeb
lavfi/dnn_backend_tensorflow.c: fix mem leak in execute_model_tf
...
Signed-off-by: Ting Fu <ting.fu@intel.com>
2021-03-25 13:10:32 +08:00
Ting Fu
b08b5f07b6
lavfi/dnn_backend_tensorflow.c: fix mem leak in load_native_model
...
Signed-off-by: Ting Fu <ting.fu@intel.com>
2021-03-25 13:10:32 +08:00
Ting Fu
3499ec84cc
lavfi/dnn_backend_tensorflow.c: fix mem leak in load_tf_model
...
Signed-off-by: Ting Fu <ting.fu@intel.com>
2021-03-25 13:10:32 +08:00
Wenlong Ding
b460595dd7
lavfi/dnn/dnn_backend_native_layer_mathunary: add exp support
...
Signed-off-by: Wenlong Ding <wenlong.ding@intel.com>
2021-03-24 13:53:50 +08:00
Guo, Yejun
da12d600ea
lavfi/dnn_backend_openvino.c: fix mem leak for TaskItem upon error
2021-03-18 09:30:09 +08:00
Guo, Yejun
df59ae8bb2
lavfi/dnn_backend_openvino.c: fix mem leak for RequestItem upon error
2021-03-18 09:30:09 +08:00
Guo, Yejun
41f4af16fc
lavfi/dnn_backend_openvino.c: fix typo upon error
2021-03-18 09:30:09 +08:00
Guo, Yejun
bd3ca0859e
lavfi/dnn_backend_openvino.c: fix mem leak for input_blob and output_blob upon error
2021-03-18 09:30:09 +08:00
Guo, Yejun
3ce2ee7f54
lavfi/dnn_backend_openvino.c: fix mem leak for AVFrame upon error
2021-03-18 09:30:09 +08:00
Andreas Rheinhardt
2f056def65
dnn/dnn_backend_native_layer_mathbinary: Fix leak upon error
...
Fixes Coverity issue #1473568 .
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11 13:21:48 +01:00
Andreas Rheinhardt
723ebf029a
dnn/dnn_backend_native_layer_conv2d: Don't pretend convolution can fail
...
It can't; these are just remnants of commit
3c7cad69f2
which let the worker threads
do the reallocation.
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11 13:20:00 +01:00
Andreas Rheinhardt
9da96d8b69
dnn/dnn_backend_native_layer_conv2d: Check thread creation for errors
...
Fixes Coverity issue #1473533 .
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11 13:13:00 +01:00
Andreas Rheinhardt
c2fef8f16c
dnn/dnn_backend_native_layer_conv2d: Check allocation
...
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11 13:10:46 +01:00
Andreas Rheinhardt
d14ae74064
dnn/dnn_backend_native_layer_conv2d: Avoid separate, unchecked allocations
...
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11 13:09:48 +01:00
Andreas Rheinhardt
508d7005a0
dnn/dnn_backend_native_layer_conv2d: Fix memleak on error
...
If an error happens when preparing the output data buffer, an already
allocated array would leak. Fix this by postponing its allocation.
Fixes Coverity issue #1473531 .
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11 13:06:32 +01:00
Andreas Rheinhardt
16e36d5c0c
dnn/dnn_backend_native_layer_conv2d: Avoid allocation when single-threaded
...
Also fixes a memleak in single-threaded mode when an error happens
in preparing the output data buffer; and also removes an unchecked
allocation.
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11 12:47:11 +01:00
Andreas Rheinhardt
639b3bbbc7
dnn/dnn_backend_native_layer_conv2d: Join two arrays, avoid allocation
...
Fixes Coverity issue #1473507 .
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11 12:45:45 +01:00
Andreas Rheinhardt
d915c1dd7a
dnn/dnn_backend_native_layer_conv2d: Fix memleak on realloc failure
...
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11 12:44:09 +01:00
Andreas Rheinhardt
f51f13902b
dnn/dnn_backend_native: Fix typo in log message
...
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11 12:43:08 +01:00
Andreas Rheinhardt
1e47ef600d
dnn/dnn_backend_native: Don't use asserts for checks
...
asserts should not be used instead of ordinary input checks.
Yet the native DNN backend did it: get_input_native() asserted that
the first dimension was one, despite this value coming directly from
the input file without having been sanitized.
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11 12:39:01 +01:00
Andreas Rheinhardt
0e078c6cfa
dnn/dnn_backend_native: Fix leak in case parsing options fails
...
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11 12:34:17 +01:00
Andreas Rheinhardt
2e2ed39dac
dnn/dnn_backend_native: Avoid allocation for checking file magic
...
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11 12:32:25 +01:00
Ting Fu
b0d75a8de9
dnn_backend_openvino.c: allow out_frame as NULL for analytic case
2021-02-18 09:59:37 +08:00