Peer Bonus Experiences: Building tiny models for the ML community with TensorFlow
Almost all the current state-of-the-art machine learning (ML) models take quite a lot of disk space. This makes them particularly inefficient in production situations. A bulky machine learning model can be exposed as a REST API and hosted on cloud services, but that same bulk may lead to hefty infrastructure costs. And some applications may need to operate in low-bandwidth environments, making cloud-hosted models less practical.
There has never been a better time to learn about on-device ML and successfully apply it in your own projects. With frameworks like TensorFlow Lite, you have an exceptional toolset to optimize your bulky models while retaining as much performance as possible. TensorFlow Lite also makes it very easy for mobile application developers to integrate ML models with tools like metadata and ML Model Binding, Android codegen, and others.
What is TensorFlow Lite?
“TensorFlow Lite is a production ready, cross-platform framework for deploying ML on mobile devices and embedded systems.” – TensorFlow Youtube
TensorFlow Lite provides first-class support for Native Android and iOS-based integrations (with many additional features, such as delegates). TensorFlow Lite also supports other tiny computing platforms, such as microcontrollers. TensorFlow Lite’s optimization APIs produce world-class, fast, and well-performing machine learning models.
Venturing into TensorFlow Lite
Last year, I started playing around with TensorFlow Lite while developing projects for Raspberry Pi for Computer Vision, using the official documentation and this course to fuel my initial learning. Following this interest, I decided to join a voluntary working group focused on creating sample applications, writing out tutorials, and creating tiny models. This working group consists of individuals from different backgrounds passionate about teaching on-device machine learning to others. The group is coordinated by Khanh LeViet (TensorFlow Lite team) and Hoi Lam (Android ML team). This is by far one of the most active working groups I have ever seen. And, back in our starting days, Khanh proposed a few different state-of-art machine learning models that were great fits for on-device machine learning:
- DeepLabV3 segmentation models that classify each image pixels to a particular category like so –
- Selfie2Anime model that can turn a selfie into an anime like so –
These ideas were enough for us to start spinning up Jupyter notebooks and VSCode. After months of work, we now have strong collaborations between machine learning GDEs and a bunch of different TensorFlow Lite models, sample applications, and tutorials for the community to learn from. Our collaborations have been fueled by the power of open source and all the tiny models that we have built together are available on TensorFlow Hub. There are numerous open source applications that we have built that demonstrate how to use these models.
|The Cartoonizer model cartoonizes uploaded images|
Margaret and I co-authored an end-to-end tutorial that was published from the official TensorFlow blog and published the TensorFlow Lite models on TensorFlow Hub. So far, the response we have received for this work has been truly mesmerizing. I’ve also shared my experiences with TensorFlow Lite in these blog posts and conference talks:
The power of collaboration
The working group is a tremendous opportunity for machine learning GDEs, Googlers, and passionate community individuals to collaborate and learn. We get to learn together, create together, and celebrate the joy of teaching others. I am immensely thankful, grateful, and humbled to be a part of this group. Lastly, I would like to wholeheartedly thank Khanh for being a pillar of support to us and for nominating me for the Google Open Source Peer Bonus Award.
Related Google News:
- How-to Write a Python Fuzzer for TensorFlow April 1, 2021
- GraphQL: Building a consistent approach for the API consumer April 1, 2021
- TensorFlow Quantum turns one year old March 18, 2021
- Building real-time market data front-ends with websockets and Google Cloud March 18, 2021
- Introducing #AskGoogleCloud: A community driven YouTube live series March 11, 2021
- Increasing our engagement with the voice technology community March 10, 2021
- Building the future of business computing: 10 years of Chrome OS March 9, 2021
- City of San Jose ensures critical services reach community using AI translation March 4, 2021