Skip to main content

On-Device ML: An Efficient Approach to Classify Large Number of Images Using Multi-threading in Android Devices

  • Conference paper
  • First Online:
Proceedings of 2nd International Conference on Artificial Intelligence: Advances and Applications

Part of the book series: Algorithms for Intelligent Systems ((AIS))

  • 562 Accesses

Abstract

Machine Learning has unwaveringly found its way into many modern-day applications and it only seems to be spreading widely soon. Most of the applications make use of machine learning algorithms for classification, object detection purposes, and are dependent on GPU’s to perform complex computational tasks. This posed a serious limitation for the development of such applications for mobile platforms due to the lower processing capabilities of mobile chips and storage issues. For a long time in the past, developers were reliant on a cloud-based approach for machine learning capabilities to their applications with the help of REST API services. This is where “On-device Machine Learning” comes into the picture, using a mobile computing platform that utilizes the internal CPU and GPU, present in every mobile device. However, due to certain limitations in the computing power of mobile processing chips, it is very easy to throttle this solution. In this paper, we present a multi-threaded approach to sequentially classify a large number of images on the mobile CPU. This approach aids the On-Device Machine Learning approach by providing multiple threads for the application to process and handle data without throttling the hardware.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 189.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 249.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 249.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Mather T, Kumaraswamy S, Latif S (2009) Cloud security and privacy: an enterprise perspective on risks and compliance. Published by O’Reilly Media, Inc.

    Google Scholar 

  2. Li L-H, Chu Y-S, Chu J-Y, Guo S-H (2019) A machine learning approach for detection plant disease: taking orchid as example. In: Proceedings of the 3rd international conference on vision, image and signal processing. Association for computing machinery, New York, NY, USA, Article 43, pp 1–6. https://doi.org/10.1145/3387168.3387238

  3. Example on-device model personalization with TensorFlow Lite. https://blog.tensorflow.org/2019/12/example-on-device-model-personalization.html. Accessed December 2020

  4. Processes and threads overview. https://developer.android.com/guide/components/processes-and-threads. Accessed December 2020

  5. Interpreter TensorFlow Lite. https://www.tensorflow.org/lite/api_docs/java/org/tensorflow/lite/Interpreter. Accessed December 2020

  6. Better performance through threading Android Developers. https://developer.android.com/topic/performance/threads. Accessed 06 December 2020

  7. Keeping your app responsive. https://developer.android.com/training/articles/perf-anr. Accessed December 2020

  8. Producer Consumer Design Pattern with Blocking Queue Example in Java (nd). https://javarevisited.blogspot.com/2012/02/producer-consumer-design-pattern-with.html. Accessed 04 December 2020

  9. Interface BlockingQueue. https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent /BlockingQueue.html. Accessed December 2020

  10. Content provider basics Android Developers . https://developer.android.com/guide/topics/providers/content-provider-basics. Accessed December 2020

  11. Cursor Android Developers. https://developer.android.com/reference/android/database/Cursor. Accessed December 2020

  12. TensorFlow Lite guide. https://www.tensorflow.org/lite/guide. Accessed December 2020

  13. TensorFlow Lite inference. https://www.tensorflow.org/lite/guide/inference. Accessed December 2020

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Kothari, S., Crasta, R., Biju, A., Lotlikar, T., Rai, H. (2022). On-Device ML: An Efficient Approach to Classify Large Number of Images Using Multi-threading in Android Devices. In: Mathur, G., Bundele, M., Lalwani, M., Paprzycki, M. (eds) Proceedings of 2nd International Conference on Artificial Intelligence: Advances and Applications. Algorithms for Intelligent Systems. Springer, Singapore. https://doi.org/10.1007/978-981-16-6332-1_64

Download citation

Publish with us

Policies and ethics