Skip to content

Instantly share code, notes, and snippets.

View amitbd1508's full-sized avatar
🎯
Focusing

Amit Ghosh amitbd1508

🎯
Focusing
  • Fidelity Investment | KForce Inc | Cefalo | Jeeon LLC | Shohoz Ltd. | Edublock | Threat Equitation Ltd. |
  • Dallas, Texas
  • X @amitbd1508
View GitHub Profile
@amitbd1508
amitbd1508 / object_detection_with_labels.py
Created November 30, 2019 03:23 — forked from aallan/object_detection_with_labels.py
Object detection python demonstration code for use with Google's Edge TPU (now with labelling)
import argparse
import platform
import subprocess
from edgetpu.detection.engine import DetectionEngine
from PIL import Image
from PIL import ImageFont, ImageDraw
# Function to draw a rectangle with width > 1
def draw_rectangle(draw, coordinates, color, width=1):
for i in range(width):
# install dependencies
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y cmake
sudo apt-get install -y libgtk2.0-dev
sudo apt-get install -y pkg-config
sudo apt-get install -y python-numpy python-dev
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install -y libjpeg-dev libpng-dev libtiff-dev libjasper-dev