Giter Club home page Giter Club logo

dhananjayyy / smart_queuing-system-at-edge-using-intel-openvino Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 98.44 MB

The Smart Queuing App detects people standing in a queue, providing the number of people in the frame and total count. Retail, Manufacturing, and Transportation scenarios are observed in this project. The Smart Queuing System is a smart video IoT solution using Intel's OpenVINO.

License: MIT License

Jupyter Notebook 98.75% Python 1.05% Shell 0.20%

smart_queuing-system-at-edge-using-intel-openvino's Introduction

Smart-Queuing-System-At-Edge-Using-Intel-OpenVINO

Table of Contents

What it Does

The Smart Queuing System deomnstrates how to create a video AI solution on the edge using Intel® hardware and software tools. The app detects people in a specified area and accordingly detects the number of people in a queue. It would then also notify whether a person would need to change the queue to reduce congestation. I strongly recommend you to read the WRITEUP

How it Works

The people counter script will use the Inference Engine included in the Intel® Distribution of OpenVINO™ Toolkit. To test out the script and determine which hardware would be best for a particular use case we use a job submission script Intel DevCloud to test the scripts on different hardware. To propose a hardware we take a note of the model loading time, inference time and FPS to do so.

Requirements

Hardware

  • This project makes the use of Intel DevCloud to test on CPU, GPU, FPGA and VPU so no specific hardware is required..

Software

  • Intel® Distribution of OpenVINO™ toolkit 2019 R3 release.
  • Python > 3.5, 3.6

Intel DevCloud

The Intel® DevCloud for the Edge is a cloud service designed to help developers prototype and experiment with computer vision applications using the Intel® Distribution of OpenVINO™ Toolkit. Once registered, developers can access a series of Python and C++ based Jupyter Notebook tutorials and sample solutions and execute them directly from a web browser. Then, developers can create their own Jupyter Notebooks and quickly try them out on a variety of hosted Intel® hardware solutions specifically designed for deep learning inferencing.

The Intel® DevCloud for the Edge provides you with access to everything needed to begin working with sample applications, prototypes and tutorials. This includes pre-trained models, source code, test input images, video and data streams. Additionally, users can apply any of the pre-trained deep learning models available through the Intel® Distribution of OpenVino™ toolkit, or upload their own customized pre-trained deep-learning models to develop and test their own computer vision applications.

Benefits of The Intel® DevCloud for the Edge

  • Reduced time to access comprehensive Intel® development solutions, hardware and software, for deep learning and computer vision application development with just an internet connection.
  • Access to fully configured physical edge machines pre-installed with the Intel® Distribution of OpenVINO™ Toolkit (CPU, iGPU, VPU and FPGA) hosted in the cloud powered by Intel® Xeon® Scalable processors.
  • Ability to evaluate and choose the right Intel® hardware acceleration option for your application.
  • A vast library of pre-trained models from the Intel® Distribution of OpenVINO™ Toolkit and ability to upload your own custom pre- trained models to evaluate the best framework, topology, and hardware acceleration solution for your unique application.

Setup

Install Intel® Distribution of OpenVINO™ toolkit

Utilize the classroom workspace, or refer to the relevant instructions for your operating system for this step.

Get started with DevCloud

Much of the Intel® DevCloud for the Edge documentation can be accessed without registering. You will need to register for an Intel® DevCloud for the Edge account to explore, run the examples, upload your own code and test the hardware.

  • On the Home page, click Sign in on the top right corner.
  • Click Register and follow the prompts to enter the information requested.
  • Within 48 hours you will receive an invitation email to your Intel® DevCloud for the Edge account.
  • For increased security, the Intel® DevCloud for the Edge is protected by 2-factor authentication. Please check your email for the 6- digit security code. Copy/paste the full URL from that email containing the uuid argument into a browser window. All current web browsers are supported.
  • Follow the prompts to complete your Intel DevCloud account registration.
  • Once you have completed account registration, you can return any time to the Home page and click Sign in at the top right corner to access your account.
  • Each time you sign in, the top right corner displays the total number of days you have access to the Intel® DevCloud for the Edge resource. You can request an extension from within the portal.

Run the application

The figure below illustrates the user workflow for code development, job submission and viewing results.

Credits
Intel DevCloud website

Step 1 - Person Detection

The person_detect.py file does the person counting part for you. Try to experiment around with the threshold value and see how the predictions turn up.

Step 2 - Job Submission

The queue_job.sh is the utility which
helps in the submission of the job to multiple devices on the DevCloud.

Step 3 - Submitting the job

The project majorly includes 3 notebooks for different use cases-

Each of the above notebooks follow this process, be sure to change the original video location according to your system in each case.

Submit to an Edge Compute Node with an Intel CPU

We write a script to submit a job to an IEI Tank* 870-Q170 edge node with an Intel Core™ i5-6500TE processor. The inference workload should run on the CPU.

cpu_job_id = !qsub queue_job.sh -d . -l nodes=1:tank-870:i5-6500te -F "[model_path] CPU [original_video_path] /data/queue_param/manufacturing.npy [output_path] 2" -N store_core

Submit to an Edge Compute Node with CPU and IGPU

We write a script to submit a job to an IEI Tank* 870-Q170 edge node with an Intel® Core i5-6500TE. The inference workload should run on the Intel® HD Graphics 530 integrated GPU.

gpu_job_id = !qsub queue_job.sh -d . -l nodes=tank-870:i5-6500te:intel-hd-530 -F "[model_path] GPU [original_video_path] /data/queue_param/manufacturing.npy [output_path] 2" -N store_core

Submit to an Edge Compute Node with a Neural Compute Stick 2

We write a script to submit a job to an IEI Tank 870-Q170 edge node with an Intel Core i5-6500te CPU. The inference workload should run on an Intel Neural Compute Stick 2 installed in this node.

vpu_job_id = !qsub queue_job.sh -d . -l nodes=tank-870:i5-6500te:intel-ncs2 -F "[model_path] MYRIAD [original_video_path] /data/queue_param/manufacturing.npy [output_path] 2" -N store_core

Submit to an Edge Compute Node with IEI Mustang-F100-A10

We write a script to submit a job to an IEI Tank 870-Q170 edge node with an Intel Core™ i5-6500te CPU. The inference workload will run on the IEI Mustang-F100-A10 FPGA card installed in this node.

fpga_job_id = !qsub queue_job.sh -d . -l nodes=1:tank-870:i5-6500te:iei-mustang-f100-a10 -F "[model_path] HETERO:FPGA,CPU [original_video_path] /data/queue_param/manufacturing.npy [output_path] 2" -N store_core

Step 4 - Compare performance

We then compare performance on these devices on these 3 metrics-

  • FPS
  • Model Load Time
  • Inference Time

smart_queuing-system-at-edge-using-intel-openvino's People

Contributors

dhananjayyy avatar

Stargazers

 avatar  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.