summaryrefslogtreecommitdiff
path: root/libavfilter/dnn/dnn_backend_openvino.c
Commit message (Collapse)AuthorAge
* lavf/dnn: dump OpenVINO model input/output names to OVMdel struct.Ting Fu2022-07-24
| | | | | | | 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 <ting.fu@intel.com>
* libavfilter: Remove DNNReturnType from DNN ModuleShubhanshu Saxena2022-03-12
| | | | | | | | | | This patch removes all occurences of DNNReturnType from the DNN module. This commit replaces DNN_SUCCESS by 0 (essentially the same), so the functions with DNNReturnType now return 0 in case of success, the negative values otherwise. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com> Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn_backend_openvino: Return Specific Error CodesShubhanshu Saxena2022-03-12
| | | | | | | | Switch to returning specific error codes or DNN_GENERIC_ERROR when an error is encountered. For OpenVINO API errors, currently DNN_GENERIC_ERROR is returned. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn: Rename InferenceItem to LastLevelTaskItemShubhanshu Saxena2021-08-28
| | | | | | | | | | | | | | | This patch renames the InferenceItem to LastLevelTaskItem in the three backends to avoid confusion among the meanings of these structs. The following are the renames done in this patch: 1. extract_inference_from_task -> extract_lltask_from_task 2. InferenceItem -> LastLevelTaskItem 3. inference_queue -> lltask_queue 4. inference -> lltask 5. inference_count -> lltask_count Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* libavfilter: Unify Execution Modes in DNN FiltersShubhanshu Saxena2021-08-28
| | | | | | | | | | | | | | | | | | | | | | | This commit unifies the async and sync mode from the DNN filters' perspective. As of this commit, the Native backend only supports synchronous execution mode. Now the user can switch between async and sync mode by using the 'async' option in the backend_configs. The values can be 1 for async and 0 for sync mode of execution. This commit affects the following filters: 1. vf_dnn_classify 2. vf_dnn_detect 3. vf_dnn_processing 4. vf_sr 5. vf_derain This commit also updates the filters vf_dnn_detect and vf_dnn_classify to send only the input frame and send NULL as output frame instead of input frame to the DNN backends. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn: Extract Common Parts from get_output functionsShubhanshu Saxena2021-08-10
| | | | | | | | The frame allocation and filling the TaskItem with execution parameters is common in the three backends. This commit shifts this logic to dnn_backend_common. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn: Common Function to Get Async Result in DNN BackendsShubhanshu Saxena2021-08-10
| | | | | | | This commits refactors the get async result function for common use in all three backends. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* avcodec/avcodec: Don't include cpu.hAndreas Rheinhardt2021-07-22
| | | | | | | It is not used here at all; instead, add it where it is used without including it or any of the arch-specific CPU headers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavfi/dnn_backend_ov: Rename RequestItem to OVRequestItemShubhanshu Saxena2021-07-22
| | | | | | | Rename RequestItem to OVRequestItem in the OpenVINO backend to avoid confusion. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn_backend_openvino.c: Fix Memory Leak in execute_model_ovShubhanshu Saxena2021-07-22
| | | | | | | | In cases where the execution inside the function execute_model_ov fails, the OVRequestItem must be pushed back to the request_queue before returning the error. In case pushing back fails, release the allocated memory. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn_backend_tf: Request-based ExecutionShubhanshu Saxena2021-07-11
| | | | | | | | This commit uses TFRequestItem and the existing sync execution mechanism to use request-based execution. It will help in adding async functionality to the TensorFlow backend later. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn_backend_openvino.c: Fix Memory Leak in execute_model_ovShubhanshu Saxena2021-07-04
| | | | | | | | In cases where the execution inside the function execute_model_ov fails, push the RequestItem back to the request_queue before returning the error. In case pushing back fails, release the allocated memory. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn_backend_openvino.c: fix crash when target is not specifiedGuo Yejun2021-06-19
|
* lavfi/dnn_backend_openvino.c: Fix Memory Leak for RequestItemShubhanshu Saxena2021-06-18
| | | | | | | Fix memory leak for RequestItem upon error while pushing to the request_queue in the completion callback. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn: Fill Task using Common FunctionShubhanshu Saxena2021-06-12
| | | | | | | This commit adds a common function for filling the TaskItems in all three backends. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn: Add nb_output to TaskItemShubhanshu Saxena2021-06-12
| | | | | | | Add nb_output property to TaskItem for use in TensorFlow backend and Native backend. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn: Convert output_name to char** in TaskItemShubhanshu Saxena2021-06-12
| | | | | | | Convert output_name to char **output_names in TaskItem and use it as a pointer to array of output names in the DNN backend. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn: Extract TaskItem and InferenceItem from OpenVino BackendShubhanshu Saxena2021-06-12
| | | | | | | Extract TaskItem and InferenceItem from OpenVino backend and convert ov_model to void in TaskItem. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn_backend_openvino.c: Correct Pointer Type while FreeingShubhanshu Saxena2021-05-28
| | | | | | | 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>
* lavfi/dnn: refine code to separate processing and detection in backendsGuo, Yejun2021-05-24
|
* lavfi/dnn: add classify support with openvino backendGuo, Yejun2021-05-06
| | | | Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* lavfi/dnn: refine dnn interface to add DNNExecBaseParamsGuo, Yejun2021-05-06
| | | | | | | | | | | | | 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.
* lavfi/dnn_backend_openvino.c: move the logic for batch mode earlierGuo, Yejun2021-05-06
|
* lavfi/dnn_backend_openvino.c: add InferenceItem between TaskItem and RequestItemGuo, Yejun2021-05-06
| | | | | | | 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.
* lavfi/dnn_backend_openvino.c: unify code for infer request for sync/asyncGuo, Yejun2021-05-06
|
* lavfi/dnn_backend_openvino.c: Spelling Correction in OpenVino Backendshubhanshu022021-04-25
| | | | | | | Correct Spelling of the word `descibe` to `describe` in init_model_ov Signed-off-by: shubhanshu02 <shubhanshu.e01@gmail.com>
* lavfi/dnn: add post process for detectionGuo, Yejun2021-04-08
|
* lavfi/dnn: refine code for frame pre/proc processingGuo, Yejun2021-04-08
|
* lavfi/dnn_backend_openvino.c: only allow DFT_PROCESS_FRAME to get output dimGuo, Yejun2021-04-08
|
* lavfi/dnn_backend_openvino.c: fix mem leak for TaskItem upon errorGuo, Yejun2021-03-18
|
* lavfi/dnn_backend_openvino.c: fix mem leak for RequestItem upon errorGuo, Yejun2021-03-18
|
* lavfi/dnn_backend_openvino.c: fix typo upon errorGuo, Yejun2021-03-18
|
* lavfi/dnn_backend_openvino.c: fix mem leak for input_blob and output_blob ↵Guo, Yejun2021-03-18
| | | | upon error
* lavfi/dnn_backend_openvino.c: fix mem leak for AVFrame upon errorGuo, Yejun2021-03-18
|
* dnn_backend_openvino.c: allow out_frame as NULL for analytic caseTing Fu2021-02-18
|
* dnn: add color conversion for analytic caseGuo, Yejun2021-02-18
| | | | Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* dnn: add function type for modelGuo, Yejun2021-02-18
| | | | | | | | So the backend knows the usage of model is for frame processing, detect, classify, etc. Each function type has different behavior in backend when handling the input/output data of the model. Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* dnn_backend_openvino.c: fix multi-thread issue for async executionGuo, Yejun2021-02-18
| | | | | | | | | once we mark done for the task in function infer_completion_callback, the task is possible to be release in function ff_dnn_get_async_result_ov in another thread just after it, so we need to record request queue first, instead of using task->ov_model->request_queue later. Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* dnn_backend_openvino.c: fix mismatch between ffmpeg(NHWC) and openvino(NCHW)Guo, Yejun2021-02-18
| | | | Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* dnn_backend_openvino.c: remove extra semicolonGuo, Yejun2021-01-28
|
* dnn: remove type cast which is not necessaryGuo, Yejun2021-01-28
|
* dnn/queue: remove prefix FF for Queue and SafeQueueGuo, Yejun2021-01-22
| | | | | | we don't need FF prefix for internal data struct Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* libavfilter/dnn: add prefix ff_ for internal functionsGuo, Yejun2021-01-22
| | | | | | | from proc_from_frame_to_dnn to ff_proc_from_frame_to_dnn, and from proc_from_dnn_to_frame to ff_proc_from_dnn_to_frame. Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* libavfilter/dnn: use avpriv_report_missing_feature for unsupported featuresGuo, Yejun2021-01-22
| | | | Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* dnn_backend_openvino.c: add version mismatch reminderGuo, Yejun2021-01-22
| | | | | | | | The OpenVINO model file format changes when OpenVINO goes to a new release, it does not work if the versions between model file and runtime are mismatched. Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* dnn/openvino: support model input resizeTing Fu2021-01-18
| | | | | | | | | | | | | | | | OpenVINO APIs require specify input size to run the model, while some OpenVINO model does accept different input size. To enable this feature adding input_resizable option here for easier use. Setting bool variable input_resizable to specify if the input can be resizable or not. input_resizable = 1 means support input resize, aka accept different input size. input_resizable = 0 (default) means do not support input resize. Please make sure the inference model does accept different input size before use this option, otherwise the inference engine may report error(s). eg: ./ffmpeg -i 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 <ting.fu@intel.com>
* dnn/openvino: refine code for better model initializationTing Fu2021-01-18
| | | | | | | | 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 <ting.fu@intel.com>
* dnn/openvino: remove unnecessary codeTing Fu2021-01-18
| | | | Signed-off-by: Ting Fu <ting.fu@intel.com>
* libavfilter/dnn: add batch mode for async executionGuo, Yejun2021-01-15
| | | | | | | | the default number of batch_size is 1 Signed-off-by: Xie, Lin <lin.xie@intel.com> Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com> Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* dnn/queue: add error check and cleanupGuo, Yejun2020-12-31
| | | | Signed-off-by: Guo, Yejun <yejun.guo@intel.com>