
We have implemented a drawing canvas in the Android app and boilerplate code to capture the drawing.The code for this codelab is under the lite/codelabs/digit_classifier/ folder. The archive contains other TensorFlow samples that are not related to this codelab.Extract the archive in your local machine. Download the Android skeleton appĭownload a zip archive that contains the source code of the Android app used in this codelab. Please make sure that you have downloaded the TensorFlow Lite model that you trained in previous step before proceeding. Open in ColabĪfter finishing this step, you will have a TensorFlow Lite digit classifier model that is ready for deployment to a mobile app.ģ. This step is presented as a Python notebook that you can open in Google Colab. Next, we will convert the trained TensorFlow model to TensorFlow Lite to get ready for deployment. We will start by using TensorFlow to define and train our machine learning model that can recognize handwritten digits, known in machine learning terms as a digit classifier model.
Basic knowledge of Android development in Kotlin. Android Studio Emulator or a physical Android device (v5.0+). A recent version of Android Studio (v4.1+). Access to Google Colab or a Python environment with TensorFlow 2.0+. How to deploy a TensorFlow Lite model to an Android app. How to convert a TensorFlow model to TensorFlow Lite. How to train a handwritten digit classifier model using TensorFlow. It enables on-device machine learning inference with low latency and a small binary size. TensorFlow Lite is a product in the TensorFlow ecosystem to help developers run TensorFlow models on mobile, embedded, and IoT devices. It has a comprehensive, flexible ecosystem of tools, libraries, and community resources that lets researchers push the state-of-the-art in machine learning and helps developers easily build and deploy machine learning powered applications. TensorFlow is an end-to-end open source platform for machine learning. If you run into any issues (code bugs, grammatical errors, unclear wording, etc.) as you work through this codelab, please report the issue via the Report a mistake link in the lower left corner of the codelab. In this codelab, you will experience the end-to-end process of training a machine learning model that can recognize handwritten digit images with TensorFlow and deploy it to an Android app.Īfter finishing the codelab, we will have a working Android app that can recognize handwritten digits that you write. If you are a mobile developer who is new to machine learning and want a quick introduction about the machine learning techniques that you can integrate to your mobile app, this is the codelab for you! Machine learning has become an important toolset in mobile development, enabling many smart capabilities in modern mobile apps.