1

For a MachineLearning project I need to form a training set using images taken from the web page containing lots of them. Like, for example this one. It would be very convenient, if all the images from this site could be downloaded and transformed into a list of images, such that I could later simply delete those I do not like. Then it is easy to transform it into a training set.

Any ideas of how to download/form a list of images?

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
Alexei Boulbitch
  • 39,397
  • 2
  • 47
  • 96

1 Answers1

6

I wrote this in the comment, but the code did not come out properly formatted. So here it is again:

Import["https://en.wikipedia.org/wiki/Mathematica", "Images"]

Import Images as a list

Lotus
  • 2,671
  • 11
  • 10
  • This works to an extent with a Google image search, like in OP's query. Import["http://images.google.com/search?tbm=isch&q=baby+elephant", "Images"] returns a list of the first 20 images, in thumbnail size. – Jason B. Nov 19 '15 at 11:59
  • @Lotus Thank you, it works, though not as I expect. Namely, it, indeed, imports the images, but only a small part of them. Have you ideas of how to import them all? – Alexei Boulbitch Nov 19 '15 at 12:42
  • @AlexeiBoulbitch The 20 images you get are the ones from page 1. – Karsten7 Nov 19 '15 at 13:12
  • @ Karsten 7 How can I get the images from other pages then? You see, to train the machine I need lots of images. Impossible to pick them up by hand. – Alexei Boulbitch Nov 19 '15 at 13:16
  • I'd presume google detects the request is not from a browser and serves up a limited number. I realize its not elegant, but you can go to google images in a browser and save page as to get all the images (~400) dumped to a folder, then import the files. Of course they are thumbnails. You'd need to navigate each link to get the full size images. – george2079 Nov 19 '15 at 17:38