Artificial Intelligence for Teachers
Today's session we are going to keep it restricted to one domain of AI specifically and that would be Deep Neural Nets and specifically in that Computer Vision so let's begin and any questions in please feel free to ask. Before we jump into you know what EDI means for any one of you know and there has been a extension of umbrella definitions across different technology providers as well as nations what they perceive as AI but it's important to understand that you know the word which we hear all over the time that uh the world is volatile uncertain complex and ambiguity and this is happening this is like is shaking not only our society world but uh reconfiguring our every system and it's just not because of covets it had already begun this era societies had begun a long time back and all what you are seeing is that uh covalence has accelerated it but what exactly is you know i mean uh how how would you measure any ideas guys that how would you quantify maybe i'll minimize my screen so i can see what others are typing also any ideas how how can we quantify hookah no idea and such okay no issues so uh predominantly uh volatility volatility uncertainty complexity and ambiguity is a combination of couple of factors uh one is the uh systematic and other is non-systematic so obviously one is that we are seeing a geoparticle situation globally play out between the world domination powers but if i go a little step below that you know and then you see that uh in the in the realm of society and business there are three more variables which are also acting which are really relevant to us in the in our day-to-day lives one of them is the technology variable so we have seen that today any business you open or any industry you go to there have been explosion of technology and it's not that you can do with one or the other for example if you just look at here as a technology you know just a dimension you realize that there are 30 technologies mentioned here right from ai to internet of things to 5g to adaptive nano printing to 3d printing and quantum computing and the list goes on and all of these are changing at a second order derivative meaning there's an acceleration on the rate of change this was this is something which has we have never seen in the history what we have seen in the last three four years the acceleration on the base change but there are two more dimensions the two more dimensions that are occurring is the product and the market timing so earlier what used to happen you know uh 17 years back or 18 years when i began my career and some of you are more experienced than me but when i began my career what had happened is we used to make a product and we could milk it for five years you know and the technology all three-dimensional moving and moving exponentially what does this mean actually this means that whether it is at the organization level at the nation level or at the individual level to re-skilling yourself and adapting to change has become a paramount need that we all have to live up to just to give you a context 70 percent of the world's assets today are actually the gdp assets which people invest in are actually obsolete because the life cycle of an asset uh specifically digital assets uh and the intellectual property which corporation organizations today have uh have reduced from five years to 18 months and it is now getting even lesser than that so what this innovation acceleration leads to obviously you know if you look at a timeline if you could reduce if you could uh you know solve let's say uh we took out desktop computers and that design stayed the same for years and years and years or let's say your telephone 30 40 years there was no change 50 years there was no change looks the same.
Today every two weeks we are seeing agility that newer features are being launched whether you're talking about video streaming whether you're talking about telecommunication we're talking about optimization of 5g networks whether they're talking about internet of things or weekly to vehicle communication so um how how do we as humans comprehend with so much of noise so much of information and so much of rate of change this can only happen if we keep adopting ourselves to newer paradigms and so what is more important today is understanding information understanding patterns and able to make sense of it uh only one more thing i want to add although this webinar is restricted to ai and i i wanted to contain it but i wanted to give a pre-filler only ai or learning data science is not going to cut out for anyone you got to be multi-disciplinary and you got you got to have the ability to look at the world from different dimensions whether it is from designing perspective whether it is from data perspective or whether it is from a systems thinking approach which is a larger and more generic context so uh if you if you now see what what what they're saying you know if you look at world trade organization and world economic forum they're seeing that a lot of newer technologies and a lot of new markets uh and market doesn't mean only physical markets but it can be newer business models of doing things and new products are being launched that means the barrier to entry has reduced in information symmetry is there this is no more asymmetric but having said that having said that the word profit pool of the gdp global gdp profit pool will reduce from 9.8 to 7.9 percent and can someone tell me can someone give me any idea rough guess why is this so anyone that why do we think that the global profit would reduce even though when there is a lot of explosion of new startups technology completely write something machines are replacing the humans yes you can say machines are replacing humans but there is something more to this even though the level of the plane he might have leveled at the same time the competition should demonstrate not only with computational thinking i understand patterns and systems thinking but it also to build multiple disciplinary skill sets and not just specific domain knowledge uh this is the precursor i wanted to say before i discuss so there has been a lot of talk if you look at globally.
What ai is what ai means we do understand that it is essential to automate and to increase the productivity uh but essentially ai uh if you look at the larger umbrella right from statistics to machine learning to deep neural nets to remote process of optimization or rpas to chat bots it could mean virtual assistants it could mean a lot of things within couple and comes into one however there has been in the society a fight that everybody is trying to look at and these concepts into is there something called a generic ai and general ai needs one single machine or one uniform one unified model which can solve uh you know all the all the needs of of a humanity something which is conscious enough and something uh which can read itself adapt itself be creative enough uh understand different dimensions of what what it could be to be called intelligent so if you look at this this uh you know uh over here this diagram uh you you see that there's this importance you know i mean uh cognitive we are self-aware of a lot of things and into we have intuition our perception and we have language and based on these uh we we can do a couple of things so if you look at the cognitive side of it we can identify levels we can forecast we can predict patterns we can adopt and evolve but at the same time we get the you know we have something called ethics and we can understand ethical deliverance we can build empathy but if you look at ai today or any machine it can't do all of this we train the models or we feature engineering based on the branch of artificial intelligence you choose so we are more focused on let's say cognitive so we can identify labels we can do forecasting we within anomaly detection we can do adapt and evolve so for example we use reinforcement learning where there is an agent and an agent is given certain tasks or missions and then rewards and punishment so it can adapt and evolve when it was defeated it was by a reinforcement learning model so what what i'm trying to tell you here is that general ai is too far off uh what uh and and it soft feels what they all address right from bayesian techniques from statistical models to deep neural nets they all focus on what we call the vki or narrow ai so narrow ai is we take the set of data and we try to make a sense of it and that in that in that specific realm or domain of prediction or detection or classification or clustering the models are far far hard to defeat humans in their accuracy so typically uh guys do let me know i'm just trying to you know go up set the pace uh and if any questions you please let me know so what we did mention yes i'm sorry i swear now because of volatility and 30 you mentioned lower self lies and competition absolutely that's very true and that also means individuals have to adopt our adult are you know to the environment at a much faster rate and that doesn't mean that we uh we always say that this is a cognitive economy uh but uh i personally believe i may be wrong here but but this is going to be an imaginative economy and more bigger than it could be an imaginative society in the next five years so uh the ability to create imagine fail fast and having that kind of must is more important so what are the kind of data we deal with so let's simplify things you know ultimately science is about uh uh simplification and that's that's where the beauty is right and if you look at any algorithms in the world if you look at any kind of a data in the world you can just classify them under this four or five six or seven things one is that hey you might see a a spatial shape you know or an image or you might have a video you might have audio you might have numbers uh you might have text and then metadata metadata is data which tells something about your data like so for example let's say if i am streaming your video then i it is saying who is streaming video to whom how much they bought it for which movie are they seeing that is data over data and then graphs is technically a data structure but you should formalize it as a form of data because this visual representation is very powerful and gives you certain information uh which otherwise uh we can't comprehend for example if you want to do a uh a drug a drug discovery so how does a drug discovery work you you you take a molecule which binds with certain receptors in your body and it follows a path so now the path it follows to reach the receptor and bind to a target site can have millions of ways of going about it so obviously it is okay visualize it is going to be like a graph similarly if you look at black money today being caught so how ai systems do it is actually they make a graph out of it for we didn't have two years back and that is why folks have their own story to tell and it has become very important in fields of medical banking and you name it in every other field in fact the biggest use cases to make knowledge bases or ontologies so but for computer vision i am just setting the sum part of the tempo and then after another 10 minutes i will jump to computer video so definitely we deal with two forms of data i think we all know about it structured i mean you know your more tabular form you know for example uh how many tables columns and rows we we make it and we say this is how it is going to look like but today the information and the way uh the brain uses digital paradigm is more non-linear you know it's more about flow and in the flow you don't make tables and columns uh to be more creative you use audio use video you make you post on instagram somebody's liking somebody's disliking so activity there's a very rich and varied sets of data that is being created all of these structured data is right now at the bottom of the pyramid so today you can just see in all the icebergs you can just see the structured data and some with the unstructured people try to pass pdfs presentation social media post but there's a whole plethora of unstructured data that is there that needs to also be processed and this is this is one area where ei has been really helpful.
So you know when did people started talking about artificial intelligence you know and uh this graph starts from 2010 as a timeline but even during the world war right uh when alan turing made the tuning machine it was thinking and competition logic actually had taken over uh in the world but from day one it was 1950s and 60s when jeff hinted you know who who started uh looking at deep neural nets uh which we will cover uh where we started seeing that how we could mimic the human brain in human neurons where things started started being conceptualized and being constructed but uh ai beating humans was not by what i say by design it goes by a luck and i'll tell you the story about it's very interesting so what happened is that there was a gamer who used to who was also also a artificial television student and he was participating uh around 2011 or 12 uh in exactly 2013 which is really recently uh in a competition to create a deep bureau and model the problem was he brought his gravy gaming gaming my laptop because and then he realized that he had not brought his armor laptop which actually has a cpu so uh so he had to train his model on a gpu now why gpus are more important than cpus for deep neural nets also is because there is lot of matrix multiplication that works and for the linear algebra computational matrix multiplication gpus can do parallel uh because they were parallel cores they can do parallel competition unlike cpus and by chance he realized that his models were being played much faster and rather than days it is latest nlp model of g52 g53 uh it took them 48 days on around you know around 1500 gpus and it cost him seven million dollars one trading cycle now imagine if you had to do it on a cpu it would have cost you a few years of competition power so it was around 2012 and 13 we started showing that uh people started getting excited once they start understanding that gpus are there and then imagenet 2015 actually uh took overpowered human performance and it was far more superior that means detect detecting objects detecting images what does the image convey as an information now we have seen after 2017 and 18 that even language processing the processing of documents and summarizing them have also taken over so obviously that you know uh i'm going to skip a few slides because uh otherwise the topic is very vast but yes we started earlier on you know uh the basis to do basic regression analysis take some x x to x ten for example and try to predict the y right so the independent and dependent variables and and uh the y which we are predicting that there is an error rate and these two there were certain methods that they getting linear regression logic regression or you know polynomial regression and we used to calculate the loss or the error may be like mean squared error and then and then try to see which variable works and which variable is actually influencing the uh the prediction the other kind of problem which we typically used to encounter is classification whether it is a dog or a cat and you can do this even without uh you can even do this with statistical modeling it is it is totally possible and i'm going to show you some tricks how how it used to be done and then obviously machine learning came along with not only regression then we had clustering and clustering is today one of the most important things in the world because and i'll tell you i'll come to that because the classification uh is after example have to classify a brain tumor or i have to classify whether the text is you know whether the customer is irritated or not so what is the sentiment all this requires you to label the data and labeling data can be expensive because uh uh to reach an accuracy of eighty thousand eighty percent you might just require a few thousand samples but if you want to go back to ninety five ninety six percent you might require even a million samples and that's where the game actually uh creates a barrier to entry and uh it is unfortunately under democratic so the likes of google and amazon who have lots of guitar they can play around with and the class on the other hand allows you to not do anything just uh look at data and it clusters data together uh based on a probability distribution or distance and and and take it from there so there are a lot of methods like gaussian iota and k means uh where you can cluster a data just to give an example for example you want to do customer segmentation so typically people used to uh segment customers based on based on if i just click on the notepad you know for a second people used to say age then taste and preferences buying pattern area you know profession and they should say okay i have clustered based on i i've done i have labeled this person as you know if he or she purchases so much and gender and they purchase at certain frequency and a certain recency then i will say taking all these variables i'll say okay maybe this person is a mid segment for me just just an example but today what we do today we don't do this we can create hundreds of sub segments because we combine this data with unstructured data what is unstructured data your facebook uh personality you know we do personality and analysis on it you take we take all your tweets and scraps and can do a big five personality analysis then we take images that you post and we can understand your taste and preferences now all these metadata all this uh unstructured data is used is passed by an artificial intelligence you know maybe a deep neural net model or or i can take all of this information and all of these variables and cluster them so there can be four clusters five clusters people 20 similar behavior personality likes dislikes taste preferences in images what brands they wear what what colors they wear i can cluster them accordingly so just to give you another context over here you know uh if i if just show you here something called fashion uh mnist this is something very interesting now when i talk about unclustered uh because let's say these are cluster of data and sets of data where you see leggings cardigans jeans shoes and you see this this is actually a cluster of data across x dimensions and the nearest neighbors are the most likely combination which people are buying and this is exactly used when the recommendation engine being prepared use contractor data and they take into clusters they now that we have discussed you know that uh what exactly is uh you know like like unsupervised learning and what is supervised learning we also have reinforcement learning where we reinforce the concepts using rewards and punishment uh light headquarters but today we're going to discover discuss about deep neural net and deep neural net is more like a baby which falls under the gambit of you know supervised learning so supervised means i have to feed it some data and uh and i have to give it and and i will label that data which is out so i feed an image of a spoon and then i label it i feel i feed in the image of not for other people developers always used to have the control over the logic so you know they love to create that mathematical equation you know that algorithm the problem is the error rate is there and there is a bias in anything even in an equation of e is equal to mc square mathematics about approximation it's never about absolute values that is why that is that is why at science we always observe a phenomenon and we keep improving our iteration so so approximation is a personality of deepness why because what they do is they take all these inputs you know and these inputs can be in millions they take all these inputs and then what they do is they they will after you given it a certain output they will try to they would have to predict that output and if it is wrong then they will adjust it so it is by trial and error and i have come to it how it happened it is by trial and error uh deep duration so what happens is the the algorithm or the how it is giving the weights we really don't know that's a black box we know how to make it but which which neuron is being given a weight or which pathway is being given more weight than the other that is still a hidden information so how how how did deep neural nets came into picture we did talk was inspired by you know uh uh to mimic our brain but obviously our brains are far more sophisticated and complicated than just a very simple deep neural net however uh in our brain you know we have neurons and uh it's for example you get up early morning when you get up in the morning what exactly happens is that we you who notice you keep a a bucket of water next to you and if you dip your feet and you walk every day you next because you're walking nearly on the same maybe with a standard variance of 15 because the similar neurons are getting fired and they are used to it for a certain task and obviously similar concept is is trying to be mimic break by a deep neural net there.
Let's take an example of a simple you know regression analysis in a simple regression analysis what we did is let's see these are x you know these are the x and uh these are independent variables and dependent variables is which segment should i classify this in which segment i need to classify this is y this is a predictive predictor i have to predict this variable right now i take the previous information and based on this previous information of all the x's the y is predicted and particular particularly the formula of y is equal to i'm just writing a basic formula which we all have studied y is equal to mx plus c plus epsilon is the error rate just to put it like this right and some error for approximation mx plus c now this if you have 10 mx so this will become mx1 and uh this will be maybe mx10 you know so one two three this complete series is going uh so uh essentially m is nothing but the rate of change so i can even call it a rate of change of x uh or slope uh of x1 okay and and c is nothing but a coefficient which we had or you can call it a bias here it is also the intercept in in regression analysis now similar thing is happening nothing nothing fancy nothing nothing more secure than this in reality the only thing is this m has now become a weight so what happens is if you if you just look at an example of a house prediction let's say a house is a spectrum uh i told you i i tell you to you know predict uh what should be the price of the house so we have to predict why that is the price of the house so you will say okay what locality it is does it have amenities does it how many bedrooms what is the square foot what is the neighborhood and and they can be 20 50 more variables now you had mx plus c uh you know here every we call this every variable of input as a neuron or an x and we give it a weight like your brain instead of it and uh so here rather than be giving it away the machine will give the weight so what is happening because i talked about universal approximation theorem what is happening is i i take a neighbor neighborhood for example let's say and i i feed in the data and i'm saying that these many bedrooms just square fit this neighborhood this amenities the price is 20 you know uh 20 lakhs 30 like 40 like 50 likes inherently when i'm training the model i has just gone to the bedroom now once you do this uh you know so uh so if you look at it what it is doing it is summing the weight plus the neuron or the x or here the bedroom you know plus square feet of weight plus neighborhood per weight and then adding a bias to it or the coefficient to it and based on that it is in the summit let me know if this is not clear guys i mean i'm not getting information it's clear okay so what happens you know what happens is once you have some date you you you you give it to another layer so typically what happens is let's see when you're making a forecasting uh uh we go it by layer by layer by layer base and each layer's input becomes the output of other layers and why this is very important is when you take an input of one layer and make an output another layer what essentially you are doing is you are actually um making it learn more and i've come to it how does that happen but out of one layer think of the input of another layer there is another trick to it and the trick is that it not only sums it uses something called an activation function so let's say in a brain what is happening is you're firing some neurons if you see this diagram this will diagram some neurons being up will be based on activation function so activation function is what when you are doing y is equal to mx plus you are trying the environment variable the wind resistance uh all the people the weight of the car the number of people in the car all in and to give me hundreds of more variables all can influence what time you are going to reach your destination that means you just can't take a simple model and say that okay you're exactly going to reach at that time there has to be some non-linearity the non-linearity is added here a for better predictions and the more the non-linear it is uh the better representation of the data set becomes for it to mimic the real world uh non-united is not a complicated word i will exactly come to it how it works so essentially what we do essentially what we do is if you look at this uh you know diagram we took certain x and we multiplied by a weight we added a bias right and then we do and we say and that output goes to another it becomes the input for the next layer this keeps on happening layer by layer by layer by layer and in the end in the end we say above predictor so let's see if i'm doing a prediction between cad dogs snake and let's say 10 animals so i technically have 10 classes the prediction has to be of all the 10 classes and every class is competing for that probability and the class with the highest probability is going to gain now obviously you can set a threshold that anything above 80 or 90 percent based on how much of a data sensitivity and specificity you want to have and the error rate you want to accommodate you can mention that okay 95 percent if my data like imagine if the ai can be painted it just it can really do it so i did understood the intent where someone spoke that your skin is not visible or if you could just look at the image you're talking about image right so if you look at the image it does it is not coming it can show you a notification and then we can expand the screen so these are the kind of use cases which we just we talked about ei can actually do so now you look at this image right so uh we take the output of one layer uh by giving this to each x prediction for example and then it passes through each layer and it learns more information about it and then in the end it predicts and then obviously there is a loss it has to be because it's approximating right now once there is a loss which is actual minus predicted so you might say so what happens is the loss will be adjusted across the layers because if there were five layers to definitely have passed there was a loss of existence now in mathematics to adjust the loss uh when it is like layer by layer by it needs something called it is a chain so we are studying chain or partial derivatives right so rate of change is adjusted in each layer so uh there will be only this part is that you think then it all the fun will start okay so now what happens is in each layer let's say i have to first if you look at on top you know the left you see there's certain the layer one layer two and then layer three and then layer four it is the single single output because we are just predicting some particular output here and we call it y hat here and the actual might be white so what i am doing is i am actually if you look at the equation it is w i mean layer one into x uh you know the so w into x i so all the x i to x three or x four they will be multiplied and plus it's adding the bias now because i said once it has sum the first layer it has to also give it a masala that is non-linearity let's say example right what exactly is there is a non-linearity to represent for the representation to happen on we call it an activation function so next part but it is just a symbol for activation and i'm activating it through certain equations i'll come to and i'll and i'll put the complete summation of that into the z variable so obviously if you see that was if that was a i so in the so now in the in the second layer that is z2 weight is multiplied by a1 and it keeps going on going on going on now obviously in the end it will predict y and when there is a loss if you see d by z is nothing but it is uh all of these equations are partial derivative equations to adjust the rate of field over layer value so if you look at it it's actually just doing summation activation and then loss calculation and then adjusting the loss you might repeat it submission activation uh loss calculation and the resisting philosophy that's how deeply relates numbers are activation functions so there are a lot of activation and it is obviously you're going to slide like a torch you will take a box of pixels we call it convolutioning and we are trying to check different areas and while we're checking we are multiplying it right so now what happens is if i have to detect that edge the back edge what i want is there in a when you look at the image of a rag or if you look at any other image there'll be a lot of background information unnecessary information if you're just looking at the the back of the rack there could be the garden there could be a tree there could be other color contrast acting a lot of things can happen and you are not interested in that you said i i just want to know the back of the right so let's say you already have a learned representation if you already have a learn differentiation like a template of what a pack looks like think it like if we call it a feature now that feature map is on the right here like a matrix can you see this thirty thirty capabilities and a rest of zero can you scale tell me what it how it looks like can you see this is it visible guys yes yes so yeah exactly to imagine all the background information this is called an edge now now what is going to happen uh this is how computers are calculating the edges they are they are multiplying with certain matrix and irrelevant information is being nullified and the relevant information that's the relevance for zero and max then there are certain more functions like sigmoid sigmoid and soft max are two functions which are also very important they are used uh uh for basically in the end when you want to predict the probability it's because i told you that every class is fighting for a probability score dog will say no i am the dog that means i am the type but probability hundred percent now obviously uh the probability score will drive from zero to one or in percentage terms from one zero percent to hundred percent so anything divided by one will actually reduce the one and so that is why if you see if i when i do one by one plus e to the power of w x plus b weight plus bias uh jaguar and now we are going to talk about the most exciting stuff that is coming and now we are going to mimic the eyes and in the the ins how i see and how we are like artists we can create a computer vision okay from a human being so 550 or 600 million years back uh there was an explosion in species obviously because you would have guessed it it was because of um a weaver a rudimentary vision a species started building with a periphery vision so sea life started having periphery vision uh they used to see some blur in their in their eye cones rgb was not that perfect and certain image was being formed in the brain in the area of visual cortex but because of that it was explosive species but how do images are seen so this is very interesting here if you see that you see a basketball and if you see the left image can you see the basketball easily visible but if you see the second image you can still figure out it's a positive although the color has gone but only through the edges you are able to see but if you look at the third image you can still figure out is the basketball because you can still see the context that is definitely you will make a logical context a [Music] now teaching these two teaching these two computers will be similar so what happens is we are going to break this image into shapes into pixels every shape is got a pixel pixel has got a value a mathematical value and that pixel you can break and they can be let's say after image when you click on your phone iphone today it has got one zero two four by one zero two four it or its hd it can even be four thousand pixels but imagine one zero 2 4 into 1 0 2 4 if you calculate the number it is more than the stars in the universe but imagine if you do 1 0 2 4 into 1 0 2 4 and then you also have rgb information because red green blue form the color combination so now imagine the number of uh combination that can be formed left image of top page image there are certain edges those edges is we used to do now you can see these three images uh one minute two people standing in a type and then and then you have you have also uh in the rest two images now what happens is if you see when when in if even as we discussed about edges as we have removed [Music] the edges information you can you can see that you are still able to make out whether human hacking or peachy activity yes or no yes even in the last image you are able to do that yes yeah so what what whenever about foreign [Music] combination so now it has become very beautiful and elegant to solve it rather than a rule based approach it's an approximation so i take an image i deconstruct the image into pixels each pixel has got a x which is a mathematical number or a weight it has got a rgb information or if it is great it has got a single information it can even have if it is a 3d image you can even 1 minus 2 1 now i multiply this with each pixel so let's say this 3 here i'm going to multiply you can see the calculation minus 1 into 1 0 into 4 blah blah blah blah and it comes as 7 and edge is nothing but the rate of change of contrast so whenever it is the rate of change of contrast the edge forms guys i'm trying to simple simplify it a lot uh and i could have easily gone without a little bit of mathematics but i just wanted to push it just to so that now you can now when you know certain will walk you through the visual how we have built the asia's first visual ai platform you don't need to do all this but now you can drag drop and understand how layers are so let's see your character here here so there are matters to solve this also by including this positional information it's called capsule network which we are not going to cover but i hope uh guys please tell me i hope now you are if you might have found a little bit of but i hope now you've been able to understand the scene correct yes some basic idea great so now uh now that we have done this now we will walk so this is about computer vision now you now for 20 minutes we will show you magic where you don't need to do any of this you need to just have this inclusion but just by drag searching
Now as you know about the evolution of artificial intelligence about vision the training so we can conclude that the present era of artificial intelligence is all about teaching or training the machine so today we will mimic the vision into artificial intelligence so we will build and train a deep net to create a binary classifier for mask detection so let's let us quickly run the project so this project basically tells you whether or not you are wearing a mask and as you know in this coverage scenario it can be very helpful for show off smalls and etc so as you can see it is showing in the red box if you are not wearing a mark and if you wear one it will show you in the green color so today we will make this this particular project and one more thing if you observe carefully it is showing a percentage at the top now now what is the percentage so it it also means that percentage is equally important in that in a particular project so it also depends on project to project although for example it is okay to have 1995 accuracy in project like these but when it comes to project like self-driving car we can't just let it go on the road with 90 percent accuracy because in that case it will mean that it is killing 10 people out of every 100 we just don't want that anyways so now as you have seen the project which we will build today so the next question is how and someone earlier in the chat wrote that it's too much of math but uh the platform which we'll be using today you don't need to remember any math that is the beauty of that particular platform so now creating an ai project is like baking a cake now how you bake a cake there are several steps which is collecting the ingredients then mixing the ingredients in right proportion then pouring the batter into the mold which basically tells like how many layers or what will the shape of the cake and the next step is baking the cake in the oven then we have inspecting and uh checking that whether it is baked properly or not and then decorating it and add the most important stuff which is safe so these uh these steps we can follow to build an ei project as you can see on the screen on the left side it is the steps of picking up cx on the right side is depth of creating an ai project it go it starts from loading libraries similar to collecting ingredients and we we go all the way down to testing our train model of that particular project so without any further delay uh let's start building it so this is the platform i was talking about i will give you about this platform at the end of this webinar but for now just let's start working on it so what was the first step first step was collecting the ingredient or collecting the libraries in our in ai project so as you can see we are dragging the library's block like mad float clip which will help us to plot some graphs then we have numpy which will basically help us in computation and one more thing you might observe over here that when you are dragging a block the hold automatically appears on the right side of the screen so you don't need to remember code you don't need to remember math all you have to do is drag and drop drag and drop that so now what was the next step the most important step is data set as this particular project tells you that whether or not you are wearing a mask so the data set also needs to be related to that only so we have a data set uh with two classes which is the binary classifier sorry binary classifier so as you can see we have two folders and in the first folder we have images of person wearing a mark and in the second folder we have images person not wearing a mask so we'll just feed in these images tell the tell our network our model our machine like just learn from it okay so in this uh second step we have in the data set we have loaded the data set by just the first block and now one thing you might see there is something called target image size now why we are doing targeting inside when baking a cake you have to mix all the ingredients in the right proportion you can't just add more sugar and sugar then it will just do in the cake so similarly in when doing a project you have to maintain a uniformity across the training of the project so here we are just taking out the images we are just converting them into a size of 224 to 24 and 3 which is basically length great than the number of channels in the image which you know uh know as rgb images so we have just done it over here now next if you carefully see there is a something called data created into train and test now i will ask you guys that why we are splitting between train and test so can anyone answer i'm waiting on the servo you can write in the chat box so okay so one has returned that so the train model can be tested that's absolutely right because the test data set contains all those images which our model hasn't seen yet so in the in that way it will tell us that accurate how accurate our particular model is and then we have a block where we are just shuffling the data set so then now what was the next step was pouring the batter into the mold which basically decide number of layers on the case we want but similarly here also we have to decide how many layers of architecture how many neurons as nixon has already explained you what neurons are we requiring our network so here we have uh we already created a four lane network so which are basically we have uh two phone convolution layers and then we have some dance layer and you carefully see in between those there is some something called activation function as nikhil already told you about prelu and here also we are using and that thing uh like the same thing to activation function is making it learn something you know something information about the edge certain intelligence which it will carry forward and then use it while it is doing the probability in the point thank you uh technical for the input so each layer has already explained that it will remember it will extract some different features with the help of each other each and different neurons so now after we have created the layer i want i want you guys to look at the last layer here we have only two neurons now can anyone guess why we have two neurons anyone two classes right so because it is a binary classifier and we have only two classes where uh whether a mask is there or not that's why we have uh we have to enter two as neurons in the last year which is same as the number of classes and at the last layer we have to use sigmoid as a as our activation function because it's basically used in cases of binary classification now that we have converted we have created the network architecture we have loaded that dataset you loaded the library so what was the next step can anyone guess if i just give you contacts in cake it is baking the cake so what can be the step next year training so yeah training uh very good so next step is training the model so we are using this bunch of blocks over here which will basically help us to select the lowest function which missile i was explaining like uh it will it will go forward in the network then it will check how how much loss it has caused for that particular uh effort then it will go back again these blocks are basically helping us to select those functions we want those optimizers or number of iteration number of efforts we want to have in the architecture so now here it is two epochs let's just change it to 10. so now we have completed almost all the steps we have created the architecture then the training is almost done now one step which is required that we want to observe we want to see we want to visualize how our training went during the process so for that how we can achieve that by plotting some graphs obviously because graphs are easy to interpret so here these bunch of blocks will help us to create plot some graphs of accuracy and losses then we will get a confusion matrix also and at last we are just saving our train motor so that's it this was the whole uh project of market on now the next step is to train it we have just uh connected all the blocks uh real training is still left so can we go to the full screen mode at the right top yeah now it is clearly visible and we can just zoom it a bit yes so let's go through from top to bottom so at first we loaded to library then we loaded our data set and did some pre-processing then we created the architecture with four layers convolutions and some activation layers dense layers after the layers what we had to do we had to train it so for that we use this compile and switch block and at last we wanted to visualize how our training went so that's why we are plotting some graphs so that was the block code now now it's time to run it so let's just turn it now these these models require high computation power of gpu cpu which is also expensive as nixie was also saying so google already provides us with free gpus and key views for our model training in that in the tool named as google collab so why why just waste our money and when we can use the free gpus and tpus for the training or why to use why to train it on our own system so here we will click on the go to collab button it will redirect us to the google collab and then we will create a new notebook now the thing is the code which we have created on the platform got automatically copied so all we have to do is just paste it in the set let's first let it run so i mean let it load yeah so we'll just paste the code over here yeah as you can see all the codes here now the next step is uh training it so basically we're running it so we'll just click on run as you can see it is right now connecting to gpus and pcq resources then after that it will start to run so if it pulls up if you just scroll down it is successfully connected and now as you can see it has started to run so first it will it is loading the data set after loading the libraries now it will take quite a few time to run it to run it all so we have already uh we already have a notebook where we have already done it so we'll just show it to you with step by step so as you can see the first step was loading the library then we were loading some data set as you can also see the few images of the data set with mark and without mark and the next step was reprocessing we did already pre-processing then we have we created this particular architecture using those layers and the next step was uh searching one one minute one minute let me just go back to the architecture just above yeah so guys uh what you did visually you know you created uh the architecture and what all uh functions you use all this uh the notebook shows you like this okay now you can do it but but the one idea is that while this is being training because we don't want people to get scared and afraid of ai it's more intuitive the power is that this drag and drop allows you to understand the intuition behind it and have the and be empowered to solve your own artifact ai use cases uh whether it's duplicate based or machine learning based so now you yourself can have fun with it in this way and build any kind of a network you want words yeah thank you so uh we don't need to follow this particular architecture we can create our any of the architecture we want so after creating the architecture we trained it as you can see we have trained it for 10 epochs or we can say 10 iteration and we achieved our accuracy training accuracy of 95 and the validation accuracy of 90 so after training it what we did we plotted some graphs so as you can see it is more clear how our training went that like the loss is decreasing and accuracy is increasing then we have a confusion matrix as well which will basically tell the precision and recalls so at last we just saved the model now what what step is left we have trained it we have saved it but what we haven't done is we haven't tested it on camera so how we gonna do it so when you run this particular notebook automatically one zip file will appear i will download it on your system it basically contains a trained model so as you can see we have already the trained model in a zip file so now we will what we will do we will just go to the project which we were on earlier and we will just upload our own model so as you can see we have upload button we'll enter a name and then we have to select the trained model files which we have which we got from google for that and we'll just upload it will take time depending on the size of model so and uh background color could change over here so it means it is successfully uploaded now if we see that if it is working you see it is working right now it's finding that color that is not wearing a mask and if she put it on the mark it is showing in color so that's how you can create your own model you can design your own architecture you don't need to remember any syntax you don't need to remember any math all you have to do is drag drop drag drop and that's how you can test it on cameras.
And all now so one more thing so uh you know so folks uh the mission of prophet is not that one should not uh learn logic or you know because this requires still a lot of creative uh thinking and computational logic uh we we have both the code window so if you're comfortable you can still write the code but most people get left behind in the in the field of ai or in the field of you know computer programming just because they they're the initial age so this not only acts as a bridge but this bridge is itself uh sophisticated enough to handle any any any any kind of machine learning from basic regression analysis to unsupervised learning like support vector machine or k means clustering could be neural net or nlp tasks so another way to create a chat port or anything so the idea is that with drag and drop you see the code also so that you can visually as information intuitively understand that how the code is being formed but you don't need to be restricted to it you can just now uh also reduce the time so if it if if it is to take one week to write a code now you can do it in a matter of few minutes once you get comfortable with it and you build a visual intuition the visual intuition is very important like i said you should say imagination and that's the reason uh this is the genesis of Funoppia so nikhil told you that we can also run machine learning algorithm and i also promise you that i will teach you about the platform and so let's just see what else we can do on this particular platform so we have a few ml algorithm linear regression logistics pn and then support vector machines and all so we have to save time we have just loaded our already prepared linear regression notebook so what the linear regression is used for let's first run it so it is basically used for prediction and forecasting purposes like you can do feather forecasting you can predict the price of share in the share market then you can you can predict marks of students uh based on some certain features certain parameters so here the data set is about uh which is experience of the salary like how much salary you will get based on the experience you have so it is a simple data set and we have run the linear regression over it then you can see we have some accuracy of about 86 and we also have a graph to visualize our training went you can see how well our line fits on this particular data set which is just a sample data set now now you already uh and one more thing i would like to point out is that you can also type your own code if you got paired up with blocks that i don't want usually you can also write your own type and machine learning deep learning writer itself if you just write a print statement so all you have to do is just type you you you have to use the python syntax so if you just run it now see there is no block but it is still running because it is now running the editor you can also do that here also.
Then you are already aware of the project playground so let's go to that as well so here you will find already made projects which you can do on the platform this platform and not only this you can create as many as you want and apart from these projects and all we also have a teacher training program where which is for those teachers who want to learn python or ai uh we have different classes for different courses so and one more thing i would like to tell is that each class over here is divided into certain small small cap tool which is for around six to seven minutes each for example you are seeing on the screen right now it is uh it is a journey of a class called conditionals where you will learn if health concept so as you can see we have uh there is a take away that what you will learn in this class then we have small capsules eight small capsules over here we will start by learning the concept using the game so we have a game for example this bird game where we have to guide the bird to carry the worm and go into its nest we have to use the concept which is itself so here you will learn the concept you will learn the intuition by playing some games then we move on to learning and solving some other real life problem skills only cells then we will create those projects and at last we will create one uh dedicated project based on the concept which is defense over here and not only this we you will also get to know about the flow of how the program is going how when the basically the control flow of the program and at last we'll have some assignments and quizzes so each class in the course will basically we have this kind of journey there will be some capsules and there's some takeaways because we want to keep the learning as open as possible so unless if you don't want any personalized dedication you want to do it on your own uh the funopia id uh you can create a register your login play around with it play with the project get your own project as well as there are pre-built and files also which which are already present inside so every block if you right click you will find that it has its own help text and video both built into it so the idea is unless you really want and you just want to go to into a self-discovery mode most welcome people can use because the mission is as many people as can get into the air revolution and cognitive computing revolution the better it is for the society hey any questions guys about about you know the ai or the learning methodology or uh yes yes yes they can they can use the platform uh free of cost uh the reason is uh we want to be an honest company where where we can where we can uh facilitate and you know synthesize education uh without charge we are uh we want to be in the forefront of doing that the platform is absolutely free you can be on a self-discovery board only when you want a dedicated teacher you all are teachers or educators you understand it there is a cost for that which you can't uh subsidize i mean we have subsidized but there is a cost right otherwise or or a teacher training code specifically otherwise if you want to do a self discovery taken like an ai operating system you guys can go log in play around there are videos thank you for that i just want to make one clarification that means if the teachers want to go into that self-discovery mode and want their students to use this platform they can do that as well free of cost so something like code.org where you have the activities you go you play around with that and uh you can use it in your classrooms as well absolutely absolutely because our mission is holistic in nature it's only when a student says though i want more than that i want a dedicated teacher or maybe uh you know three or four students in groups or maybe teacher wanted i want to have a more professional rigor to it then then we say okay for that we'll give you a dedicated expert who is going to handle you otherwise please jump into the revolution uh we want as many people to celebrate it sure thank you nikhil thank you for that i also think okay we also have professor and professor i think [Music] [Music] wrong guys i think he's here uh thank you for joining any any advice of wisdom words from you and then okay maybe he's on mute yeah okay no issues guys any other in the meeting anyone else has any doubts thank you so uh everybody can go and create their own logins and if you have any doubts you can reach out to us over the whatsapp or you know contact us both by informal formal methods we are fairly approachable and accessible and [Music] in case you guys want to know anything more please reach out to us anytime murphy do you have you have the i i saw last time that you have been doing computer vision and you have taken a section also that words uh to explain the basic uh so do you think the uh i mean uh this kind of platform would be beneficial for your students yeah definitely nikhil that is why you know i was just right typing in the message so i stopped i said okay let me speak it out only i think first of all i want to congratulate the team because uh i i always used to wonder why is it that we have code.org and all these platforms all coming from american brands and here and there and why nobody in india is building something like that so congratulations for you uh to you for that and second thing i i am a very big professor of free learning resources so i think uh as soon as you mentioned that i am the first one who will go and tell the schools that here is one platform which can offer you free resources and you can explore and you have to become a self-learner because that's the way we have to nurture our kids now absolutely absolutely and that that's the way so only when uh and we for us also it's a tricky thing right because there's no government support so we have to see how we keep it as much as much as we can and yet have a model which is sustainable uh so absolutely uh so that that's it thank you for the thoughts and yes we want it to be not only first in india but uh by the way this is the first in asia basic drag and drop ai so scratching all you can do basic stuff but this is actual artificial intelligence and statistical modeling and machine learning with drag and drop so kudos to you and your team for that okay uh anyone else any questions guys thank you ajit so actually uh may i know uh someone had banana gaming brawl stars this is rashmi actually uh yeah so yeah please please your question is how is the AI beneficial for educators and what platforms are available to support see any skill in itself is never complete you know in a life journey but uh there are certain skills which have become very important uh if you really want to uh especially in the digital age ai is one skill which helps you to do couple of things one is not only build computational thinking and logic but uh it empowers you to uh solve a lot of problems which which not only you can do it on you know computers for commercial game but even which humanity is facing just to give you a context who did not overdraft discovery vaccine every big company in the world was running actually our artificial intelligence to actually completely understand which molecules will bind better with that and which target therapies before it's a similar case climate crisis say like even if you want to teach your students uh you know there's a company called max education with personalized learning through artificial intelligence so what they do is the data of the kids and based on the kids data and how they learn they build an adaptive learning model using bayesian optimization techniques so the point is that uh ai as a skill set today gives you superpowers uh that doesn't mean you solve your problem for yourself we as humans have to use our own creativity.
we all know that we have to go and do the streets and to the ground and field work to solve the real problems but it does gives you competition tools to analyze and it does give you competition tools to focus on more creative stuff because you can automate the redundant stuff or you can automate the stuff for which uh you know uh this takes a lot of time consuming so uh ai for educators is very necessary uh specifically even after uh you know this might sound like cliche but even after uh cbsc and ncrt mandating it but globally it is happening uh what we feel india is still not there you know i mean and that hurts us and that's why genesis goes because if you look at china and any other nations they are thriving on the ai wave today indian startups are there they are existing but they all are going uh and solving some some nitty-gritty problems from the consumer demand side i think educators will play a very important role for shaping the kids using artificial intelligence by creating our adaptive learning model models by personalizing the curriculum and automating the tasks which actually should not have been which which are redundant you know for example uh removing buyers checking papers and all that stuff and facilitated learning through bots so that they can focus on more experience and more multifunction uh and even if you're not an educator as a person uh i think if there is a skill which you should have two skills which are very important today one i think is design thinking aesthetics and humanistic inspirations are to create more organic designs in the world another is ai are two skills which will which will remain the skill super ticket no matter you know from whichever industry uh great uh it sounds great am i audible yeah yeah yeah like what you have talked about as like uh this site maths education did you say can you just post it on the group also and uh because see uh our students do have learning gaps and the one you are talking about the adaptive learning uh what this site offers based on the data of what students are learning it really sounds great and sounds helpful also but i don't know what they're going to charge or anything but then uh what you as fanopia has to offer in that case so we as a forum so see they offer a particular how to do adaptive learning as a service um for opia is an open platform we are a community of ai researchers and developers who have built this platform where instead there is no drag and drop tool today through which you can build artificial intelligence and machine learning so you have to understand that if you today have to learn ai and do it yourself you're not empowered for that and service you can even buy a google today but if you really want to become a creator and not a consumer in the economy then uh how could you talk about asia's first drag and drop where you can just do visual intuition create your own ai models and celebrate uh automation and see and also along with your video classes uh jump on to getting a solving new problem so ai is far more open and fuzzy in that way but at the same time it has a visual ai platform as a visual air platform you're free to free anything and and on top of that we have got a structured curriculum so let's say you you say that no i want to go beyond this and i want to learn sure then we can then we have a structured curriculum where how you could empower yourself and let's become and learn about uh in depth about computer vision or nlp that is taught well that is okay and uh how about coding is that a part of being efficient in this ai no no so we do teach coding and like sachin covered they were games right and the games that we intentionally built to be like a spiral learning and reinforced learning where the concepts are installed but holding even see that is the power of the platform that you have coding and your visual imports we teach coding also but if you say no i don't want to do coding i just want the visual part you're you're most welcome you can do it so and is quoting a prerequisite no absolutely not because uh people can come from different background from liberal arts and we don't want to distinguish whether so obviously there are certain levels so if you already have existing coding experience then uh you are put on a separate track if you are not from a coding experience you are put on a separate track either way none of the learnings will be a barrier uh because of the visual interface so today do you have visual interfaces you do have you know like which was mentioned you have scratch or code.org but they are limited to very child play and for early education but if you really want to create problems which are you know which are more sophisticated like you need mass detection or you want to do a facial recognition or you want to do a you know a summary analysis of nlp you you need to have more sophisticated models and there having a visual model will help you to adapt a skill faster learn faster and uh and learn coding but you might not want to do coding you might just want to be on the visual mode because you're more comfortable it's as good as driving an automatic car and having a manual car it can be a part of preference but people who really have a sense of fear of control they can leave [Music] that it won't be a barrier that if you are not good at match that way uh see uh maths uh uh definitely evokes a sense of fear in most of us right and uh i've known my nemesis about it and we try to make it more like poetry but no it is not a prerequisite because we only covered that much maths and that took visually and that investment up to be you know complicated function rectifier linear unit but i just told you anything you multiply by zero will become zero that is the area of interest in that image now honestly speaking the amount of match that is there required is not that much that's what people comprehend to be so we simplify we have we don't only have a platform but we have a complete lesson journey so a code.org you don't have lessons the ones who join the course we have a first line lesson journey in each of the lesson journey every story every concept has an abstraction as an application and has a visual story tool so match is not going to be a barrier any other questions all right guys so we will uh send some logins and uh thank you for joining everyone uh we hope you loved the platform and we all we wish you all the luck and we would be more than happy to assist in any way join the learning revolution join the ai revolution uh we really have made a lot of effort to make it as simplified as possible by creating a visual platform for it thank you everyone.