英特尔神经计算棒_如何设置英特尔Movidius神经计算棒

英特尔神经计算棒

by Rishal Hurbans

由Rishal Hurbans

如何设置英特尔Movidius神经计算棒 (How to set up the Intel Movidius Neural Compute Stick)

In 2017 I was approached by Intel to join their Innovator Programme. After a couple interviews I was inducted as an Intel Innovator in the AI space. The idea of the initiative is to support technologists around the world involved in the community by providing cutting edge hardware, speakership opportunities, and a platform to promote their work and engage with more people.

2017年,英特尔邀请我加入他们的创新计划。 经过几次采访后,我被选为AI领域的英特尔创新者。 该计划的想法是通过提供最先进的硬件,演讲机会以及促进他们的工作并与更多人互动的平台来支持世界各地参与社区的技术人员。

Intel sent me a Movidius Neural Compute Stick. It’s a USB stick a little larger than a thumb drive that is specifically designed to train and primarily run neural network graphs, which is particularly useful in running networks for deep learning where learning happened from media such as images and video. I’ll likely cover deep learning in a future post. From benchmarks, the Movidius neural compute stick promises to run models up to five times faster than a standard laptop.

英特尔向我发送了Movidius神经计算棒。 这是一个比拇指驱动器大一点的USB记忆棒,专门设计用于训练和主要运行神经网络图,这在运行深度学习网络时特别有用,在深度学习中,需要从图像和视频等媒体中学习。 我可能会在以后的文章中介绍深度学习。 从基准来看,Movidius神经计算棒承诺运行模型的速度比标准笔记本电脑快五倍。

Upon receiving the device, I realised that it currently only runs on Ubuntu 16.04 and the Raspberry Pi 3. Being a macOS user, this was a little problematic, so I decided to run an Ubuntu virtual machine to start tinkering with the device. This guide describes how I successfully setup an environment acceptable for the Movidius stick, and briefly describes its capabilities.

收到设备后,我意识到它目前只能在Ubuntu 16.04和Raspberry Pi 3上运行。作为macOS用户,这有点问题,因此我决定运行Ubuntu虚拟机来开始对该设备进行修改。 本指南介绍了如何成功设置Movidius棒可接受的环境,并简要介绍了其功能。

设置虚拟机 (Setting up a virtual machine)

The first step is getting a virtual machine(VM) up and running. Although there are a number of different VM software options, Virtual Box is a freely available one that’s simple to configure and use. Alternatives such as Parallels and VMWare may provide better performance if the VM is intended to be used as a primary workstation.

第一步是启动并运行虚拟机。 尽管有许多不同的VM软件选项,但Virtual Box是可免费使用的,易于配置和使用。 如果打算将VM用作主要工作站,则诸如Parallels和VMWare之类的替代方案可能会提供更好的性能。

  1. Download Virtual Box.

    下载Virtual Box 。

  2. Install Virtual Box using the downloaded installer.

    使用下载的安装程序安装Virtual Box。
  3. Download Virtual Box Extension Pack.

    下载Virtual Box Extension Pack 。

  4. Install Virtual Box Extension Pack using the downloaded installer.

    使用下载的安装程序安装Virtual Box Extension Pack。
  5. Download Ubuntu 16.04 64 bit ISO image.

    下载Ubuntu 16.04 64位ISO映像 。

  6. Create a new virtual machine.

    创建一个新的虚拟机。
  7. Load Ubuntu 16.04 image as optical disk on the newly created virtual machine.

    将Ubuntu 16.04映像作为光盘加载到新创建的虚拟机上。
  8. Start the virtual machine.

    启动虚拟机。
  9. Follow the steps to install Ubuntu on the virtual machine.

    请按照以下步骤在虚拟机上安装Ubuntu。

My virtual machine specifications:

我的虚拟机规格:

These are the configurations I used. Feel free to adjust the memory(RAM) and hard disk allocation as you see fit. Keep in mind that over-allocating resources will result in poor performance on the host operating system.

这些是我使用的配置。 随意调整您认为合适的内存(RAM)和硬盘分配。 请记住,过度分配资源会导致主机操作系统上的性能下降。

  • Name: Ubuntu 16.04

    名称:Ubuntu 16.04
  • Type: Linux

    类型:Linux
  • Memory Size: 3072 MB

    记忆体大小:3072 MB
  • Virtual hard disk: 40 GB

    虚拟硬盘:40 GB

