Coder Social home page Coder Social logo

video_analytics_intel_gpu's Introduction

Video Analytics on Intel GPU

Introduction

  • This repository shows how to do video analytics integraton on Intel Platform with best peformance, including multiple streams decoding, video processing and inference with OpenVINO. some of codes was borrowed from Intel's VAIT code. thanks for their great work!!! you can refer more on VAIT(https://software.intel.com/en-us/articles/vaitpreview)

Key Features:

  • Decoding and video processing with MSDK
  • Inference with GPU with OpenVINO
  • scale from 1 stream to multiple streams. the maximum supported is 48 for 1080p now.
  • RGBP color format supported with latest MSDK + Open Source media driver
  • Docker based environment for user easy to setup the environment
  • Efficient display with XCB is introduced - Thanks [email protected].
  • Workload balance between CPU and GPU is introduced. you need to manual enable it by define ENABLE_WORKLOAD_BALANCE in main.cpp
  • Batch across differnt streams is introduced
  • MobileNetSSD as an example to show benfit of this architecture
  • added VD+SFC which is able to do CSC from NV12 to ARGB on the fly with decoding. it can help save the memroy bandwidth
  • KCF acceleration with GPU, which is able to gain 4x performance boost compared to CPU only

WIP features:

  • Further improve the workload scheduing with Intel's telemtry library
  • Video Process before inference
  • Encoding after composition
  • 1->N features

Expected Usages:

  • Reference to learn OpenVINO, MSDK, and OpenCL
  • Reference source code about how to use MediaSDK pipe/plugin

Requirements

pre-requisites installation without Docker

  • Ubuntu 16.04.3 Install OS and finish "sudo apt-get update; reboot" Copy "prerequisites_install_ubuntu.py" and "silent.cfg" to other folder (ex: ~/tmp)

    • SKL/BXT Script will create many folders and download packages in current folder, so you'd be better run this from other directory, not in the current folder.

      tmp$ sudo prerequisites_install_ubuntu.py tmp$ reboot

    • Install depdency libraires if you need to enable KCF tracking with GPU acceleration

Installation with Docker

  • Build a docker image
    • configure your network proxy and make sure your docker is able to access network well.
    • run ./build_docker_image.sh

build

  • Ubuntu 16.04.3 $ source env.sh $ mkdir build $ cd build $ cmake .. $ make

if you want to enable more advanced features, please follow below steps:

  • KCF tracking with GPU acceleration
  • define TEST_KCF_TRACK_WITH_GPU in main.cpp to enable KCF acceleration with GPU
  • recompile
  • workload scheduler
  • define ENABLE_WORKLOAD_BALANCE in main.cpp
  • change NUM_OF_GPU_INFER macro definiton to 2
  • recompile

execution

  • Ubuntu 16.04.3

    .\build\video_analytics_example\video_analytics_example -d GPU -c 1 -batch 6

  • runnig in docker image

    • get the imageID via "docker image ls" in a terminal
    • docker run -ti -device /dev/dri:/dev/dri {imageID} /bin/sh
    • cd /vait/build/video_analytics_example
    • video_analytics_example -d GPU -c 1 -batch 6

#streams are hardcoded in the main.cpp, so no need to specify the source clip.

Q&A

XCB display issue

You may meet XCB display issue, please follow up below steps to check whether it an solve your issue. teltek/Galicaster#543

  • sudo apt remove xserver-xorg-core-hwe-16.04 #Also remove all the dependencies
  • sudo apt install ubuntu-desktop xorg xserver-xorg-core #Also install the required dependencies

video_analytics_intel_gpu's People

Contributors

alariono avatar hefan2017 avatar yaoxinshi avatar yunbiaolin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.