Package: dvg-utils
dvg-utilsGo Deep with your Visiondvg-utilsis a set of tools to help you easily build your image and video processing pipeline using OpenCV and Python.
With an easy configuration file and implementation modules you can try your computer vision pipeline
on different devices like webcams, RaspberryPi Camera or camera connected to NVIDIA Jetson device (Nano, TX2, XAVIER)
through GStreamer and more.The library provides a handful of examples to start from.Getting StartedThese instructions will get you a copy of the project up and running on your local machine for development and testing
purposes.PrerequisitesI suggest using Python virtual environment. Virtual environments will allow you to run independent Python environments
in isolation on your system.Please take a look atthis article on RealPython.$ pip install tqdm pyyaml numpyFor OpenCV installation steps please look atOpenCV Tutorials, Resources, and Guides.Mostly:$ pip install opencv-pythonor$ pip install opencv-contrib-pythonif you need both main and contrib modules should work.You can also try to play hard andcompile OpenCV with CUDA(if you got GPU on your board).NVIDIA Jetsondevices withJetPack SDKhave OpenCV already installed.For more info about OpenCV on Jetson platform lookyhere.ForRaspberry Pi Buster, install OpenCV with the help of this article:Install OpenCV 4 on Raspberry Pi 4 and Raspbian Busterfrom the wonderfulPyImageSearchblog.Installation$ pip install dvg-utilsDevelopment setupWe can install the package locally (for use on our system), with:$ pip install .We can also install the package with a symlink, so that changes to the source files will be
immediately available to other users of the package on our system:$ pip install -e .Running testsRunning tests requirespytestpackage to be installed.$ pip install pytest

$ make testCommand-line toolAfterdvg-utilsinstallation, you get access todvg-utilscommand which allows you to:convert a video file to set of images:$ dvg-utils v2i -i assets/videos/faces.mp4 -o output --displayconvert a set of frame images to a video file:$ dvg-utils i2v -i output -o output/my_new_file.avi --displayplot metrics (see examples below):$ dvg-utils pm --input output/metrics_1.csv --input output/metrics_2.csvExamplesPreparation$ pip install matplotlib
$ pip install scipy
$ pip install dlibIf you run examples on Raspberry Pi Camera you will need to:$ pip install picameraCapture single image$ python ./examples/capture_image.py -i assets/images/friendsCapture video stream$ python ./examples/capture_video.pyCapture two video stream from web cameras$ python ./examples/capture_multi_video.pyDetect faces in images$ python ./examples/detect_face_image.py -i assets/images/friendsDetect faces in a video stream:$ python ./examples/detect_face_video.py --metrics output/metrics_no_pipeline.csvor using pipeline implementation:$ python ./examples/detect_face_video.py --pipeline --metrics output/metrics_with_pipeline.csvCompare the collected metrics$ dvg-utils pm --input output/metrics_no_pipeline.csv --input output/metrics_with_pipeline.csvDetect motion in a video stream$ python ./examples/detect_motion_video.pyDetect object in a video stream$ python ./examples/detect_object_video.pyTrack object in a video stream$ python ./examples/track_object_video.pyCount object in a video stream$ python ./examples/count_object_video.pyAcknowledgmentsPyImageSearchfor ideaspixabayfor assetsLicenseThis project is licensed under the MIT License - see theLICENSE.mdfile for details