Ubunutu 16.04的先决条件 (Prerequisites on Ubunutu 16.04)

Before getting the SDK and examples up and running, some dependencies are required to ensure that the development environment is ready and the necessary tools are available. This entails updating Ubuntu and making sure you have Python, PIP (PIP Installs Packages), and Git to clone code repositories.

在启动和运行SDK和示例之前,需要一些依赖项,以确保开发环境准备就绪并且必要的工具可用。 这需要更新Ubuntu,并确保您具有Python,PIP(PIP安装软件包)和Git来克隆代码存储库。

  1. Update Ubuntu: A popup should appear to update Ubuntu or you can use this command in Console: sudo apt-get upgrade

    更新Ubuntu:应该会出现一个弹出窗口以更新Ubuntu,或者您可以在控制台中使用此命令: sudo apt-get upgrade

  2. To use Console, simply click on the Ubuntu menu and search for the “Console” application.

    要使用控制台,只需单击Ubuntu菜单并搜索“ Console”应用程序。
  3. Make sure Python 3 is installed using Console: python3 --version

    确保使用控制台安装了Python 3: python3 --version

  4. If Python 3 is not installed, install it using Console: sudo apt install python3

    如果未安装Python 3,请使用控制台进行sudo apt install python3sudo apt install python3

  5. Make sure pip 3 is installed using Console: pip3 --version

    确保使用控制台安装了pip 3: pip3 --version

  6. If pip 3 is not installed, install it using Console: sudo apt install python3-pip

    如果未安装pip 3,请使用控制台进行sudo apt install python3-pipsudo apt install python3-pip

  7. Make sure Git is installed using Console: git --version

    确保使用控制台安装了Git: git --version

  8. If Git is not installed, install it using Console: sudo apt install git-all

    如果未安装Git,请使用控制台进行sudo apt install git-allsudo apt install git-all

确保Movidius Stick被识别 (Make sure the Movidius Stick is recognised)

Next, we get to setting up the Movidius stick. This involves ensuring that the USB devices is recognised by the virtual machine. Since a virtual machine gains access to hardware via the host operating system, some configuration is required for devices such as the Movidius where drivers are not distributed commonly.

接下来,我们要设置Movidius摇杆。 这涉及确保USB设备被虚拟机识别。 由于虚拟机可以通过主机操作系统访问硬件,因此对于Movidius等设备(其驱动程序不常见),需要进行一些配置。

  1. Plug the Movidius stick into a USB port.

    将Movidius记忆棒插入USB端口。
  2. Use the lsusb command in Console to determine if it is recognised by the VM and Ubuntu. You should see the Movidius stick in the list of USB devices.

    在控制台中使用lsusb命令来确定VM和Ubuntu是否可以识别它。 您应该在USB设备列表中看到Movidius记忆棒。

  3. If it is not recognised. Shut down the VM and follow the below instructions.

    如果无法识别。 关闭虚拟机,然后按照以下说明进行操作。
  4. Navigate to the settings of the VM in Virtual Box. Choose Ports > USB.

    导航到“ Virtual Box”中虚拟机的设置。 选择“端口> USB”。
  5. Add a new filter for USB 2 providing just the Vendor ID as 03e7

    为USB 2添加新的过滤器,仅提供供应商ID为03e7

  6. Add a new filter for USB 3 providing just the Vendor ID as 040e

    为USB 3添加新的筛选器,仅提供供应商ID为040e

  7. Start the Ubuntu VM.

    启动Ubuntu VM。
  8. Use the lsusb command to list USB devices, and the Movidius stick should now be recognised. In my case, it worked being plugged into a USB 3 port but it was recognised as USB 2 vendor ID 03e7.

    使用lsusb命令列出USB设备,现在应该可以识别Movidius记忆棒了。 就我而言,它可以插入USB 3端口,但是被识别为USB 2供应商ID 03e7

安装NCSDK (Install NCSDK)

The NCSDK is required to interact with the Movidius stick. The goal of the SDK is to provide an interface to neural compute hardware. This means that machine learning programs can be written to take advantage of the optimisation of purpose-specific hardware by using this SDK.

