Skip to content

Commit

Permalink
v1.09.00 release files
Browse files Browse the repository at this point in the history
  • Loading branch information
nealvis committed Oct 9, 2017
1 parent cbfdb24 commit 8d9fc0a
Show file tree
Hide file tree
Showing 159 changed files with 48,061 additions and 4 deletions.
20 changes: 20 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

*.sh text eol=lf
sshd_config text eol=lf

# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.c text
*.h text
*.cpp text
*.hpp text
*.py text

# Declare files that will always have CRLF line endings on checkout.
*.sln text eol=crlf

# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# ignore build directories and any files in build directories
build/

# ignore any qt-creator user files for cmake projects. these are files
# specific to a user and specific to qt-creator
CMakeLists.txt.user


193 changes: 193 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

64 changes: 64 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

ifneq ($(findstring movidius, $(PYTHONPATH)), movidius)
export PYTHONPATH:=/opt/movidius/caffe/python:/opt/movidius/mvnc/python:$(PYTHONPATH)
endif


.PHONY: help
help:
@echo "\nmake help starting."
@echo "Make targets are:"
@echo " make help - shows this message"
@echo " make install - Installs the ncsdk."
@echo " make examples - makes the ncsdk examples."
@echo " make uninstall - uninstalls the ncsdk."
@echo " make clean - removes targets and intermediate files."

.PHONY: all
all: install examples

.PHONY: opencv
opencv:
./install-opencv.sh

.PHONY: prereqs
prereqs:
@sed -i 's/\r//' ncsdk.conf
@if [ -e ncsdk_redirector.txt ] ; \
then \
@sed -i 's/\r//' ncsdk_redirector.txt ; \
fi

@sed -i 's/\r//' install.sh
@sed -i 's/\r//' uninstall.sh
@sed -i 's/\r//' README.md
@chmod +x install.sh
@chmod +x uninstall.sh
@chmod +x install-opencv.sh

.PHONY: install
install: prereqs
@echo "\nmake install starting."
./install.sh

.PHONY: uninstall
uninstall: prereqs
@echo "\nmake uninstall starting."
./uninstall.sh

.PHONY: examples
examples: prereqs opencv
@echo "\nmake examples starting."
(cd examples; make)

.PHONY: runexamples
runexamples: prereqs opencv
@echo "\nmake examples starting."
(cd examples; make run)

.PHONY: clean
clean:
@echo "\nmake clean starting."
(cd examples; make clean)


