Skip to content

Instantly share code, notes, and snippets.

View chad-green's full-sized avatar

Chad Green chad-green

View GitHub Profile
@chad-green
chad-green / ncs2_realtime_objectdetection.py
Created September 4, 2018 05:54
Update for NCSDK 2.0 based on code from Adrian Rosebrock's tutorial on pyimagesearch.com (see link in comments)
# Updated for NCSDK 2.0. Original code by Adrian Rosebrock
# https://www.pyimagesearch.com/2018/02/19/real-time-object-detection-on-the-raspberry-pi-with-the-movidius-ncs/
# USAGE
# python ncs2_realtime_objectdetection.py --graph graphs/mobilenetgraph --display 1
# python ncs2_realtime_objectdetection.py --graph graphs/mobilenetgraph --confidence 0.5 --display 1
# import the necessary packages
from mvnc import mvncapi as mvnc
from imutils.video import VideoStream
from imutils.video import FPS