Skip to content

Commit

Permalink
Added inception service and renamed gunicorn service
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas committed Jan 5, 2017
1 parent e7cd02c commit 9ca1460
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 19 deletions.
29 changes: 25 additions & 4 deletions README.md
Expand Up @@ -102,15 +102,15 @@ sudo cp gunicorn/gunicorn.service /etc/systemd/system/gunicorn.service
copy configuration file from gunicorn/gunicorn.service /etc/systemd/system/gunicorn.service

```
sudo cp gunicorn/gunicorn.service /etc/systemd/system/gunicorn.service
sudo cp services/web.service /etc/systemd/system/web.service
```

start gunicorn service
start gunicorn web app service

```
sudo systemctl daemon-reload
sudo systemctl enable gunicorn
sudo systemctl start gunicorn
sudo systemctl enable web
sudo systemctl start web
```

Your webservice should be started now. You can try driving your robot with buttons or arrow keys
Expand All @@ -128,4 +128,25 @@ chmod u+x *.sh

Now a stream of images from the camera should be constantly updating the file at /dev/shm/mjpeg. Nginx will serve up the image directly if you request localhost/cam.jpg.

#### tensorflow

There is a great project at https://github.com/samjabrahams/tensorflow-on-raspberry-pi that gives instructions on installing tensorflow on the Raspberry PI. Recently it's gotten much easier, just do

```
wget https://github.com/samjabrahams/tensorflow-on-raspberry-pi/releases/download/v0.11.0/tensorflow-0.11.0-cp27-none-linux_armv7l.whl
sudo pip install tensorflow-0.11.0-cp27-none-linux_armv7l.whl
```

Next start a tensorflow service that loads up an inception model and does object recognition the the inception model

```
sudo cp services/inception.service /etc/systemd/system/inception.service
sudo systemctl daemon-reload
sudo systemctl enable inception
sudo systemctl start inception
```





14 changes: 0 additions & 14 deletions gunicorn/gunicorn.service

This file was deleted.

2 changes: 1 addition & 1 deletion inception_server.py
Expand Up @@ -48,7 +48,7 @@
"""Display this many predictions.""")

DATA_URL = 'http://download.tensorflow.org/models/image/imagenet/inception-2015-12-05.tgz'
IMAGE_PATH = '/tmp/imagenet/cropped_panda.jpg'
IMAGE_PATH = '/dev/shm/mjpeg/cam.jpg'


class NodeLookup(object):
Expand Down

0 comments on commit 9ca1460

Please sign in to comment.