22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
# MvNC_SDK-
Toolkit/API binaries for the Neural Compute Stick Program
# Movidius™ Neural Compute Software Development Kit
This SDK is provided for users of the [Movidius™ Neural Compute Stick (NCS)](https://developer.movidius.com/). It provides software tools, an API, and examples which enable developers to create software that takes advantage of the hardware the accelerated neural network capability provided by the NCS.


# Installation
The provided Makefile helps with installation. Clone this repository and then run the following command to install the SDK.

```
make install
```

# Examples
Also included in the SDK are examples. After cloning and running 'make install' run the following command to install examples.
```
make examples
```

# Documentation
The complete Neural Compute SDK documentation can be viewed at [https://movidius.github.io/ncsdk/](https://movidius.github.io/ncsdk/)

155 changes: 155 additions & 0 deletions docs/Caffe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
# Caffe Support

## Introduction
[Caffe](http://caffe.berkeleyvision.org/) is a deep learning framework developed by Berkeley AI Research ([BAIR](http://bair.berkley.edu)) and by community contributors. The setup script currently downloads BVLC Caffe and installs it in a system location. Other versions of Caffe are not supported at this time. For more information please visit http://caffe.berkeleyvision.org/

Default Caffe Installation Location: /opt/movidius/caffe<br>
Checkout Berkley Vision's Web Image Classification [demo](http://demo.caffe.berkeleyvision.org/)

## Caffe Zoo
Berkley Vision hosts a Caffe Model Zoo for researchers and engineers to contribute Caffe models for various tasks. Please visit the [Berkley Caffe Zoo](http://caffe.berkeleyvision.org/model_zoo.html) page to learn more about the caffe zoo and how to create your own Caffe Zoo model and contribute.

Caffe Zoo has several models contributed including a model network that can classify images for Age and Gender. This network trained by [Gil Levi](https://gist.github.com/GilLevi) and Tal Hassner is at this [Gender Net Caffe Zoo Model on GitHub](https://gist.github.com/GilLevi/c9e99062283c719c03de)

Caffe models consists of two files that are used for compiling the caffe model using the [Neural Compute Compiler](tools/compile.md)
* Caffe Network Description (.prototxt): Text file that describes the topology and layers of the network.
* Caffe Weights (.caffemodel): Contains the weights for each layer that are obtained after training a model.

## Neural Compute Caffe Layer Support
The following layers are supported in Caffe by the Neural Compute SDK. The Neural Compute Stick does not support training, so some layers that are only required for training are not supported.

### Activation/Neuron
* bias
* elu
* prelu
* relu
* scale
* sigmoid
* tanh

### Common
* inner_product

### Normalization
* batch_norm
* lrn

### Utility
* concat
* eltwise
* flatten
* parameter
* reshape
* slice
* softmax

### Vision
* conv
* Regular Convolution - 1x1s1, 3x3s1, 5x5s1, 7x7s1, 7x7s2, 7x7s4
* Group Convolution - <1024 groups total
* deconv
* pooling

# Known Issues
### Caffe Input Layer

Limitation: Batch Size which is the first dimension must always be 1

Limitation: The number of inputs must be 1

Limitation: We don't support this "input_param" format for the input layer:

```
1 name: "GoogleNet"
2 layer {
3 name: "data"
4 type: "Input"
5 top: "data"
6 input_param { shape: { dim: *10* dim: 3 dim: 224 dim: 224 } }
7 }
```

We only support this "input_shape" format for the input layer:

```
name: "GoogleNet"
input: "data"
input_shape
{ dim:1 dim:3 dim:224 dim:224 }
```

### Input Name
Input name should be always called "data"
This works
```
name: "GoogleNet"
input: "data"
input_shape
{ dim:1 dim:3 dim:224 dim:224 }
```
This does not
```
name: "GoogleNet"
input: "data_x"
input_shape
{ dim:1 dim:3 dim:224 dim:224 }
```

### Non-Square Convolutions
Limitation: We don't support non-square convolutions such as 1x20
```
input: "data"
input_shape
{ dim:1 dim:1 dim:1 dim:64 }
layer {
name: "conv1_x"
type: "Convolution"
bottom: "data"
top: "conv1_x"
convolution_param {
num_output: 3
kernel_h: 1
kernel_w: 20
stride: 1
}
```

### Crop Layer
Limitation: Crop layer cannot take reference size layer from input:"data"

```
layer {
name: "score"
type: "Crop"
bottom: "upscore"
bottom: "data"
top: "score"
crop_param {
axis: 2
offset: 18
}
}
```

### Size Limitations
Compiled Movidius™ "graph" file < 320MB
Intermediate layer buffer size < 100MB
```
[Error 35] Setup Error: Not enough resources on Myriad to process this network
```

Scratch Memory size < 112KB

```
[Error 25] Myriad Error: "Matmul scratch memory [112640] lower than required [165392]"
```

## Caffe Networks
The following networks are validated and known to work on the Movidius™ Neural Compute SDK.
- GoogleNet V1
- SqueezeNet V1.1
- LeNet
- CaffeNet
- VGG (Sousmith VGG_A)
- AlexNet

90 changes: 89 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,89 @@
# Steven should not be seeing this, but he is ...
# Introduction
The Movidius™ Neural Compute SDK and Movidius™ Neural Compute Stick (NCS) enables rapid prototyping, validation and deployment of Deep Neural Networks (DNNs.)

The NCS is used in two primary scenarios:
- Profiling, tuning, and compiling a DNN on a development computer (host system) with the tools provided in the Movidius™ Neural Compute SDK. In this scenario the host system is typically a desktop or laptop machine running Ubuntu 16.04 Desktop (x86, 64 bit), but you can use any supported platform for these steps.

- Prototyping a user application on a development computer (host system) which accesses the hardware of the NCS to accelerate DNN inferences via the API provided with the Movidius™ Neural Compute SDK. In this scenario the host system can be a developer workstation or any developer system that runs an operating system compatible with the API.

The following diagram shows the typical workflow for development with the NCS:
![](images/ncs_workflow.jpg)

The training phase does not utilize the NCS hardware or SDK, while the subsequent phases of “profiling, tuning and compiling” and “prototyping” do require the NCS hardware and the accompanying Movidius™ Neural Compute SDK

The SDK contains a set of software tools to compile, profile, and check validity of your DNN as well as an API for both the C and Python programming languages. The API is provided to allow users to create software which offloads the neural network computation onto the Movidius™ Neural Compute Stick.

Here is more information on the [architecture](ncs1arch.md) of the Neural Compute Stick.

<a name="Frameworks"></a>
# Frameworks
Neural Compute SDK currently supports two Deep Learning frameworks.
1. [Caffe](Caffe.md) : Caffe is a deep learning framework from Berkeley Vision Labs.
2. [TensorFlow™](TensorFlow.md): TensorFlow™ is a deep learning framework from Google.

[See how to use networks from these supported framework with NCS.](configure_network.md)


<a name="InstallAndExamples"></a>
# Installation and Examples
The following commands install NCSDK and run examples. Detailed instructions for [installation and Configuration](install.md)

```
git clone http://github.com/Movidius/ncsdk && cd ncsdk && make install && make examples
```
<a name="NcSdkTools"></a>
# Movidius™ Neural Compute SDK Tools
The SDK comes with a set of tools to assist in development and deployment of applications that utilize hardware accelerated Deep Neural Networks via the Movidius™ Neural Compute Stick (NCS). Each tool and its usage is described on this page below

* [mvNCCompile](tools/compile.md): Converts Caffe/TF network and weights to Movidius™ Internal compiled format

* [mvNCProfile](tools/profile.md): Provides layer by layer statistics to evaluate the performance of Caffe/TF networks on the NCS

* [mvNCCheck](tools/check.md): Compares the results from an inference by running the network on the NCS and Caffe/TF

<a name="NcApi"></a>
# Neural Compute API
Applications for inferencing with Neural Compute SDK can be developed either in C/C++ or Python. The API provides a software interface to Open/Close Neural Compute Sticks, load graphs into the NCS and run inferences on the stick.

* [C API](c_api/readme.md)
* [Python API](py_api/readme.md)

<a name="UserForum"></a>
# Movidius™ Neural Compute User Forum

There is an active user forum in which users of the Neural Compute Stick discuss ideas and issues they have with regard to the NCS. The link to the NCS User Forum is:

[https://ncsforum.movidius.com](https://ncsforum.movidius.com)

The forum is a good place to go if you need help troubleshooting an issue. You may find other people that have figured out the issue or get ideas for how to fix it. The forum is also monitored by Movidius™ engineers which provide solutions as well.

<a name="Examples"></a>
# Examples

There are several examples including the following at the github
* Caffe
* GoogLeNet
* AlexNet
* SqueezeNet
* TensorFlow™
* Inception V1
* Inception V3
* Apps
* hello_ncs_py
* hello_ncs_cpp
* multistick_cpp

The examples demonstrate compiling, profiling and running inferences using the network on the Movidius™ Neural Compute Stick.
Each example contains a Makefile. Running 'make help' in the example's base directory will give possible make targets.

```
git clone http://github.com/Movidius/ncsdk # Already done during installation
(cd ncsdk/examples && make) # run all examples
(cd ncsdk/examples/caffe/GoogLeNet && make) # Run just one example
```


[Release Notes](release_notes.md)
23 changes: 23 additions & 0 deletions docs/TOC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# NC SDK Documentation Table of Contents

- [Introduction](readme.md#Introduction)
- [NCS Architecture](ncs1arch.md)
- [Frameworks](readme.md#Frameworks)
- [Caffe Support](Caffe.md)
- [TensorFlow Support](TensorFlow.md)
- [Configure Networks for NCS](configure_network.md)
- [Installation and examples](readme.md#InstallAndExamples)
- [Detailed Installation Instructions](install.md)
- [Virtual Machine Configuration](VirtualMachineConfig.md)
- [Installation manifiest](manifest.md)
- [NC SDK Tools](readme.md#NcSdkTools)
- [mvNCCompile](tools/compile.md)
- [mvNCProfile](tools/profile.md)
- [mvNCCheck](tools/check.md)
- [Neural Compute API](readme.md#NcApi)
- [Python API](py_api/readme.md)
- [C API](c_api/readme.md)
- [Neural Compute User Forum](readme.md#UserForum)
- [Examples](readme.md#Examples)


Loading

0 comments on commit 8d9fc0a

Please sign in to comment.