Add demo script and data files.

Change-Id: Ife1fd3a744755917c1c955c3fc25b4d2e00f88ca
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..e43b0f9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.DS_Store
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..6b3c587
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+edgetpudemo (1.0-1) unstable; urgency=low
+
+  * Initial release.
+
+ -- AIY Projects <support-aiyprojects@google.com>  Thu, 21 Feb 2019 13:22:55 -0800
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..378dc5e
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,13 @@
+Source: edgetpudemo
+Maintainer: AIY Projects <support-aiyprojects@google.com>
+Build-Depends: debhelper (>= 9)
+Standards-Version: 3.9.6
+Homepage: https://aiyprojects.withgoogle.com/
+
+Package: edgetpudemo
+Architecture: all
+Depends: ${misc:Depends},
+         python3-edgetpuvision
+Description: Edge TPU demo script
+ Script to demonstrate TPU vs CPU performance.
+
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..0ed8904
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,7 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: edgetpudemo
+Source: https://aiyprojects.withgoogle.com
+
+Files: *
+Copyright: Copyright 2018 Google, LLC <support-aiyprojects@google.com>
+License: Apache-2.0
diff --git a/debian/edgetpudemo.install b/debian/edgetpudemo.install
new file mode 100644
index 0000000..45c5494
--- /dev/null
+++ b/debian/edgetpudemo.install
@@ -0,0 +1,2 @@
+edgetpu_demo /usr/bin/
+edgetpudemo /usr/share/
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..ea37544
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,8 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+%:
+	dh $@
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/edgetpu_demo b/edgetpu_demo
new file mode 100755
index 0000000..fe4985b
--- /dev/null
+++ b/edgetpu_demo
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+readonly TEST_DATA="/usr/share/edgetpudemo"
+readonly VIDEO_FILE="${TEST_DATA}/video.mp4"
+readonly TPU_MODEL_FILE="${TEST_DATA}/mobilenet_ssd_v1_coco_quant_postprocess_edgetpu.tflite@Running MobileNet SSD v1 on Edge TPU"
+readonly CPU_MODEL_FILE="${TEST_DATA}/mobilenet_ssd_v1_coco_quant_postprocess.tflite@Running MobileNet SSD v1 on CPU"
+readonly LABELS_FILE="${TEST_DATA}/coco_labels.txt"
+
+if [[ "$1" == "--device" ]]; then
+  echo "Press 'q' to quit."
+  echo "Press 'n' to switch between models."
+
+  edgetpu_detect \
+      --source "${VIDEO_FILE}" \
+      --model "${TPU_MODEL_FILE},${CPU_MODEL_FILE}" \
+      --labels "${LABELS_FILE}" \
+      --filter car \
+      --max_area 0.1 \
+      --color white \
+      --loop \
+      --displaymode fullscreen
+elif [[ "$1" == "--stream" ]]; then
+  echo "Press 'q' to quit."
+  echo "Press 'n' to switch between models."
+
+  SERVER_INDEX_HTML="${TEST_DATA}/index.html" edgetpu_detect_server \
+      --source "${VIDEO_FILE}" \
+      --model "${TPU_MODEL_FILE},${CPU_MODEL_FILE}" \
+      --labels "${LABELS_FILE}" \
+      --filter car \
+      --max_area 0.1 \
+      --color white \
+      --loop
+else
+  echo "Run on-device inference:"
+  echo "  $0 --device"
+  echo "Run streaming server:"
+  echo "  $0 --stream"
+fi
diff --git a/edgetpudemo/coco_labels.txt b/edgetpudemo/coco_labels.txt
new file mode 100644
index 0000000..1ee473c
--- /dev/null
+++ b/edgetpudemo/coco_labels.txt
@@ -0,0 +1,80 @@
+0  person
+1  bicycle
+2  car
+3  motorcycle
+4  airplane
+5  bus
+6  train
+7  truck
+8  boat
+9  traffic light
+10  fire hydrant
+12  stop sign
+13  parking meter
+14  bench
+15  bird
+16  cat
+17  dog
+18  horse
+19  sheep
+20  cow
+21  elephant
+22  bear
+23  zebra
+24  giraffe
+26  backpack
+27  umbrella
+30  handbag
+31  tie
+32  suitcase
+33  frisbee
+34  skis
+35  snowboard
+36  sports ball
+37  kite
+38  baseball bat
+39  baseball glove
+40  skateboard
+41  surfboard
+42  tennis racket
+43  bottle
+45  wine glass
+46  cup
+47  fork
+48  knife
+49  spoon
+50  bowl
+51  banana
+52  apple
+53  sandwich
+54  orange
+55  broccoli
+56  carrot
+57  hot dog
+58  pizza
+59  donut
+60  cake
+61  chair
+62  couch
+63  potted plant
+64  bed
+66  dining table
+69  toilet
+71  tv
+72  laptop
+73  mouse
+74  remote
+75  keyboard
+76  cell phone
+77  microwave
+78  oven
+79  toaster
+80  sink
+81  refrigerator
+83  book
+84  clock
+85  vase
+86  scissors
+87  teddy bear
+88  hair drier
+89  toothbrush
\ No newline at end of file
diff --git a/edgetpudemo/index.html b/edgetpudemo/index.html
new file mode 100644
index 0000000..d78f53a
--- /dev/null
+++ b/edgetpudemo/index.html
@@ -0,0 +1,27 @@
+<!doctype html>
+<html>
+<head>
+  <title>Coral Web Panel</title>
+  <link rel="icon" type="image/png" sizes="16x16" href="favicon.png"/>
+  <link rel="stylesheet" type="text/css" href="coral.css">
+  <script type="text/javascript" src="protobuf.min.js"></script>
+  <script type="text/javascript" src="broadway/YUVCanvas.js"></script>
+  <script type="text/javascript" src="broadway/Decoder.js"></script>
+  <script type="text/javascript" src="broadway/Player.js"></script>
+  <script type="text/javascript" src="ws_client.js"></script>
+</head>
+<body>
+  <img src="coral_logo.png" width="100em" style="padding-bottom:10px"/>
+  <div>
+  <h1>Edge TPU Performance Demo</h1>
+  <h2>Object detection and classification</h2>
+  <p>The following program demonstrates the processing power of the Edge TPU by
+  running MobileNet model that can concurrently identify and classify multiple
+  objects in a video. This demo is running a model with the MobileNet SSD v2
+  architecture, trained to detected 90 different object types from the COCO
+  dataset.
+  </p>
+  <div>
+  <div id="container"></div>
+</body>
+</html>
diff --git a/edgetpudemo/mobilenet_ssd_v1_coco_quant_postprocess.tflite b/edgetpudemo/mobilenet_ssd_v1_coco_quant_postprocess.tflite
new file mode 100644
index 0000000..f510887
--- /dev/null
+++ b/edgetpudemo/mobilenet_ssd_v1_coco_quant_postprocess.tflite
Binary files differ
diff --git a/edgetpudemo/mobilenet_ssd_v1_coco_quant_postprocess_edgetpu.tflite b/edgetpudemo/mobilenet_ssd_v1_coco_quant_postprocess_edgetpu.tflite
new file mode 100644
index 0000000..91b128f
--- /dev/null
+++ b/edgetpudemo/mobilenet_ssd_v1_coco_quant_postprocess_edgetpu.tflite
Binary files differ
diff --git a/edgetpudemo/video.mp4 b/edgetpudemo/video.mp4
new file mode 100644
index 0000000..32621ce
--- /dev/null
+++ b/edgetpudemo/video.mp4
Binary files differ