summaryrefslogtreecommitdiff
path: root/libavfilter/allfilters.c
diff options
context:
space:
mode:
authorGuo, Yejun <yejun.guo@intel.com>2021-02-07 14:36:13 +0800
committerGuo, Yejun <yejun.guo@intel.com>2021-04-17 17:27:02 +0800
commitaa9ffdaa1eaeb5e16fb6b89852f38ff488d81173 (patch)
tree85afb97148ad11be2cf30d346fe91db448dd0faa /libavfilter/allfilters.c
parente942b4bbaaddad451752254cbb60a3ea383294d6 (diff)
lavfi: add filter dnn_detect for object detection
Below are the example steps to do object detection: 1. download and install l_openvino_toolkit_p_2021.1.110.tgz from https://software.intel.com/content/www/us/en/develop/tools/openvino-toolkit/download.html or, we can get source code (tag 2021.1), build and install. 2. export LD_LIBRARY_PATH with openvino settings, for example: .../deployment_tools/inference_engine/lib/intel64/:.../deployment_tools/inference_engine/external/tbb/lib/ 3. rebuild ffmpeg from source code with configure option: --enable-libopenvino --extra-cflags='-I.../deployment_tools/inference_engine/include/' --extra-ldflags='-L.../deployment_tools/inference_engine/lib/intel64' 4. download model files and test image wget https://github.com/guoyejun/ffmpeg_dnn/raw/main/models/openvino/2021.1/face-detection-adas-0001.bin wget https://github.com/guoyejun/ffmpeg_dnn/raw/main/models/openvino/2021.1/face-detection-adas-0001.xml wget https://github.com/guoyejun/ffmpeg_dnn/raw/main/models/openvino/2021.1/face-detection-adas-0001.label wget https://github.com/guoyejun/ffmpeg_dnn/raw/main/images/cici.jpg 5. run ffmpeg with: ./ffmpeg -i cici.jpg -vf dnn_detect=dnn_backend=openvino:model=face-detection-adas-0001.xml:input=data:output=detection_out:confidence=0.6:labels=face-detection-adas-0001.label,showinfo -f null - We'll see the detect result as below: [Parsed_showinfo_1 @ 0x560c21ecbe40] side data - detection bounding boxes: [Parsed_showinfo_1 @ 0x560c21ecbe40] source: face-detection-adas-0001.xml [Parsed_showinfo_1 @ 0x560c21ecbe40] index: 0, region: (1005, 813) -> (1086, 905), label: face, confidence: 10000/10000. [Parsed_showinfo_1 @ 0x560c21ecbe40] index: 1, region: (888, 839) -> (967, 926), label: face, confidence: 6917/10000. There are two faces detected with confidence 100% and 69.17%. Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Diffstat (limited to 'libavfilter/allfilters.c')
-rw-r--r--libavfilter/allfilters.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
index 0872c6e0f2..0d2bf7bbee 100644
--- a/libavfilter/allfilters.c
+++ b/libavfilter/allfilters.c
@@ -230,6 +230,7 @@ extern AVFilter ff_vf_detelecine;
extern AVFilter ff_vf_dilation;
extern AVFilter ff_vf_dilation_opencl;
extern AVFilter ff_vf_displace;
+extern AVFilter ff_vf_dnn_detect;
extern AVFilter ff_vf_dnn_processing;
extern AVFilter ff_vf_doubleweave;
extern AVFilter ff_vf_drawbox;