← all repositories
yuxitong/TensorFlowAndroidDemo

TensorFlow on Android: a grab-bag of CV demos with honest notes

An all-in-one Android app that runs lane detection, pose estimation, and driver-monitoring models—complete with handwritten performance numbers and a "works on my P10" caveat.

TensorFlowAndroidDemo
Velocity · 7d
+0.2
★ / day
Trend
steady
star history

What it does

This is a kitchen-sink Android demo for running TensorFlow models on-device. It bundles four detection pipelines: lane marking and vehicle detection (with crude lane-departure and forward-collision logic), human skeleton estimation, and face-state classification—specifically smoking, phone calls, eyes open/closed. The author built it because the official TensorFlow Android demo is hard to extract into your own project.

The interesting bit

The README doesn’t hide the mess. Performance numbers are handwritten (“P10: 4 fps for task 1, 8 fps for task 2…”), the skeleton model needs three conversion layers to run, and the lane-detection drawing code is explicitly noted as unoptimized. The lane-departure logic is literally k = (y2-y1)/(x2-x1) compared against a fixed threshold; forward-collision detection checks if a car’s center sits in the middle 50% of the screen and is “too high” or “too tall.” It’s refreshingly unpolished.

Key highlights

  • Uses Camera2 API throughout
  • Skeleton model implements COCO-style 19-keypoint PAF parsing with custom scoring logic (threshold 0.2, minimum 5 valid points per connection)
  • Includes direct APK download link for immediate testing
  • Models contributed by three community members, not the repo owner
  • Companion Python auto-labeling tool: AutoMarKingTensorFlowPython

Caveats

  • TensorFlow mobile doesn’t use GPU here; CPU-only inference means serious stutter on lower-end phones
  • One GIF link points to a different repo (TensorFlowDemo vs TensorFlowAndroidDemo)—likely a copy-paste error
  • Skeleton “breakthrough” to connect points into full bodies is described but not yet implemented

Verdict

Grab this if you need a working reference for jamming multiple TensorFlow vision models into a single Android app and you can tolerate rough edges. Skip it if you want production-grade ADAS or a maintained, GPU-accelerated pipeline.

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