Places365 - xyfJASON/image-datasets GitHub Wiki

Links

Official website | Papers with Code | Download

Brief introduction

Copied from paperswithcode.

The Places365 dataset is a scene recognition dataset. It is composed of 10 million images comprising 434 scene classes. There are two versions of the dataset: Places365-Standard with 1.8 million train and 36000 validation images from K=365 scene classes, and Places365-Challenge-2016, in which the size of the training set is increased up to 6.2 million extra images, including 69 new scene classes (leading to a total of 8 million train images from 434 scene classes).

Statistics

Places365-Standard

Numbers: 2,168,460

Splits: 1,803,460 / 36,500 / 328,500 (train / valid / test)

Resolution:

  • High-resolution: resized to have a minimum dimension of 512 while preserving the aspect ratio of the image. Original images that had a dimension smaller than 512 have been left unchanged.
  • Small: resized to 256 * 256 regardless of the original aspect ratio.

Annotations: 365 scene categories

Places365-Challenge-2016

Notes (copied from official website): Compared to the train set of Places365-Standard, the train set of Places365-Challenge has 6.2 million extra images, leading to totally 8 million train images for the Places365 challenge 2016. The validation set and testing set are the same as the Places365-Standard.

Numbers: 8,391,628

Splits: 8,026,628 / 36,500 / 328,500 (train / valid / test)

Resolution: The same as Places365-Standard.

Annotations: 365 scene categories

Files

Content Filename Size MD5
High-res Train Standard train_large_places365standard.tar 105GB 67e186b496a84c929568076ed01a8aa1
Challenge train_large_places365challenge.tar 476GB 605f18e68e510c82b958664ea134545f
Validation val_large.tar 2.1GB 9b71c4993ad89d2d8bcbdc4aef38042f
Test test_large.tar 19GB 41a4b6b724b1d2cd862fb3871ed59913
Small Train Standard train_256_places365standard.tar 24GB 53ca1c756c3d1e7809517cc47c5561c5
Challenge train_256_places365challenge.tar 108GB 741915038a5e3471ec7332404dfb64ef
Validation val_256.tar 501MB e27b17d8d44f4af9a78502beb927f808
Test test_256.tar 4.4GB f532f6ad7b582262a2ec8009075e186b

Usage

File structure

Please organize the downloaded dataset in the following file structure:

root
├── categories_places365.txt
├── places365_train_standard.txt
├── places365_train_challenge.txt
├── places365_val.txt
├── places365_test.txt
├── data_256_standard                  (extracted from train_256_places365standard.tar)
│   ├── a
│   ├── ...
│   └── z
├── data_large_standard                (extracted from train_large_places365standard.tar)
│   ├── a
│   ├── ...
│   └── z
├── val_256                            (extracted from val_256.tar)
│   ├── Places365_val_00000001.jpg
│   ├── ...
│   └── Places365_val_00036500.jpg
├── val_large                          (extracted from val_large.tar)
│   ├── Places365_val_00000001.jpg
│   ├── ...
│   └── Places365_val_00036500.jpg
├── test_256                           (extracted from test_256.tar)
│   ├── Places365_test_00000001.jpg
│   ├── ...
│   └── Places365_test_00328500.jpg
└── test_large                         (extracted from test_large.tar)
    ├── Places365_test_00000001.jpg
    ├── ...
    └── Places365_test_00328500.jpg

API Reference

Places365(root: str, split: str = 'train', small: bool = False, is_challenge: bool = False, transforms: Optional[Callable] = None)
  • root: Root directory of dataset.
  • split: One of {'train', 'valid', 'test'}.
  • small: if True, use 256x256 version; otherwise, use high-resolution version. Default to False.
  • is_challenge: if True, use Places365-Challenge-2016 training split; otherwise, use Places365-Standard. Default to False.
  • transforms: A function/transform that takes in an PIL image and returns a transformed version.

Example

from image_datasets import Places365

root = '~/data/Places365/'  # path to downloaded dataset
train_set = Places365(root=root, split='train', small=True)
valid_set = Places365(root=root, split='valid', small=True)
test_set = Places365(root=root, split='test', small=True)
print(len(train_set))  # 1803460
print(len(valid_set))  # 36500
print(len(test_set))   # 328500
print(train_set[0])    # (<PIL.Image.Image image mode=RGB size=256x256 at 0x7FD8EE031C10>, 0)
print(valid_set[100])  # (<PIL.Image.Image image mode=RGB size=256x256 at 0x7FCDF70A2E50>, 296)
print(test_set[1000])  # (<PIL.Image.Image image mode=RGB size=256x256 at 0x7FCDF70A2E50>, None)
⚠️ **GitHub.com Fallback** ⚠️