Data Science & Machine Learning Project - Part 3 Data Cleaning | Image Classification
HTML-код
- Опубликовано: 16 июл 2024
- In this video, we are going to clean images that we downloaded from google in a way that it is suitable to train our classifier. We mostly identify a person in a photo with a face. Hence we will use opencv and a technique called haar cascades to detect if a face and two eyes are clearly visible or not. If they are than we keep the image otherwise we discard the image. Majority of the data cleaning work will be done using python code but there will be some cleaning work that we will have to do manually.
Do you want to learn technology from me? Check codebasics.io/ for my affordable video courses.
Code: github.com/codebasics/py/blob...
Code folder: github.com/codebasics/py/blob...
Special thanks to,
Debjyoti Paul (Amazon Data Scientist): For help with entire project
Website: codebasics.io/
Facebook: / codebasicshub
Twitter: / codebasicshub
Check out our premium machine learning course with 2 Industry projects: codebasics.io/courses/machine-learning-for-data-science-beginners-to-advanced
Hello Sir, I'm working on a license plate detection and I would love for you to teach me how to clean and preprocess images that I have personally taken and how to bring the images together for model building using CNN
Please build more projects like these..! These are very helpful!
This is a great tutorial, thank you for your generosity and clear explanations. The project videos provide a wider view on how to use and implement the models in a very practical way and expose to us additional practical tools.
Amazing tutorial Sir, going through the playlist from last 15 days. Thnx a lot , truly appreciate your time and effort !!!!
your effort & time to explain the project is superb, many thanks for sharing your knowledge to the data science community 🙏
Clear instruction, easier to understand. Love how you teach, thank you a lot for providing us free and high quality lesson.
You're very welcome!
These kind of projects are really helpful and interesting.Thank you very much
Thank you for such great content ❤️.
Please make more such project series 🙏🏻
Hello Sir, you are an amazing teacher and I am very honoured to learn from you. You have a really good heart to be working so so hard to help us all on this platform and I hope you keep going and you stay in good health to enjoy a long happy life for helping out so many people. Thanks for all the hard work.
Thanks Sultan for your kind words
Hello Sir, you are great teacher and your way of teaching is amazing. Thank You so much for your all hard work.
Thank you so much sir for teaching such concepts in easy language for free of cost !!
Awesome projects . Please bring some similar projects on this channel in future. Thanks a lot
I will try my best
Hi Dhaval,
Although, you made this project series in a pretty explanatory way and I hope everybody likes this series but It would be better if you could explain more about the arguments that you feed to libraries's attributes. I hope from the next project series you would focus more on that part.
Really helpful series. Thank you for taking time to put it together and explain each steps in a very easy to understand manner
Sir i like your process of explaining every things in a simple way. Keep up the good work and your valuable time.
glad you liked it
excellent tutorials where I can learn and practice data science project. thank you so much...
Very simple and easy to understand.You are really awesome teacher. Thanks a lot for all your tutorials.
Can you please mail the data to me for this project to himanshusingh6551@@t
Very easy to understand for those guys who also have basic knowledge of opencv...
But In my point of view very very great video sir ❤❤❤
Hello Sir, excellent video. I really appreciate your work. Please make more end to end projects like this!
Thank you sir one more project ... It will help us to get in details knowledge ... Keep it up
You are my favorite instructor.
Awesome explanation. Thank you so much for these projects!
I undersatnd your situation brother.Your stuff is very great.
Very very thankful for your efforts sir. You are helping so many peoples like me for learning new concepts. Please Keep working. Thanks
Thank you, I will Nihal.
It was a nice practical implementation.
I would be happy to see a video on using a model with REST-API, that could be very useful.
thank u sir for this video series, i also working on Image Processing using Opencv & YOLO, this series is helped me a lot.
Glad it helped!
Thanks for this project... really appreciate your extra weekend time on such things... super
My pleasure Naveen. Always a pleasure to read your comment my friend 😊
Nice Project and explanation. Automated generating cropped images and folders thing was good.
Thanks Dhaval for sharing your knowledge
always i learn new tips\concepts from you Dhaval. Example requirements.txt in this video. I'm improving day by day by watching your videos.
Glad to hear that jaganinfo :)
sir massive respect!
thank you, just what i needed.
i was preparing for a hackathon! this really helps a lot.
Glad it helped!
This video gives details of handling images for making useful datasets. Useful learning experience.
Glad it was helpful!
fabulous... the way you explain...👌👌
Great video must say
Extremely useful....Helped me a lot !
@Dhavel, its an amazing project..please give more such projects
Hey, hope you are doing fine. Here is a suggestion, show us how to tackle problems during projects that will give us a proper understanding of projects. Choose big projects on different algorithms. Share your personal experience in that way you can increase the content of your channel and we can also learn more from you. Make projects on different topics
Right now Data science is growing and more people want to become a data scientist. You have covered basics now you have to show us
how to deal with projects?
What should be your goal when you get any dataset?
What to do, what not to do?
Why you require this or that?
Protocols?
How to approach a dataset
How to solve it.
I hope you will do it because these are the things i personally face right now.
I admire only you and krish naik.
Great Sir, very helpful.
Really lovely projects ..Learnt a lot Sirr. Thank you very much . Your explanation is awesome .
You are most welcome
After completed your ML series these projects are really helpful it's blow my mind, thank you so much,
please make another project like this which helpful to gain more coding knowledge which can't gain in basics, if it is possible please make another in future
Yes Jay. I am planning to add many such projects in future
Ohh thank you I'm exciting for upcoming projects
And also I want to suggest you that in next project please teach some data scientist presentation means the way data scientist present project or model so we can learn it with coding bcz some persons say that data scientist must story teller.. so think about this if it is possible.
I want to one promise to you is when I became a data scientist or machine learning engineering I will contribute you and your channel 🙂🙂
Thanks alot bhai for such helpful content
Build More projects like these, they are very fun and we learn a lot from it. :D
Yes more projects are coming up
Awesome!! TQVM!
"What is this guy doing in serina's folder?". I like the comment :-). Thanks for the video.
Ha ha.. good observation Arul
Thankyou for your efforts sir!
Great Tutorial!
easy to understand, thanks a lot
These projects are really helpful, would be really so good if you could build more and more projects like these, thank you so much!
Have you installed the libraries with given version or newest version?? With newset version , I am getting error in executing code.can you help me out ?
@@niharika5161 hey, Niharika, I installed the libraries with the old versions, and it worked fine. Let me know what is the error popping up with the new versions.
@@irfan2597 When i write image shape(the second line code) ,it shows 'nonetype object has no attribute shape' and plt.imshow(img) giving typeerror"image data of dtype object cannot be converted to float" .
Also can you tell me how to install the old versions?
Thank you so much very interesting.
Thanks for it all!
thank you sir its really helping for me
Hello Sir, Please make more end to end projects like this.
very good tutorial!!
Super sir. Excellent teaching
👍😊
Nicely explained, we are definitely benefited, thanks
Glad it was helpful!
Very nicee explanation
Glad it was helpful!
Please build more out of box projects....it would be very helpful
Sir, Please do a guided project on stock prediction.
Very nice tutorial
thank u thank u, God bless you
is it necessary to install same versions of modules(requirements.txt).
Latest version are being installed.
I am facing issue of compatibility in older versions
very helpful
Good job
sir plz build project like this .it will really helpful to the student like us who cannot afford paid classes.
In the video, the author explains (time-stamp 9:37) cv2 module presents any image with RGB values as the third dimension. Where as, it should be BGR values, I believe. Please let me know if I am wrong.
Very helpful!
Glad it was helpful!
Thank you Sir, Great
Glad it was helpful!
Cool bro
No comment. Just wow.
thankyou sir, quite helpful
Glad it helped!
perfect
More please!!!
sir many images are being generated in jfif format . opencv is unable to read those files , can you please suggest some solution
I was looking for a data cleaning method and I found this video is interesting. As a part of my project, I`d like to delete some images that are labeled as the same class but were taken outdoors. For example, let`s say there`s a Empire State Building, this picture should`ve taken outdoors but a few pictures was taken indoors. Is there any possible way to remove those kinds of outliers automatically on Python? Or should I delete the pictures manually?
nice work sir
Glad it was helpful!
Hey dhaval!
I have a problem whenver i m running code, it says generating cropped image folder
But when i see I can't find a single image and there's no error.
Note:- os.makedirs('full path', exist_ok = True)
This i had change as it was throwing many error
Plz check it once
This project is great!
Please build some projects in data science domain
Thank You!
We will
Nice INformation. JFYI ... your face video is not synchronizing with audio .If it is recorded video we can adjust while editing. If it is live , Please switch camera OFF & ON
For all the users with the problem error :- Opencv(4.5.5) ,error(-215 : assertion failed)!_src.empty in function 'cv:cvColor'.
Modify the function as
def get_cropped_image_if_2_eyes(image_path):
img = cv2.imread(image_path)
if img is not None:
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
faces = face_cascade.detectMultiScale(gray, 1.3, 5)
for (x,y,w,h) in faces:
roi_gray = gray[y:y+h, x:x+w]
roi_color = img[y:y+h, x:x+w]
eyes = eye_cascade.detectMultiScale(roi_gray)
if len(eyes) >= 2:
return roi_color
Thanks bro. I searched for 30 minutes for the solution
thank you so much !! This works like magic
thank you bro helped alot!
Much love man. You rock!!!
god bless u bro
Hi Dhaval.
It is great efforts where you making projects which will help the beginners. But if will be good if you explain about the arguments which you are passing. For example for line of code faces=face_cascade.detectMultiScale(gray,1.3,5 )
You mentioned what is that gray but you dint mention why 1.3 and 5 are passed.
When I started watching this video, and I didn't know that you will use OpenCV library, so I purchased a course of OpenCV from Udemy and completed it and then I watched this video, then it was very easy for me to understand all the functions you implemented in this video. CHEERS!!!
Great to hear Vishwas :)
Hi,
This tutorial is top of the line. I have a query. In the section where you mention that in creating cropped images folder ( 32:21 - of the video), one face is as of that code is picked - how come that both faces are seen when we check the cropped images that are created( for eg. Serena's husband). Regards KM
Please provide video code and data in video description and also discussed how install new require package like season required version
Can you make a tutorial series to train a model which can recognize hand written digits other than the scikit learn dataset.Please sir !
my data cleaned succesfully ❤❤
hello, ommi
I'm stuck on downloading the haarcades .xml files. Please share how you were able to do yours
How do you accessed model folder from jupyter notebook??
better than my university
Can someone please explain what is the shortcoming that sir is talking about at 32:00?
I did not understood it.
Hi, why do I encounter this error "UnboundLocalError: local variable 'roi_color' referenced before assignment" when I want to crop faces of file and creating cropped images folder for famous sportmen
kindly i have a question how to change datatype of iris dataset PetalWidthCm column to numeric.
i am bit confuse that i got error while create cropped image in cropped folder . At end i got output as fuction not define .
Thanks for the great video. Just curious, if there are two faces in the downloaded picture, will the code produces two cropped images of those two faces? Thank you.
Yes
Hey there. I have an image that has two faces, and I want my code to extract both of them. How do I make "roi_color" as an array that can have both cropped faces, like he has mentioned at 32:05 in the video? Please help!
Got this error @29:00 min :
PermissionError: [WinError 5] Access is denied: './dataset/cropped/'
*Solution* for others:
*Changed that code by adding a prefix 'r' before the path.* example :
img = cv2.imread(r'./test_images/sharapova1.jpg')
Make sure you give the full path to the image.
This worked for and got rid of the permission problem.
I got this error @22:00 min while removing the cropped folder (I tested how this code woks well ). I got permission error whenver I try to delete the existing folder and creating new empty folder !
@codebasics help me please !
Is there anyone who can tell about any method or tool which checks the subfolders of cropped folder (like Lionel Messi in this project) in automated way?
everytime we run the code it will delete the existing folders and create new one thing is wrong i have take 10 hr to clean manually the cropped dataset next day when i opened my laptop and rerun it it regenerates the folder
I am not able to import the modules u told in the start. plz help me with that.
Sir I have some doubts in creating a cropped folder using code.
can we use images of multiple player like do we need multiple images of single player only