Intel® Movidius™ Neural Compute SDK - Base Examples

Intel® Movidius™ Neural Compute SDK - Base Examples

There are several example applications and networks included with the NCSDK:

  • Apps
    • hello_ncs_py
    • hello_ncs_cpp
    • multistick_cpp
  • Caffe
    • GoogLeNet
    • AlexNet
    • SqueezeNet
  • TensorFlow*
    • Inception v1
    • Inception v3

Usage

Use the following command in your ncsdk directory to download necessary prerequisites and models and build all examples:

make examples

You must have a neural compute device attached to your system to build the examples.

Building Individual Examples

Each example comes with its own Makefile that will install only that specific example and any prerequisites that it requires. To build and run an example, run the following command within that example’s directory:

make run

The Makefile for each example also has a ‘help’ target that will display all possible make targets:

make help

Neural Compute App Zoo

Many more examples, including user-submitted networks and applications, can be found at our Neural Compute App Zoo GitHub repository.
https://github.com/movidius/ncappzoo/
Contains examples for the Movidius Neural Compute Stick.

ncappzoo/caffe/README.md

https://github.com/movidius/ncappzoo/blob/master/caffe/README.md

ncappzoo/apps/README.md

https://github.com/movidius/ncappzoo/blob/master/apps/README.md

ncappzoo/apps/hello_ncs_py/README.md

hello_ncs_py: A Movidius Neural Compute Stick Hello World example for Python
This directory contains a python3 example that shows the Movidius NC SDK software is installed and is correctly configured on your system such that an application can access the stick via the NC SDK’s API.

Prerequisites
This code example requires that the following components are available:

  1. Movidius Neural Compute Stick
  2. Movidius Neural Compute SDK
  3. Python3

Running the Example
To run the example code do the following :

  1. Open a terminal and change directory to the hello_ncs_py base directory
  2. Type the following command in the terminal: make run

When the application runs normally and is able to connect to the NCS device the output will be similar to this:

