Did you enjoy this video? Try my premium courses! 😃🙌😊 ● Hands-On Computer Vision in the Cloud: Building an AWS-based Real Time Number Plate Recognition System bit.ly/3RXrE1Y ● End-To-End Computer Vision: Build and Deploy a Video Summarization API bit.ly/3tyQX0M ● Computer Vision on Edge: Real Time Number Plate Recognition on an Edge Device bit.ly/4dYodA7 ● Machine Learning Entrepreneur: How to start your entrepreneurial journey as a freelancer and content creator bit.ly/4bFLeaC Learn to create AI-based prototypes in the Computer Vision School! www.computervision.school 😃🚀🎓
ultimate teaching style, this was the best computer vision introduction tutorial I have ever seen on youtube as it was very easy to understand , thanks a lot Philip!!
hi, qq how did you split the images to empty and not empty? I saw the other video where you cropped images, but how did you separate 6K+ images into empty and not empty, its not clear.
The opencv function I used to get all connected components provides an id for every component, so I looked at the ids of empty slots and non empty slots and save them into different directories.
@@ComputerVisionEngineer i see, thank you. Yes I also looked at the other videos you have and realized how its done. Thanks for responding. Btw I pinged you on linedin for a project. I did not see reply, assuming you are not logging in to that often. Would you be interested in a paid consultation?
@@TatianaMaskaron thank you so much for reaching out regarding a paid consultation, I do work as a freelance contractor, but I am a little too busy right now with other projects. Yeah I don't use linkedin that much, but you can reach out to me through mail, discord, Patreon, or the comments in my videos, I try to answer as soon as possible. 🙌
Thank you very much, Felipe, for these very clear explanations. Until now, I was making predictions for numerical values. Before watching your videos, I thought image classification was more complicated (even though this is a relatively straightforward use case). I have just one perhaps silly question: How did you create the image captures for the dataset? Was it done manually, or did you use specific software for this somewhat tedious task? Thanks again!
Hi, I took the parking lot video I show in the tutorial, I created a binary mask with the location of all the parking slots, then got all the connected components using opencv, then cropped the bboxes from the video frames. 🙌
Thanks a lot for your content Felipe, you're a great teacher! I'm new to machine learning so there's one thing that confuses me: how can I now utilize the the model that I've created? I understand that Pickle transforms the data into byte form and that it can be read somehow, but could you give me an example of what to now do with this data?
Sure! Take a look at this function, here is an example of how I use the same image classifier I trained in this video to make predictions github.com/computervisioneng/parking-space-counter/blob/master/util.py#L14 Please mind I am loading the model in line 11. 💪💪
Ciao Fillippe, I have question about this profession in 2024 and want to know your opinion. Do I need to study any course in online platforms to become a good on it and of course finde a job(take certificate for CV). And is it easy to find a job as Comp.Vision engineer nowadays(2024 and maybe future). What can you advise me to become an engineer as you (online courses, books ect...) P.S. I really appreciate your contents, thank you for your time and effort. Hope to become a professional com.vision engineer and send you a gift from my 1st salary(but now i dont know, how to become it)
Hi, take a look at the computer vision roadmap video, there are links to youtube videos and resources you can use to learn computer vision engineering. 🙌
Hi, great tutorial! I seem to be stuck on a problem when I execute the "grid_search.fit(x_train, y_train)" part of the code. This is the issue "FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details: TypeError: only size-1 arrays can be converted to Python scalars". Do you know how to fix this? I have ensured to use the correct versions (scikit learn, scikit image, and numpy) as shown in video, and followed the video step by step. This is the code for importing images i have (i had to add dtype=object when converting lists to numpy array as it was giving me visibleDeprecationWarning): for category_idx, category in enumerate(categories): for file in os.listdir(os.path.join(input_dir, category)): img_path = os.path.join(input_dir, category, file) img = imread(img_path) print(len(data)) img = resize(img, (200, 200)) data.append(img.flatten()) labels.append(category_idx) data = np.asarray(data, dtype=object) labels = np.asarray(labels, dtype=object). Finally, do you have an instagram or other site to discuss this issue, if possible?
Hey, what is your Python version and your OS? Many things could be going on. I would start by making sure the data and labels are being loaded correctly. You could print 'data' and 'labels' and see if they make sense.
Sir, I have facing some error while training the classifier. It says : ValueError: Found input variables with inconsistent numbers of samples: [4872, 1218] It would be of great help if you solve this problem🙏
i need your advice i have task where i need to find avarage pixal value of x-ray image object in x-ray image i have many object like pen paper palstic and so on and each intesity is different some are overlap some have no clear edegs and mixed edges can i detect or draw a boundry box around each object is it possible without ml model i am newbew in this field specially in image processing can it can be done by image process alone can i segement object if intesity of each object is different and edges are not so clear please help me i am single develpoer in my team
@@ComputerVisionEngineer sounds great, trying to come up with a plan to computer vision something either its a good object or a bad one depending on some criteria
Could you release the data of empty and not empty for us? Thank you very much for your amazing tutorials on OpenCV and Machine Learning. It is beneficial for me to construct my own project!
Sure! I am happy to help you in your machine learning journey! 😃🙌 Here you go: drive.google.com/file/d/11DyZ165lZGzULEZSQNofyy9A8xaYgFJ2/view?usp=share_link
Could you make another video when you test out this classifier?. Like host this online and let the user upload images of parking spaces and the program outputs 'empty' or 'not empty'. Thanks
Hey, that sounds like a cool project! As long as the different classes are visually distinct, you can classify them with an image classifier! I suggest you start with the data collection; collect data from all the different categories you wish to classify. Once you have the data, the Python code would be very similar as the one I used in this video! 😃💪🦆
amazing tutorial, thanks! I had a question about the model.p file, is there some way I can open it and view its contents, I want to know how it classified, or maybe to see if the task was done as I wanted it to be done.
For models trained with scikit learn, in some cases is possible to look at the model weights or some of its internal parameters. But in general I would say model.p is a binary file and it only makes sense in scikit learn, there is not an easy way to 'open it and view its content'. 🙌
If I have more that 2 categories of images, can I name “x_train” and “x_test” whatever I want? For example “car_train”, “car_test”, “bus_train”, “bus_test”, and “limo_train”, “limo_test”?
Hey, you can certainly name your variables whatever you want. But, remember the category is already encoded in the labels variable. For example if you are building a vehicle classifier and the categories are car, bus and limo. Then each data point will be labeled as 0 (car), 1(bus) or 2 (limo).
Hello Sir, i used the same code, but its not giving me the output result, like don't print the accuracy... kindly help! thats what it is showing in the notification area. Shared indexes are downloaded for Python packages in 1 min, 12 sec (20.48 MB)
Hey, I just tested the code and everything seems to be working well on my end! That msg seems to be related to Pycharm, maybe you could try to execute from another IDE or from the command line?
Thumbs up for this video. I just noticed a small mistake . I think you accidentally switched the parameters for the accuracy_score function. It should be accuracy_score(y_test, y_prediction) instead of accuracy_score(y_prediction, y_test).
Hey, thank you for your contribution! Although the order of input parameters is not crucial at computing the accuracy, the function outputs the same result 💪🙌
Thank you for a great clear video. I am going to run it through. Yet something is missing for me: I would like to train a set of specific toy car recognition. For that I need to take pictures of the toy car , and pictures of the floor/table (where the car can be placed) for the "empty' part. Can you recommend: 1) how many pictures of each? 2) What resolution? does it matter? 3) Any other guide line you would recommend?
About the number of pictures, you should be able to achieve a high level of accuracy with a 'small' dataset; try with 200 images in each class. The resolution may not be that critical, but try to make it as high as possible. 🙌
Great video. Is there a follow up on this to show how you can use the classifier and display the annotated image with green box and red box representing occupied and unoccupied spots in a parking lot image?
Thank you! Sure, visualization is covered in the parking spot detector and counter video! ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-F-884J2mnOY.html
When i was trying to convert data and labels into numpy array, i got this error😢 ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (84,) + inhomogeneous part. What is this ? Thanks for the amazing tutorial ❤
@@ComputerVisionEngineer No sir, first i used a data set that i have created, when i load your data set, now it is working 😍 But I want to know what is that error ? How it occurred 🥲
Hey, oh I see the inference of individual images is not covered in this tutorial. Take a look at this video ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-MJCSjXepaAM.html, in this video I also train a classifier using scikit learn and I show you how to inference new data. 🙌
Hi Felipe, Actually I wanted to ask that is this model build using pretrained model or not? and If it is build on pre trained model can you suggest me a video of yours where I can learn building a model with using a pretrained model
also i wanted to know about your video named as sign language detection with scikit learn. The thing is in that video the sign detection one of yours are you using any pre trained model?
@@ComputerVisionEngineer hey felipe i loved the tutorial but if i wanna see how the model recognises the parking spaces in a video and its real time working ? actually i wanted to see the output of it
I have a task to classify cat and dog so i tried the same way you do it but the accuracy its very low i used gray scale to minimize the complicity but didont work , i want to used like this approach if you has any advice
@@odaithalji9603 by increasing the size in line 23 performance should go up. Nevertheless, this may not be the best approach for this type of task. I would recommend you to use feature extraction before applying a scikit learn classifier. I may do a video about it soon. 💪
Amazing job Felipe, you are helping me so much on my studies! I'm from Brazil and I will definitely use your videos to help on my completion of course work
Hey Endah, there are different ways in which you can deploy the model we created in Scikit learn in an Android app. If you are looking to run the model in the mobile device you could consider the Python library sklearn2onnx in order to convert the Scikit learn model into an onnx file. 😃💪
@@ComputerVisionEngineer do you have any reference to change the model? I had trouble finding the reference, I used this classification method for my thesis and my deadline is only 2 days to be able to run this program. I hope you can help me, thank you
How do you build up your trainig data? You won‘t have decided for 6000 pictures whether they are empty or not? Did you use kind of a „step by step“ classification? So that with lets say with 50 pictures you built up a classifier, that builds up further (and of course checked it then whether it worked properly? Thanks for your videos!
Hey Niklas! That is a good question. The data I used in this video comes from a previous video where I built a parking space detector and counter. In that other video I got the location of all parking slots by getting all the connected components of a binary mask. The function I used for getting the connected components got me not only the bbox but also an id for that specific location. Then, as most of the spaces are either empty or not-empty during the entire video, I just selected a few empty spaces (and a few not-empty spaces) and cropped them out of the video in all frames. 💪💪
Hi, please I have a project that is similar to yours and I would please like your assistance in some questions. The label being passed into the training and testing set, is it numerical or in string format? Cause I have to use labelencoder for my label before passing it into the function. Then the data being saved in the data variable is there any way I can convert them into a 4D array to be able to pass it into a CNN model? Thank you.
Hey, the label is numerical. Sure, you could reshape 'data' into a 4D array, it is possible. In that case, you may don't need to flatten the array as I did. 😃🙌