Data Science & Machine Learning Project - Part 2 Data Collection | Image Classification
Key Takeaways
Data collection for image classification using Google Images, web scraping with Python, Chrome extension, and purchasing images from news websites or third-party vendors.
Full Transcript
in this video we are going to talk about data collection aspect of our project now as you know that when you are doing supervised learning you need a lot of data truth data is basically you have an image which you can call it as X or an independent variable and then you have a label a class label which will tell you whether these images of miracoli Maria Sharapova so that label is called Y or a target variable you need lot of these images to train our classifier now how can you collect all these images there are four different ways of collecting this number one is very obvious you go to Google Images start downloading these images one by one now this approach is very manual and labor intensive for our project it works we need probably fifty or more images so it's not that bad but if you are training a huge algorithm with so much data then manually downloading these images might be very tough so the second approach is you can use Python and automatic test software along with chrome driver I found this nice article on towards data science which talks about how you can scrap images from Google and how you can download them in automated way now I'm going to provide a link of the code I don't want to discuss this code in detail for one specific reason the reason is that the code is working today I'm not sure if it's going to work after one week and this is because Google is improving their algorithms and they are trying the best so that people do not scrap their website web scraping in general is a very gray area in terms of legal implication google images are a public information so on one hand you would think that why can't I scrape it but if you are Google then you don't want people to be writing this automated boards which can scrap the content Google in fact had this issue when Binga came out being started escaping a lot of Google articles to improve their own search performance and Google of course did not like it any website would not like the fact that you are a web scraping their content and they will try their best to stop you from writing this web crawler so you have to be very very mindful when you are using any automated way of scrapping Internet just keep in mind that your core might just stop working one fine day and you have to continuously improve or continuously change that now in this video clip you already noticed that when we are running this program or to scrap Google it is opening a chrome or window on its own and it is trying to download the images one by one and at the top you notice this that chrome is controlled by automated testing software now if you know about selenium selenium is an automated testing software which will simulate manual actions so it is like a computer going and clicking different things and right-clicking and downloading it so it is that paradigm there is RPO also which is called robotic process automation which can be used for automating this kind of manual tasks third way which I kind of suggest is probably a better way is to use Chrome extension called fat cool so the fat kun is something you can add it to your Chrome easily and after that you can open a tab of Google Images and you can just say download and it will download all the images you can also filter based on width and height I want to say thank you to my dear friend Kenji who is a head of data scientist he also runs a YouTube channel for data science so I will provide a link of his YouTube channel you can go check it out he's doing some awesome work so thank you can for suggesting me this fat control also I want to thank you my dear friend a big duty Paul who is a data scientist at Amazon he has helped me throughout the project the fourth way of collecting images is to buy these images if you are working for a big company they will have a budget and using that money they can even buy the images from some news website you know let's say you are a CNN or NDT you are Times of India these are news portals the companies will have a lot of images okay and there could be another third-party vendors who might be selling those images so the fourth option which is by paying a price you can buy these images now if you are less the Times of India or CNN yourself then your company will have a team engineering team who will have access to these images so you can contact that team and you can get those images from the team and it store it in your data warehouse for your convenience I have a given link below where you can just download all these images so if you don't want to bother about all this you can I have this relevant data set that you can use but if you want to play with this Google image capping code then I have a link github link in the video description below also try this fat cone tool in the next video we are going to talk about data cleaning and feature engineering
Original Description
There are 4 different ways of collecting data for our project,
(1) Manually download images from google images
(2) Use python and web scrapping to automate downloading images from google. Here is the article on how you can do that: https://towardsdatascience.com/image-scraping-with-python-a96feda8af2d
(3) Use a chrome extention called fatkun. You can download that from here: https://chrome.google.com/webstore/detail/fatkun-batch-download-ima/nnjjahlikiabnchcpehcpkdeckfgnohf?hl=en
(4) Buy these images from third party vendor who is selling images database. Sometimes if a company is in sports or news domain they might have internal database of these images. You can work with engineering team that owns that database and get an access of those images
00:00 Overview
00:38 Manually download images from google
01:03 Use python and web scrapping
03:29 Use a chrome extension called fatkun
04:20 Buy data from third party vendor for a price
Do you want to learn technology from me? Check https://codebasics.io/ for my affordable video courses.
You need to download chrome extension based on your chrome version: https://chromedriver.chromium.org/downloads
Put chromedriver.exe in same folder as image_download.py
Github link for google image scrapping code: https://github.com/codebasics/py/blob/master/DataScience/CelebrityFaceRecognition/google_image_scrapping/image_download.py
Link for dataset if you want to download directly: https://github.com/codebasics/py/tree/master/DataScience/CelebrityFaceRecognition/images_dataset
Special thanks to,
Ken Jee (https://www.youtube.com/channel/UCiT9RITQ9PW6BhXK0y2jaeg) : For suggesting fatkun
Debjyoti Paul (Amazon Data Scientist): For help with entire project
Website: https://codebasics.io/
Facebook: https://www.facebook.com/codebasicshub
Twitter: https://twitter.com/codebasicshub
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from codebasics · codebasics · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Python Tutorial - 1. Install python on windows
codebasics
Python Tutorial - 2. Variables
codebasics
Python Tutorial - 3. Numbers
codebasics
Python Tutorial - 4. Strings
codebasics
Python Tutorial - 5. Lists
codebasics
Python Tutorial - 6. Install PyCharm on Windows
codebasics
PyCharm Tutorial - 7. Debug python code using PyCharm
codebasics
Python Tutorial - 8. If Statement
codebasics
Python Tutorial - 9. For loop
codebasics
Python Tutorial - 10. Functions
codebasics
Python Tutorial - 11. Dictionaries and Tuples
codebasics
Python Tutorial - 12. Modules
codebasics
Python Tutorial - 13. Reading/Writing Files
codebasics
How to install Julia on Windows
codebasics
Python Tutorial - 14. Working With JSON
codebasics
Julia Tutorial - 1. Variables
codebasics
Julia Tutorial - 2. Numbers
codebasics
Python Tutorial - 15. if __name__ == "__main__"
codebasics
Julia Tutorial - Why Should I Learn Julia Programming Language
codebasics
Python Tutorial - 16. Exception Handling
codebasics
Julia Tutorial - 3. Complex and Rational Numbers
codebasics
Julia Tutorial - 4. Strings
codebasics
Python Tutorial - 17. Class and Objects
codebasics
Julia Tutorial - 5. Functions
codebasics
Julia Tutorial - 6. If Statement and Ternary Operator
codebasics
Julia Tutorial - 7. For While Loop
codebasics
Python Tutorial - 18. Inheritance
codebasics
Julia Tutorial - 8. begin and (;) Compound Expressions
codebasics
Python Tutorial - 12.1 - Install Python Module (using pip)
codebasics
Julia Tutorial - 9. Tasks (a.k.a. Generators or Coroutines)
codebasics
Julia Tutorial - 10. Exception Handling
codebasics
Python Tutorial - 19. Multiple Inheritance
codebasics
Python Tutorial - 20. Raise Exception And Finally
codebasics
Python Tutorial - 21. Iterators
codebasics
Python Tutorial - 22. Generators
codebasics
Python Tutorial - 23. List Set Dict Comprehensions
codebasics
Python Tutorial - 24. Sets and Frozen Sets
codebasics
Python Tutorial - 25. Command line argument processing using argparse
codebasics
Debugging Tips - What is bug and debugging?
codebasics
Debugging Tips - Conditional Breakpoint
codebasics
Debugging Tips - Watches and Call Stack
codebasics
Python Tutorial - 26. Multithreading - Introduction
codebasics
Git Tutorial 3: How To Install Git
codebasics
Git Tutorial 1: What is git / What is version control system?
codebasics
Git Tutorial 2 : What is Github? | github tutorial
codebasics
Git Tutorial 4: Basic Commands: add, commit, push
codebasics
Git Tutorial 5: Undoing/Reverting/Resetting code changes
codebasics
Git Tutorial 6: Branches (Create, Merge, Delete a branch)
codebasics
Git Github Tutorial 10: What is Pull Request?
codebasics
Git Tutorial 7: What is HEAD?
codebasics
Git Tutorial 9: Diff and Merge using meld
codebasics
Difference between Multiprocessing and Multithreading
codebasics
Python Tutorial - 27. Multiprocessing Introduction
codebasics
Python Tutorial - 28. Sharing Data Between Processes Using Array and Value
codebasics
Git Tutorial 8 - .gitignore file
codebasics
Python Tutorial - 29. Sharing Data Between Processes Using Multiprocessing Queue
codebasics
Python Tutorial - 30. Multiprocessing Lock
codebasics
Python Tutorial - 31. Multiprocessing Pool (Map Reduce)
codebasics
What is code?
codebasics
Python unit testing - pytest introduction
codebasics
More on: ML Pipelines
View skill →Related Reads
📰
📰
📰
📰
Musk thanks Micron for chips, and builds a $55bn fab to replace it
The Next Web AI
Jensen Huang calls the AI jobs panic ‘complete nonsense’, and takes aim at his peers
The Next Web AI
IMF says Africa has to keep lights on before it can bet on AI
TechCabal
What Does Job Security Even Look Like In 2026? It Starts With Skills
Forbes Innovation
Chapters (5)
Overview
0:38
Manually download images from google
1:03
Use python and web scrapping
3:29
Use a chrome extension called fatkun
4:20
Buy data from third party vendor for a price
🎓
Tutor Explanation
DeepCamp AI