An open API service indexing awesome lists of open source software.

https://github.com/dmitryryumin/oidv6

Download single or multiple classes from the Open Images V6 dataset (OIDv6)
https://github.com/dmitryryumin/oidv6

oidv6 open-images-dataset

Last synced: about 1 year ago
JSON representation

Download single or multiple classes from the Open Images V6 dataset (OIDv6)

Awesome Lists containing this project

README

          

# Download single or multiple classes from the OIDv6

![PyPI](https://img.shields.io/pypi/v/oidv6)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/oidv6)
![PyPI - Implementation](https://img.shields.io/pypi/implementation/oidv6)
![GitHub repo size](https://img.shields.io/github/repo-size/dmitryryumin/oidv6)
[![Downloads](https://pepy.tech/badge/oidv6)](https://pepy.tech/project/oidv6)
![PyPI - Status](https://img.shields.io/pypi/status/oidv6)
![PyPI - License](https://img.shields.io/pypi/l/oidv6)

| [Release history](https://github.com/DmitryRyumin/OIDv6/blob/master/NOTES.md) | [Documentation in Russian](https://github.com/DmitryRyumin/OIDv6/blob/master/README_RU.md) |
| --- | --- |

## Installation

```shell script
pip install oidv6
```

## Update

```shell script
pip install --upgrade oidv6
```

## Required packages

| Packages | Min version | Current version |
| -------- | ----------- | --------------- |
`requests` | `2.23.0` | ![PyPI](https://img.shields.io/pypi/v/requests) |
`numpy` | `1.18.4` | ![PyPI](https://img.shields.io/pypi/v/numpy) |
`pandas` | `1.0.4` | ![PyPI](https://img.shields.io/pypi/v/pandas) |
`progressbar2` | `3.51.3` | ![PyPI](https://img.shields.io/pypi/v/progressbar2) |
`opencv-contrib-python` | `4.2.0.34` | ![PyPI](https://img.shields.io/pypi/v/opencv-contrib-python) |
`awscli` | `1.18.69` | ![PyPI](https://img.shields.io/pypi/v/awscli) |

## Useful resources

- [Official site Open Images Dataset V6](https://storage.googleapis.com/openimages/web/index.html)
- [List of all classes that can be downloaded](https://github.com/DmitryRyumin/OIDv6/blob/master/oidv6/classes.txt)

## [Class for multiple download of the OIDv6](https://github.com/DmitryRyumin/OIDv6/blob/master/oidv6/OIDv6.py)

### Command line arguments

| Argument                | Type | Description | Valid Values |
| -------------------------- | --- | -------- | ------------------- |
| command | str | Boot command | `downloader` |
| command | str | Language
`Default value: en` | `en`
`ru` |
| --dataset | str | The root directory for saving OIDv6
`Default value: OIDv6` | - |
| --type_data | str | Dataset
`Default value: train` | `train`
`validation`
`test`
`all` |
| --classes | str | Sequence of class names or text file | - |
| --limit | int | Images Upload Limit
`Default value: 0 (no limit)` | From `0` to `∞` |
| --multi_classes | bool | Downloading classes in one directory | No value |
| --yes | bool | Automatic download metadata | No value |
| --no_labels | bool | No labeling | No value |
| --hide_metadata | bool | Вывод метаданных | No value |
| --no_clear_shell | bool | Do not clean the console before running | No value |

Examples

---

> **Note!** Classes that are composed of several words should be surrounded by quotation marks (if they are passed directly to the command line). For example: `"Organ (Musical Instrument)"`

---

1. Downloading classes (`apple`, `banana`, `Kitchen & dining room table`) from the `train`, `validation` and `test` sets with labels in semi-automatic mode and image limit = `4` (Language: `Russian`)

> CMD
>
> ```shell script
> oidv6 downloader ru --dataset path_to_directory --type_data all --classes apple banana "Kitchen & dining room table" --limit 4
> ```

2. Downloading training classes (`cat`, `dog`) from the `train` set with tags in automatic mode and image limit = `10` (Language: `English`)

> CMD
>
> ```shell script
> oidv6 downloader en --dataset path_to_directory --type_data train --classes Cat dOg --limit 10 --yes
> ```

3. Downloading validation classes (see text file) from the `validation` set with labels in automatic mode and image limit = `10` (Language: `English`)

> Text file
>
> ```text
> person
> Organ (Musical Instrument)
> ```

> CMD
>
> ```shell script
> oidv6 downloader --dataset path_to_directory --type_data validation --classes text_file_path --limit 10 --yes
> ```

4. Downloading classes (`axe`, `calculator`) in one directory from the `train`, `validation` and `test` sets with labels in automatic mode and image limit = `12` (Language: `English`)

> CMD
>
> ```shell script
> oidv6 downloader --dataset path_to_directory --type_data all --classes axe calculator --limit 12 --multi_classes --yes
> ```