Artificial Intelligence Full Course 2026 | AI Tutorial For Beginners | AI Full Course | Simplilearn

Simplilearn| 05:01:25|Jun 12, 2026
Chapters15
Introduces the capstone goal of solving real world problems with AI and how capstone fits into the learning program.

This Simplilearn session unlocks practical AI capstone work, showing how to pair object detection, forecasting, and AI agents for real-world problems.

Summary

In this Simplilearn capstone overview, the host walks through three AI engineer capstone options and explains how to apply everything learned in the program to real-business problems. The session emphasizes that AI engineering is as much about execution as theory, with examples ranging from autonomous driving object detection to tourist-site recommendations and restaurant sales forecasting. We get concrete guidance on two-part capstone projects: autonomous driving (object detection with YOLO and accident-data analysis) and tourism (landmark classification with transfer learning plus a collaborative filtering recommender). Throughout, the lecturer highlights key tools and concepts like TensorFlow, Keras, transfer learning, image augmentation, pandas, group by, merging, regression models, and time-series feature engineering. The talk also introduces a future-facing AI agent stack—LangGraph, Autogen, and Crew AI—and demonstrates how multiple agents can plan, use tools, and collaborate to complete tasks, illustrated with a travel-litinerary demo. Microsoft’s AI engineering program is showcased as beginner-friendly, with extensive live training, hands-on tool use (Azure, OpenAI, PyTorch, LangChain, Hugging Face, etc.), and three capstones plus real-world project work. The speaker provides actionable workflow advice for approaching the capstones, including how to structure data wrangling, model training, and analysis, and points to prior lessons on object detection and transfer learning to accelerate learning. Finally, the video closes with guidance on which capstone to pick, and real-world considerations like how to host and scale AI agents in production. By the end, viewers are equipped to move from theory to deploying integrated AI solutions and to explore the latest agentic AI frameworks in a hands-on way.

Key Takeaways

  • Use transfer learning (e.g., with YOLO for object detection) instead of building models from scratch to save time and leverage pretrained features.
  • Capstones consist of two parts per project: a computer vision or image-recognition task and a data-analysis or forecasting task, each with concrete datasets and clear evaluation goals.
  • Particularly for the autonomous-driving project, you train on an images.zip with ground-truth boxes and labels, then test the model on new images to visualize prediction boxes.
  • In the tourism-capstone, you combine transfer learning for image classification with collaborative filtering to build a meaningful location-based recommendation system.
  • Time-series feature engineering and group-by/data-merge operations are central to the forecasting capstone, including creating date-based features and evaluating models with RMSE or RMSE-like metrics.
  • LangGraph, Autogen, and Crew AI are presented as complementary tools for building multi-agent AI systems: LangGraph for structured workflows, and Autogen/Crew AI for agent collaboration with memory and tool usage.
  • The course emphasizes practical deployment considerations, including GPU usage for training, data preprocessing, and the need to monitor LLM calls and tool usage for cost and reliability.

Who Is This For?

Essential viewing for aspiring AI engineers and data scientists who want to translate classroom concepts into production-ready AI capstone projects, especially those curious about AI agents and practical machine learning pipelines.

Notable Quotes

"What if your final AI project could prove that you are ready to solve real world problems using computer vision, recommendation systems, forecasting models and AI agents?"
Opening capstone premise and what the video will cover.
"Capstone projects help learners connect theory with hands-on implementation."
Emphasizing the practical focus of capstones.
"Three capstone options and two-part projects: autonomous driving and tourism offer concrete datasets and tasks."
Outline of the three projects and two-part structure.
"LangGraph, Autogen, and Crew AI help build AI agents that plan, use tools, complete the task, and work together."
Overview of agent frameworks.
"If you want to move beyond tool usage and actually learn how AI solutions are built and applied, this program is worth checking out."
Promotion of the Microsoft AI Engineer program benefits.

Questions This Video Answers

  • How do I combine object detection with a YOLO model for autonomous driving datasets?
  • What is transfer learning and how does it apply to image classification in capstone projects?
  • What are LangGraph, Autogen, and Crew AI, and when should I use each for multi-agent workflows?
  • How can I build an item-based collaborative filtering recommender for tourism locations?
  • What features should I engineer from dates for time-series forecasting in restaurant sales data?