需要NCSDK与Movidius操纵杆进行交互。 SDK的目标是提供神经计算硬件的接口。 这意味着可以使用此SDK编写机器学习程序,以利用针对特定目的的硬件的优化。

  1. Clone the NCSDK (Neural Compute Software Development Kit) repository in Console: git clone https://github.com/movidius/ncsdk.git

    在控制台中克隆NCSDK(神经计算软件开发套件)存储库: git clone https://github.com/movidius/ncsdk.git

  2. If you have problems with the repository, download the NCSDK here. I used version 1:

    如果存储库有问题,请在此处下载NCSDK。 我使用了版本1:

1.12.00.01:https://ncs-forum-uploads.s3.amazonaws.com/ncsdk/ncsdk-01_12_00_01-full/ncsdk-1.12.00.01.tar.gz

1.12.00.01: https://ncs-forum-uploads.s3.amazonaws.com/ncsdk/ncsdk-01_12_00_01-full/ncsdk-1.12.00.01.tar.gz

2.05.00.02:https://ncs-forum-uploads.s3.amazonaws.com/ncsdk/ncsdk-02_05_00_02-full/ncsdk-2.05.00.02.tar.gz

2.05.00.02: https://ncs-forum-uploads.s3.amazonaws.com/ncsdk/ncsdk-02_05_00_02-full/ncsdk-2.05.00.02.tar.gz

Then perform the following steps:

然后执行以下步骤:

  1. Navigate to the NCSDK directory in Console.

    导航到控制台中的NCSDK目录。
  2. Build the SDK in Console: make install

    在控制台中构建SDK: make install

  3. Build the examples: make examples

    构建示例: make examples

构建并运行示例 (Build and Run Examples)

Finally, we get to run some examples and see the Movidius in action. The Neural Compute App Zoo is a repository of examples that demonstrate how the NC SDK and Movidius stick can be used to train and process neural network graphs more efficiently than typical CPUs.

最后,我们开始运行一些示例,看看Movidius的作用。 Neural Compute App Zoo是一个示例存储库,这些示例演示了如何使用NC SDK和Movidius stick比典型的CPU更有效地训练和处理神经网络图。

The example we will be looking at is image classification. Instead of creating our own model which will take countless of hours of data collection, data processing, and training, we will simply use GoogLeNet — a well trained model for image classification by Google. The graph engine used to process the model will be Caffe. Caffe is a widely used machine-vision framework which excels at image-related tasks.

我们将要看的示例是图像分类。 与其创建我们自己的模型,该模型将花费大量时间进行数据收集,数据处理和培训,我们将仅使用GoogLeNet(谷歌对图像进行分类的训练有素的模型)。 用于处理模型的图形引擎将是Caffe。 Caffe是一种广泛使用的机器视觉框架,擅长于图像相关的任务。

  1. Clone the examples repository in Console: git clone https://github.com/movidius/ncappzoo.git

    在控制台中克隆示例存储库: git clone https://github.com/movidius/ncappzoo.git

  2. Navigate to cloned directory: cd ncappzoo

    导航到克隆目录: cd ncappzoo

  3. Build the examples: make

    构建示例: make

  4. Install sk-image if it’s missing: pip3 install scikit-image

    如果缺少,请安装sk-image: pip3 install scikit-image

  5. Make caffe GoogleImageNet graph: cd caffe && make

    制作caffe GoogleImageNet图: cd caffe && make

  6. Navigate to image-classifier: cd apps/image-classifier

    导航到图像分类器: cd apps/image-classifier

  7. Run the example: python3 image-classifier.py

    运行示例: python3 image-classifier.py

  8. Success! You should see results of the basic image classifier.

    成功! 您应该看到基本图像分类器的结果。

前进并征服 (Go Forth and Conquer)

Although the Movidius Neural Compute stick only supports Raspbian and Ubuntu at the moment, it is possible to get it running on your platform. Soon we will be seeing AI on edge devices such as drones, home automation cameras, and other IoT devices via purpose specific hardware solutions such as the Movidius. Explore the examples and build your own AI, share your great work, and help mould the future.

尽管Movidius神经计算棒目前仅支持Raspbian和Ubuntu,但是有可能使其在您的平台上运行。 很快,我们将通过专用硬件解决方案(例如Movidius)在无人机,家庭自动化摄像头和其他IoT设备等边缘设备上看到AI。 探索示例并构建自己的AI,分享您的出色工作,并帮助塑造未来。

