Skip to content
(WIP) A silly React Native + Tensorflow Lite Android app to tell you whether or not something is a squirrel.
JavaScript Java Objective-C Python Shell
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
android
assets
ios
release/android
src/components
tools/package_json_backups
.babelrc
.buckconfig
.flowconfig
.gitattributes
.gitignore
.watchmanconfig
App.js
README.md
app.json
copy_bundle.sh
haul.config.js
index.js
metro.config.js
package.json
rn-cli.config.js

README.md

notsquirrel

(WIP) A silly 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
You can’t perform that action at this time.