← all repositories
amitshekhariitbhu/AndroidTensorFlowMachineLearningExample

Building TensorFlow from source for Android, the hard way

A cookbook for compiling TensorFlow .so and .jar files for Android before Google made it easy.

AndroidTensorFlowMachineLearningExample
Velocity · 7d
+0.4
★ / day
Trend
steady
star history

What it does This repo is a working Android app that detects objects in camera images using TensorFlow. The real payload, though, is the build instructions: how to compile TensorFlow’s native library and Java bindings from source so they actually link into an Android project. Think of it as a survival guide for the pre-TFLite era.

The interesting bit The author also maintains a TensorFlow Lite successor repo, which quietly admits this original approach is now the scenic route. The example itself is Google’s stock classifier repurposed — the value is in the plumbing, not the model.

Key highlights

  • Step-by-step build of TensorFlow .so and .jar for Android NDK integration
  • Working camera-to-classifier pipeline in a single Java Android app
  • 1,441 stars suggest plenty of people hit this exact build wall
  • Explicitly points to a TensorFlow Lite follow-up for modern projects
  • Apache 2.0 licensed, with low-friction PR policy (“Just make pull request. You are in!”)

Caveats

  • README is sparse on actual build commands; expect to fill in gaps
  • The object detection example is borrowed from Google’s official samples, so this is largely glue and documentation
  • TensorFlow Lite has superseded this approach; the author says so themselves

Verdict Grab this if you’re maintaining legacy NDK-linked TensorFlow code or need to understand how the sausage was made circa 2017–2018. Skip it if you’re starting fresh — use TensorFlow Lite like the README suggests.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.