summaryrefslogtreecommitdiff
path: root/posts/2019-12-04-Google-Teachable-Machines/index.html
blob: 254d7f5431231f62cbf96c773d5488c9541f8448 (plain)
1
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"/><meta name="og:site_name" content="Navan Chauhan"/><link rel="canonical" href="https://navanchauhan.github.io/posts/2019-12-04-Google-Teachable-Machines"/><meta name="twitter:url" content="https://navanchauhan.github.io/posts/2019-12-04-Google-Teachable-Machines"/><meta name="og:url" content="https://navanchauhan.github.io/posts/2019-12-04-Google-Teachable-Machines"/><title>Image Classifier With Teachable Machines | Navan Chauhan</title><meta name="twitter:title" content="Image Classifier With Teachable Machines | Navan Chauhan"/><meta name="og:title" content="Image Classifier With Teachable Machines | Navan Chauhan"/><meta name="description" content="Tutorial on creating a custom image classifier quickly with Google Teachanle Machines"/><meta name="twitter:description" content="Tutorial on creating a custom image classifier quickly with Google Teachanle Machines"/><meta name="og:description" content="Tutorial on creating a custom image classifier quickly with Google Teachanle Machines"/><meta name="twitter:card" content="summary"/><link rel="stylesheet" href="/styles.css" type="text/css"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="shortcut icon" href="/images/favicon.png" type="image/png"/><link rel="alternate" href="/feed.rss" type="application/rss+xml" title="Subscribe to Navan Chauhan"/><meta name="twitter:image" content="https://navanchauhan.github.io/images/logo.png"/><meta name="og:image" content="https://navanchauhan.github.io/images/logo.png"/></head><head><script>var _paq=window._paq=window._paq||[];_paq.push(['trackPageView']),_paq.push(['enableLinkTracking']),function(){var a='https://navanspi.duckdns.org:6969/analytics/';_paq.push(['setTrackerUrl',a+'matomo.php']),_paq.push(['setSiteId','2']);var e=document,t=e.createElement('script'),p=e.getElementsByTagName('script')[0];t.type='text/javascript',t.async=!0,t.src=a+'matomo.js',p.parentNode.insertBefore(t,p)}();</script></head><head><script src="https://www.googletagmanager.com/gtag/js?id=UA-108635191-1v"></script><script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'UA-108635191-1');</script></head><body class="item-page"><header><div class="wrapper"><a class="site-name" href="/">Navan Chauhan</a><nav><ul><li><a href="/about">About Me</a></li><li><a class="selected" href="/posts">Posts</a></li><li><a href="/publications">Publications</a></li><li><a href="/assets/résumé.pdf">Résumé</a></li><li><a href="https://navanchauhan.github.io/repo">Repo</a></li></ul></nav></div></header><div class="wrapper"><article><div class="content"><span class="reading-time">2 minute read</span><span class="reading-time">Created on December 4, 2019</span><span class="reading-time">Last modified on June 1, 2020</span><h1>Image Classifier With Teachable Machines</h1><p>Made for Google Code-In</p><p><strong>Task Description</strong></p><p>Using Glitch and the Teachable Machines, build a Book Detector with Tensorflow.js. When a book is recognized, the code would randomly suggest a book/tell a famous quote from a book. Here is an example Project to get you started: https://glitch.com/~voltaic-acorn</p><h3>Details</h3><ol><li>Collecting Data</li></ol><p>Teachable Machine allows you to create your dataset just by using your webcam! I created a database consisting of three classes ( Three Books ) and approximately grabbed 100 pictures for each book/class</p><img src="/assets/gciTales/01-teachableMachines/01-collect.png"/><ol start="2"><li>Training</li></ol><p>Training on teachable machines is as simple as clicking the train button. I did not even have to modify any configurations.</p><img src="/assets/gciTales/01-teachableMachines/02-train.png"/><ol start="3"><li>Finding Labels</li></ol><p>Because I originally entered the entire name of the book and it's author's name as the label, the class name got truncated (Note to self, use shorter class names :p ). I then modified the code to print the modified label names in an alert box.</p><img src="/assets/gciTales/01-teachableMachines/03-label.png"/><img src="/assets/gciTales/01-teachableMachines/04-alert.png"/><ol start="4"><li>Adding a suggestions function</li></ol><p>I first added a text field on the main page and then modified the JavaScript file to suggest a similar book whenever the model predicted with an accuracy &gt;= 98%</p><img src="/assets/gciTales/01-teachableMachines/05-html.png"/><img src="/assets/gciTales/01-teachableMachines/06-js.png"/><ol start="5"><li>Running!</li></ol><p>Here it is running!</p><img src="/assets/gciTales/01-teachableMachines/07-eg.png"/><img src="/assets/gciTales/01-teachableMachines/08-eg.png"/><p>Remix this project:-</p><p>https://luminous-opinion.glitch.me</p></div><span>Tagged with: </span><ul class="tag-list"><li><a href="/tags/tutorial">Tutorial</a></li></ul></article></div><footer><p>Made with ❤️ using <a href="https://github.com/johnsundell/publish">Publish</a></p><p><a href="/feed.rss">RSS feed</a></p></footer></body></html>