-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinstall_precompile.sh
More file actions
36 lines (33 loc) · 1.39 KB
/
Copy pathinstall_precompile.sh
File metadata and controls
36 lines (33 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
#######################################################################
######## enable camera first by running 'sudo raspi-config' ###########
#######################################################################
sudo apt-get update
sudo apt-get install -y python-dev python-setuptools python-pip python-opencv python-picamera
sudo apt-get install -y libopenblas-dev liblapack-dev libopencv-dev
###############################
## install pre-compile mxnet ##
###############################
cd ~
wget https://github.com/comdet/deep-mbed/raw/master/mxnet.tar.gz
tar -zxf mxnet.tar.gz
cd incubator-mxnet/python
sudo -H pip install --upgrade pip
sudo -H pip install -e .
printf "import mxnet\nprint mxnet.__version__" | python
cd ~
#benchmark test speed alexnet
python incubator-mxnet/example/image-classification/benchmark_score.py
########################
## install tensorflow ##
########################
cd ~
mkdir tensorflow
cd tensorflow
sudo -H pip install numpy
wget https://github.com/samjabrahams/tensorflow-on-raspberry-pi/releases/download/v1.1.0/tensorflow-1.1.0-cp27-none-linux_armv7l.whl
sudo pip install tensorflow-1.1.0-cp27-none-linux_armv7l.whl
wget https://raw.githubusercontent.com/samjabrahams/tensorflow-on-raspberry-pi/master/benchmarks/inceptionv3/classify_image_timed.py
#benchmark test speed inception-net-v3
cd ~
python deep-mbed/classify_image_timed.py --num_runs=10 --warmup_runs=3