Keep in touch ✌️I’m active on Twitter: @RishalHurbans

保持联系✌️我在Twitter上活跃: @RishalHurbans

I’m available on email via rishal[at]prolificidea[dot]com

我可以通过rishal [at] prolificidea [dot] com接收电子邮件

I’m also writing more, so follow me on Medium.

我也在写更多,所以在Medium上关注我。

If you enjoyed this article, please give it a clap, or five, or fifty. It will help others see it.

如果您喜欢这篇文章,请给它鼓掌,或五或五十。 它将帮助其他人看到它。

翻译自: https://www.freecodecamp.org/news/how-to-set-up-the-intel-movidius-neural-compute-stick-b9db16d493a7/

英特尔神经计算棒

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/393038.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

linux 脚本中的push,linux shell之pushd、popd和dirs的使用讲解

1 问题我们有时候需要保存多个路径,上下键切换不方便,用cd-只能到上个目录,我们可以用dirs和pushd和popd2 dirs、pushd、popddirs: 这个命令显示栈里面所有的路径,一定会包含当前路径,常用参数如下dirs -v 显示栈里面的所有路径和…

为什么我从 Git Flow 开发模式切换到了 Trunk Based 开发模式?

我已经使用 Git Flow 构建我的 Git 分支有几年了。但是,我遇到了 Git Flow 的一些问题,其中大部分来自长期存在的分支。解决这些问题的方案就是 Trunk Based Development。这是一个非常简单的技术,也是有效的持续交付的基础。在这篇文章中&am…

DedeCMS 提示信息! ----------dede_addonarticle

把数据保存到数据库附加表 dede_addonarticle 时出错,请把相关信息提交给DedeCms官方。Duplicate entry ’2532′ for key ‘PRIMARY’出现这种情况其实是你的主键是不可重复的,现在重复插入值为2532的主键了。可以去掉主键唯一,或是设成自增…

angular 模块构建_通过构建全栈应用程序学习Angular 6

angular 模块构建Angular 6 is out! The new features include better performance, new powerful CLI additions and a new way to inject services.Angular 6出来了! 新功能包括更好的性能,新的功能强大的CLI附加功能以及注入服务的新方法。 This tut…

leetcode74. 搜索二维矩阵(二分查找)

编写一个高效的算法来判断 m x n 矩阵中,是否存在一个目标值。该矩阵具有如下特性: 每行中的整数从左到右按升序排列。 每行的第一个整数大于前一行的最后一个整数。 示例 1: 输入: matrix [ [1, 3, 5, 7], [10, 11, 16, 20], [23, 30, 34, 50] ] tar…

搭建基于.NetFrameWork的私有nuget服务端及打包项目发布上传

一、私有Nuget服务端搭建 1.创建一个.NetFramework web项目 2.在nuget管理中 安装 nuget.server包 3.安装完成后修改web.config里面的 apikey 和 packagesPath apikey:推送包到nuget服务端 packpage: 上传上来的包存放的服务器位置 4.发布web项目到IIS中&#xff0c…

linux 网络配置 阮一峰,Vim 配置入门

Vim 是最重要的编辑器之一,主要有下面几个优点。可以不使用鼠标,完全用键盘操作。系统资源占用小,打开大文件毫无压力。键盘命令变成肌肉记忆以后,操作速度极快。服务器默认都安装 Vi 或 Vim。Vim 的配置不太容易,它有…

spring 之 property-placeholder 分析

不难知道&#xff0c; property-placeholder 的解析是 PropertyPlaceholderBeanDefinitionParser 完成的&#xff0c; 但是 它仅仅是个parser &#xff0c; 它仅仅是读取了 location 等配置属性&#xff0c; 并没有完成真正的解析&#xff0c;及 注册。 <context:property-p…

leetcode面试题 10.02. 变位词组

编写一种方法&#xff0c;对字符串数组进行排序&#xff0c;将所有变位词组合在一起。变位词是指字母相同&#xff0c;但排列不同的字符串。 注意&#xff1a;本题相对原题稍作修改 示例: 输入: [“eat”, “tea”, “tan”, “ate”, “nat”, “bat”], 输出: [ [“ate”,…

