Skip to content

Challenge the marginal performance of YoloV2 + Neural Compute Stick + RaspberryPi YoloV2+Neural Compute Stick(NCS)+Raspberry Piの限界性能に挑戦

License

Notifications You must be signed in to change notification settings

PINTO0309/TinyYolo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[Japanese] TinyYolo

YoloV2+Neural Compute Stick(NCS)+Raspberry Piの限界性能に挑戦 Challenge the marginal performance of YoloV2 + Neural Compute Stick + Raspberry Pi

https://qiita.com/PINTO/items/db3ab44a3e2bcd87f2d8

動作イメージ

TinyYolo + Neural Compute Stick + RaspberryPi3

Youtube: https://youtu.be/L4RvVLyo8Rc

Riders MultiStick

環境

・RaspberryPi 3 + Raspbian Stretch

・NCSDK v1.12.00

・Intel Movidius Neural Compute Stick 1本

・OpenCV 3.4.1

・OpenGL

・numpy

・UVC対応のUSB-Webカメラ

環境構築

  1. SWAP領域の一時的な拡張
$ sudo nano /etc/dphys-swapfile
CONF_SWAPSIZE=2048

$ sudo /etc/init.d/dphys-swapfile restart swapon -s
  1. パッケージのインストール
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install python3-pip python3-numpy git cmake
  1. NCSDKのインストール
$ cd ~
$ git clone https://github.com/movidius/ncsdk.git
$ cd ncsdk
$ make install
  1. OpenCVのインストール
$ wget https://github.com/PINTO0309/OpenCVonARMv7/blob/master/libopencv3_3.4.1-20180304.1_armhf.deb
$ sudo apt install -y ./libopencv3_3.4.1-20180304.1_armhf.deb
$ sudo ldconfig
  1. OpenGLのインストール
$ sudo apt-get install python-opengl
$ sudo -H pip3 install pyopengl
$ sudo -H pip3 install pyopengl_accelerate
$ sudo raspi-config
  1. 「7.Advanced Options」-「A7 GL Driver」-「G2 GL (Fake KMS)」の順に選択し、Raspberry Pi のOpenGL Driver を有効化

  2. 再起動

$ sudo reboot
  1. リソース一式のダウンロード
$ cd ~
$ git clone https://github.com/PINTO0309/TinyYolo.git
  1. USB-WEBカメラ(UVC対応) と Neural Compute Stick をRaspberryPiのUSBポートへ接続(Neural Compute Stickをマルチで使用する場合は電圧が不足するためセルフパワーUSB-Hub必須)

  2. RaspberryPiとディスプレイをHDMIケーブルで接続

  3. MultiStick.pyの実行

$ cd TinyYolo
$ python3 ./detectionExample/MultiStick.py
  1. SWAP領域の縮小
$ sudo nano /etc/dphys-swapfile
CONF_SWAPSIZE=100

$ sudo /etc/init.d/dphys-swapfile restart swapon -s

   

[English] TinyYolo

Challenge the marginal performance of YoloV2 + Neural Compute Stick + Raspberry Pi

https://qiita.com/PINTO/items/db3ab44a3e2bcd87f2d8

Image of motion

TinyYolo + Neural Compute Stick + RaspberryPi3

Youtube: https://youtu.be/L4RvVLyo8Rc

Riders MultiStick

Environment

・RaspberryPi 3 + Raspbian Stretch

・NCSDK v1.12.00

・Intel Movidius Neural Compute Stick 1本

・OpenCV 3.4.1

・OpenGL

・numpy

・(UVC)USB-Web Camera

Building environment

  1. Temporary extension of SWAP area
$ sudo nano /etc/dphys-swapfile
CONF_SWAPSIZE=2048

$ sudo /etc/init.d/dphys-swapfile restart swapon -s
  1. Installing packages
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install python3-pip python3-numpy git cmake
  1. Installing NCSDK
$ cd ~
$ git clone https://github.com/movidius/ncsdk.git
$ cd ncsdk
$ make install
  1. Installation of OpenCV
$ wget https://github.com/PINTO0309/OpenCVonARMv7/blob/master/libopencv3_3.4.1-20180304.1_armhf.deb
$ sudo apt install -y ./libopencv3_3.4.1-20180304.1_armhf.deb
$ sudo ldconfig
  1. Installing OpenGL
$ sudo apt-get install python-opengl
$ sudo -H pip3 install pyopengl
$ sudo -H pip3 install pyopengl_accelerate
$ sudo raspi-config
  1. 「7.Advanced Options」-「A7 GL Driver」-「G2 GL (Fake KMS)」 and Activate Raspberry Pi's OpenGL Driver

  2. Reboot

$ sudo reboot
  1. Download complete set of resources
$ cd ~
$ git clone https://github.com/PINTO0309/TinyYolo.git
  1. Connect USB-WEB camera (UVC compatible) and Neural Compute Stick to RaspberryPi's USB port (self power USB-Hub required due to insufficient voltage when using Neural Compute Stick in multiple)

  2. Connect RaspberryPi and display with HDMI cable

  3. Running MultiStick.py

$ cd TinyYolo
$ python3 ./detectionExample/MultiStick.py
  1. Reducing the SWAP area
$ sudo nano /etc/dphys-swapfile
CONF_SWAPSIZE=100

$ sudo /etc/init.d/dphys-swapfile restart swapon -s

About

Challenge the marginal performance of YoloV2 + Neural Compute Stick + RaspberryPi YoloV2+Neural Compute Stick(NCS)+Raspberry Piの限界性能に挑戦

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published