TensorFlow Project Screenshot

Offline-Ready Real-Time Image Analysis on Smartphones

An ML Optimization and Implementation Case Study for Android

Role: Development

As part of a larger research initiative, we created an Android application capable of performing real-time image analysis on smartphones—even when an internet connection isn’t available. This was achieved by combining a pre-trained MobileNet model for image feature extraction with on-device inference techniques tailored for optimal performance.

Model Validation and Optimization

  • Leveraged Keras to validate the performance of a pre-trained MobileNet model.
  • Converted the model from an h5 file to TensorFlow Lite format, ensuring lightweight, low-latency operation on smartphone hardware.

Real-Time Inference Workflow

  • Employed TensorFlow Lite for on-device inference, feeding live camera footage into the ML model in real time.
  • Calculated cross-entropy loss between the inferred features and a predefined dataset, then triggered corresponding multimedia playback based on the results.

Kotlin Implementation Challenges

  • Tasks like loading models and computing cross-entropy loss, typically straightforward in Python, demanded extra care in Kotlin to maintain high performance.
  • Despite the additional work needed to optimize loss computation, our expertise in memory management and multithreading helped ensure stable offline operation.

Through this project, we demonstrated a practical approach to on-device machine learning, gathering valuable know-how on maximizing smartphone hardware for real-time analytics. As companies look to differentiate products and accelerate new business opportunities, mobile ML solutions like this are poised to play a significant role in shaping the future of tech innovation.

Project Information

Genre:

AI, Machine Learning, TensorFlow, Android

Year:

2018

Links
Back to Case List

Related Works

Measuring and Comparing ML Model Inference Performance on AWS and GKE

Measuring and Comparing ML Model Inference Performance on AWS and GKE

Role: Infrastructure Build, Performance Measurement, and Optimization

Building a Topic-Specific AI Chatbot with RAG

Building a Topic-Specific AI Chatbot with RAG

Roles: New Business Planning, UX Design, RAG Architecture, Development