Hello NCS! Device opened normally.
Goodbye NCS! Device closed normally.
NCS device working.
foreverstrong@strong:~$ cd ncs_work/ncsdk/
foreverstrong@strong:~/ncs_work/ncsdk$ 
foreverstrong@strong:~/ncs_work/ncsdk$ ll
total 1132
drwxrwxr-x 6 foreverstrong foreverstrong   4096 10月 30 14:55 ./
drwxrwxr-x 3 foreverstrong foreverstrong   4096 10月 30 14:40 ../
drwxrwxr-x 5 foreverstrong foreverstrong   4096 10月 30 14:41 api/
-rw-rw-r-- 1 foreverstrong foreverstrong 117286 10月 30 14:41 ATTRIBUTIONS
drwxrwxr-x 9 foreverstrong foreverstrong   4096 10月 30 14:41 docs/
drwxrwxr-x 6 foreverstrong foreverstrong   4096 10月 30 14:41 examples/
drwxrwxr-x 8 foreverstrong foreverstrong   4096 10月 30 14:41 .git/
-rw-rw-r-- 1 foreverstrong foreverstrong    481 10月 30 14:41 .gitattributes
-rw-rw-r-- 1 foreverstrong foreverstrong    212 10月 30 14:41 .gitignore
-rwxrwxr-x 1 foreverstrong foreverstrong   2055 10月 30 14:41 install-opencv.sh*
-rwxrwxr-x 1 foreverstrong foreverstrong   1577 10月 30 14:55 install.sh*
-rw-rw-r-- 1 foreverstrong foreverstrong  10321 10月 30 14:41 LICENSE
-rw-rw-r-- 1 foreverstrong foreverstrong   1574 10月 30 14:41 Makefile
-rw-rw-r-- 1 foreverstrong foreverstrong 966651 10月  3 04:51 NCSDK-1.12.01.01.tar.gz
-rw-rw-r-- 1 foreverstrong foreverstrong    145 10月 30 14:55 ncsdk.conf
-rw-rw-r-- 1 foreverstrong foreverstrong   3144 10月 30 14:55 README.md
-rwxrwxr-x 1 foreverstrong foreverstrong   1203 10月 30 14:41 uninstall-opencv.sh*
-rwxrwxr-x 1 foreverstrong foreverstrong    247 10月 30 14:55 uninstall.sh*
foreverstrong@strong:~/ncs_work/ncsdk$ 
foreverstrong@strong:~/ncs_work/ncsdk$ cd examples/
foreverstrong@strong:~/ncs_work/ncsdk/examples$ ll
total 32
drwxrwxr-x 6 foreverstrong foreverstrong 4096 10月 30 14:41 ./
drwxrwxr-x 6 foreverstrong foreverstrong 4096 10月 30 14:55 ../
drwxrwxr-x 5 foreverstrong foreverstrong 4096 10月 30 14:41 apps/
drwxrwxr-x 5 foreverstrong foreverstrong 4096 10月 30 14:41 caffe/
drwxrwxr-x 4 foreverstrong foreverstrong 4096 10月 30 14:41 data/
-rw-rw-r-- 1 foreverstrong foreverstrong  767 10月 30 14:41 Makefile
-rw-rw-r-- 1 foreverstrong foreverstrong  887 10月 30 14:41 README.md
drwxrwxr-x 4 foreverstrong foreverstrong 4096 10月 30 14:41 tensorflow/
foreverstrong@strong:~/ncs_work/ncsdk/examples$ 
foreverstrong@strong:~/ncs_work/ncsdk/examples$ cd apps/
foreverstrong@strong:~/ncs_work/ncsdk/examples/apps$ 
foreverstrong@strong:~/ncs_work/ncsdk/examples/apps$ ll
total 28
drwxrwxr-x 5 foreverstrong foreverstrong 4096 10月 30 14:41 ./
drwxrwxr-x 6 foreverstrong foreverstrong 4096 10月 30 14:41 ../
drwxrwxr-x 3 foreverstrong foreverstrong 4096 10月 30 14:41 hello_ncs_cpp/
drwxrwxr-x 2 foreverstrong foreverstrong 4096 10月 30 14:41 hello_ncs_py/
-rw-rw-r-- 1 foreverstrong foreverstrong  527 10月 30 14:41 Makefile
drwxrwxr-x 3 foreverstrong foreverstrong 4096 10月 30 15:04 multistick_cpp/
-rw-rw-r-- 1 foreverstrong foreverstrong   22 10月 30 14:41 README.md
foreverstrong@strong:~/ncs_work/ncsdk/examples/apps$ 
foreverstrong@strong:~/ncs_work/ncsdk/examples/apps$ cd hello_ncs_py/
foreverstrong@strong:~/ncs_work/ncsdk/examples/apps/hello_ncs_py$ 
foreverstrong@strong:~/ncs_work/ncsdk/examples/apps/hello_ncs_py$ ll
total 20
drwxrwxr-x 2 foreverstrong foreverstrong 4096 10月 30 14:41 ./
drwxrwxr-x 5 foreverstrong foreverstrong 4096 10月 30 14:41 ../
-rw-rw-r-- 1 foreverstrong foreverstrong 1727 10月 30 14:41 hello_ncs.py
-rw-rw-r-- 1 foreverstrong foreverstrong  468 10月 30 14:41 Makefile
-rw-rw-r-- 1 foreverstrong foreverstrong  871 10月 30 14:41 readme.md
foreverstrong@strong:~/ncs_work/ncsdk/examples/apps/hello_ncs_py$ 
foreverstrong@strong:~/ncs_work/ncsdk/examples/apps/hello_ncs_py$ make run

making run
python3 hello_ncs.py;
Hello NCS! Device opened normally.
Goodbye NCS! Device closed normally.
NCS device working.
foreverstrong@strong:~/ncs_work/ncsdk/examples/apps/hello_ncs_py$ 
foreverstrong@strong:~/ncs_work/ncsdk/examples/apps/hello_ncs_py$ make help
possible make targets: 
  make help - shows this message
  make all - makes the following: run
  make run - runs the hello_ncs_cpp executable example program
  make clean - removes all created content and temporary files
foreverstrong@strong:~/ncs_work/ncsdk/examples/apps/hello_ncs_py$ 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值