{"id":14635,"date":"2020-09-17T07:14:44","date_gmt":"2020-09-17T14:14:44","guid":{"rendered":"https:\/\/www.springboard.com\/?p=14635"},"modified":"2023-09-28T00:45:03","modified_gmt":"2023-09-28T07:45:03","slug":"tiny-machine-learning","status":"publish","type":"post","link":"https:\/\/www.springboard.com\/blog\/data-science\/tiny-machine-learning\/","title":{"rendered":"What Is Tiny Machine Learning?"},"content":{"rendered":"\n<p>We have come a long way in developing and training complex machine learning and deep learning models. Though we deploy them on cloud platforms to perform useful tasks in real-time, sometimes you need to deploy them on edge devices for various reasons like better response time, cost, data privacy, etc. That\u2019s where Tiny Machine Learning (TinyML) comes into play.<\/p>\n\n\n\n<p>In this article, we will discuss TinyML and its role today. Learn what it is, why it&#8217;s important, and its various applications.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is Tiny Machine Learning (TinyML)?<\/h2>\n\n\n\n<p>TinyML is where the embedded <a href=\"https:\/\/en.wikipedia.org\/wiki\/Internet_of_things\" target=\"_blank\" rel=\"noreferrer noopener\">internet of things (IoT)<\/a> and machine learning (ML) intersect. In other words, TinyML is a technology that can be used to develop embedded low power consuming devices to run both machine and deep learning models.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why is TinyML important?<\/h2>\n\n\n\n<p>TinyML plays a significant role in connecting the IoT devices and machine learning community. The technology can change how the IoT devices interact and process the data. Traditionally, the IoT devices sent the data to the cloud where the hosted machine learning models make inferences and provide insights. With TinyML, it is possible to deploy machine learning models on the IoT devices to get inference and insight without sending data to the cloud.<\/p>\n\n\n\n<p>This is crucial for many reasons, especially these four:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Data privacy.<\/strong> When you transmit data from edge devices to the cloud, your data becomes vulnerable\u2014it could even be used for malicious acts. But keeping your data on the edge devices reduces this risk and strengthens your data privacy.<\/li>\n\n\n\n<li><strong>Cost.<\/strong> Transmitting continuous streams of data to the cloud incurs high storage and infrastructure costs; also, most of the data coming from the edge devices is insignificant. For example, you wouldn\u2019t want your home security camera to save every frame\u2014instead, you\u2019d just need it to save frames that capture activity. Like this, saving only necessary data can reduce expenses.<\/li>\n\n\n\n<li><strong>Fast inference (<a href=\"https:\/\/en.wikipedia.org\/wiki\/Latency_(engineering)\" target=\"_blank\" rel=\"noreferrer noopener\">latency<\/a>).<\/strong> Completing all processing and inferencing on edge devices can help serve users with extremely low latency. For example, devices like Google Home Mini must send some data to the cloud to get a response. But in the case of an unstable network, this can result in high latency that can only be resolved by making inferences on the device itself. In addition, low latency will open up the road to brand new usage of ML, which was not possible until now due to the occasional high latency response (eg. models affecting the safety of humans).<\/li>\n\n\n\n<li><strong>Reliability.<\/strong> Due to a more distributed architecture, you don\u2019t have to rely on one model for all predictions. Also, it reduces the possibility of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Denial-of-service_attack\" target=\"_blank\" rel=\"noreferrer noopener\">DOS attack<\/a> against prediction API, as no direct cloud connectivity is in place and models are distributed on edge devices.<\/li>\n<\/ol>\n\n\n\n<p>These reasons are similar to what led <a href=\"https:\/\/en.wikipedia.org\/wiki\/Web_application\" target=\"_blank\" rel=\"noreferrer noopener\">web applications<\/a> to go from <a href=\"https:\/\/en.wikipedia.org\/wiki\/Monolithic_application\" target=\"_blank\" rel=\"noreferrer noopener\">monolithic (traditional)<\/a> to <a href=\"https:\/\/www.geeksforgeeks.org\/monolithic-vs-microservices-architecture\/\" target=\"_blank\" rel=\"noreferrer noopener\">distributed architectures<\/a>, supported by <a href=\"https:\/\/en.wikipedia.org\/wiki\/Content_delivery_network\" target=\"_blank\" rel=\"noreferrer noopener\">content distribution networks (CDNs)<\/a>, edge web workers, as well as a lot more code to run directly on the client&#8217;s device (browser or mobile app).<\/p>\n\n\n<div class=\"bg-leaf-50 p-4 my-3\"><h4 class=\"fw-bold text-center\">Get To Know Other\tData Science Students<\/h4><div class=\"row row-cols-1 row-cols-lg-3\"><div class=\"col\"><div class=\"card success-story-card h-100 d-flex justify-content-between mb-0\"><div class=\"flex-grow-1 text-center\"><a class=\"d-inline-block rounded-circle\" href=\"\/success\/karen-masterson\" style=\"width:125px;height:125px;overflow:hidden\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/res.cloudinary.com\/springboard-images\/image\/upload\/v1543914918\/homepage-assets\/career-tracks\/dsc\/dsc-alumni\/karen.png\" alt=\"Karen Masterson\" style=\"object-fit:contain;max-width:170px;height:125px\" \/><\/a><p class=\"fw-bold mb-0\">Karen Masterson<\/p><p class=\"text-muted lh-1\">Data Analyst at Verizon Digital Media Services<\/p><\/div><div class=\"w-100 d-block d-md-none mt-3\"><\/div><p class=\"mb-0 mx-auto text-center\"><a class=\"btn btn-primary mx-auto\" href=\"\/success\/karen-masterson\">Read Story<\/a><\/p><\/div><\/div><div class=\"col d-none d-md-block\"><div class=\"card success-story-card h-100 d-flex justify-content-between mb-0\"><div class=\"flex-grow-1 text-center\"><a class=\"d-inline-block rounded-circle\" href=\"\/success\/jonathan-king\" style=\"width:125px;height:125px;overflow:hidden\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/res.cloudinary.com\/springboard-images\/image\/upload\/v1629203191\/Student%20Success\/Jonathan_King_125x125.png\" alt=\"Jonathan King\" style=\"object-fit:contain;max-width:170px;height:125px\" \/><\/a><p class=\"fw-bold mb-0\">Jonathan King<\/p><p class=\"text-muted lh-1\">Sr. Healthcare Analyst at IBM<\/p><\/div><p class=\"mb-0 mx-auto text-center\"><a class=\"btn btn-primary mx-auto\" href=\"\/success\/jonathan-king\">Read Story<\/a><\/p><\/div><\/div><div class=\"col d-none d-md-block\"><div class=\"card success-story-card h-100 d-flex justify-content-between mb-0\"><div class=\"flex-grow-1 text-center\"><a class=\"d-inline-block rounded-circle\" href=\"\/success\/jonathan-orr\" style=\"width:125px;height:125px;overflow:hidden\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/res.cloudinary.com\/springboard-images\/image\/upload\/v1629203194\/Student%20Success\/Jonathan_Orr_125x125.png\" alt=\"Jonathan Orr\" style=\"object-fit:contain;max-width:170px;height:125px\" \/><\/a><p class=\"fw-bold mb-0\">Jonathan Orr<\/p><p class=\"text-muted lh-1\">Data Scientist at Carlisle & Company<\/p><\/div><p class=\"mb-0 mx-auto text-center\"><a class=\"btn btn-primary mx-auto\" href=\"\/success\/jonathan-orr\">Read Story<\/a><\/p><\/div><\/div><\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Applications of TinyML<\/h2>\n\n\n\n<p>Here are five potential applications of TinyML:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Voice commands.<\/strong> Smartphones actively listen to wake words like &#8220;Hey Google&#8221; or &#8220;Hey Siri.&#8221; Not surprisingly, the models that detect wake words are not run on the usual mobile CPU, as it consumes lots of power and quickly drains the battery with continuous use. Instead, with TinyML, these models are run on specialized low-power hardware inside the smartphone, which can run regularly and consume very little energy.<\/li>\n\n\n\n<li><strong>High-quality imagery.<\/strong> Microsatellite applications can high-quality images and transfer them to Earth. These satellites feature fixed storage and can save a limited number of pictures. TinyML can help to capture pictures only when an object of interest is in sight.<\/li>\n\n\n\n<li><strong>Equipment maintenance.<\/strong> In manufacturing companies, TinyML can help to avoid downtime due to equipment failure by alerting technicians when equipment conditions go wrong as part of preventive maintenance.<\/li>\n\n\n\n<li><strong>Monitor retail stock.<\/strong> In retail stores, TinyML can help to monitor the stock of the products on shelves and send alerts when it\u2019s low. This helps businesses manage their inventory and satisfy their customers.<\/li>\n\n\n\n<li><strong>Increase crop yields.<\/strong> As we all know that <a href=\"https:\/\/www.springboard.com\/blog\/data-science\/data-science-definition\/\" target=\"_blank\" data-type=\"URL\" data-id=\"https:\/\/www.springboard.com\/blog\/data-science\/data-science-definition\/\" rel=\"noreferrer noopener\">data science<\/a> provides actionable insights for the agricultural development and so as the TinyML-based smart sensors can be used in greenhouses that continuously monitor parameters like pH, humidity, CO2 level, and send alerts when the metrics deviate from the ideal range. TinyML can also help farmers fight animal illness via wearable devices that monitor the animals\u2019 parameters\u2014like heart rate, temperature, and so on\u2014and alert farmers when the parameters cross certain thresholds.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Challenges with TinyML<\/h2>\n\n\n\n<p>Though the development of TinyML has brought many encouraging outcomes, the machine learning industry still faces some significant <a href=\"https:\/\/arxiv.org\/pdf\/2003.04821.pdf\" target=\"_blank\" rel=\"noreferrer noopener\">challenges<\/a>.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Limited memory.<\/strong> Traditional platforms like smartphones and laptops have memory measuring in gigabytes, but TinyML devices measure memory in kilobytes or megabytes. This constrains the size of the model that can be deployed.<\/li>\n\n\n\n<li><strong>Hardware variety.<\/strong> There are many possibilities for hardware selection. TinyML platforms can range from general-purpose <a href=\"https:\/\/en.wikipedia.org\/wiki\/Microcontroller#:~:text=A%20microcontroller%20(MCU%20for%20microcontroller,integrated%20circuit%20(IC)%20chip.&amp;text=A%20microcontroller%20contains%20one%20or,and%20programmable%20input%2Foutput%20peripherals.\" target=\"_blank\" rel=\"noreferrer noopener\">microcontrollers<\/a> to novel systems like <a href=\"https:\/\/brainchipinc.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">neural processors<\/a>. This creates problems for model deployment on various architectures.<\/li>\n\n\n\n<li><strong>Software variety.<\/strong> Different methods to deploy models on TinyML devices include <a href=\"https:\/\/en.wikipedia.org\/wiki\/Hand_coding\" target=\"_blank\" rel=\"noreferrer noopener\">hand-coding<\/a>, <a href=\"https:\/\/en.wikipedia.org\/wiki\/Code_generation\" target=\"_blank\" rel=\"noreferrer noopener\">code generation<\/a>, and ML interpreters, all of which require different amounts of time and effort. This can also result in different performance.<\/li>\n\n\n\n<li><strong>Model training.<\/strong> Although deploying ML models on TinyML devices has many benefits, the training of the majority ML models is still done in the cloud to iterate and continuously improve the accuracy of the model.<\/li>\n\n\n\n<li><strong>Debugging\/troubleshooting.<\/strong> When an ML model performs poorly in the cloud, it is easy to see the presented data and determine the cause of the bad performance. However, when a model is distributed to thousands of TinyML devices, often with no data stream coming back to the cloud, it is hard to debug and might require a new approach.<\/li>\n<\/ol>\n\n\n\n<p>TinyML is still in its early stages but it is expected to grow significantly by the contribution of ML engineers and <a href=\"https:\/\/www.springboard.com\/blog\/data-science\/what-does-a-data-scientist-do\/\" target=\"_blank\" data-type=\"post\" data-id=\"24427\" rel=\"noreferrer noopener\">Data Scientists<\/a> in the next few years in the machine learning industry.<\/p>\n\n\n\n<p class=\"rm has-background\" style=\"background-color:#efeff6\"><strong>Since you\u2019re here\u2026<\/strong>Are you interested in this career track? Investigate with our free guide to <a href=\"https:\/\/www.springboard.com\/blog\/data-science\/what-does-a-data-scientist-do\/\" data-type=\"post\" data-id=\"24427\">what a data professional <em>actually<\/em> does<\/a>. When you\u2019re ready to build a CV that will make hiring managers melt, join our <a href=\"https:\/\/www.springboard.com\/courses\/data-science-career-track\/\" data-type=\"URL\" data-id=\"https:\/\/www.springboard.com\/courses\/data-science-career-track\/\" target=\"_blank\" rel=\"noreferrer noopener\">Data Science Bootcamp<\/a> which will help you land a job or your tuition back!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We have come a long way in developing and training complex machine learning and deep learning models. Though we deploy them on cloud platforms to perform useful tasks in real-time, sometimes you need to deploy them on edge devices for various reasons like better response time, cost, data privacy, etc. That\u2019s where Tiny Machine Learning [&hellip;]<\/p>\n","protected":false},"author":100,"featured_media":19007,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_eb_attr":"","_eb_data_table":"","footnotes":""},"categories":[67],"tags":[],"marketing_tags":[1476],"class_list":{"0":"post-14635","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-data-science"},"acf":[],"_links":{"self":[{"href":"https:\/\/www.springboard.com\/blog\/wp-json\/wp\/v2\/posts\/14635"}],"collection":[{"href":"https:\/\/www.springboard.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.springboard.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.springboard.com\/blog\/wp-json\/wp\/v2\/users\/100"}],"replies":[{"embeddable":true,"href":"https:\/\/www.springboard.com\/blog\/wp-json\/wp\/v2\/comments?post=14635"}],"version-history":[{"count":4,"href":"https:\/\/www.springboard.com\/blog\/wp-json\/wp\/v2\/posts\/14635\/revisions"}],"predecessor-version":[{"id":50121,"href":"https:\/\/www.springboard.com\/blog\/wp-json\/wp\/v2\/posts\/14635\/revisions\/50121"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.springboard.com\/blog\/wp-json\/wp\/v2\/media\/19007"}],"wp:attachment":[{"href":"https:\/\/www.springboard.com\/blog\/wp-json\/wp\/v2\/media?parent=14635"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.springboard.com\/blog\/wp-json\/wp\/v2\/categories?post=14635"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.springboard.com\/blog\/wp-json\/wp\/v2\/tags?post=14635"},{"taxonomy":"marketing_tags","embeddable":true,"href":"https:\/\/www.springboard.com\/blog\/wp-json\/wp\/v2\/marketing_tags?post=14635"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}