Skip to main content

Tool to download large dataset from a list of url

Project description

Dataset Downloader

Preview

Dataset_downloader allow you to download large dataset from multiple list of url, from image-net for example. You can split the download into 2 folders, one for the training and one for the testing. File are save into their class name, perfect for model training. It looks something like that:

root:.
|
├───test
│   ├───accerola
│   ├───apple
│   └───lemon
├───train
│   ├───accerola
│   ├───apple
│   └───lemon

Installation

Simply install from pip:

pip install dataset_downloader

Config

Create a dataset.json file with the following content:

{
  "outputTrain": "...",
  "outputTest": "...",
  "ratio": ...,
  "classes": {
    "class1": [
      "http://url1",
      "http://url2"
    ],
    "class2": [
      "http://url1",
      "http://url2"
    ],
    "class3": "list_images.txt"
  }
}
  • outputTrain: Output folder of the training images
  • outputTest: Output folder of the testing images
  • ratio: The ratio of training/testing images. 0.8 correspond of 80% of training images.
  • classes: List of classes with their urls. Urls can be a list of url, a file containing a list of urls or an url containing a list of urls

An exemple of file on a windows computer:

  "outputTrain": "D:/dataset/train",
  "outputTest": "D:/dataset/test",
  "ratio": 0.8,
  "classes": {
    "accerola": [
      "http://tiachea.files.wordpress.com/2008/10/acerolas.jpg",
      "http://www.jardimdeflores.com.br/floresefolhas/JPEGS/A56acerola5.JPG",
      "http://farm2.staticflickr.com/1353/4602150961_177e096984_z.jpg",
    ],
    "apple": [
      "http://www.naturalhealth365.com/images/apple.jpg",
      "http://urbanext.illinois.edu/fruit/images/apple1.jpg",
      "https://www.aroma-zone.com/cms//sites/default/files/plante-acerola.jpg"
    ],
    "lemon": "list_images.txt",
    "watermelon": "https://gist.githubusercontent.com/johnrazeur/645787bc08a5aedd82da9573fbfa169a/raw/49cea1ee1438cecef8ac213b20f24e5ae02d4d78/watermelon.txt"
  }

Run

Simple call the dataset_downloader command:

cd yourdirectory
# You must create the dataset.json file before
dataset_downloader

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dataset_downloader-1.0.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dataset_downloader-1.0.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file dataset_downloader-1.0.0.tar.gz.

File metadata

  • Download URL: dataset_downloader-1.0.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

File hashes

Hashes for dataset_downloader-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f45ad3dafb0e1bfa5cd1346b6972941137d51dff166d2246edf9926341027157
MD5 fc9c46498b8da95298dc5611edc449aa
BLAKE2b-256 e6039379a450c9978b94231640715b4845a8c59c5afa2c27156949c4d55bf853

See more details on using hashes here.

File details

Details for the file dataset_downloader-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: dataset_downloader-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

File hashes

Hashes for dataset_downloader-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 86f624443d9ac7deb0d908176549adf68ee7f1e757042e76ff7f124859f587da
MD5 555dcb85b6d9cbd0fe2587b296fac6af
BLAKE2b-256 1747d923bf433df1831f928c58062215d00f3d8857f2ebbaa1dd0055aa137d94

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page