Giter Site home page Giter Site logo

ggd's Introduction

Google Image Downloader

pypi ci

Usefull package for collecting image label in machine learning usecases.

Setup

This package is available on pypi repository

pip install ggd

Is required have installed the browser, using a webdriver (Geckodriver or Chromedriver) and have the executable in the path.

The following command can be used in linux64 platform

wget https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz && tar -zxvf geckodriver-v0.30.0-linux64.tar.gz && rm geckodriver-v0.30.0-linux64.tar.gz && mv geckodriver /usr/local/bin/

Simple Usage

from ggd import GoogleImage

gg = GoogleImage()
gg.download(request='Alakazam', n_images=200)
  • All images are downloaded in a new folder.

  • all_files attribute contains all images pathes downloaded.

print(gg.all_files)
>>> ['Alakazam/Alakazam_000.png',
    'Alakazam/Alakazam_001.png',
    'Alakazam/Alakazam_002.png',
    'Alakazam/Alakazam_003.png',
    'Alakazam/Alakazam_004.png',
    ...]

Advanced Usage

For using this package with more requests labeled and see scraping working in backend.

from ggd import GoogleImage

google_dl = GoogleImage(driver=driver,
                        verbose=True,
                        close_after_download=False,
                        headless=False)

n = 500
for rq, name_im in [("bulbasaur --cards", 'Bulbizarre'),
                    ('ivysaur --cards', 'Herbizarre')]:
    google_dl.download(request=rq,
                       n_images=n,
                       directory='Data',
                       name=name_im)
google_dl.close()

For multiplying number and variety of images, use Google filtering* in requests , synonyms, other languages...

*article in french

ggd's People

Contributors

titigmr avatar

Watchers

 avatar

Forkers

fabricejourdan

ggd's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.