The original tutorial link is here: https://pyimagesearch.com/2017/12/04/how-to-create-a-deep-learning-dataset-using-google-images/
This method is suitable for downloading images from Google Images to be used in deep learning datasets, such as for YOLO or Transfer Learning.
- Clone this repo with 'https://github.com/Wayan123/scraping-google-images.git'.
- Install requirements with 'pip install -r requirements.txt'.
- Open Google Images, then search for the images you want to download, for example, apples, and then scroll down until all the images cannot be displayed anymore.
- On the same page where we searched for the images, find Developer Tools or you can also use CTRL+SHIFT+I.
- Click on the console and then paste the code from js_code.js, then press enter and wait a moment until urls.txt is downloaded with the image URLs.
- Once urls.txt is downloaded, move it to the directory/folder of the git clone result, and also create a new directory to store the images that will be downloaded later.
- Run the Python code to start downloading images by typing "python image-downloader2.py -u urls.txt -o directory-name".
- Wait until the download process is complete, and you can view the contents of the image directory where the images will be downloaded one by one.
Happy Deep Learning!