Difference between revisions of "TensorflowPi"
From cogniteam
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | Raspberry Pi tensorflow detection SD image install and run instructions | |
+ | |||
+ | == Create SD card == | ||
+ | # Unzip compressed image: | ||
+ | #: <pre>tar xf pi_mobilenet_embedded_0_5_aarch64.img.tar.xz</pre> | ||
# Copy raspberry pi disk image to SD card (8Gb minimum): | # Copy raspberry pi disk image to SD card (8Gb minimum): | ||
− | |||
#: <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 == | |
# 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 16: | Line 19: | ||
# '''sudo reboot''' | # '''sudo reboot''' | ||
− | + | == 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 22: | Line 25: | ||
</pre> | </pre> | ||
− | + | == Remote image viewer == | |
− | # | + | # 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> | ||
#: <pre>sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116</pre> | #: <pre>sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116</pre> | ||
Line 30: | Line 33: | ||
# Setup ROS environment | # Setup ROS environment | ||
#: <pre>source /opt/ros/kinetic/setup.bash</pre> | #: <pre>source /opt/ros/kinetic/setup.bash</pre> | ||
− | # | + | # Connect to remote ROS server |
#: <pre>export ROS_IP=IP_OF_RASPBERRY_PI</pre> | #: <pre>export ROS_IP=IP_OF_RASPBERRY_PI</pre> | ||
#: <pre>rqt_image_view</pre> | #: <pre>rqt_image_view</pre> |
Latest revision as of 14:04, 4 February 2019
Raspberry Pi tensorflow detection SD image install and run instructions
Create SD card
- Unzip compressed image:
-
tar xf pi_mobilenet_embedded_0_5_aarch64.img.tar.xz
-
- Copy raspberry pi disk image to SD card (8Gb minimum):
-
sudo dd if=pi_mobilenet_embedded_0_5_aarch64.img of=/dev/YOU_SD_DEVICE bs=4M
-
Power up & network configuration
- Connect your raspberry pi to good power supply (5V, 2A at least), connect keyboard and monitor
- Login:
- Username: root
- Password: raspberry
- Edit /etc/network/interfaces.d/eth0:
- Set your local network IP settings
- Edit /root/detection.config:
- Set ROS_IP to your IP address
- 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
- 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
-
- Setup ROS environment
-
source /opt/ros/kinetic/setup.bash
-
- Connect to remote ROS server
-
export ROS_IP=IP_OF_RASPBERRY_PI
-
rqt_image_view
-