Teaching a machine to learn with an increased accuracy we need lots of stuff but in this overview I want to have the ability to seamlessly gather information to input information that the machine can learn from. For these purposes, I am creating an image classifier, that means we are inputting images for the machine to learn and identify. I can search and download images one by one but this becomes dreadful task to do for 100s even 1000s of images.
Can we automate this?
Yes, yes we can.
Let me introduce the Image Scraper, this is a tool created by Anantha Natarajan S for the purposes of downloading all the images on a specific web page. Image Scraper is a great tool to help speed the process of gathering images but does have limitations. For one as I have been getting familiar with the tool, I found that it will not extract the image if the picture itself is not embedded in the page as a .image-format e.g. .jpeg, .gif, etc...... This can be difficult when you find a website with the perfect images all on one page buy each image is a link to another web page. Maybe in the future I can build on the program to follow all links on the page to extract all images within the links, for another time though.
First, let’s go over the requirements.
Install Visual Studio 2017
(Recommended but not needed Anaconda Navigator for python 3.7 distribution)
Python 3 - Not needed if you have Anaconda
Once you install Visual Studio open your command prompt and type:
$ pip install ImageScraper
This will install the package for you directly without having to do anything.
Common commands and all the information needed to use Image Scraper can be found HERE
The most used line that you will end up using or starting off with is:
$ image-scraper -s [file path location] [www.website.com/tesetimages] --formats jpeg
-s [file path location] - is where you want to save your file on your computer
[www.website.com/tesetimages] - place the website link you want to extract the images from
- -formats - is what type of file you want to save .jpeg, .gif, etc.....
It’s as simple as that.
Possibilities are endless, now go test it out while watching the videos below
Below is a quick video showing the process from install to execution of image-scraper
Below is the unedited video that I recorded while I was working on downloading images
If you have any questions, email me at email@example.com and I would be glad to troubleshoot any issues you may have.