Difference between revisions of "TensorflowPi"

From cogniteam
Jump to: navigation, search
Line 1: Line 1:
 
= Raspberry Pi tensorflow detection SD image install and run instructions =
 
= Raspberry Pi tensorflow detection SD image install and run instructions =
  
=== Create SD card ===
+
== Create SD card ==
 
# Copy raspberry pi disk image to SD card (8Gb minimum):
 
# Copy raspberry pi disk image to SD card (8Gb minimum):
 
#: <pre>tar xf pi_mobilenet_embedded_0_5_aarch64.img.tar.xz</pre>
 
#: <pre>tar xf pi_mobilenet_embedded_0_5_aarch64.img.tar.xz</pre>
 
#: <pre>sudo dd if=pi_mobilenet_embedded_0_5_aarch64.img of=/dev/YOU_SD_DEVICE bs=4M</pre>
 
#: <pre>sudo dd if=pi_mobilenet_embedded_0_5_aarch64.img of=/dev/YOU_SD_DEVICE bs=4M</pre>
  
=== Power up & network configuration ===
+
== Power up & network configuration ==
 
# Connect your raspberry pi to good power supply (5V, 2A at least), connect keyboard and monitor
 
# Connect your raspberry pi to good power supply (5V, 2A at least), connect keyboard and monitor
 
# Login:
 
# Login:
Line 17: Line 17:
 
# '''sudo reboot'''
 
# '''sudo reboot'''
  
=== Run ===
+
== Run ==
 
Now everything is ready for running detection, connect a regular USB webcam and run:
 
Now everything is ready for running detection, connect a regular USB webcam and run:
 
<pre>
 
<pre>
Line 23: Line 23:
 
</pre>
 
</pre>
  
=== Remote image viewer ===
+
== Remote image viewer ==
 
# On a computer connected to the same network, first, install ROS (Ubuntu 16.04):
 
# On a computer connected to the same network, first, install ROS (Ubuntu 16.04):
 
#: <pre>sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'</pre>
 
#: <pre>sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'</pre>

Revision as of 13:21, 4 February 2019

Raspberry Pi tensorflow detection SD image install and run instructions

Create SD card

  1. Copy raspberry pi disk image to SD card (8Gb minimum):
    tar xf pi_mobilenet_embedded_0_5_aarch64.img.tar.xz
    sudo dd if=pi_mobilenet_embedded_0_5_aarch64.img of=/dev/YOU_SD_DEVICE bs=4M

Power up & network configuration

  1. Connect your raspberry pi to good power supply (5V, 2A at least), connect keyboard and monitor
  2. Login:
    Username: root
    Password: raspberry
  3. Edit /etc/network/interfaces.d/eth0:
    Set your local network IP settings
  4. Edit /root/detection.config:
    Set ROS_IP to your IP address
  5. sudo reboot

Run

Now everything is ready for running detection, connect a regular USB webcam and run:

roslaunch tensorflow_detection tensorflow_detection.launch

Remote image viewer

  1. On a computer connected to the same network, first, install ROS (Ubuntu 16.04):
    sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
    sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
    sudo apt-get update
    sudo apt install ros-kinetic-rqt-image-view
  2. Setup ROS environment
    source /opt/ros/kinetic/setup.bash
  3. Connect to remote ROS server
    export ROS_IP=IP_OF_RASPBERRY_PI
    rqt_image_view