Microsoft AI Engineer CapstoneYOLO Object DetectionTransfer LearningImage AugmentationPandas GroupByData MergingTime Series Feature EngineeringCollaborative FilteringRecommender SystemsLangGraph
Full Transcript
What if your final AI project could prove that you are ready to solve real world problems using computer vision, recommendation system, forecasting models and AI agents? That is exactly what this capstone session is all about. Hello everyone and welcome back to simply learn. In this video, we will explore the Microsoft AI engineer capstone and understand how learners can apply everything they have studied in the program to build practical AI solutions. This topic is important because AI engineering is not just about learning concepts. It's about applying those concepts to real business problems. Whether it's a detecting objects for autonomous driving, recommending tourist places, forecasting restaurant sales, or even building multi- aent systems, Capstone projects help learners connect theory with hands-on implementation. In this session, we will cover the three major Capstone projects options. First, we will look into the autonomous driving project where learners use object detection while YOLO and analyze self-driving accident data. Next, we'll explore the tourist project where learners classify landmark images using transfer learning and build a recommendation system using collaborative filtering. Then, we'll be covering the sales forecasting project where learners analyze restaurant sales data, create time based features, compare the regression models and forecast of future demand. We'll also discuss key technical concepts such as TensorFlow, Keras, transfer learning, image augmentation, pandas, group by data, merging, recommendation system, regression models, and time series feature engineering. Towards the end, we will also move into aentic AI and understand how frameworks like Langraph, Autogen, and Crew AI help build AI agents that can plan, use tools, complete the task, and work together. We'll also look at crew AI travel litinary demo where multiple agents collaborate to create a complete travel plan. By the end of this video, you will understand how to approach your AI engineer keystone projects and how modern AI engineering is moving beyond simple models into intelligent tool using AI systems. Before we move ahead, let me quickly share you something exciting for everyone who wants to start a career in AI. Microsoft's AI engineering program is a beginner-friendly program designed to help you understand the complete AI stack from Python, data science, machine learning, and deep learning to generative AI, NLP, Agentic AI, and Microsoft AI tools. The program includes 140 plus hours of live training, hands-on learning with tools like Azure, OpenAI, Copilot, Studio, Autogen, PyTorch, TensorFlow, Lang Chain, Hugging Face, and more. plus 12 plus real world projects and three capstone to help you build practical AI skills. You also get a joint completion certificate from Microsoft and simply learn access to Microsoft learn certificates and preparation support for Microsoft Azure AI 900 certification exam. So if you want to move beyond just using AI tools and actually learn how AI solutions are built, developed and applied in real world scenarios, this program is worth checking out. The link is given in the description box below and in the pin comments. Go check it out. Before we move ahead, here's a quick question for you to answer. Which AI framework is mainly used to build a multi- aent travel planning system? Is it Crew AI, Excel, Tableau, or is it PowerPoint? Comment your answers below. Let's get started. Okay. So, the the very first so again, three projects that we'll go through and these are the options that you have to uh work on. Um and so the this very first one is on autonomous driving. It's centered around this idea. Um and so there'll be each project has two parts to it. Um so and uh so we'll go through both of those parts for this, but the theme of this first project is centered around autonomous driving. Um so this is project one. Uh and again you should have in the capstone course you should have these reference materials that have the uh uh notes or the problem description and then the data sets that are relevant to the project. Um so again my goal is to go through these today with you guys so you have a little bit more background on them and then also review some some relevant um examples that I think will help you with these particular projects. Um but let me describe the autonomous vehicle one. So um the first uh part is centered on object detection, right? So, we've worked on object detection before, but um it has to deal with, you know, what a typical autonomous vehicle system would have to do, which is obviously detect vehicles on the road um uh at, you know, for tracking uh purposes and driving purposes obviously. Um and uh this uh part of this data that you're going to be working with is twofold. one, it's going to be a bunch of images that we can run object detection on to detect what kinds of vehicles that we are uh seeing in the image. So, we'll there'll be a part one that does that and then part two to this project will be analyzing some data um related to accidents with self-driving cars. So, there'll be kind of a a data frame style data set and you'll do some analysis. we'll talk about what that looks like um you know related to uh that data set. So the first part is doing object detection that can um predict the vehicle type. So there'll be different models of vehicles um as well as drawing you know f producing that box that uh we typically do for object detection right that um locates the object within the image. Um and so uh one of the things I want to do is go back and look at that uh example that we worked on with YOLO and just to refresh us a little bit on that process. Um, but in this uh project, you'll have some data that that mimics kind of the example that we went through back then. You know, you'll have images and then you'll have those files that have the um ground truth kind of box coordinates and box label of what vehicle it is. Um and so you know if we have that data we should be able to follow mostly the same steps that we used when we uh went through you know building and and training the YOLO model and then using it for prediction. So I do want to walk through that uh example notebook because I think that'll be really really relevant for this pretty much identical to doing this just with different data right. So this will be um predicting different types of vehicles that are in in and drawing the box around the vehicles within these images. Um so that's one part uh of it. The second part is um analyze the uh autopilot program and some of the accident data that I talked about. Um so there'll be a bunch of different tasks related to that that we'll go through. So, uh, part one has images that look like this. So, uh, this is part of your data set for this project is the images.zip, uh, folder that has all of these image files in them. Um, so you can see they're just uh images of different car types of cars. Maybe some of them are buses, different types of vehicles. Again, our goal is to be able to train and utilize an object detection model, something like YOLO that we did, you know, to be able to draw those boxes around these guys and and predict what kind of vehicle it is. Um, so you'll be given data that kind of uh resembles exactly that kind of data set we used back in in in that example. Um, so you have images like that. Uh so then uh it's all about uh going through and building the object detection model. So the first task really the first part of the project is um building that object detection. Um I know it says here create a CNN architecture. Um but in reality you can follow the uh steps of using a pre-existing model like YOLO. Um it it wouldn't really make a lot of sense to do it by scratch. um and and not use an existing model that's out there like yellow. Um so that's again why I think it'll be relevant to go back and look at that again. But that would be the advice here is just use an existing one and we'll train it with this data. So we won't create one from from scratch. We don't need to do that. We can just use an existing one and and train it against this data which is that whole transfer learning process, right? So taking a model that's already been trained off the shelf and then just updating it with our own data in in this uh example. So um again I'll show us how to do that. I'll go back and review that and it'll be really really relevant to this essentially similar task. Okay. So the goal is to train it and then um basically run that model after it's been trained on some of the test images to see if we can uh to see what the detection results look like um which we also did in that example back then. Right? So we we first trained it which was the transfer learning process. Then we applied that model to uh then we applied that model to some example images to see what kind of boxes it was drawing. Right? And so again, I I'll go through that today. So we have some review on on that. Um but but yeah, that's the first part of it is just doing object detection with this data. Um so that's the first part. Then the uh well, let me pause there. Any questions on that first part? Again, I think the deep learning lesson 10 that we did on object detection will be really really relevant to that. pretty much doing if you choose to do this project. I think it'll be pretty much doing that again and we'll go through that today just to review it, but I think it'll be fairly close to following that. Okay, good. So, let's talk about part two of this first one. So um this uh part two will be dealing with this CSV. So part of again you'll have the images and their labels and then you'll also have this uh CSV for this part two which has a bunch of um data centered around accident cases. Um and so there'll be some text description, there'll be some statistics about them. um and whether or not autopilot was being used. Um you know, how many occupants there were, if there were any deaths. Um so, a bunch of accident data here. And our goal will be to do a bunch of uh analysis with this. Um you can see a little bit about the description of the column. So, um that's always helpful to know is kind of what each column represents. And so, you have some information here about that. Um, so, uh, this is, you know, just some information about those columns. So, you can see a bunch of, uh, different information here. Um, including the model of the car, if insurance has been claimed, total number of verified deaths, those kind of things. number of vehicles that were collided with, if any, um number of cyclists or pedestrians they've collided with, which would be again if there were any recorded. Um that's something to be aware of with this data is there are, you know, it can be null, which means there was no data for that. Um so if you're doing this project and working with this data, be careful with the NLES um in terms of filling them in. Um, and you're I don't think you're building any model with it necessarily. Um, you're not building any model with it. It's just uh for analysis purposes, it may be easier to fill in all those blanks with a zero essentially. Maybe something you want to do. Um, but that's just a suggestion. Yeah, it's from a Yeah, it is legit. It's from a sort. You can see like there are rows that have the case sources, which are information about these accidents. Um yes this is it's it's old data it's from 2022 most of these right so you can see in the year um yeah it's older but Okay. So, what you're going to be doing with it is some initial inspection, checking for data types. Again, the probably the biggest task here is dealing with the missing values. Um, in which case, my recommendation there would be likely to fill in with zero. Um, which would be, you know, missing. There's basically no information about it. So, we could put a zero in there. um which I think would be fine. Uh and um then you can also remove any columns. So, you know, there's probably columns in there that aren't going to be that relevant like the case number, um an ID, those kind of things. Uh um you know, you can feel free to drop them if you want to uh just to make the data set a little bit smaller to to work with. Um, but part of the exploration you're going to be doing for this is, uh, you know, figuring out how many events there were by date, per year, and per day for each state and country. So part of what I would recommend there is building um it you know it may be helpful to build some images or sorry some visualizations for this such as doing different plots like box plots that can uh use some of these fields like country and state um as like the x-axis and and count how many uh accidents there were, how many uh deaths there were and those kind of things. Um so uh you can also another thing that may help you with this is doing group by. So we can't forget like part of our aggregations that we can do on dataf frames is grouping by uh different columns right so we can group by the country we can group by the state um we can group by year um and then do totals like a count of how many events there were. That's kind of what this this first one is. This part a is is likely just a simple group by um for these things. And then uh you can do you can aggregate like a count of how many events there. Basically every row is an event, right? Some type of event in the data. Um whether that's like a basic accident or a deadly one. Um they're all they're all some type of accident event. Uh, so that's probably the easiest way to go, but you can also go like a visualization route for that too. Um, yeah, that's yeah, it can be. Yeah. Yeah, definitely. Can the victim be the driver? Yes, there's a column for that uh in the data. Um, I believe if there was a death of the driver, so Tesla driver, there's a column for that. Yeah. Okay. Then for part B of this of this uh exploration is analyzing the death events in particular. So this would be basically filtering the data frame right to uh every row where there was at least one death. Um so filtering it to that and then kind of analyzing that data frame that you get. Um so what is the number of deaths in each accident? um we just kind of um you know like an average uh essentially um how many of them had the Tesla driver so it's a count of how many there are with the driver death um what is the fraction of events in which one or more occupants died what is the distribution of events in which the vehicle hit a cyclist so what is that you can even you can even do a value counts there which gives you that distribution um and these are all columns right so the Tesla the driver's death is a column. Uh occupants uh is a column. And then the uh the um uh driver we said is a column. So you're just doing different value counts on columns. You could also just do a histogram, right? You could that can also be a visual of that uh um distribution as well. Um and then there's this is another kind of filter. How many times did the accident involve the death of an occupant or driver along with a cyclist? Um, so that's kind of a filter for did we have a death in this column or a death in this column. How many rows do we have that match that filter? Um, and then how many times did we have Tesla colliding with other vehicles, which is another column, right? So there's there's a column specifically for that. Um which is other vehicle. Um so um this analysis is mostly just looking at value counts and histograms for these various columns. So fairly straightforward I would say for this um to to do this analysis there. Um then you can group by the model uh and look at the counts per model. So that that again could be a very simple graph like a um uh a plot with Seabour could help you there. Um it could also be just doing a group by um and then doing the value counts um once you group by the model and and kind of aggregate the count. So there's lots of different approaches I think there. think about what's the best way to get this, you know, get that relevant data and um maybe even build a visualization which I think would would would be great. Um and then what is the histogram or the value counts of the autopilot? So that's there's a column for autopilot. If it's a one, um that means autopilot was being used. So that that's going to be kind of a filter down to how many rows had autopilot of one. So it's a very simple question that can be answered from the data frame. Uh so that shouldn't be too bad. So a lot of these correspond to existing columns. It's not um not too much. It's just interpreting those and kind of using value counts using a histogram to get the distributions of them. Okay. All right. So let me pause there. Um so this is the first this is the first project one of three. Um it deals with object detection and then doing some basic data analysis of of this um event that uh accident event data. Um any questions surrounding this? I'm going to I'm going to do object detection uh examples um or just walk through the I mean the the walking through the example we already did before. So I'm going to go back through that um after we go through the other projects. So we'll we'll come back and do that. But any questions on this? good, good, good. So, let me go to So, uh we will come back and do object detection. So, that that'll be very very relevant to this. Um you know, the other parts that are relevant to this are likely in our applied data science course. So, kind of what we were looking at yesterday with data wrangling, right? So, doing those kind of filters and group buys. Um that was also in in uh lesson four of that course. Um you know lesson four of that course of the applied data science and also lesson 10 on feature engineering probably have some relevant stuff related to that data analysis. Um but the the deep learning course lesson 10 is going to be really valuable for object detection for that first part though. So, so yeah, let me clarify that is there's three different projects. Each one has two parts. So, we just went through the first project which has two parts. Part one is the object detection for the vehicles and then part two is data science data analysis on the uh on the accident data. Both of those parts just are are for the first project only. So again, you're just going to choose one of the three to do. So if you choose project one, which is this autopilot themed uh um project, you would be doing both parts. So you'd be doing both of those. You'd be doing the object detection and the uh data analysis, which is uh all two parts for the for the first project. So, uh, but again, you're only you only need to choose one of the three projects. It's just each one has two parts. So, that actually brings me to let me go uh to the second uh project that you have available. Let me share my screen there. So this one is going to be a tourism related uh basically enhancing tourism with AI related project. So if you're interested in that, this would be a good one. Um so uh in in the background for this second project is there you know there are centuries old historical structures that preserve a countries and communities history to improve tourism. A government agency decides to use advanced machine learning techniques to monitor the condition of these structures and report if any of them need maintenance. Um also understanding customers and their expectation is critical for effective marketing and promotion. A recommendation engine is an excellent way to supplement existing marketing outreach. So this project is going to center on two parts as as just as the first one had two parts. Part one is going to be a computer vision image recognition problem. So you're going to be looking at different images of structures and classifying them. Um and then the uh the the second part is going to be building a recommendation system using collaborative filtering um to recommend a tourism destination um given a location. So, sort of like um item recommendation, kind of like what we've talked about in the past where, you know, if you're browsing a website and you're on a product, you see recommendations for other products. Um or like if you're looking at a movie, you see other movies. Um same kind of thing. If you're look if you're at a location, here's other relevant uh landmarks or locations that are recommend recommended to visit. Um so, so that'll be the two parts. is the recommendation part and the uh image recognition part. So we'll break those down and talk about each one of those, but those are those are the two main parts for this one. So part one is uh building a uh as I said a computer vision model that can uh predict the category of a structure. So there'll be various uh there'll be images, we'll take a look at them that have different types of structures like bridges, uh statues, um different landmarks, and you'll be uh basically categorizing those into the different labels. Um and you know, that's a problem we've done many times is given an image, here's the label for it. That's one that we should feel comfortable with, but I'll go back and review how to do that effectively with transfer learning. Right? So, we've um uh you know talked about transfer learning in the past and we've done some examples with it. I'll go back and and do that as review for this because I think it'll be really relevant to this part one is doing transfer learning with uh image recognition. So, we'll go back and do that. Um and then part two we'll be doing recommendation. I'll go back and go through that too because it's been a while since we've looked at that. Um so so those two things uh transfer learning um I think is lesson nine in the deep learning course that'll be really really relevant for part one and then um our I think lesson seven in our machine learning course on recommendation uh will be um uh uh will be you know the lesson seven will be really relevant for machine learning. So let me go let me dive into those. So part one as I said is image recognition and I think um the best way to approach it will be to do transfer learning for it. So, I'll talk about that, but this is one of those examples kind of like the flowers uh data set that we had or you know that had different folders for different uh categories. So, they had like remember we had like roses, tulips, dandelions, whatever it was in those different folders. Um here we have uh different structures which have images in these different folders. So we have the um these are just different structures uh um stained glass domes column tower um flying buttress um you know these are all just different images there's images within these folders that represent those structures um and our goal is to you know build a model that would be predicting um one of these labels for the for a structure given an image right so we have an image it should be one of these categories of structures. Uh and so we want to build our model to predict that. Um and there's also a test set of so there's uh um a zip folder that has uh uh you know uh basically training images and test images of of these guys. Um, again, I'll go back and review and show you the relevant notebook that that you should use as a guide for doing this. I think it'll be um it'll follow very closely to like our transfer and learning examples that we've done. Um, where especially like that example where we had different flowers, remember that were in these folders and we can load those into a nice caris data set that splits them into training and tests and all that. Um so we have practiced before how to do this and so uh I think it'll be pretty straightforward to follow those follow the examples. I'll just remind us of that uh today and go through those. But um the first task again is related to those images. What we want to do is um do some sample plotting. Now this we have examples of doing two. We haven't focused on doing that too much but we have some code that I'll review today. that can help us um basically plot some of these uh some of these images. And so that's not too hard to do. We can load in those files and then uh easily generate a plot of them. We we've been able to do that before. That's not too hard to do. Um and then the the more interesting part obviously is uh building a model. So this is where you want to um use transfer learning, right? So I would not advise uh building it from scratch even though you could, you know, you could um try to put together different convolutional layers and build out your own network. I would recommend using an existing network off the shelf and doing transfer learning, which is what we've done in the past, right? So we have practiced using one of those models like VGG16 or ResNet loading that in from caris and then remember what we did is we left off the the last few layers the top of it is what it's called um and then we inserted our own layers uh there and then just retrained it on the data. Right? So I would recommend going that route. I don't think it makes sense to build your own from scratch. uh it's not going to it's likely not to be as effective as one of those existing architectures which are known to be pretty good. Um so again I'll show us that example. Uh oh I just saw the messages. Yeah. Um that's true. We did not we skipped over that. Um, so we need to make those up. Uh, essentially we skipped over those. So I can uh message offline after this or at the end and clarify that. But um, yeah, we because we need a Microsoft certified trainer to administer that. Um, which is not me. So we we skipped over those in favor of just continuing our generative AI material and uh review. So we do need to to circle back to that. It shows completed because in place of that we covered that other material but definitely owe it owe those those courses. Okay. So again it even even in the these notes it has a hint to do transfer learning. So of course um that's what I would recommend doing and we will um uh we will practice and review what we did back then to do that just so we see it one more time. Um, so and it even says here, uh, modify the top of this network by adding whatever dense layers you want with the activation and then using dropout if you want. Um, so it's going to be this the same exact situation as that example we did. Pull in a model off the shelf. um you know uh leave off the top of it, insert your own layers and then train that network against the the data that we have uh here in this project. So, and then we know like in order to train it once we have that architecture like pulled off the shelf and we've ripped out the top and we put in our own layers, it's just a matter of setting up the training, right? So, we do the usual things. We set up our uh loss function, our optimizer, which is going to be atom, our metric usually accuracy. Um, we can even set a early stopping call back, which is what this suggests to do. Um, so, and that's something we've done in the past and we can review that too. and then we can uh basically do the model.fit, right? So we can uh uh uh train the model um uh by running the model.fit once we have everything set up. So so that part is fairly easy um and we've done it a lot. It's just getting everything set up from the transform learning perspective that uh is worth reviewing and practicing. We'll do that. So, one of the things that it wants you to do too in this project which uh is interesting is training the model twice. Um, one time without augmentation layers in the front. Um which so remember augmentation is uh those additional layers we put in the very front to generate variations on our on our images like doing the zoom or brightness change or flips or rotations. and so uh it wants you to do training twice. So basically an architecture that has that at the very front um and one without it which is you know without it it's easier you just you don't have to add anything additional to the transfer learning but with it you want to add in the um you know the transformations and we can review that too like how do you do that um but it's essentially um stacking together the various transformations that we want to have and then just putting that in the in a sequential model, putting that first, putting the transfer learning model after that with our own custom layers of course, but you know, really having that augmentation up front. Um, uh, having that augmentation up front and so we can do it with and without that. And the purpose of doing it with and without it is to see the difference like what kind of difference does it make to have that additional variation? And the idea is like um it should help us generalize, right? If we're able to um train our model on those different variations of the input images, we should do a better job of predicting generally against the test set. Um so it's supposed to help with overfitting. It's supposed to help us with generalization to use augmentation, but we can see the difference in the stats, right? So we should be able to train it and then go back and retrain it with with and without the augmentation to see the difference. Okay. So that is the first part. Uh again the resources that are going to help you a lot if you're working on this one are the transfer learning uh which I think is lesson nine uh or 10 nine or 10 from I think it might actually be 10 from uh deep learning. um and we'll we'll review that today. So, another one on our list. So, we'll do um object detection, we'll do recommendation systems, and we'll do transfer learning. But any questions on this part of it? very good. So, let's go to part two. So that's part one, image recognition with those different structures again using transfer learning mostly. Um let's go to part two which is going to be building a recommendation system. And so as you would expect we have uh different data sets here that represent the users and the items um that we would build the recommendation system off of. So we have um users uh uh in this user CSV and then we have um basically uh items in this tourism with ID and the main the the products here we have to think of the products a little differently than usual. They're not physical products, right? They're and they're not movies. In the examples that we've done in the past, we've mainly worked with movies or like products, right? Here the product is the location. So it is like these places. So there's a place ID and a place name like this monument or this uh you know museum or whatever it is. These are different places we could recommend for tourists to visit. And so they have different item ids just like any other product would in a typical data set. Right? So we have users products and which are tourism locations and they they have ratings that are given to them. Um and so uh we want to use all of that information to build a uh collaborative filtering system to to you know given one of these locations to then recommend other similar you know locations that that may be worth visiting. That's the goal. Um and so they have so these are the and then there's one more data set which is the uh combination of the users and the uh the items and their ratings. So which of course is the data we really care about is is the um users and these different ratings that they gave to these different places. So we should think about these are our items essentially right these are our items these are our ratings for those items. So it's th this um part of the project is going to be very very similar to the recommendation systems that we built um back when we were doing like movies or anime. Remember we had those anime shows and recommendation. It's going to be very similar. It's just you know these these product IDs are now um tourism locations that we're recommending. So, and we'll review that, right? So, we'll that's that's the point of this session and really um next Monday's session is to just have some time to review these things as you guys are uh you know um working on on these final projects here. So uh there there's a description of each of these data sets. So we have the you know user CSV um which we already talked about just contains information about the uh users age and user ID that may not be very relevant for building a collaborative filtering system but it but it's there. Um this is more metadata about the places. So obviously the place ID is really important. Um, but given the place ID, we can use this data to kind of look up what it's called, what a description of it, the actual like city and country location, um, latitude, longitude. Um, so this is more information about those products. This is the data that we're really going to zero in on though to build the recommendation system, right? Is this tourism rating CSV. That's probably the most important data is is the actual ratings that were given to these places from users. Um which are you know you know users we have to frame it correctly in this users are tourists right so they are various tourists um and and items are places right so just like when we were doing users in movies or shows here we have tourists and their locations. So but and but they have ratings that they've given to these locations. Um so we can certainly build a recommendation system. Okay. So um couple things to do for this part two is first do some preliminary loading of the data and inspection. So check for any missing values. So you want to load each one of those CSVs as different data frames and check for missing values or duplicates, right? U and then uh basically remove any um uh maybe drop any missing values or uh any duplicates we can drop. Um it says remove any anomalies. So, you know, it may be worthwhile to see if there's any outliers um from the ratings. Uh so, that may be worthwhile to do is see if there's any really um you know, far away from the average rating ratings. Um and we can consider dropping those rows if they're really significant outliers. Um so, uh and you can you can use your own technique to find outliers. So obviously we reviewed a little bit of that yesterday uh Monday. Various ways you can find outliers which would be you know doing like the zcore for the rating figuring out how far away it is from the average and dropping any that are significantly far away. Um so just do a little bit of that. Um so then we can analyze the ages of the users. Uh so we can look at the histogram of the age from the user CSV. Um and then identify the places where these users are are visiting. Um in order to do this by the way um you likely want to use that second data set. So, you want to use uh um you likely want to in fact you likely want to um likely want to merge together potentially this this user data set with this tourism uh data set um where you can merge them together with the place ID essentially being like the location. and so, uh, that may be something you want to do is merge those together so you can answer some of the these questions that relate to the user. May also be able to just use this third data set which has users and their places and their place ratings. But, but the goal is there to just answer that basic question. Um, where are the users visiting the most? Uh, so what are kind of the top places that users are actually visiting? um you know they might have given them low ratings but they were visiting them. So what are those place ids um that that have the largest count? So basically value counts on the place ids um maybe a way to go there. Okay. So then some more analysis what are the different categories of spots which is going to come from that second data set. uh what kind of tourism uh uh each location is most famous for um what city would be the best for a nature enthusiast. So these are going to be um you know probably all information we can get from this data set. Um and uh there's various ways to do that. Like for instance, the nature you may look for that string in this description. So you can see is the word nature in this column? Um or you know that's not hard to do by doing a simple filter. Um and so you you know feel free to use that description column and look for various substrings in there. Um such as nature. That may be something good to answer that question. Okay. And then even here on this part four is uh create a combined data set with places and their user ratings. Um which would be like merging the second and third data sets that have the user ID, place ID. If you think about it, we should be able to merge that together because this third data set has user ID and place ID along with a rating, but we have a data set that has information about every single place ID. So, we should be able to merge that second and third data set together um to have uh you know essentially a combined data set. Uh so that that'll be good practice for merging uh which we looked at on Monday, right? um doing emerging on a place ID for example. So and we can figure from that we can figure out uh what cities had the highest ratings because the place ids will be joined together with the ratings. So once you join that second and third data set you can ask you can answer a lot of questions. Which city had the highest ratings uh on average? um uh which category of places are have the highest ratings again those are only things we can really answer once we've merged the second and third data sets okay so basic analysis there then is the fun part is a recommendation system right so then we can do we can use that third data set to build a a collaborative filtering model because we have the place ID the user ID um and the uh ratings. So the idea is like given a current place ID um can we recommend other similar places to visit? Um so this the collaborative filtering we want to do here is going to be similar to the examples we did in our lesson that are uh it's not userbased because we're not given a user but it's given a location. So, it's actually going to be item based collaborative filtering. So, we'll we'll review that today. I'll go back to that lesson and kind of walk us through that example. But because again, it's the it's sort of like when you're browsing a product, you know, if on Amazon or something and you're on that product, we want to see other relevant products that are similar to it that we would recommend. Same thing here. given a tourist location, what are other tourist locations that that are recommended? Um, and so we want to follow the itembbased collaborative filtering approach. Um, because it's it's not like given a user, what are other what are recommendations we can make for items given that user um it's it's given the item in this case, right? Given the the location, then we recommend other locations. So we'll do item based uh collaborative filtering. So we'll go back and review that today. Um so that'll be super relevant for this um project is is that recommendation uh example will follow pretty much identical to that you know given the ratings data um given the ratings data that we have and the the place ids and user ids. All right. So just to recap that um this second project has two parts. It has a image recognition transfer learning part with those uh structures images and then it has this recommendation a little bit of data analysis but recommendation uh system part um too. So those main two parts if you're really interested in those topics uh this would be a great project to to do. Um and so the relevant resources for you if you really want to do this one um are going to be the transfer learning lesson in deep learning uh which we will go back and take a look at today and then recommendation systems particularly item based collaborative filtering which we'll go back and look at too. So we'll do those two today. third project here and then after we do that we'll start getting into some review go back through some notebooks and some examples we did um you know that are going to be I think relevant to these projects. Um so the third one is uh um has to do with sales forecasting. So um in this situation we are um looking at uh using a model to forecast sales and demand. Um uh and so this is going to be an interesting kind of regression oriented uh uh project that is dealing with a bunch of sales data. So uh if you're interested in these kind of problems um this might be a good one for you. Um and so uh we'll talk about it. Um so we want to predict the demand for various uh items across restaurants. So the sales that we're dealing with or sales data that we're dealing with are for various items that are being sold in restaurants. Um and so we have a bunch of data around that and we want to use that to kind of forecast um the sales figures for um different time periods essentially um rel and and of course this is all related to uh the v uh various data sets that we'll have around um these products and how much they were sold over uh a period of time. So we'll talk about that. Um so you're going to be working with a few data sets in this. Um namely the uh first one is just some information about the restaurant. So uh each one has a restaurant ID and uh a name. So very very simple um as you can imagine um just basically an identifier and then some name that goes with it. Um so these are the various restaurants. Um now this data is probably the most important is the sales CSV. So uh we have different items that were sold um for different prices and how many counts of them and which items they were. So there's every row has a date of the transaction um what item it was, what its price was, and then um the which is a a unit price per item. and then a uh total number of those items that were sold. Um so this is the sales uh data and then we have uh information about those items. So we have a store ID which corresponds to the restaurants. So we can figure out those item uh and and we have an item ID. Um and we it has a name, it has a calories, and it has a price um which is the same price that was in the sales uh CSV as well. Um uh so we have um uh items here. So we have three different data sets going on. And as you can imagine, it's going to be useful to combine this information. Um, so in this project, you'll get some practice merging together these data sets. Um, for instance, like here we have restaurant ID. So of course, we can merge that to this and basically have a restaurant name per row. That should be doable by joining those together. Um and then we should be able to figure out the sales as well by merging in that sales CSC because we have um you know uh product ids or item ids per sales record. So we should be able to join that to this data as well. Um so we know the name and the calories and the store uh for every single item that was sold. We should be able to join this together. So all three we should be able to join all three and that's going to be one of the tasks uh in in in the task list. Um so just breaking that down the restaurants obviously as we said only has those two columns which are the ID and the name which is a string uh name for the restaurant. Um then we have the items which has an item ID, a store ID, the name, um then the unit price that we talked about uh earlier, the name of it, that's another string kind of fold string description of what the the name of the item is. And then we have the sales. Um, and then we have which has the data we really care about, you know, the the date. Um, and then the the item ID, the price, and then the, uh, item count. Um, and so, uh, this is all of this data is what we're going to use to do some analysis and then ultimately building some, uh, forecasting models off of, uh, to to predict the sales. So getting into some of the tasks here. Um the first one is uh uh um the first one is uh importing the data set into Python. So obviously that's just loading the CSVs um and then doing some uh info and head. So doing the usual just basic checks. Um and then looking for outliers in any of them. Um so uh probably the one that we'll care about the most is the sales CSV. See, uh seeing if there's any um outliers there. Um and so again, that's up to you to choose what methodology you want to use for outlier detection. Um you can use the zcore method. You could use something more advanced like an isolation forest model from from scikitlearn. Um so but uh that's the first thing is kind of look for outliers. Um now this is the big part is merging. So we want to take those three that we have and merge them together. And so what we should have is a full data set that has all of these columns included in it. Right? So it should have uh date, item ID, price, item count, item names, calories, store, store name. All of that information is being brought together in a single data set. So the the way I recommend doing this, by the way, is in two steps. So I recommend merging these in two steps. Um, so you first want to merge, for example, you could merge the restaurants data um to the items data. That's that you could do it that way. And that gives you a new data frame. Then you take that resulting data frame and merge it with the uh then merge it on the sales uh data frame. Um, and so, uh, you want to do that in two steps because remember when you do the PDM merge, um, you really can only, uh, merge two at a time. So, you you pick your two data frames and you pick the column that you're using as the one to look for the overlap. Um, and so what you likely want to do is merge uh, pick two of them to merge and then and then take that result and merge it with the third one. And so by the end of that you should have a single data set of everything merged together. So for example like um you can merge together this restaurants um with the items. That's a really easy merge because this is the ID of the store. So we should be able to merge those together on this store ID. So that should be not too hard to do. um because their restaurants CSV has everything um you know with that store ID. Um so by the time we merge these two data sets, what we should have is an extra column that represents the name, right? We should have a restaurant name that's merged in here. So we should have that added to it. And that's just from the merging of the restaurant CSV to this one. Then we take that result we take that result data frame and merge it to the sales. So we should be merging it to the sales and the ID we can the column we can use there to look for overlap is obviously the item. We could use the item ID because every row in the sales has an item ID that's being sold, right? So we can merge that here. And what that should do is bring in extra columns that are the um the name of the the the name um of the or sorry the sales like amount like the item count. It should bring in the uh price um and it should bring in the date which is important to have too. Um so we should be able to merge those three together um and you end up with a final data set. So that'll be, you know, a little bit of work there to bring all those together. But that's the point of that task, merging all of it together. Um, and we should end up with all of those columns. Okay? And so if you want to if you want a good resource for doing that, go back to the uh the data science course that that um lesson 9 notebook that we walked through on Monday that has those examples of merging, right? that those are really good examples for doing this kind of merge here. Um, so you definitely want to look at that uh as a good reference. That's in that's in the lesson 9 notebook in the data science course. Okay. Then uh once you have all that data together, we then want to do some exploration of it. So, um, one thing we could do is, so when it says examine the overall sales, um, uh, I think what a good place to start there is is, um, plot this based on the date. So, um, essentially what you need to do is generate a new column that is basically the the total sales. Um, which should be easy to do because um, you know, you just need to multiply together uh, you just need to multiply together the um, price times the item count cuz this is going to be a unit price that we're selling it for. And then we have how many of those items we actually sold. So if you multiply these two together, you get a new column that is like the sales for that date and that item, right? And so the the point is uh once we do that um we could group by the date and total the sales. So we can sum the sales column grouping by the date and we want to generate basically a plot that shows the sales per day, right? I think that's that's ultimately like the best visualization you can get. But you have to do a little bit of work there to um group by this date and and sum this uh sales column, which I recommend generating. So the sales column is easy. You just create it by multiplying these two together. Um and then you can group by the date and sum this sales column per day. um and then look at the sales per day. Another thing you can do is once you have this data frame grouped by day, you can reample it. Remember how we had the uh we had that reample function. Um so you can reample it to uh basically go from daily data to weekly and monthly. So um another so you can look into the reample function which um remember you can do like resample and you can pass in a like a w here or a month here capital M which will um basically aggregate it up to weekly data and monthly and then you can plot that and see how that changes. So all of these will be valuable to do for that exploration. These are things you'd want to do. We have some examples of this in our uh um data science course. If you go back to that and look through some of those notebooks we did like in lesson four with the data frames um we have some examples of doing resampling uh which remember just aggregates based on the that date uh uh column essentially. So uh that's that's what these first few um that's what these first few you can answer all of these questions by doing different graphs like that. So all of these are really uh um uh answering those questions. Same thing with this like you can look at different quarters. So you can reample to the you can do reample um and pass in Q which will be a quarterly reample um from those daily sales. Um so again the key here is generating that daily sales column and then just resampling it um at different uh levels like monthly, quarterly, daily um or weekly. Um so those will answer kind of all of these here parts A, B, C and D um can all be answered from that that kind of view. Um then finally and on this page what we want to do is compare the performances of different restaurants. So what we can do is group by restaurant. So group by restaurant ID um and figure out uh we can group by restaurant and sum the sales to figure out what the top and then sort it right. So we can figure out what the top sales selling restaurants were. Um, and we can even look at that across different time windows. So we can group by uh if we produce this quarterly resample or or I should say uh monthly reample, yearly reample um we could group that by restaurant ID and figure out who had the most yearly sales or who had the most monthly sales. Um, so this part E is going to be grouping by the restaurant ID. So, um, you know, that shouldn't be too bad once you've done all this work. Uh, grouping by the restaurant should be relatively easy. let me pause there. Um, any questions on this analysis so far? I know it's been a while since we've done a little bit of this. We talked about it yesterday. I say yesterday, I meant Monday. We talked about a little bit of these data frame manipulations. So, you'll be doing some more of that, especially the merging here in this one. Um, group by uh we sample. The key though is going to be generating that sales column and then grouping by the date to generate a new data frame that has daily total sales. Okay. Okay. So then we can also so just a couple more is we can also group by the item. So we can uh group by the item to figure out uh and we can group by item and store. Um so find out where the which item was the most popular at each store. That's that's just a simple like group by two columns the the item ID and the store ID. Um so so that'd be part F. and we can figure out if the store with the highest volume, meaning so volume is uh item count essentially is also making the most money. So, do they have the most sales per day? Um, that's an easy calculation to do. Um, once you have that full sales data frame and you can aggregate like the item counts too, um, and and aggregate the sales uh, as well. So you may have to go back and do that for part G is just um when you do the sum you group by the date you can sum the item count and you can sum the uh that sales column to figure out uh you know um what the volume is and the money um and you can average that out per day. Uh so and then you can look at the max. So you can look at the most expensive. So you can group by the restaurant and take the maximum uh item price and so you can figure out what the most expensive item at every restaurant is. And and you can also look at what that item's calorie count is. So this is just breaking down, you know, we have this data. We can group by the restaurant and look at the max price. what is the most expensive item. So that's just an aggregation on the price. Um and you know that item will come with a calorie count because every item does. So we can grab that too. So bunch of group buys that you're going to be doing. So in this project uh in the analysis you should find yourself doing group buy a few times uh in here. Um and then and then we pivot to part two. So that's part one is just analysis. Um part two is building the model for forecasting. So part one just analysis, part two is building the model. Um so and you're actually going to be building a few different models to do regression. So uh you're going to be using a linear a basic linear regression, a random forest regression, and an XG boost regression. So three different regression models. Um so and um it even has some suggestions for different features um like what the quarter is, the month, the day of the week. Now remember, you should be able to generate these features from the date. So, um, this is an excellent practice of changing over the date into a datetime object and then grabbing the day of the week, grabbing the quarter, grabbing the month, grabbing the year, day of the month. Um, those are all things that come from the datetime object. So, uh, you you should be able to extract those, um, from the datetime object. And so really recommend mapping that date to a datetime object which we saw how to do on on Monday. That's not too hard to do, right? It's just using that PD2 datetime function to do that. Um and so then you want to split apart your data into training and test. The the big thing with this data that is indexed by date is keeping it in order. So you really want to sort by the date. um and use the last 6 months as the test and and the um previous data to the last 6 months as the training data. Okay. So this will involve sorting sort by the date column so that you have it all in time order and then use the um use the first section of the data. Basically everything but the last six months is going to be the training data. The last six months worth is going to be the testing data. So you just sort by that date. Um now you may be wondering what am I predicting? So the thing that you should be trying to predict are the total sales. So it's that it's that sales column that we generated from the um item count times the price is the sales quantity. We want to predict that. So, it's the sales amount. Um, and we want to build a regression model to predict that. Um, and and remember, we're going to have a total of that per day essentially, right? Um, and so we want to uh be able to forecast that uh um at different time intervals. So um essentially what you're going to do is build you're going to build a model using all those features to predict what the sales uh quantity should be. Um and uh you will um use RMSSE. Now that's a very natural uh evaluation for the model um because we're doing a regression, right? MSE we've talked about that many many times. um that's what we would want to use to uh you know if we're doing um a regression problem. So that makes sense. Um and then you so you'll compare the performance of those three. So the linear regression, random forest, XG boost, you'll train all three, take the one with the lowest MSE that's going to be the best model and then use that to make a um prediction for the next year. So um you'll forecast you'll use that to make a forecast for the uh next year which would mean um predicting essentially making a prediction um at the year level. Um so what would be kind of a what would be the next year's sales quantity? Any questions on this? So, something, you know, something I realized that may be worth reviewing here and we can do that today is going back and looking at the resampling. We can do that uh because I think that'll be helpful for this. It we had examples of how to do that I think early on in our uh work with data frames. We can certainly go back and and look look at the resampling examples because I think that'll come in handy. Um and also, you know, maybe group by operations too because this one's going to involve a lot of uh group by operations which I think are uh really handy. Um you know, we've looked at them before, but it's obviously been a while since we've had to do those. So maybe we can go back and look at those two for review. So this one, just to recap, has two parts. Just exploring the sales data, which is a lot of uh like I said, group by different manipulations, maybe even building some graphs. Um and then uh building a model off of that sales data to do to predict um the sales quantity. and so if you you know as I said this might be a good project if you enjoy uh building those kind of models. Um so th this one the good thing about this project is it doesn't involve any deep learning. Um but it is using a lot of older content from you know doing uh regression and doing a lot of group by and resampling and such. Um so so you have one so you have an option to do any one of these three right? Um so uh really good options I think. All right so let me stop sharing that. So those are the three that we have. Now what I want to do is spend some time uh starting now reviewing some of those topics that I think are going to be really relevant. Um the first place that I'm going to start is uh going back to the first project on the autopilot in Tesla. Um I'm going to review the object detection uh model that we worked on uh not too long ago. You know, that was recent in our deep learning journey. Um I'm going to go back and take a look at that. Uh so let me pull that up. um that would be within I think lesson nine of our deep learning course. So let me pull that up. Sorry, lesson nine was transfer learning. It's lesson 10. Let me share my screen here. Okay, so this is this for the first project is going to be a really fantastic resource uh object detection with YOLO. We did this a while ago. Uh but I I do would just want to briefly walk back through it as a you know really good resource for that first project because obviously um in the in the beginning of it the first part of it is do is building an object detection model. Um so the the idea there is you should be able to follow this notebook mostly all the way through. It's just you're going to be working with different data obviously with the uh um Tesla vehicle um data set. Um so let's go back through this. So remember we had to do uh um some work here with the YOLO um repository and we use some of those built-in scripts to do the training and the evaluation. So uh um and we had some helper functions along the way. So we had this function to uh download a bunch of data. Now will we need to to do that for this uh for the project? No, because you'll already have the data. Um so we won't need to go out and and download it. So you won't need a function like this necessarily which was used for retrieving data from the internet. Um so we didn't really need to do that which was pulling from this you know public data set you will already have um data but what's nice is like if you want to use it in this format you or with this um kind of setup you'll want to make sure that the data from the data set is in this kind of uh format. So, you want to have it in an images. You want an images folder. You'll want a labels folder that has these uh text files. And remember, these text files are unique in that they have the the box coordinates on each on each line along with the class of what vehicle it is. Um, so we want uh all that to be Now that should already be set up for you, but you just want to double check it's kind of in this uh this kind of folder setup where you have an overall folder with an images subfolder, a label subfolder, and they have the images are within this one, and then the label files are within this one. We won't be downloading it from a location. We'll already have it. That that's just the difference there, right? Um so you'll you'll already have it from the data sets. Okay. Otherwise, we cloned the model. So, um we cloned the model from this repository uh because it unfortunately it's not one of those that are built into caris or built into scikitlearn or something like that. So, we're pulling it from this repository so we can use it. So, we did that. We set up a results directory to save our training um artifacts. So that's something that we still would use in this setup. Um you know this is just setting up a folder to save the results to um for training. Um and then essentially what we're leaning on here is this training script. So this is using this is a Python script that is using uh um you know a training loop. And remember when we looked at PyTorch, usually that's a very manually coded out loop, right? It's because in PyTorch, your training is a little bit more explicit, right? It's not just model.fit, which we see in TensorFlow. Um, but this YOLO model is a PyTorch model. So the code to do that training is within this training.py script. Um, and we're going to run that here um using the existing model, but we're going to train it against our uh um data that's set up that's uh in the in the right folder right in the um it's assumed to be in this setup that we talked about earlier uh with this directory. Um and then we will uh execute this. So this what you want to make sure if you're following this example is you want to make sure this part runs um when you download uh this when you clone this repository um you may if it's not working for you you may need to tweak this data.yamel to point to the right folder where you have your data set up in on on your machine. So, if you're doing it locally, um, or if you're doing it in collab, um, you just want to make sure that you have your data set up, uh, want to make sure you have this. This is just a configuration to say where on my machine is the data stored. Um, so you just want to look in that file and make sure it's pointing at the right location so it can pick up your your data set. Um, and you know, you can also play around with how many epics it's running. So, and and what I would recommend too is using a GPU, especially if you're on Collab, connect to the GPU, and this um should speed it up ideally, right? It should speed it up. Okay. Then we had a helper function to visualize some of our results. Um so, this is this should be exactly how it is. It's going to look inside of our um path and pull in some images from our uh training um run and uh um then we can visualize what some of our results will be. This is a helper function to do that um from our results directory. Data.l will be no what I'm saying is in this is a file that has that. So, uh, let me run this actually to show you what I mean. Um, it may help to just run through this real quick. And I don't need to be connected to just connect to CPU to do this. So, data.l is a configuration file that should have a default directory. What I'm saying is if if this uh training isn't working for you, you may need to change some of the configuration settings in that YAML file. Uh so I want to see what it actually contains. Um what it's pointing at initially. So let me go down and just clone this. So this so this file um if you look at it here it's just pointing to so it has some meta data about the data set. So it has the this is what I'm saying is you may need to change this location. This is telling it where to look for the training data which is inside of a folder um that is called that is uh set up to be so dot dot means go back a directory and it's inside of a folder called train and then there's a folder within that called images. Um so this might change depending on like if you're running this locally on your own machine this might be a different directory. It depends on where you're saving your data set. Um but uh what I would recommend is trying to follow this example as closely as possible which means that um you so notice how the yolo uh the the um the the data is within a train and validation folder that is underneath the YOLO uh directory. So once you clone the YOLO directory, you can copy all the data in there in these folders which should line up to this exact configuration. You shouldn't need to change any of this. Um notice like now these might change as well. Um in fact these are likely to change which are going to be your uh labels for the different vehicle types. So, um, you know, these are going to be, uh, different vehicle types that, um, and you should be able to get that from the, uh, the the label files, um, themselves. You should be able to see what the the classes are for the various images. It should be in the data set uh, description too, I think. All right. So then if we're following this, it should mostly follow this example, we have a helper function to do inference. So this is to make predictions, which should mostly lean on running this detect.py script, which is, you know, the script that basically does forward propagation for us with the PyTorch model. um using our training uh results to load in the model. Um and then it's going to store the prediction results inside of this directory. And remember the prediction results are um interesting for object detection, right? They are the box plus the label of what's inside the box, right? And so for a single image, we may have multiple boxes. That's totally possible. Um, so the the predictions are not just a label, but boxes with labels, right? And here's a helper function to visualize some of the results. And again, this is something we uh want to do and and the project even asks you to do is to visualize some of the uh detections. Um, and so this is going to uh run some inference and ultimately uh visualize it. Uh and so we can see what some of the images are with those boxes. Um so we this is some examples we saw uh earlier. Um but as long as you mostly follow this example um you should be good should follow mostly this. The only difference really is instead of downloading this public data set you're going to be using the one that is given to you with the project, right? And so you just want to make sure that is set up in the right place um for the training to work and the predictions to work but should follow mostly uh this example. So this is a great resource this 10.07 notebook. If you plan on doing that first project this is a very very good resource for you uh to work with there. All right. Any questions on this? So, uh, that being said, let me go over to, um, let me go over to some transfer learning practice, which I think will help with the second project. Um, so inside of lesson 9, we did transfer learning and we had a notebook there to practice um to practice doing transfer learning. So, let me share my screen and show you that one. So this will be really really helpful for the uh second project. So this is within um lesson nine of uh the deep learning course and this was the the only notebook in there 9.04. This would be a really fantastic example to follow for that second project. Remember what you're doing there is predicting the um various structure images and categorizing them into one of those structures like the the statue or the um stained glass or whatever it is, right? The different um tourism structures. So, uh, the reason this is so relevant is because, um, it's going to walk you through, um, using a model off the shelf, which I highly recommend for that second project, and then just, you know, training it against that data that you have, um, with the which are going to be those images. Um, and so, uh, this example you uses VG16, which you're welcome to use as well. Um so here we import this uh in order to use it. Um and remember this was the key was uh this is what makes everything work is loading in that model here but making sure we turn off that top of the network um by by making sure we do include top equals false. which you know will uh basically leave out the end of the network so that it allows us to put in our own layers there to do the classification. So essentially this is going to be our starting point. And then we um take this and we go ahead and flatten this result um from that last layer of the VG16. And then we put in a dense here with a relu. And then we put in a dense here with a softmax. And again this number of neurons here should match to how many categories we have for that project. Right? So um if I go back to that project um in part one uh there were these categories right alter apps bell tower column dome two different types of domes flying buttress gargoyle stained glass vault. So I should have as many you know um categories there as I as many neurons in that last layer as I have categories here uh which are in these different folders right um so I this this we want that to match that number um as far as our output and one of the things that it wanted us to do as well was add in a dropout layer um so that would be worthwhile doing is you putting that in here. And we could, you know, we could drop out uh right here um after this um to affect some of these neurons being turned off. Um so that's something we definitely could do. Um but once we do that, we see we have all of the VG16 layers, you know, populated in here, which are all these blocks of convolutions and max pooling and convolution max pooling and all that. And then basically here's our final layers we added in and then we want to train this on the uh then we want to train this on the data right itself. So um this we would want to do these kind of steps uh to uh to then go ahead and set up our training and go ahead and set up our uh uh model.fit and and all of that. So um you know that would be something uh worthwhile doing is basically looking at this example as a good way of setting our network up and then what we could do is look at other examples that we had for um you know doing the training process especially with uh image data. So that may be something worthwhile to uh look at and I can do that. Um, let me find well before I find a new another example, especially with setting up the data loading which I think will be relevant. Um, any questions on this? So, so like this is what you'd want to be doing for this second project that part one, right? Is using transfer learning to your advantage? And really what it's doing is building your model for you, right? It's just building your model for you. You still have to do everything else. You still have to get it ready for training by doing model.compile. And you still have to actually train it by doing model.fit. You're still doing that, but this is giving you your model architecture, right? Is you're pulling this off the shelf and then adding in a few layers at the end to do the classification. We practice that a little bit. This is a great resource for setting that up. Um, any questions on on this? Again, really great resource for the second project. Uh this is a good example that you could follow on using one off the shelf. We actually have multiple examples I think I think we have one later on uh um of of using transfer learning as well. All right. So, let me find I actually have another example in mind that I wanted to use. Let me see if I can find it. Which has the It's the roses. And remember, we loaded those like rose data sets so we could uh Yes, this one. um as a good just to show you like a good way of setting up the uh setting up the data here. So let me share my screen. It's this one. So this is an 8.08. Um the reason I think this is a good resource for that second project is the um you should be following this the way this loads in the data because the data that you're going to have remember is set up in these folders. So I go back here. It's set up in these folders like this. Um and and this uh will assume a similar setup. Um so this is a really good resource for examples on how to load in the data set for working with caris um and tensorflow. So remember we download the data set here um and what we did is we uh basically um used a function. If I keep going here by the way this is a helpful this is a helper function to to just display images. Um, so this displays an image given uh the directory. So that's that's a helpful example. This is what I really wanted to show off was for that um transfer learning example when you're training. This is how you want to load in your data exactly like this. So you want to use this utility image data set from directory because our images are already organized into these folders right with the labels. Um and this function assumes that structure and so we can pass in the directory path. Um and basically uh this will load this will read from those folders and organize them into their classes. Right? So you can see how many classes there are. Um, and you get this confirmation that it found all these files belonging to five different classes. And you can set up how much data you want to reserve for testing and it will split that out. Um, and so it reserves a certain amount of them for training and then it reserves the remainder of them to be used for validation. Um so really excellent uh reference here for how to load data from that kind of uh folder setup uh which I think you would want to do for building out your training set and validation set. And then you can visualize by the way you can also get the class names from the this class names attribute. So once you've loaded in from those folders, um you can grab the class names from here and you can see like you should have all those names that match this. You should have all those exact names that match your folders. Um and so that's how you can that's how you can verify that it loaded those correctly. This is a really good function to because you know in the project instructions it wants you to plot some of the example images. This is a really good um example to grab a batch and go ahead and plot them. So it uses the PLT immO function to um plot and then it puts a title on it with the label, right? So you um grab the label of the image and which is an index and you use that index into the class names list to grab the string. uh uh and so that puts it on the title and and so this is a really good way to kind of sample visualize some of these images uh in this subplot. So it plots the first nine images. Obviously you can do more than that. You could build out uh 20. You could do however many you want to do, but um nine is a nice number because it's this 3x3 grid of images. Uh yes. Yeah, it was organized. It's Yeah. So in this situation, um it's organized like this where there's a there's like a data set directory here and underneath of that are the folders with each uh type of flower. Yeah. So we had each one of those. Um, so when you like this data set, it's going to be organized very similarly, right? It's going to be a folder that has a bunch of subfolders that represent each class. So images of altars, images of bell towers, images of columns, images of stained glass, right? It's going to be set up in the same exact setup. That's why I think this is a good uh very good example of how to load in a training set and validation set given this directory setup. So when you specifically have that directory set up, this helper function can uh grab that data for you. Yeah, which I recommend doing. So I think for that part one of the second project, I think you're going to want to lean on this as a good example of loading the data. Um, and not only loading the data, but training a model, right? So now obviously in this one, I think we built our own convolutional net. Um, but this also, by the way, has a really, really fantastic example of adding in augmentations, which we did not do on the uh, VGG16, but something we certainly could do. So, what the project wants you to do is set up training it with and without this added into the model. So, there's no reason we can't take the existing one and in the very front of it build a sequential that…

Transcript truncated. Watch the full video for the complete content.

Get daily recaps from
Simplilearn

AI-powered summaries delivered to your inbox. Save hours every week while staying fully informed.