A React Native + Tensorflow Lite Android app to tell you whether or not something is a squirrel.
Inspired by the incredibly aggressive squirrels that climb up the (heavily oiled!) bird feeder pole in my backyard. Inspiration and end-goal is something like this fantastic Arduino + Python squirrel super soaker sentry from PyCon 2012.
For now, just following in Jian Yang's shoes. Is it a squirrel or not-squirrel?
Uses the following resources and libraries:
retrained_graph.pb
andretrained_labels.txt
from a Tensorflow Lite graph retrained on images of squirrels and squirrel-like rodents, per the tutorial at TensorFlow for Poets- Modified fork of react-native-tensorflow (Original)(Fork)
- Modified fork of react-native-image-picker (Original)(Fork)
- react-native-fs
Direct download: Install the latest .apk from ./release/android/notsquirrel.apk
App store: TBD
Coming as soon as I'm not too poor to get a iPhone to test on. :)
All commands should be run on master
from the project root folder unless otherwise specified.
- Install npm packages. Note that this project's
package.json
points to the modified forks.
npm install
- Specify Android SDK path: create/edit
android/local.properties
and setsdk.dir
(or set theANDROID_HOME
env variable). Example:
## This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
sdk.dir=/home/casey/Android/Sdk
- Run Bundler:
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
- Generate keystore and configure gradle variables (see https://facebook.github.io/react-native/docs/signed-apk-android.html). Then assemble:
cd android
./gradlew assembleRelease
- Test release APK:
react-native run-android --variant=release
- Install to phone:
cd android
./gradlew installRelease