<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Highlights &#8211; Kartik Nanda, Engineering AI</title>
	<atom:link href="https://www.kartiknanda.com/category/highlights/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.kartiknanda.com</link>
	<description>AI algorithms, how-to guides, thoughts</description>
	<lastBuildDate>Tue, 11 Aug 2020 00:27:07 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.5.1</generator>

<image>
	<url>https://www.kartiknanda.com/wp-content/uploads/2020/07/cropped-site_icon-2-32x32.jpg</url>
	<title>Highlights &#8211; Kartik Nanda, Engineering AI</title>
	<link>https://www.kartiknanda.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Kartik, what do you do?</title>
		<link>https://www.kartiknanda.com/what-do-you-do/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=what-do-you-do</link>
					<comments>https://www.kartiknanda.com/what-do-you-do/#respond</comments>
		
		<dc:creator><![CDATA[Kartik Nanda]]></dc:creator>
		<pubDate>Tue, 28 Jul 2020 18:02:00 +0000</pubDate>
				<category><![CDATA[Highlights]]></category>
		<category><![CDATA[Meet Me]]></category>
		<guid isPermaLink="false">http://www.kartiknanda.com/?p=1100</guid>

					<description><![CDATA[<p>“Kartik, what do you do?” &#8211; asked you. Lets see &#8211; nowadays I design AI algorithms. I have designed Integrated Circuits, solar powered irrigation pumps in India, have founded a company, have some US patents. But what do I do? The 42nd time someone asked me this, I went deeper. As an&#160;undergraduate student at the Indian Institute of Technology (IIT),&#8230;</p>
<p>The post <a rel="nofollow" href="https://www.kartiknanda.com/what-do-you-do/">Kartik, what do you do?</a> appeared first on <a rel="nofollow" href="https://www.kartiknanda.com">Kartik Nanda, Engineering AI</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>“Kartik, what do you do?” &#8211; asked you. Lets see &#8211; nowadays I design AI algorithms. I have designed Integrated Circuits, solar powered irrigation pumps in India, have founded a company, have some <a href="https://patents.justia.com/inventor/kartik-nanda">US patents</a>. But what do I do? The 42nd time someone asked me this, I went deeper.</p>



<p>As an&nbsp;undergraduate student at the <a href="http://www.iitk.ac.in/">Indian Institute of Technology (IIT), Kanpur</a>, I remember this sinking feeling at the end of every semester – I don’t see myself doing that for the rest of my life! Four years and something like forty courses, and at the end of it, I still had no idea what I wanted to do – every course had been a struggle.</p>



<p>So I did the only logical thing – enrolled for a masters. It wasn’t until the second semester of <a href="https://cse.nd.edu/">graduate school at Notre Dame</a> that I found a course that I just “got” – Algorithms. Of course, realization has taken many more happy years to sink in.</p>



<p>That interest in algorithms took me to signal processing early in my career. I designed delta sigma ADCs (or sigma delta, if you must!), digital filters, DSPs. Since these don’t exist in air, what I was actually doing was building mixed signal ICs. I started to think of myself as an IC guy (really! <a href="https://www.researchgate.net/profile/Samares_Kar">Prof. Kar’s</a> course!!).&nbsp;</p>



<p>But algorithms wasn’t done with me yet – I moved on to solar, or more specifically, generating electricity from solar. From designing ICs, to coding algorithms for building irrigation pumps that run directly from a solar PV panel. Solar, though, is more than just a product for me. It has enabled me to return to India (where I was born), to rural India – what a learning experience that has been. I am now also more conscious of the environment, and of how we live our lives.&nbsp;</p>



<p>My focus nowadays is&nbsp;Artificial Intelligence (AI), specifically deep learning using neural nets. Projects include looking for anomalies in audio signals, audio keyword recognition, identifying anomalies in images taken by a drone. All of these are algorithms &#8211; AI is but another tool. A powerful tool though, that makes it possible to do things we couldn&#8217;t earlier. I believe that AI complements human intelligence, not replace it. In other words, do things that humans cannot do or find too painful (expensive, tedious) to do. </p>



<p>So, what do I do? – I design algorithms and build products around them. That is me, in a nutshell. I call Austin, Texas home, am married and have two wonderful daughters. I like the outdoors &#8211; in the pre-Corona days you could find me on Lady Bird Lake at least three evenings every week. </p>



<p>OK, what do <em>you </em>do? Can I help you with your next thing? Do write &#8230;</p>



<p></p>
<p>The post <a rel="nofollow" href="https://www.kartiknanda.com/what-do-you-do/">Kartik, what do you do?</a> appeared first on <a rel="nofollow" href="https://www.kartiknanda.com">Kartik Nanda, Engineering AI</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.kartiknanda.com/what-do-you-do/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Setting up the Pi is easy</title>
		<link>https://www.kartiknanda.com/raspberry-pi-setup/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=raspberry-pi-setup</link>
					<comments>https://www.kartiknanda.com/raspberry-pi-setup/#respond</comments>
		
		<dc:creator><![CDATA[Kartik Nanda]]></dc:creator>
		<pubDate>Fri, 24 Jul 2020 01:32:30 +0000</pubDate>
				<category><![CDATA[AI on Pi]]></category>
		<category><![CDATA[Highlights]]></category>
		<category><![CDATA[ai]]></category>
		<category><![CDATA[raspberry pi]]></category>
		<guid isPermaLink="false">http://www.kartiknanda.com/?p=1075</guid>

					<description><![CDATA[<p>This is the first in a series of posts on how to run AI on the Raspberry Pi (AI on Pi). The first step &#8211; setting up the Raspberry Pi. The final goal is to use the Pi to run a deep learning application. This could be vision related – example, recognizing an event from images/video feed, using Convolutional Neural&#8230;</p>
<p>The post <a rel="nofollow" href="https://www.kartiknanda.com/raspberry-pi-setup/">Setting up the Pi is easy</a> appeared first on <a rel="nofollow" href="https://www.kartiknanda.com">Kartik Nanda, Engineering AI</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>This is the first in a series of posts on how to run AI on the Raspberry Pi (AI on Pi). The first step &#8211; setting up the Raspberry Pi. The final goal is to use the Pi to run a deep learning application. This could be vision related – example, recognizing an event from images/video feed, using Convolutional Neural Nets (CNNs). It could also be audio related, so NLP using RNNs, but that is for a later time.</p>



<h2>The main goals:</h2>



<ul><li>Capture images / video using a camera (sensor) connected to the Pi</li><li>AI algo executes on the Pi</li><li>Result is communicated to “Hub” using BT, Wifi etc. Hub could be another computer, IoT Hub, or the Cloud.</li></ul>



<p>Since I have never worked with the Raspberry Pi previously, let’s start at the very beginning.</p>



<h3>Hardware:</h3>



<ul><li>Raspberry Pi 4, 4GB version (bought the <a href="https://www.canakit.com/raspberry-pi-4-starter-kit.html">Canakit Raspberry Pi 4 Starter Kit</a>)</li></ul>



<ul><li>OV5647 5.0MP Camera Module (bought at <a href="https://dlscorp.com/shop/ov5647-5-0-mp-raspberry-pi-compatible-camera-modules/">dlscorp.com</a> site)<br>The OV5647 module is the older version. There is a new <a href="https://www.raspberrypi.org/products/camera-module-v2/">official camera module</a>, but I decided to go with the older version for two reasons – cost and 5MP (vs 8MP in V2) is plenty for AI applications. Important details – needs to be a CSI module, and comes with a replaceable lens mount (M12)</li></ul>



<ul><li>Camera lens (bought different lenses from dlscorp)</li></ul>



<ul><li>Monitor – used an old monitor I had from years ago. The Pi connects to a monitor using a micro-HDMI port. The kit includes a micro-HDMI to HDMI cable, but I needed to buy a micro-HDMI to VGA adapter for my Monitor.</li></ul>



<ul><li>Keyboard and mouse – used an old keyboard I had laying around</li></ul>



<h3>Software:</h3>



<ul><li>Used the standard NOOBS (preloaded on the micro SD card), and the full Raspbian install. Nothing fancy, yet.</li></ul>



<h2>Step 1: Connect the System</h2>



<div class="wp-block-image"><figure class="alignright size-medium is-resized"><img loading="lazy" src="http://www.kartiknanda.com/wp-content/uploads/2020/07/raspberry_pi_setup-225x300.jpg" alt="Raspberry Pi setup with a camera facing out a window" class="wp-image-1076" width="243" height="331"/></figure></div>



<p>There are many excellent walk throughs – see <a href="https://projects.raspberrypi.org/en/projects/raspberry-pi-getting-started">here</a> or <a href="https://www.youtube.com/watch?v=BpJCAafw2qE">here</a>. The basics are simple enough – connect the display, keyboard and mouse, and the power, and follow the onscreen prompts. There are a couple of things I would like to point out though. One, setup SSH and VNC access to the Pi, so you can connect to it from a remote computer and don’t need the dedicated mouse, keyboard and monitor. This will be especially useful during deployment of the application. The second thing – <a href="https://www.raspberrypi.org/documentation/raspbian/updating.md">update the software</a>. Use “sudo apt-get update” and “sudo apt-get upgrade”.</p>



<p>Once the system is operational, do take the time to explore, browse the web etc. Marvel at a simple yet very complete computer.</p>



<h2>Step 2: Python Setup</h2>



<p>There are other languages, of course, but Python is the language of choice. Python2 and Python3 come pre-installed, with a bunch of packages. The first thing is the virtual environment setup – extremely important given the stand-alone nature of the intended application. The application should not break because of an update a couple of years out. I used <a href="https://virtualenv.pypa.io/en/latest/">virtualenv</a> – <a href="https://www.youtube.com/watch?v=N5vscPTWKOk">here</a> is a good intro.</p>



<p>I spent some time (a little) trying to research the “best” editor but realize that the Pi is not necessarily where I will develop the code. That can be done on a laptop or in the cloud. So, for now I am using Thonny, which came pre-installed. I have not yet written a lot of python on the Pi, will see how it goes over the next few days/weeks – might yet change my mind. </p>



<p>Try out a simple program, ensure that python is up and running. In the next post, the camera setup.</p>
<p>The post <a rel="nofollow" href="https://www.kartiknanda.com/raspberry-pi-setup/">Setting up the Pi is easy</a> appeared first on <a rel="nofollow" href="https://www.kartiknanda.com">Kartik Nanda, Engineering AI</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.kartiknanda.com/raspberry-pi-setup/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Edge or Cloud &#8211; Where should AI live?</title>
		<link>https://www.kartiknanda.com/edge-or-cloud-where-should-ai-live/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=edge-or-cloud-where-should-ai-live</link>
					<comments>https://www.kartiknanda.com/edge-or-cloud-where-should-ai-live/#respond</comments>
		
		<dc:creator><![CDATA[Kartik Nanda]]></dc:creator>
		<pubDate>Sat, 19 Oct 2019 18:36:48 +0000</pubDate>
				<category><![CDATA[AI]]></category>
		<category><![CDATA[Highlights]]></category>
		<category><![CDATA[Artificial Intelligence]]></category>
		<category><![CDATA[Cloud AI]]></category>
		<category><![CDATA[Edge IoT]]></category>
		<category><![CDATA[Edge or Cloud]]></category>
		<category><![CDATA[IoT]]></category>
		<guid isPermaLink="false">http://www.kartiknanda.com/?p=107</guid>

					<description><![CDATA[<p>Where should the AI live? Does it have to be in the Cloud? Or does it live in the Edge? Is it even an option (sometimes it's not)? Is there a hybrid solution, that is, bits and pieces live on the Edge, and the Cloud? This article examines various criteria that have an impact on this decision</p>
<p>The post <a rel="nofollow" href="https://www.kartiknanda.com/edge-or-cloud-where-should-ai-live/">Edge or Cloud &#8211; Where should AI live?</a> appeared first on <a rel="nofollow" href="https://www.kartiknanda.com">Kartik Nanda, Engineering AI</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>This is a question that has come up many times during AI product discussions &#8211; where will the AI live? Does it have to be in the Cloud? Or does it live in the Edge? Is it even an option (sometimes it&#8217;s not)? Is there a hybrid solution, that is, bits and pieces live on the Edge, <em>and </em>the Cloud. </p>



<p>There is not much online that compares these today, partly because its still early days. There was a panel discussion on this topic at the Texas Wireless Summit (<a href="https://www.youtube.com/watch?v=yorYWRrl4Jk">link to the YouTube video</a>). The excellent panelists covered some of the aspects I talk about here.</p>



<p>The table below summarizes some key considerations and suggests which is better &#8211; the Cloud or the Edge. Below we examine each, and present our rationale. There is not a mathematical proof, but rather intuitive arguments, with some examples. We consider two examples. First is the facial recognition on mobile devices &#8211; we can unlock our phone, the laptop just by looking at it. The device uses its camera to &#8220;see&#8221; us, and uses an AI model running on the device itself to recognize the face, and unlock. Why does this model sit on the Edge?</p>



<p>The second example is a drone searching for forest fires. Consider two possible implementations. Option 1 &#8211; the images are streamed into the Cloud, where the AI model looks for the fire. Option 2 &#8211; the AI sits on the drone itself, and the drone then only communicates the location of the fire. </p>



<figure class="wp-block-image"><img src="http://www.kartiknanda.com/wp-content/uploads/2019/10/AI_Edge_or_Cloud_Blog_Tbl1-1024x265.jpg" alt="Comparing AI deployment at the Edge Vs in the Cloud" class="wp-image-110"/><figcaption>Where should AI live &#8211; at the Edge or in the Cloud? Here we look at various criteria, and suggest if the Edge or the Cloud comes out ahead</figcaption></figure>



<h2>Accuracy</h2>



<p>Accuracy is a simple one. By &#8220;accuracy&#8221; we mean the accuracy of the AI model&#8217;s output. The Cloud has more resources, and in general, that translates into higher accuracy. What are these Resources? &#8211; compute and memory, so a bigger, more complex model. But it could also be access to other data (sensor fusion, or data from other deployments), or historical data, or other information that is not available at the Edge.</p>



<p>A drone with a model in the Cloud is likely better at detecting fires.</p>



<h2>Time</h2>



<p>Time &#8211; how long before we get the output result &#8211; is slightly more complicated. For the same computation, the Edge will be faster than the Cloud. Why? &#8211; the Edge is the data generation point. If the model sits in the Cloud, the data has to be uploaded, then inferred, and the results downloaded back to the Edge. However, if the results are not going back to the Edge and instead stay in the Cloud, then time might be the same.</p>



<p>For the phone unlock example, the Edge is a better place for the AI. The action &#8211; unlock the phone &#8211; is at the Edge. </p>



<h2>Reliability</h2>



<p>Sending data to the Cloud has a &#8220;variable&#8221; time aspect as well. Communication depends on many factors, like network availability, signal strength, data routing, traffic. Some are controllable, others harder. In a worst scenario, what if the data does not get through &#8211; will it be an issue that can be recovered from? </p>



<p>As an example, if the face recognition unlock on the mobile phone ran in the Cloud, it likely wouldn&#8217;t be a feature! </p>



<h2>Power</h2>



<p>There is a simple rule &#8211; the farther the data has to travel, the more power it needs. The most power-hungry part of an IoT (Internet of Things) device is the radio (eg, see <a href="http://diposit.ub.edu/dspace/bitstream/2445/97601/1/660493.pdf">Modeling Power Consumption for IoT devices</a>). The energy consumed of course depends on the amount of data sent. As an example, assume a drone looking for a fire. Option one is to send a video stream and process it in the Cloud. Another would be for the AI model to sit on the drone, and for the drone to only send the location of the fire. From the power perspective, the later will be far better.</p>



<h2>Cost</h2>



<p>Closely tied to power is the cost. This is not obvious, because cost can include many things. However, purely from a cost-of-data angle, streaming the video is more costly than processing it at the Edge (on the drone, in the example above). </p>



<p>The broader question about cost is harder. One aspect is one-time costs Vs recurring costs. While the Edge device is more a one-time cost, the Cloud presents a recurring cost. That&#8217;s only one aspect though, and cost has to be evaluated on a product by product basis. </p>



<h2>Security</h2>



<p>There are two ways to look at security. One is the security of the data. It is most secure, and most easily secured, if it never leaves the Edge. Once the data is on the internet, or in the Cloud, it is only as secure as the encryption/protocols. </p>



<p>The second is securing the Intellectual Property (IP) &#8211; the AI model for instance. This is more secure if its in the Cloud. </p>



<h2>Privacy</h2>



<p>While &#8220;security&#8221; looks at the problem from the Provider&#8217;s perspective (company building the product), &#8220;privacy&#8221; looks at it from the Consumer&#8217;s perspective (person or entity using the product). It is a major concern, and becoming more important every day. Imagine if every time face recognition AI unlocks my phone, my image is uploaded to the Cloud. Then another AI algorithm uses it to &#8220;read&#8221; my emotional state, and sends suggestions (ads). That is a possibility (easy) with Cloud-based AI, but not as much with Edge-based AI. </p>



<p>The easiest way to keep our personal data personal is to keep it on our devices, and not send it to the Cloud. </p>



<p>So there&#8217;s the short list of considerations to keep in mind while planning your AI deployment, and figuring out where it belongs &#8211; the Cloud or the Edge. It is not a comprehensive list, and there are many other considerations like time-to-market, managing deployment, cost of building the solution, technology etc that are not covered. They make more sense though if examined within the scope of the AI project. Feel free to <a href="/contact-us">reach  out</a> with thoughts or if you need help to get started on your project.</p>
<p>The post <a rel="nofollow" href="https://www.kartiknanda.com/edge-or-cloud-where-should-ai-live/">Edge or Cloud &#8211; Where should AI live?</a> appeared first on <a rel="nofollow" href="https://www.kartiknanda.com">Kartik Nanda, Engineering AI</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.kartiknanda.com/edge-or-cloud-where-should-ai-live/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
