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

Комментарии • 301

  • @codebasics
    @codebasics  2 года назад

    Check out our premium machine learning course with 2 Industry projects: codebasics.io/courses/machine-learning-for-data-science-beginners-to-advanced

    • @fredbaafi9013
      @fredbaafi9013 Год назад +1

      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

  • @adityasinha8649
    @adityasinha8649 4 года назад +19

    Please build more projects like these..! These are very helpful!

  • @AlonAvramson
    @AlonAvramson 3 года назад +4

    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.

  • @siddharthsingh2369
    @siddharthsingh2369 2 года назад +2

    Amazing tutorial Sir, going through the playlist from last 15 days. Thnx a lot , truly appreciate your time and effort !!!!

  • @bhaskargg6018
    @bhaskargg6018 Год назад +1

    your effort & time to explain the project is superb, many thanks for sharing your knowledge to the data science community 🙏

  • @bright4665
    @bright4665 Год назад

    Clear instruction, easier to understand. Love how you teach, thank you a lot for providing us free and high quality lesson.

  • @suryav3959
    @suryav3959 4 года назад +1

    These kind of projects are really helpful and interesting.Thank you very much

  • @harshitsingh4764
    @harshitsingh4764 3 года назад +2

    Thank you for such great content ❤️.
    Please make more such project series 🙏🏻

  • @sultanhusnoo8552
    @sultanhusnoo8552 2 года назад +2

    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.

    • @codebasics
      @codebasics  2 года назад +2

      Thanks Sultan for your kind words

  • @mudasserqayyom9947
    @mudasserqayyom9947 7 месяцев назад

    Hello Sir, you are great teacher and your way of teaching is amazing. Thank You so much for your all hard work.

  • @sonamchauhan2968
    @sonamchauhan2968 Год назад

    Thank you so much sir for teaching such concepts in easy language for free of cost !!

  • @vikashkumarchaurasia1299
    @vikashkumarchaurasia1299 4 года назад +4

    Awesome projects . Please bring some similar projects on this channel in future. Thanks a lot

  • @siddharthvarma6684
    @siddharthvarma6684 2 года назад +3

    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.

  • @salamina_
    @salamina_ 11 месяцев назад

    Really helpful series. Thank you for taking time to put it together and explain each steps in a very easy to understand manner

  • @ABHISHEKGAUTAM75
    @ABHISHEKGAUTAM75 4 года назад +1

    Sir i like your process of explaining every things in a simple way. Keep up the good work and your valuable time.

  • @prashanthshetkar2350
    @prashanthshetkar2350 2 года назад

    excellent tutorials where I can learn and practice data science project. thank you so much...

  • @urvipasad8622
    @urvipasad8622 4 года назад +2

    Very simple and easy to understand.You are really awesome teacher. Thanks a lot for all your tutorials.

    • @anonymousgod2506
      @anonymousgod2506 3 года назад

      Can you please mail the data to me for this project to himanshusingh6551@@t

  • @Gurur_shots
    @Gurur_shots 9 месяцев назад

    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 ❤❤❤

  • @lorenczhuka8017
    @lorenczhuka8017 3 года назад

    Hello Sir, excellent video. I really appreciate your work. Please make more end to end projects like this!

  • @pramodsanghavi9316
    @pramodsanghavi9316 4 года назад

    Thank you sir one more project ... It will help us to get in details knowledge ... Keep it up

  • @hasibkhan5129
    @hasibkhan5129 Год назад

    You are my favorite instructor.

  • @Jaisimnagaraj
    @Jaisimnagaraj 4 месяца назад

    Awesome explanation. Thank you so much for these projects!

  • @RamKumar-vy3by
    @RamKumar-vy3by 3 года назад

    I undersatnd your situation brother.Your stuff is very great.

  • @nihalverma702
    @nihalverma702 3 года назад

    Very very thankful for your efforts sir. You are helping so many peoples like me for learning new concepts. Please Keep working. Thanks

    • @codebasics
      @codebasics  3 года назад +1

      Thank you, I will Nihal.

  • @vishalm4231
    @vishalm4231 4 года назад +2

    It was a nice practical implementation.

  • @AlonAvramson
    @AlonAvramson 3 года назад +4

    I would be happy to see a video on using a model with REST-API, that could be very useful.

  • @santoshikalaskar7503
    @santoshikalaskar7503 4 года назад +1

    thank u sir for this video series, i also working on Image Processing using Opencv & YOLO, this series is helped me a lot.

  • @naveenkalhan95
    @naveenkalhan95 4 года назад +1

    Thanks for this project... really appreciate your extra weekend time on such things... super

    • @codebasics
      @codebasics  4 года назад +1

      My pleasure Naveen. Always a pleasure to read your comment my friend 😊

  • @its_kumar
    @its_kumar 3 года назад

    Nice Project and explanation. Automated generating cropped images and folders thing was good.

  • @srinivasreddy1709
    @srinivasreddy1709 4 года назад

    Thanks Dhaval for sharing your knowledge

  • @jaganinfo
    @jaganinfo 4 года назад

    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.

    • @codebasics
      @codebasics  4 года назад +1

      Glad to hear that jaganinfo :)

  • @sathvikmalgikar2842
    @sathvikmalgikar2842 Год назад

    sir massive respect!
    thank you, just what i needed.
    i was preparing for a hackathon! this really helps a lot.

  • @amitchimmalgi1449
    @amitchimmalgi1449 2 года назад

    This video gives details of handling images for making useful datasets. Useful learning experience.

  • @DataScience111
    @DataScience111 2 года назад

    fabulous... the way you explain...👌👌

  • @BeaProgrammer
    @BeaProgrammer 4 года назад

    Great video must say

  • @r21061991
    @r21061991 4 года назад

    Extremely useful....Helped me a lot !

  • @manmeetkaur5689
    @manmeetkaur5689 3 месяца назад

    @Dhavel, its an amazing project..please give more such projects

  • @Chinarkashmirmusic
    @Chinarkashmirmusic 4 года назад +1

    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.

  • @beststocks8555
    @beststocks8555 3 года назад

    Great Sir, very helpful.

  • @kollaanantraj3690
    @kollaanantraj3690 3 года назад +1

    Really lovely projects ..Learnt a lot Sirr. Thank you very much . Your explanation is awesome .

  • @jaysoni7812
    @jaysoni7812 4 года назад

    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

    • @codebasics
      @codebasics  4 года назад +1

      Yes Jay. I am planning to add many such projects in future

    • @jaysoni7812
      @jaysoni7812 4 года назад

      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 🙂🙂

  • @adityashinde2878
    @adityashinde2878 4 года назад

    Thanks alot bhai for such helpful content

  • @kavachtales9252
    @kavachtales9252 2 года назад

    Build More projects like these, they are very fun and we learn a lot from it. :D

    • @codebasics
      @codebasics  2 года назад +1

      Yes more projects are coming up

  • @digigoliath
    @digigoliath 3 года назад

    Awesome!! TQVM!

  • @arulsebastian6338
    @arulsebastian6338 4 года назад +8

    "What is this guy doing in serina's folder?". I like the comment :-). Thanks for the video.

    • @codebasics
      @codebasics  4 года назад +4

      Ha ha.. good observation Arul

  • @bhagyashreewagh6214
    @bhagyashreewagh6214 2 года назад

    Thankyou for your efforts sir!

  • @rajsankalp
    @rajsankalp Год назад

    Great Tutorial!

  • @shanmugapriyannsit
    @shanmugapriyannsit 4 года назад

    easy to understand, thanks a lot

  • @irfan2597
    @irfan2597 2 года назад

    These projects are really helpful, would be really so good if you could build more and more projects like these, thank you so much!

    • @niharika5161
      @niharika5161 2 года назад +1

      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 ?

    • @irfan2597
      @irfan2597 2 года назад

      @@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.

    • @niharika5161
      @niharika5161 2 года назад

      @@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?

  • @manojsriramula2355
    @manojsriramula2355 4 года назад

    Thank you so much very interesting.

  • @akhileshtrivedi7120
    @akhileshtrivedi7120 4 года назад

    Thanks for it all!

  • @nidhinsreenivas4549
    @nidhinsreenivas4549 2 месяца назад

    thank you sir its really helping for me

  • @shivanshaghor8443
    @shivanshaghor8443 3 года назад +1

    Hello Sir, Please make more end to end projects like this.

  • @lucasbegue8232
    @lucasbegue8232 3 года назад

    very good tutorial!!

  • @uttaravallivinod3468
    @uttaravallivinod3468 3 года назад

    Super sir. Excellent teaching

  • @binaykumar1616
    @binaykumar1616 3 года назад

    Nicely explained, we are definitely benefited, thanks

  • @shubhamzope6546
    @shubhamzope6546 3 года назад +1

    Very nicee explanation

  • @subhamsekharpradhan297
    @subhamsekharpradhan297 3 года назад

    Please build more out of box projects....it would be very helpful

  • @sourabhpranborah5447
    @sourabhpranborah5447 3 года назад +4

    Sir, Please do a guided project on stock prediction.

  • @shreyasb.s3819
    @shreyasb.s3819 2 года назад

    Very nice tutorial

  • @linley2036
    @linley2036 День назад

    thank u thank u, God bless you

  • @yes_i_am8378
    @yes_i_am8378 4 года назад +1

    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

  • @demon3769
    @demon3769 2 месяца назад

    very helpful

  • @izharkhankhattak
    @izharkhankhattak 3 года назад

    Good job

  • @snehalkumbhalkar7243
    @snehalkumbhalkar7243 4 года назад

    sir plz build project like this .it will really helpful to the student like us who cannot afford paid classes.

  • @bijayamanandhar3890
    @bijayamanandhar3890 Год назад

    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.

  • @willytzui2407
    @willytzui2407 2 года назад

    Very helpful!

  • @sanjuktananda3266
    @sanjuktananda3266 3 года назад

    Thank you Sir, Great

  • @mirfaramarzhussaini3413
    @mirfaramarzhussaini3413 2 года назад

    Cool bro

  • @dr.md.atiqurrahman2748
    @dr.md.atiqurrahman2748 3 года назад +1

    No comment. Just wow.

  • @ayushpratap6311
    @ayushpratap6311 3 года назад

    thankyou sir, quite helpful

  • @Borhandrv
    @Borhandrv 9 месяцев назад

    perfect

  • @Pride_Of_Ultras
    @Pride_Of_Ultras 2 года назад

    More please!!!

  • @jayamishra960
    @jayamishra960 4 года назад +1

    sir many images are being generated in jfif format . opencv is unable to read those files , can you please suggest some solution

  • @user-pp6jj4ol9o
    @user-pp6jj4ol9o 3 года назад

    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?

  • @yashwanthreddysomala6483
    @yashwanthreddysomala6483 3 года назад

    nice work sir

  • @dishantkumbhar8822
    @dishantkumbhar8822 3 года назад +1

    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

  • @rachitgupta2558
    @rachitgupta2558 3 года назад

    This project is great!
    Please build some projects in data science domain
    Thank You!

  • @jaganinfo
    @jaganinfo 4 года назад +1

    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

  • @nishantthakur144
    @nishantthakur144 2 года назад +20

    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

  • @sudikshapatil7022
    @sudikshapatil7022 2 года назад

    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.

  • @basotra97
    @basotra97 4 года назад

    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!!!

    • @codebasics
      @codebasics  4 года назад

      Great to hear Vishwas :)

  • @kmnm9463
    @kmnm9463 4 года назад

    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

  • @SajanKumar-ec2us
    @SajanKumar-ec2us 10 месяцев назад

    Please provide video code and data in video description and also discussed how install new require package like season required version

  • @koushikprofessional4186
    @koushikprofessional4186 3 года назад

    Can you make a tutorial series to train a model which can recognize hand written digits other than the scikit learn dataset.Please sir !

  • @ommi5234
    @ommi5234 6 месяцев назад

    my data cleaned succesfully ❤❤

    • @StMarkAdebayo
      @StMarkAdebayo Месяц назад

      hello, ommi
      I'm stuck on downloading the haarcades .xml files. Please share how you were able to do yours

  • @ssaikiran6456
    @ssaikiran6456 Год назад

    How do you accessed model folder from jupyter notebook??

  • @trantoan6985
    @trantoan6985 3 года назад

    better than my university

  • @AnuragSingh-iy7fz
    @AnuragSingh-iy7fz 3 года назад

    Can someone please explain what is the shortcoming that sir is talking about at 32:00?
    I did not understood it.

  • @datascienceandmachinelearn2537
    @datascienceandmachinelearn2537 3 года назад

    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

  • @ayeshaiqbal-br4ff
    @ayeshaiqbal-br4ff Год назад

    kindly i have a question how to change datatype of iris dataset PetalWidthCm column to numeric.

  • @preetiadhikari6979
    @preetiadhikari6979 11 месяцев назад

    i am bit confuse that i got error while create cropped image in cropped folder . At end i got output as fuction not define .

  • @vincelolx
    @vincelolx 4 года назад

    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.

  • @siddharthmall
    @siddharthmall Год назад

    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!

  • @jaganinfo
    @jaganinfo 4 года назад +4

    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.

    • @abdultaufiq2237
      @abdultaufiq2237 4 года назад

      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 !

  • @fahadabbas4801
    @fahadabbas4801 7 месяцев назад

    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?

  • @pranavmittal2976
    @pranavmittal2976 8 месяцев назад

    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

  • @muskangupta9104
    @muskangupta9104 10 месяцев назад

    I am not able to import the modules u told in the start. plz help me with that.

  • @Anoopkumar_17
    @Anoopkumar_17 9 месяцев назад

    Sir I have some doubts in creating a cropped folder using code.

  • @sneha967
    @sneha967 Месяц назад

    can we use images of multiple player like do we need multiple images of single player only