วันอังคารที่ 23 ตุลาคม พ.ศ. 2561

Intel® Movidius™ Neural Compute SDK Example Code on Raspberry pi

Intel® Movidius™ Neural Compute SDK Example code on Raspberry pi



Neural Compute Application Zoo (NC App Zoo)


The NC App Zoo is a community repository with many content owners and maintainers. All NC App Zoo content is being made available here in a central location for others to download, experiment with, modify, build upon, and learn from.

git clone -b ncsdk2 https://github.com/movidius/ncappzoo.git

The NC App Zoo contains the following top-level directories. See the README file in each of these directory or just click on the links below to explore the contents of the NC App Zoo.
  • apps : Applications built to use the Intel Movidius NCS. This is a great place to start in the NC App Zoo!
  • caffe : Scripts to download caffe models and compile graphs for use with the NCS
  • tensorflow : Scripts to download TensorFlow™ models and compile graphs for use with the NCS
  • data : Data and scripts to download data for use with models and applications that use the NCS

Image Classification Applications

Image classification applications typically use one of the image classification networks in the repository to classify an image as to it's likeliness to be in each of the classes on which a network was trained. For a step by step tutorial on how to build an image classification network look at Build an Image Classifier in 5 steps at the Intel® Movidius™ Neural Compute Stick Blog
Image Classification ApplicationDescription++++++Thumbnail++++++
image-classifier

*Canonical Image Classification Example
Python
Multiple Networks
Project that accompanies the blog https://movidius.github.io/blog/ncs-image-classifier/.. If you are getting started with image classification this is a good first stop.
MultiStick_GoogLeNetPython
Caffe GoogLeNet
Image classification on multiple devices. Shows scalability by using one GUI window to show inferences on a single stick and another window to show multiple sticks
MultiStick_TF_InceptionPython
TensorFlow Inception
Image classification on multiple devices.
classifier-guiPython
Multiple Network
GUI to select network and image to classify.
gender_age_lbpC++
Caffe AgeNet, GenderNet
Uses AgeNet and GenderNet to predict age and gender of people in a live camera feed. The camera feed is displayed with a box overlayed around the faces and a label for age and gender of the person. The face detection is done with OpenCV.
live-image-classifierPython
Multiple Networks
Performs image classification on a live camera feed. This project was used to build a battery powered, RPi based, portable inference device (although RPi isn't required.) You can read more about this project at this NCS developer blog https://movidius.github.io/blog/battery-powered-dl-engine/.
log-image-classifierPython
Multiple Networks
Application logs results of an image classifier into a comma-separated values (CSV) file. Run inferences sequentially (and recursively) on all images within a folder.
rapid-image-classifierPython
Multiple Networks
Performs image classification on a large number of images. This sample code was used to validate a Dogs vs Cats classifier built using a customized version of GoogLeNet. You can read more about this project (and a step-by-step guide) here https://movidius.github.io/blog/deploying-custom-caffe-models/.
stream_inferPython
Caffe SqueezeNet
Uses gstreamer to grab frames from a live camera stream and run inferences on them while displaying top results in real time.
video_face_matcherPython
TensorFlow FaceNet
Uses the tensorflow/FaceNet network to identify faces in a camera video stream. A single face image is used as the key and when a face in the video stream matches the key, a green frame is overlayed on the video feed.
video_face_matcher_multipleFacePython
TensorFlow FaceNet
Similar to the video_face_matcher application but supports matching multiple faces
topcoder_examplePython
Multiple Networks
Contains all supporting files needed to generate submissions.zip file, which would then be uploaded to the TopCoder leaderboard for automatic scoring of the NCS competition described here: https://developer.movidius.com/competition. This program may be useful as a reference for doing accuracy calculations.

Object Detection Applications

Object detection appliations make use of one of the object detection networks in the repository to detect objects within an image. The object detection networks typically determine where objects are within the image as well as what type of objects they are.
Object Detection ApplicationDescription+++++Thumbnail+++++
birdsPython
Caffe Tiny Yolo, GoogLeNet
Detects and identifies birds in photos by using Yolo Tiny to identify birds in general and then GoogLeNet to further classify them. Displays images with overlayed rectangles bird classification.
stream_ty_gnPython
Caffe Tiny Yolo, GoogLeNet
Sends frames of live camera stream to Tiny Yolo for object detection and then crops each object and sends that to GoogLeNet for further classification. This application requires two NCS devices, one for each network. Look at this example for straight forward example, but look at the threaded version if you are interested in better performance.
stream_ty_gn_threadedPython
Caffe Tiny Yolo, GoogLeNet
Sends frames of live camera stream to Tiny Yolo for object detection and then crops each object and sends that to GoogLeNet for further classification. This application requires two NCS devices, one for each network. This is a threaded, better performing, and slightly more complex version of the stream_ty_gn application.
street_camPython
Caffe TinyYolo, GoogLeNet
Processes a video file (presumably produced by a street camera) and overlays boxes and labels around the objects detected. Objects are detected by Tiny Yolo and then further classified by GoogLeNet. This requires two NCS devices. Look at this example for straight forward example, but look at the threaded version if you are interested in better performance.
street_cam_threadedPython
Caffe TinyYolo, GoogLeNet
Processes a video file (presumably produced by a street camera) and overlays boxes and labels around the objects detected. Objects are detected by Tiny Yolo and then further classified by GoogLeNet. This requires two NCS devices. This is a threaded, better performing, and more complex version of the street_cam application.
video_objectsPython
Caffe SSD MobileNet
Processes a video file and overlays boxes and labels around the objects detected and displays results in a GUI as frames are available.

Misc Applications

Miscellaneous applications use the NCSDK in various ways that don't fit into any of the above categories but can still be interesting.
Misc ApplicationDescription+++++Thumbnail+++++
benchmarkncsPython
Multiple Network
Outputs FPS numbers for networks in the repository that take images as input. If multiple NCS devices are plugged in will give numbers for one device and for multiple.
hello_ncs_cppC++
No Networks
Simple example demonstrating how compile, run, as well as open and close a device in C++ application.
hello_ncs_pyPython
No Networks
Simple example demonstrating how open and close a device in Python and run the program.
multistick_cppPython
Caffe SqueezeNet, GoogLeNet
Simple example demonstrating how to use multiple devices and networks in a C++ application.

Run Demo

Image Classifier


Image Classifier with Python GUI 


Video Objects Detection



Reference



My Website
email : info@softpowergroup.net  ,amphancm@gmail.com  Tel .+6681-6452400

ไม่มีความคิดเห็น:

แสดงความคิดเห็น