英特爾神經計算棒_如何設置英特爾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.pswp.cn/news/393038.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/393038.shtml
英文地址,請注明出處:http://en.pswp.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…