/smart-queue-monitoring-system

Intel Edge AI for IoT Developers Nanodegree from Udacity

Primary LanguagePythonMIT LicenseMIT

Smart Queue Monitoring System - Project

Details
Programming Language: Python 3.7
Intel OpenVINO ToolKit: OpenVINO 2020.2
Docker (Ubuntu OpenVINO pre-installed): mmphego/intel-openvino
Hardware Used: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Device: CPU
Blog Post
Visitors

This project demonstrates how to detect people in queues (in order to redirect them to shortest queue) using inference on pre-trained neural network with Intel OpenVINO framework.

The purpose of this project is to choose the right hardware suitable for a particular scenario. See Scenarios.md

Main Tasks

The following pages will walk you through the steps of the project. At a high level, you will:

  • Propose a possible hardware solution
  • Build out your application and test its performance on the DevCloud using multiple hardware types
  • Compare the performance to see which hardware performed best
  • Revise your proposal based on the test results

Proposal Submission per Scenario

  • Scenario 1: Manufacturing
    • FPGA

results/manufacturing/output_video.mp4

  • Scenario 2: Retail Sector
    • CPU and IGPU

results/retail/output_video.mp4

  • Scenario 3: Transportation
    • VPU

results/transportation/output_video.mp4

Results

The application was tested on a number of hardware and the results can be accessed here.

Requirements

Hardware

Software

Usage

Local

The application can be run locally using this command:

  • Download the person detection model from the model zoo, which will produce .xml and .bin files.
docker run --rm -ti \
--volume "$PWD":/app \
--env DISPLAY=$DISPLAY \
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
mmphego/intel-openvino \
bash -c "/opt/intel/openvino/deployment_tools/open_model_zoo/tools/downloader/downloader.py \
    --name person-detection-retail-0013"

Run inference.

xhost +;
docker run --rm -ti \
--volume "$PWD":/app \
--env DISPLAY=$DISPLAY \
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
mmphego/intel-openvino \
bash -c \
"source /opt/intel/openvino/bin/setupvars.sh && \
python person_detect.py
    --model models/person-detection-retail-0013 \
    --device CPU \
    --video original_videos/Manufacturing.mp4 \
    --output_path results/CPU \
    --max_people 3"
xhost -;
  • --env DISPLAY=$DISPLAY: Enables GUI applications
  • --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw": Enable GUI applications

DevCloud

The Intel DevCloud offers a variety of hardware that the app could be tested on, however this assumes that you have enrolled for the Intel® Edge AI for IoT Developers or have access to the Intel DevCloud.

Note: You will need to change the PYTHON_PATH's for this to work in your environment.

Run the Jupyter notebooks

Run the different scenarios