Motion sensor & Inception network to detect wildlife in Dedan Kimathi Nature Reserve, Nyeri, Kenya
# Deep learning on a Raspberry Pi
This repo contains the code and notes on running Inception net on a Raspberry Pi 3B. You also need a Raspberry PI motion sensor and a camera.
It was used to deploy a camera trap in the Dedan Kimathi University Nature Reserve at Data Science Africa 2018 in Nyeri, Kenya. Many Thanks to Ciira Maina for hosting us and for his hard work here!
Also Jan Jongboom and Gen-Tao Chiang provided invaluable hardware and software support.
## 1: Setup
This work is base on this tutorial:
Wine detector on MXnet. That's pretty cool but wine is far less exciting than detecting wildlife.
### Raspbian
First you need Raspbian. We use Stretch-lite because we want to save space:
Instructions. BE CAREFUL HERE - if you mess up you can wipe your hard drive.
You need to be able to issue commands to the Pi. You're kinda on your own here. It depends on the hardware you have available (Ideally a power supply, ethernet internet and an HDMI screen and USB keyboard). This might work for you.
### Camera module
You'll need one of these.
Installing it is easy.
### OpenCV
Installing this sucks. It take ages to download on a shaky internet line and even longer ages to compile, and even then it will probably fail a few times, and run out of memory.
This guide *mostly* works.
**Notes:**
* Expanding the file system is a good idea, but cloning the image afterwards seems awkward. Beware if you need to duplicate this.
* Those time estimates are super optimistic - they assume you have very fast internet
* You can skip the virtualenv stuff (but it will come back to bite you if you have version issues between numpy, openCV and MXnet)
* You don't need the contrib stuff
* That Cmake command didn't work for me. Use `cmake -DENABLE_PRECOMPILED_HEADERS=OFF ` as suggested here
* Make EXTRA SURE of the numpy version in the output of cmake
* That swap size hint is SUPER IMPORTANT -DO IT.
* Once you're done, CHANGE IT BACK TO `CONF_SWAPSIZE=100`
* You can try `make -j4`, but …