{"id":6507,"date":"2020-07-17T11:41:32","date_gmt":"2020-07-17T09:41:32","guid":{"rendered":"https:\/\/www.codemotion.com\/magazine\/?p=6507"},"modified":"2022-01-05T20:05:30","modified_gmt":"2022-01-05T19:05:30","slug":"the-cutting-edge-of-real-time-ai","status":"publish","type":"post","link":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/","title":{"rendered":"The cutting edge of real-time AI"},"content":{"rendered":"\t\t\t\t<div class=\"wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-8e90b704      \"\n\t\t\t\t\tdata-scroll= \"1\"\n\t\t\t\t\tdata-offset= \"30\"\n\t\t\t\t\tstyle=\"\"\n\t\t\t\t>\n\t\t\t\t<div class=\"uagb-toc__wrap\">\n\t\t\t\t\t\t<div class=\"uagb-toc__title\">\n\t\t\t\t\t\t\tTable Of Contents\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"uagb-toc__list-wrap \">\n\t\t\t\t\t\t<ol class=\"uagb-toc__list\"><li class=\"uagb-toc__list\"><a href=\"#introduction-to-machine-learning\" class=\"uagb-toc-link__trigger\">Introduction to Machine Learning\u00a0<\/a><li class=\"uagb-toc__list\"><a href=\"#the-drawbacks-of-centralised-ai\" class=\"uagb-toc-link__trigger\">The drawbacks of centralised AI<\/a><li class=\"uagb-toc__list\"><a href=\"#the-impact-of-moving-ai-to-the-edge\" class=\"uagb-toc-link__trigger\">The impact of moving AI to the edge<\/a><li class=\"uagb-toc__list\"><a href=\"#what-is-needed-to-run-ai-and-ml-models-at-the-edge\" class=\"uagb-toc-link__trigger\">What is needed to run AI and ML models at the edge?<\/a><li class=\"uagb-toc__list\"><a href=\"#the-trade-off\" class=\"uagb-toc-link__trigger\">The trade-off\u00a0<\/a><li class=\"uagb-toc__list\"><a href=\"#conclusions\" class=\"uagb-toc-link__trigger\">Conclusions<\/a><\/ol>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\n\n\n<p><a style=\"user-select: auto;\" href=\"https:\/\/www.codemotion.com\/magazine\/tag\/machine-learning\/\" target=\"_blank\" rel=\"noreferrer noopener\">Machine learning<\/a>\u00a0is traditionally processor-intensive; ML algorithms require large numbers of parallel operations. As a result, the models usually run in data centres at the core of the network. However, this has a direct impact in terms of latency, security and cost. Over the next six months, this article series will explore\u00a0why AI is moving to the network edge and the technology that\u2019s making it possible. We\u2019ll also provide practical examples of implementation on a variety of popular embedded platforms.<\/p>\n\n\n\n<div class=\"uagb-cta__outer-wrap uagb-block-50e9f061\"><div class=\"uagb-cta__content-wrap uagb-cta__block uagb-cta__icon-position-right uagb-cta__content-right uagb-cta__content-stacked-tablet uagb-cta__button-valign-middle uagb-cta__button-type-none \"><div class=\"uagb-cta__left-right-wrap\"><div class=\"uagb-cta__content\"><div class=\"uagb-cta__title-wrap\"><h4 class=\"uagb-cta__title\">RELATED CONTENT<\/h4><\/div><div class=\"uagb-cta-text-wrap\"><p class=\"uagb-cta__desc\"><a href=\"https:\/\/www.codemotion.com\/magazine\/dev-hub\/machine-learning-dev\/edge-machine-learning\/\" target=\"_blank\" aria-label=\"undefined (opens in a new tab)\" rel=\"noreferrer noopener\">Getting started with edge machine learning<\/a><\/p><\/div><\/div><div class=\"uagb-cta__link-wrapper uagb-cta__block-link-style\"><\/div><\/div><\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction to Machine Learning&nbsp;<\/h2>\n\n\n\n<p><span id=\"urn:enhancement-4962512d\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/machine_learning\">Machine learning<\/span> lies at the heart of most <span id=\"urn:enhancement-b9b1ac42\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/applications_of_artificial_intelligence\">AI applications<\/span>, and involves teaching a <span id=\"urn:enhancement-590cecf3\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/computer\">computer<\/span> to identify <span id=\"urn:enhancement-b09b8c92\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/pattern\">patterns<\/span> in <span id=\"urn:enhancement-b111cb44\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/data\">data<\/span>. More specifically, the goal is to create a trained model. This can be done with supervised <span id=\"urn:enhancement-127501b2\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/learning\">learning<\/span>, where the <span id=\"urn:enhancement-6435cd3a\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/computer\">computer<\/span> is shown examples to learn from. Alternatively, the process can be unsupervised &#8211; the <span id=\"urn:enhancement-5bbf9b96\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/computer\">computer<\/span> simply looks for interesting <span id=\"urn:enhancement-860a8dce\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/pattern\">patterns<\/span> in the <span id=\"urn:enhancement-d02c777d\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/data\">data<\/span>. Techniques involving continuous or ongoing <span id=\"urn:enhancement-37d9b5fe\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/learning\">learning<\/span>, where the <span id=\"urn:enhancement-ddf62c8a\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/computer\">computer<\/span> learns from its mistakes, also exist but are outside the scope of this article.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Running your ML model.<\/h3>\n\n\n\n<p>Once the ML model has been created, it can be used to deliver your <span id=\"urn:enhancement-11a04eb9\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/project\">project<\/span>. Models can be used for forecasting future events, identifying anomalies, and image or <span id=\"urn:enhancement-3c1e3b17\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/speech_recognition\">speech recognition<\/span>. In nearly all cases, models rely on large deep tree structures and need significant <span id=\"urn:enhancement-8e382da0\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/computer_performance\">computing power<\/span> to run. This is especially true for models engaged in image and <span id=\"urn:enhancement-c485035f\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/speech_recognition\">voice recognition<\/span>, which are usually based on <span id=\"urn:enhancement-8e160e69\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/artificial_neural_network\">artificial neural networks<\/span>. <span id=\"urn:enhancement-f9077a0b\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/artificial_neural_network\">Neural networks<\/span> create dense meshes and hence need to be run on highly parallelised hardware, often based on <span id=\"urn:enhancement-24244a0c\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/graphics_processing_unit_2\">GPUs<\/span>. Until recently, such power has only been available in the <span id=\"urn:enhancement-181ef451\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/cloud\">cloud<\/span> on <a href=\"https:\/\/www.codemotion.com\/magazine\/dev-hub\/cloud-manager\/going-serverless-the-easy-way\/\"><span id=\"urn:local-annotation-170169\" class=\"textannotation disambiguated\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/amazon_web_services\">AWS<\/span><\/a>, <span id=\"urn:local-annotation-686825\" class=\"textannotation disambiguated\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/google_cloud_platform\">Google Cloud<\/span>, or <a href=\"https:\/\/www.codemotion.com\/magazine\/dev-hub\/cloud-manager\/a-first-web-app-on-microsoft-azure\/\"><span id=\"urn:local-annotation-928077\" class=\"textannotation disambiguated\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/microsoft_azure\">Azure<\/span><\/a>.<\/p>\n\n\n\n<p>To get some idea of the power required, look at the specifications of AWS P3 instances, optimised for ML.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Type<\/strong><\/td><td><strong>GPUs<\/strong><\/td><td><strong>vCPUs<\/strong><\/td><td><strong>RAM<\/strong><\/td><td><strong>GPU RAM<\/strong><\/td><td><strong>Storage BW<\/strong><\/td><td><strong>Network BW<\/strong><\/td><\/tr><tr><td>P3.2XL<\/td><td>1<\/td><td>8<\/td><td>61GB<\/td><td>16GB<\/td><td>1.5Gbps<\/td><td>~10Gbps<\/td><\/tr><tr><td>P3.8XL<\/td><td>4<\/td><td>32<\/td><td>244GB<\/td><td>64GB<\/td><td>7Gbps<\/td><td>10Gbps<\/td><\/tr><tr><td>P3.16XL<\/td><td>8<\/td><td>64<\/td><td>488GB<\/td><td>128GB<\/td><td>14Gbps<\/td><td>25Gbps<\/td><\/tr><tr><td>P3.24XL<\/td><td>8<\/td><td>96<\/td><td>768GB<\/td><td>256GB<\/td><td>19Gbps<\/td><td>100Gbps<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>As you can see, these machines are seriously powerful; they have huge amounts of <span id=\"urn:enhancement-d9539b0a\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/random-access_memory\">RAM<\/span>, with extremely fast network and storage access. Above all, they have significant <span id=\"urn:enhancement-3298dca5\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/central_processing_unit\">CPU<\/span> and <span id=\"urn:enhancement-a257f1a5\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/graphics_processing_unit_2\">GPU<\/span> <span id=\"urn:enhancement-5ef9e4ac\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/computer_performance\">processing power<\/span>, which makes running ML models at the network edge a real challenge.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The drawbacks of centralised AI<\/h2>\n\n\n\n<p>To date, most well-known <span id=\"urn:enhancement-891dc6a0\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">applications<\/span> of <span id=\"urn:enhancement-56ec1369\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/artificial_intelligence\">AI<\/span> have relied on the <span id=\"urn:enhancement-72e845f8\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/cloud\">cloud<\/span> because it is so hard to run ML <span id=\"urn:enhancement-bc52b3fb\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/scientific_modelling\">models<\/span> at the edge. However, this dependence on cloud <span id=\"urn:enhancement-9ae6075a\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/computing\">computing<\/span> imposes some limitations on using <span id=\"urn:enhancement-610dfc96\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/artificial_intelligence\">AI<\/span>. Here is a list of some of the operational drawbacks to centralised <span id=\"urn:enhancement-664a4f54\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/artificial_intelligence\">AI<\/span>.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Some applications can\u2019t run in the cloud<\/h3>\n\n\n\n<p>To operate <span id=\"urn:enhancement-c0adfe45\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/artificial_intelligence\">AI<\/span> in the <span id=\"urn:enhancement-11832e77\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/cloud\">cloud<\/span>, you need to have a decent and stable network connection. As a result, there are some <span id=\"urn:enhancement-a51c6e10\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/artificial_intelligence\">AI<\/span> <span id=\"urn:enhancement-794e7394\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">applications<\/span> that have to run locally due to a lack of network connectivity. In other words, these <span id=\"urn:enhancement-636433dc\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">applications<\/span> only work if you are able to run your ML <span id=\"urn:enhancement-c7f941ea\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/scientific_modelling\">models<\/span> at the edge.&nbsp;<\/p>\n\n\n\n<p>An obvious example here is self-driving vehicles; these need to do a number of tasks that rely on <span id=\"urn:enhancement-b69febaf\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/machine_learning\">machine learning<\/span>. The most important of these tasks is <span id=\"urn:enhancement-66d8f0ae\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/object_detection\">object detection<\/span> and avoidance. This requires quite demanding ML <span id=\"urn:enhancement-27b318db\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/scientific_modelling\">models<\/span> that need a reasonable degree of <span id=\"urn:enhancement-a7853cec\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/computing\">computing<\/span> power. However, even networked cars have only low <span id=\"urn:enhancement-a75db88c\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/bandwidth_computing\">bandwidth<\/span> connections, and these connections are inconsistent.&nbsp;<\/p>\n\n\n\n<p>This limitation also applies when creating smart <span id=\"urn:enhancement-8b53101c\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/internet_of_things\">IoT<\/span> monitoring systems for mining and other heavy industries. There is often a fast network locally, but <span id=\"urn:enhancement-e5dd0e3b\" class=\"textannotation disambiguated wl-organization\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/internet_access\">Internet connectivity<\/span> may be reliant on a satellite uplink.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Latency matters<\/h3>\n\n\n\n<p>Many ML <span id=\"urn:enhancement-defba426\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">applications<\/span> need to work in real-time. <span id=\"urn:enhancement-5d0b54c7\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/autonomous_car\">Self-driving cars<\/span>, as mentioned above, are such an <span id=\"urn:enhancement-c5be2336\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">application<\/span>, but there are also <span id=\"urn:enhancement-74ebc37b\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">applications<\/span> such as real-time facial recognition. This can be used for door entry systems or for <span id=\"urn:enhancement-696376e0\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/security\">security<\/span> purposes; for example, police forces often use this <span id=\"urn:enhancement-569e4c19\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/technology\">technology<\/span> to monitor football crowds in an attempt to identify known trouble-makers.&nbsp;<\/p>\n\n\n\n<p>AI is also increasingly being used to create smart medical devices. Some of these need to work in real-time to deliver real benefits, but the average round trip time to connect to a <span id=\"urn:enhancement-abe760c3\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/data\">data<\/span> centre is in the order of 10-100ms. <span id=\"urn:enhancement-12b1fd35\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/real-time_data\">Real-time<\/span> <span id=\"urn:enhancement-53656276\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">applications<\/span> are therefore hard to achieve without moving your ML models nearer to the network edge.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Security may be an issue<\/h3>\n\n\n\n<p>A lot of ML <span id=\"urn:enhancement-d0447e3f\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">applications<\/span> deal with secure or sensitive <span id=\"urn:enhancement-6b53aa56\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/data\">data<\/span>. It is clearly possible to send this <span id=\"urn:enhancement-6889d2e7\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/data\">data<\/span> across the network, and store it in the <span id=\"urn:enhancement-c9012286\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/cloud\">cloud<\/span>, securely. However, local policies often forbid that. The obvious example here is medical AI <span id=\"urn:enhancement-6eaa8f39\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">applications<\/span>.&nbsp;<\/p>\n\n\n\n<p>Health <span id=\"urn:enhancement-8d9cd6c3\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/data\">data<\/span> is especially sensitive, and there are strict rules in many countries about sending it to a cloud server. Overall, it is always easier to ensure the <span id=\"urn:enhancement-8f084b36\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/security\">security<\/span> of a device that is only connected to a local network.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Costs<\/h3>\n\n\n\n<p>Running ML in the <span id=\"urn:enhancement-d665d73\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/cloud\">cloud<\/span> does not come cheap. For a start, ML-optimised cloud instances are pretty expensive &#8211; the lowest spec <span id=\"urn:enhancement-b6ea6dff\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/instance_computer_science\">instance<\/span> in the table given above <span id=\"urn:enhancement-fcc6a612\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/cost\">costs<\/span> about US$3 an hour. Then all the extra <span id=\"urn:enhancement-f8910865\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/cost\">costs<\/span> <span id=\"urn:enhancement-a0362012\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/cloud\">cloud<\/span> providers charge need to be considered, such as fees for storage can and network access. Realistically, running an AI <span id=\"urn:enhancement-a85cb9b4\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">application<\/span> could easily end up costing US$3,000 a month.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The impact of moving AI to the edge<\/h2>\n\n\n\n<p>As we have seen, there are some strong arguments for moving ML models to the edge of the network, but which <span id=\"urn:enhancement-c8a372a6\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/applications_of_artificial_intelligence\">AI applications<\/span> really benefit from doing so? The list of drawbacks above gives some strong hints. Check whether any of the following apply to the <span id=\"urn:enhancement-76f58ee6\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/project\">project<\/span>:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>No access to a fast, stable network connection<\/li><li>Product operates in a restricted environment<\/li><li>The project requires delivery of real-time AI<\/li><li>Limited budget availability<\/li><\/ul>\n\n\n\n<p>Given these factors, what specific AI projects might be made easier by running the ML models at the edge?<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Virtual assistants&nbsp;<\/h3>\n\n\n\n<p>As it has so often, <span id=\"urn:enhancement-48ff3343\" class=\"textannotation disambiguated wl-organization\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/apple_inc\">Apple<\/span> set a trend with the launch of <span id=\"urn:enhancement-57fdcaa0\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/siri\">Siri<\/span> in 2010. This paved the way for many other virtual assistants, most famously <span id=\"urn:enhancement-b676a362\" class=\"textannotation disambiguated wl-organization\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/amazon-com\">Amazon<\/span>\u2019s <span id=\"urn:enhancement-5de10eb\" class=\"textannotation disambiguated wl-organization\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/alexa_internet\">Alexa<\/span> and the <span id=\"urn:enhancement-5303fc51\" class=\"textannotation disambiguated wl-organization\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/google\">Google<\/span> Assistant. Virtual assistants make Sci-Fi style voice control into a reality, and work as follows:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Start by saying a wake word or launching the assistant. For free-standing devices like Amazon Echo, the device is constantly listening for the wake word and processes this locally, using simple speech pattern matching. This is why Alexa only recognises certain wake words (Alexa, Amazon, Echo and Computer);<\/li><li>The device now connects to a cloud-based server and sends the recording of what it has heard;&nbsp;<\/li><li>The cloud server runs a voice-to-text ML model to convert the recorded speech into a block of natural language text;<\/li><li>The text is parsed using natural language processing to extract the meaning;&nbsp;<\/li><li>The server works out what was asked for and sends the appropriate commands or content back to the device.&nbsp;<\/li><\/ol>\n\n\n\n<p>It is easy to see how this <span id=\"urn:enhancement-eaa0b305\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/experience\">experience<\/span> could be enhanced by moving the ML models to the edge: the voice assistant would be more responsive, wouldn\u2019t need an <span id=\"urn:enhancement-e6fa71e9\" class=\"textannotation disambiguated wl-organization\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/internet_access\">Internet connection<\/span>, and voice control could be <span id=\"urn:enhancement-e2b09721\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/embedded_system\">embedded<\/span>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Facial recognition&nbsp;<\/h3>\n\n\n\n<p><span id=\"urn:enhancement-4709d43\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/facial_recognition_system\">Facial recognition<\/span> is one of the fastest-growing <span id=\"urn:enhancement-ec9f4d38\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">applications<\/span> of <span id=\"urn:enhancement-77f2bffd\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/artificial_intelligence\">AI<\/span>. The <span id=\"urn:enhancement-d0eed0af\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/technology\">technology<\/span> is still evolving, and there have been a few issues along the way. For instance, two years ago, <span id=\"urn:enhancement-8f8e02f1\" class=\"textannotation disambiguated wl-organization\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/amazon-com\">Amazon<\/span>\u2019s Rekognition was mired in controversy and accusations of racism. The <span id=\"urn:enhancement-664bfb34\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/system\">system<\/span> incorrectly identified<a href=\"https:\/\/www.nytimes.com\/2018\/07\/26\/technology\/amazon-aclu-facial-recognition-congress.html\" target=\"_blank\" aria-label=\"undefined (opens in a new tab)\" rel=\"noreferrer noopener nofollow\"> 28 ethnic minority US congress members<\/a> as known criminals after being trained on a set of 25,000 mugshots.&nbsp;<\/p>\n\n\n\n<p>In 2019, an early trial of facial recognition technology by the Metropolitan Police, the largest police force in the UK, showed the <span id=\"urn:enhancement-6fb85dba\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/technology\">technology<\/span> to be <a href=\"https:\/\/news.sky.com\/story\/met-polices-facial-recognition-tech-has-81-error-rate-independent-report-says-11755941\" target=\"_blank\" aria-label=\"undefined (opens in a new tab)\" rel=\"noreferrer noopener nofollow\">inaccurate 81% of the time<\/a>. However, the latest facial recognition systems are becoming far more accurate. Earlier this year, the Met announced it was <a href=\"https:\/\/www.met.police.uk\/advice\/advice-and-information\/facial-recognition\/live-facial-recognition\/\" target=\"_blank\" aria-label=\"undefined (opens in a new tab)\" rel=\"noreferrer noopener nofollow\">adopting the technology<\/a> to scan for known troublemakers at large events.&nbsp;<\/p>\n\n\n\n<p>Many <span id=\"urn:enhancement-c3f1c7bf\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/use_case\">use cases<\/span> calling for facial recognition need the <span id=\"urn:enhancement-af0e7568\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/technology\">technology<\/span> to work in near real-time. As a result, <span id=\"urn:enhancement-f2dee029\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">applications<\/span> rely on moving ML <span id=\"urn:enhancement-ca8a0101\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/scientific_modelling\">models<\/span> to the edge of the network. The <span id=\"urn:enhancement-fed13b0\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/system\">system<\/span> adopted by the Met is based on <a href=\"https:\/\/www.nec.com\/en\/global\/solutions\/biometrics\/face\/neofacewatch.html\" target=\"_blank\" aria-label=\"undefined (opens in a new tab)\" rel=\"noreferrer noopener nofollow\">NEC NeoFace Watch<\/a>, which is completely stand-alone and works in real-time. NEC targets its technology at a number of other markets, including retail, corporate events, festivals and other mega-events, and transportation.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Real-time monitoring<\/h3>\n\n\n\n<p>Heavy industry and mining rely on extremely large and expensive machinery. Companies can potentially lose millions if this machinery suffers an unplanned breakdown. For instance, many mining operations are reliant on huge high-power pumps that keep the workings free from water and pump the mined slurry to the processing plant. The whole operation comes to a halt if one of these pumps suffers a catastrophic failure. As a result, mining companies invest significant resources into AI systems designed to predict potential failures before they happen.&nbsp;<\/p>\n\n\n\n<p>Currently, these systems are often based on transmitting data from IoT sensors attached to the equipment. This data is then processed at a central location and any warning necessary is sent back to the appropriate operator. However, mines and construction sites can be tens of kilometres across, often in hostile terrain, so being able to integrate the ML model directly into the edge device would simplify the whole process.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is needed to run AI and ML models at the edge?<\/h2>\n\n\n\n<p>Moving AI to the network edge requires three things: suitable hardware, new tools and a new paradigm for creating ML models. Let\u2019s look at each of these requirements.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Optimised hardware<\/h3>\n\n\n\n<p>As already discussed, ML models often rely on large numbers of parallel operations. Bluntly, they need raw computing power. However, there is always a trade-off between computing power and the actual power drawn by the device. For ML models to move to the edge, devices that draw as little power as possible are required. This is even more true when the device needs to be embedded. Fortunately, there is now a wide range of high-performance, low-power MCUs available from suppliers like Mouser. We will look at these in more detail later in this series of blog posts.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Suitable tools<\/h3>\n\n\n\n<p>The next thing needed is a suitable toolchain for running ML models on microcontrollers. The overwhelming majority of ML frameworks are designed to run on 64bit Intel family CPUs or on GPUs. By contrast, all the suitable microcontrollers have a 32bit reduced instruction-set architecture, like the ARM Cortex series MCUs. Don\u2019t despair though; there are libraries, such as <a href=\"https:\/\/www.tensorflow.org\/lite\/microcontrollers\" target=\"_blank\" aria-label=\"undefined (opens in a new tab)\" rel=\"noreferrer noopener nofollow\">TensorFlow Lite<\/a> that allow ML models to be run on MCUs.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Model once, run anywhere&nbsp;<\/h3>\n\n\n\n<p>The final piece of the puzzle is a different paradigm for creating and running ML models. This can be summed up with the phrase \u201cModel once, run anywhere.\u201d Essentially, this means exactly what it says on the tin: create your model, typically using a high-power ML&#8211;optimised machine, then use your toolchain to convert it into code that can run on any microcontroller. Unfortunately, this does of course eliminate the ability to benefit from <a href=\"https:\/\/towardsdatascience.com\/how-to-apply-continual-learning-to-your-machine-learning-models-4754adcd7f7f\" target=\"_blank\" aria-label=\"undefined (opens in a new tab)\" rel=\"noreferrer noopener nofollow\">continual learning<\/a> or reinforcement learning.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The trade-off&nbsp;<\/h2>\n\n\n\n<p>The following table captures some of the trade-offs made when ML models are run at the edge. Hopefully it offers some pointers that will help in deciding whether or not to move your next AI project to the edge.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Feature<\/strong><\/td><td><strong>In the data centre<\/strong><\/td><td><strong>At the edge<\/strong><\/td><\/tr><tr><td>Real-time<\/td><td>No<\/td><td>Yes<\/td><\/tr><tr><td>Continual learning<\/td><td>Yes<\/td><td>No<\/td><\/tr><tr><td>Embeddable<\/td><td>No<\/td><td>Yes<\/td><\/tr><tr><td>Network needed?<\/td><td>Yes<\/td><td>No<\/td><\/tr><tr><td>Reinforcement learning<\/td><td>Yes<\/td><td>No<\/td><\/tr><tr><td>Full range of models?<\/td><td>Yes<\/td><td>No<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusions<\/h2>\n\n\n\n<p>This blog promised to show you why moving ML models to the edge is so desirable. Hopefully you have been convinced that doing so enables new use cases for AI, which in turn promises to bring about an embeddable AI revolution. The next article will look in more detail at the tools that make Machine Learning on MCU\u2019s possible. Meanwhile, to learn more about AI-capable MCUs, check out the <a aria-label=\"undefined (opens in a new tab)\" style=\"user-select: auto;\" href=\"https:\/\/eu.mouser.com\/applications\/tensorflow-lite-mcus-ai-edge\/\" target=\"_blank\" rel=\"noreferrer noopener\">Mouser TensorFlow Lite microsite<\/a>.<\/p>\n\n\n\n<p>This series is written in collaboration with Mouser Electronics. Mouser Electronics is the worldwide leading authorized distributor of semiconductors and electronic components, specializing in the rapid introduction of new products and technologies for design engineers and buyers. Mouser has created a dedicated <a style=\"user-select: auto;\" href=\"https:\/\/www.mouser.com\/applications\/tensorflow-lite-mcus-ai-edge\/\">microsite<\/a> exploring machine learning at the edge. They also have a useful <a style=\"user-select: auto;\" href=\"https:\/\/www.mouser.com\/technical-resources\/Search?keyword=artificial+intelligence&amp;pageNumber=1&amp;tab=All+Content\">Technical Resource Centre<\/a>, which offers a wide range of articles on the latest technologies.<\/p>\n\n\n\n<div class=\"uagb-cta__outer-wrap uagb-block-75565457\"><div class=\"uagb-cta__content-wrap uagb-cta__block uagb-cta__icon-position-right uagb-cta__content-right uagb-cta__content-stacked-tablet uagb-cta__button-valign-middle uagb-cta__button-type-none \"><div class=\"uagb-cta__left-right-wrap\"><div class=\"uagb-cta__content\"><div class=\"uagb-cta__title-wrap\"><h4 class=\"uagb-cta__title\">RELATED CONTENT<\/h4><\/div><div class=\"uagb-cta-text-wrap\"><p class=\"uagb-cta__desc\"><a href=\"https:\/\/www.codemotion.com\/magazine\/dev-hub\/machine-learning-dev\/edge-machine-learning\/\" target=\"_blank\" aria-label=\"undefined (opens in a new tab)\" rel=\"noreferrer noopener\">Getting started with edge machine learning<\/a><\/p><\/div><\/div><div class=\"uagb-cta__link-wrapper uagb-cta__block-link-style\"><\/div><\/div><\/div><\/div>\n\n\n","protected":false},"excerpt":{"rendered":"<p>Machine learning\u00a0is traditionally processor-intensive; ML algorithms require large numbers of parallel operations. As a result, the models usually run in data centres at the core of the network. However, this has a direct impact in terms of latency, security and cost. Over the next six months, this article series will explore\u00a0why AI is moving to&#8230; <a class=\"more-link\" href=\"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/\">Read more<\/a><\/p>\n","protected":false},"author":83,"featured_media":6893,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_editorskit_title_hidden":false,"_editorskit_reading_time":8,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","_uag_custom_page_level_css":"","_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[46],"tags":[],"collections":[],"class_list":{"0":"post-6507","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-ai-ml","8":"entry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>The cutting edge of real-time AI - Codemotion Magazine<\/title>\n<meta name=\"description\" content=\"AI relies on machine learning models running in data centres. Here, we see why it makes sense to move some ML models to the edge.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The cutting edge of real-time AI\" \/>\n<meta property=\"og:description\" content=\"AI relies on machine learning models running in data centres. Here, we see why it makes sense to move some ML models to the edge.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/\" \/>\n<meta property=\"og:site_name\" content=\"Codemotion Magazine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Codemotion.Italy\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-17T09:41:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-01-05T19:05:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/07\/mouser-real-time-AI-scaled.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1130\" \/>\n\t<meta property=\"og:image:height\" content=\"675\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Mark Patrick, Mouser Electronics\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CodemotionIT\" \/>\n<meta name=\"twitter:site\" content=\"@CodemotionIT\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mark Patrick, Mouser Electronics\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/\"},\"author\":{\"name\":\"Mark Patrick, Mouser Electronics\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/664e4da6990fc1344a2299435a542654\"},\"headline\":\"The cutting edge of real-time AI\",\"datePublished\":\"2020-07-17T09:41:32+00:00\",\"dateModified\":\"2022-01-05T19:05:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/\"},\"wordCount\":2099,\"publisher\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/07\/mouser-real-time-AI-scaled.jpg\",\"articleSection\":[\"AI\/ML\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/\",\"name\":\"The cutting edge of real-time AI - Codemotion Magazine\",\"isPartOf\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/07\/mouser-real-time-AI-scaled.jpg\",\"datePublished\":\"2020-07-17T09:41:32+00:00\",\"dateModified\":\"2022-01-05T19:05:30+00:00\",\"description\":\"AI relies on machine learning models running in data centres. Here, we see why it makes sense to move some ML models to the edge.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/#primaryimage\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/07\/mouser-real-time-AI-scaled.jpg\",\"contentUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/07\/mouser-real-time-AI-scaled.jpg\",\"width\":1130,\"height\":675,\"caption\":\"Real time AI at the edge\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.codemotion.com\/magazine\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AI\/ML\",\"item\":\"https:\/\/www.codemotion.com\/magazine\/ai-ml\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Machine Learning\",\"item\":\"https:\/\/www.codemotion.com\/magazine\/ai-ml\/machine-learning\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"The cutting edge of real-time AI\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#website\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/\",\"name\":\"Codemotion Magazine\",\"description\":\"We code the future. Together\",\"publisher\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.codemotion.com\/magazine\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\",\"name\":\"Codemotion\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png\",\"contentUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png\",\"width\":225,\"height\":225,\"caption\":\"Codemotion\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/Codemotion.Italy\/\",\"https:\/\/x.com\/CodemotionIT\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/664e4da6990fc1344a2299435a542654\",\"name\":\"Mark Patrick, Mouser Electronics\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0d35fad9fee01e991637b67f54ae7cb8b001b5d2c1e4f7c1942b2105dad5a9bf?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0d35fad9fee01e991637b67f54ae7cb8b001b5d2c1e4f7c1942b2105dad5a9bf?s=96&d=mm&r=g\",\"caption\":\"Mark Patrick, Mouser Electronics\"},\"url\":\"https:\/\/www.codemotion.com\/magazine\/author\/mark-patrick\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"The cutting edge of real-time AI - Codemotion Magazine","description":"AI relies on machine learning models running in data centres. Here, we see why it makes sense to move some ML models to the edge.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/","og_locale":"en_US","og_type":"article","og_title":"The cutting edge of real-time AI","og_description":"AI relies on machine learning models running in data centres. Here, we see why it makes sense to move some ML models to the edge.","og_url":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/","og_site_name":"Codemotion Magazine","article_publisher":"https:\/\/www.facebook.com\/Codemotion.Italy\/","article_published_time":"2020-07-17T09:41:32+00:00","article_modified_time":"2022-01-05T19:05:30+00:00","og_image":[{"width":1130,"height":675,"url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/07\/mouser-real-time-AI-scaled.jpg","type":"image\/jpeg"}],"author":"Mark Patrick, Mouser Electronics","twitter_card":"summary_large_image","twitter_creator":"@CodemotionIT","twitter_site":"@CodemotionIT","twitter_misc":{"Written by":"Mark Patrick, Mouser Electronics","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/#article","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/"},"author":{"name":"Mark Patrick, Mouser Electronics","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/664e4da6990fc1344a2299435a542654"},"headline":"The cutting edge of real-time AI","datePublished":"2020-07-17T09:41:32+00:00","dateModified":"2022-01-05T19:05:30+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/"},"wordCount":2099,"publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/07\/mouser-real-time-AI-scaled.jpg","articleSection":["AI\/ML"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/","url":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/","name":"The cutting edge of real-time AI - Codemotion Magazine","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/#primaryimage"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/07\/mouser-real-time-AI-scaled.jpg","datePublished":"2020-07-17T09:41:32+00:00","dateModified":"2022-01-05T19:05:30+00:00","description":"AI relies on machine learning models running in data centres. Here, we see why it makes sense to move some ML models to the edge.","breadcrumb":{"@id":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/#primaryimage","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/07\/mouser-real-time-AI-scaled.jpg","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/07\/mouser-real-time-AI-scaled.jpg","width":1130,"height":675,"caption":"Real time AI at the edge"},{"@type":"BreadcrumbList","@id":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/the-cutting-edge-of-real-time-ai\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codemotion.com\/magazine\/"},{"@type":"ListItem","position":2,"name":"AI\/ML","item":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/"},{"@type":"ListItem","position":3,"name":"Machine Learning","item":"https:\/\/www.codemotion.com\/magazine\/ai-ml\/machine-learning\/"},{"@type":"ListItem","position":4,"name":"The cutting edge of real-time AI"}]},{"@type":"WebSite","@id":"https:\/\/www.codemotion.com\/magazine\/#website","url":"https:\/\/www.codemotion.com\/magazine\/","name":"Codemotion Magazine","description":"We code the future. Together","publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codemotion.com\/magazine\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codemotion.com\/magazine\/#organization","name":"Codemotion","url":"https:\/\/www.codemotion.com\/magazine\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","width":225,"height":225,"caption":"Codemotion"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Codemotion.Italy\/","https:\/\/x.com\/CodemotionIT"]},{"@type":"Person","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/664e4da6990fc1344a2299435a542654","name":"Mark Patrick, Mouser Electronics","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0d35fad9fee01e991637b67f54ae7cb8b001b5d2c1e4f7c1942b2105dad5a9bf?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0d35fad9fee01e991637b67f54ae7cb8b001b5d2c1e4f7c1942b2105dad5a9bf?s=96&d=mm&r=g","caption":"Mark Patrick, Mouser Electronics"},"url":"https:\/\/www.codemotion.com\/magazine\/author\/mark-patrick\/"}]}},"featured_image_src":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/07\/mouser-real-time-AI-scaled-600x400.jpg","featured_image_src_square":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/07\/mouser-real-time-AI-scaled-600x600.jpg","author_info":{"display_name":"Mark Patrick, Mouser Electronics","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/mark-patrick\/"},"uagb_featured_image_src":{"full":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/07\/mouser-real-time-AI-scaled.jpg",1130,675,false],"thumbnail":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/07\/mouser-real-time-AI-scaled-150x150.jpg",150,150,true],"medium":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/07\/mouser-real-time-AI-scaled-300x179.jpg",300,179,true],"medium_large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/07\/mouser-real-time-AI-scaled-768x459.jpg",768,459,true],"large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/07\/mouser-real-time-AI-scaled-1024x612.jpg",1024,612,true],"1536x1536":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/07\/mouser-real-time-AI-scaled.jpg",1130,675,false],"2048x2048":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/07\/mouser-real-time-AI-scaled.jpg",1130,675,false],"small-home-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/07\/mouser-real-time-AI-scaled.jpg",100,60,false],"sidebar-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/07\/mouser-real-time-AI-scaled-180x128.jpg",180,128,true],"genesis-singular-images":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/07\/mouser-real-time-AI-scaled-896x504.jpg",896,504,true],"archive-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/07\/mouser-real-time-AI-scaled-400x225.jpg",400,225,true],"gb-block-post-grid-landscape":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/07\/mouser-real-time-AI-scaled-600x400.jpg",600,400,true],"gb-block-post-grid-square":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/07\/mouser-real-time-AI-scaled-600x600.jpg",600,600,true]},"uagb_author_info":{"display_name":"Mark Patrick, Mouser Electronics","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/mark-patrick\/"},"uagb_comment_info":0,"uagb_excerpt":"Machine learning\u00a0is traditionally processor-intensive; ML algorithms require large numbers of parallel operations. As a result, the models usually run in data centres at the core of the network. However, this has a direct impact in terms of latency, security and cost. Over the next six months, this article series will explore\u00a0why AI is moving to&#8230;&hellip;","lang":"en","_links":{"self":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/6507","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/users\/83"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/comments?post=6507"}],"version-history":[{"count":12,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/6507\/revisions"}],"predecessor-version":[{"id":7076,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/6507\/revisions\/7076"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media\/6893"}],"wp:attachment":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media?parent=6507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/categories?post=6507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/tags?post=6507"},{"taxonomy":"collections","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/collections?post=6507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}