FFmpeg git repo
Go to file
Guo, Yejun aa9ffdaa1e 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>
2021-04-17 17:27:02 +08:00
compat atomics: Fix the win32 atomic_exchange function 2021-04-04 11:06:08 +03:00
doc lavfi: add filter dnn_detect for object detection 2021-04-17 17:27:02 +08:00
ffbuild ffbuild/common: Make deletion of templates possible 2021-02-07 09:45:04 +01:00
fftools fftools/ffprobe: Remove check on show_frames and show_packets in XML writer 2021-04-16 08:40:09 +02:00
libavcodec avcodec/libaomdec: export frame pict_type 2021-04-16 11:09:03 -03:00
libavdevice libavdevice/gdigrab: fix capture of windows with non-ASCII titles 2021-04-13 19:34:33 +03:00
libavfilter lavfi: add filter dnn_detect for object detection 2021-04-17 17:27:02 +08:00
libavformat avformat/mpegts: set correct extradata size for Opus streams 2021-04-16 11:08:40 -03:00
libavresample avresample: remove deprecated attribute from the AVAudioResampleContext struct 2018-01-09 10:56:53 -03:00
libavutil lavu: add side data AV_FRAME_DATA_DETECTION_BBOXES for object detection/classification 2021-04-17 17:27:02 +08:00
libpostproc Bump minor versions after release branch 2021-03-20 01:02:11 +01:00
libswresample libswresample/audioconvert: Fix undefined NULL + 0 2021-04-01 14:15:20 +02:00
libswscale libswscale/x86/yuv2yuvX: Removes unrolling for mmx and mmxext 2021-04-01 20:47:52 +02:00
presets
tests avformat/mpegts: set correct extradata size for Opus streams 2021-04-16 11:08:40 -03:00
tools tools/target_dem_fuzzer: Fix packet leak 2021-04-01 10:10:21 +02:00
.gitattributes
.gitignore tools/python: add script to convert TensorFlow model (.pb) to native model (.model) 2019-07-01 10:23:47 -03:00
.mailmap mailmap: add entry for myself 2021-03-09 02:09:55 +00:00
.travis.yml Merge commit '899ee03088d55152a48830df0899887f055da1de' 2019-03-14 15:53:16 -03:00
CONTRIBUTING.md
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS
Changelog Changelog: Add new <next> line after 4.4 2021-04-09 06:30:31 +02:00
INSTALL.md INSTALL.md: Fix Markdown formatting 2019-01-31 10:29:16 -09:00
LICENSE.md avfilter/vf_geq: Relicense to LGPL 2019-12-28 11:20:48 +01:00
MAINTAINERS MAINTAINERS: add myself as adpcm maintainer 2021-03-25 12:51:10 +10:00
Makefile avcodec: move core AVCodecContext functions from util.c to a new file 2021-03-19 15:35:35 -03:00
README.md Remove the ffserver program 2018-01-06 18:31:37 +00:00
RELEASE Bump Versions before release/4.4 branch 2021-03-20 01:01:12 +01:00
configure lavfi: add filter dnn_detect for object detection 2021-04-17 17:27:02 +08:00

README.md

FFmpeg README

FFmpeg is a collection of libraries and tools to process multimedia content such as audio, video, subtitles and related metadata.

Libraries

  • libavcodec provides implementation of a wider range of codecs.
  • libavformat implements streaming protocols, container formats and basic I/O access.
  • libavutil includes hashers, decompressors and miscellaneous utility functions.
  • libavfilter provides a mean to alter decoded Audio and Video through chain of filters.
  • libavdevice provides an abstraction to access capture and playback devices.
  • libswresample implements audio mixing and resampling routines.
  • libswscale implements color conversion and scaling routines.

Tools

  • ffmpeg is a command line toolbox to manipulate, convert and stream multimedia content.
  • ffplay is a minimalistic multimedia player.
  • ffprobe is a simple analysis tool to inspect multimedia content.
  • Additional small tools such as aviocat, ismindex and qt-faststart.

Documentation

The offline documentation is available in the doc/ directory.

The online documentation is available in the main website and in the wiki.

Examples

Coding examples are available in the doc/examples directory.

License

FFmpeg codebase is mainly LGPL-licensed with optional components licensed under GPL. Please refer to the LICENSE file for detailed information.

Contributing

Patches should be submitted to the ffmpeg-devel mailing list using git format-patch or git send-email. Github pull requests should be avoided because they are not part of our review process and will be ignored.