hacktoberfest_我第一次参加Hacktoberfest中学到了什么

hacktoberfestImposter syndrome is something we all struggle with to one degree or another. Imposter syndrome is the fear of exposure as a fraud. If you’re anything like me you have felt like your work was not good enough to show. Or you weren’t far along…

--save 和--save-dev的区别

npm install 在安装 npm 包时&#xff0c;有两种命令参数可以把它们的信息写入 package.json 文件&#xff0c;一个是npm install --save另一个是 npm install --save-dev&#xff0c;他们表面上的区别是--save 会把依赖包名称添加到 package.json 文件 dependencies 键下&…

Linux 文件区块连续吗,关于Linux文件系统的的简单理解和认识

关于Linux文件系统的的简单理解和认识关于文件系统的运作&#xff0c;这与操作系统带的档案数据有关。例如Linux操作系统的档案权限(rwx)与文件属性(拥有者&#xff0c;群组&#xff0c;时间参数等)。文件系统通常会将这两部分的数据分别存放在不同的区块&#xff0c;权限与属性…

服务器性能和活动监视

监视数据库的目的是评估服务器的性能。 有效监视包括定期拍摄当前性能的快照来隔离导致问题的进程&#xff0c;以及连续收集数据来跟踪性能趋势。 Microsoft SQL Server 和 Microsoft 操作系统提供实用工具&#xff0c;使您可以查看数据库的当前状态并跟踪性能的状态变化。 下一…

Microsoft Desktop Virtualization

基本上有两套啦&#xff0c;一是大家较为熟悉的MED-V。另外就是VDI(虚拟桌面基础架构)&#xff0c;也就是以下的组合&#xff1a;1、Windows Server 2008 with Hyper-V 2、System Center Virtual Machine Manager (VMM) 2008 VMM 20083、Windows Vista Enterprise Centralized …

leetcode60. 第k个排列(回溯算法)

给出集合 [1,2,3,…,n]&#xff0c;其所有元素共有 n! 种排列。 按大小顺序列出所有排列情况&#xff0c;并一一标记&#xff0c;当 n 3 时, 所有排列如下&#xff1a; “123” “132” “213” “231” “312” “321” 给定 n 和 k&#xff0c;返回第 k 个排列。 说明&…

webpack设置应用缓存_如何使用Webpack在Rails应用程序中设置TinyMCE

webpack设置应用缓存by Joanna Gaudyn乔安娜高登(Joanna Gaudyn) 如何使用Webpack在Rails应用程序中设置TinyMCE (How to setup TinyMCE in your Rails app using Webpack) The popularity of using Webpack to deal with your assets in Rails is steadily increasing. Getti…

springmvc ajax 页面无法重定向问题!!!!

诶诶诶。这个问题困扰了我一天&#xff0c;百度了很多都不行。 刚实战ssm框架&#xff0c;做登录跳转的时候&#xff0c;我是用ajax提交数据到后台&#xff0c;然后后天返回数据进前台&#xff0c;前台再给用户一些比较友好的提示&#xff0c;比如用户名或密码错误之类的。 所以…

linux svn log 乱码,解决p42svn中文log乱码的问题

现象&#xff1a;将perforce代码库迁移至SVN时log乱码。p42svn.pl在windows下运行至"-|"时会报错&#xff0c;于是安装了linux虚拟机&#xff0c;从虚拟linux中运行p42svn.pl生成dump文件&#xff0c;再传至windows下用svnadmin load。可是在svn查看log时&#xff0…

Django开发中常用的命令总结

1. 创建一个Django Project#使用下面的命令可以创建一个projectdjango-admin.py startproject mysite #创建好之后可以看到如下的pro... 1. 创建一个Django Project 1 2 3 4 5 6 7 8 9 10 11 #使用下面的命令可以创建一个project django-admin.py startproject mysite #创…

xml解析-jaxp添加结点

jaxp添加结点 eg&#xff1a; //在第一个下面添加nv / 1.创建解析器工厂 * 2.根据解析器工厂创建解析器 * 3.解析xml返回document * * 4.得到第一个p1 * -得到所有p1使用item方法得到第一个p1 * * 5.创建sex标签 createElement * 6.创建文本 createTextNode * 7.把文本添加到se…