Skip to content

Latest commit

 

History

History
65 lines (49 loc) · 2.97 KB

README.md

File metadata and controls

65 lines (49 loc) · 2.97 KB

notsquirrel

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 and retrained_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

Install

Android

Direct download: Install the latest .apk from ./release/android/notsquirrel.apk
App store: TBD

iOS

Coming as soon as I'm not too poor to get a iPhone to test on. :)

Screenshots

Build

All commands should be run on master from the project root folder unless otherwise specified.

  1. Install npm packages. Note that this project's package.json points to the modified forks.
npm install
  1. Specify Android SDK path: create/edit android/local.properties and set sdk.dir (or set the ANDROID_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
  1. 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/
  1. Generate keystore and configure gradle variables (see https://facebook.github.io/react-native/docs/signed-apk-android.html). Then assemble:
cd android
./gradlew assembleRelease
  1. Test release APK:
react-native run-android --variant=release
  1. Install to phone:
cd android
./gradlew installRelease