Completed
Push — master ( 3e1d4c...f31f72 )
by Bart
27s
created

ILSVRC2010   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 35
Duplicated Lines 0 %
Metric Value
dl 0
loc 35
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __init__() 0 5 1
1
# -*- coding: utf-8 -*-
2
from fuel.datasets import H5PYDataset
3
from fuel.transformers.defaults import rgb_images_from_encoded_bytes
4
from fuel.utils import find_in_data_path
5
6
7
class ILSVRC2010(H5PYDataset):
8
    u"""The ILSVRC2010 Dataset.
9
10
    The ImageNet Large-Scale Visual Recognition Challenge [ILSVRC]
11
    is an annual computer vision competition testing object classification
12
    and detection at large-scale. This is a wrapper around the data for
13
    the 2010 competition, which is (as of 2015) the only year for which
14
    test data groundtruth is available.
15
16
    Note that the download site for the images is not publicly
17
    accessible. To download the images, you may sign up for an account
18
    at [SIGNUP].
19
20
    .. [ILSVRC] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause,
21
       Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya
22
       Khosla, Michael Bernstein, Alexander C. Berg and Li Fei-Fei.
23
       *ImageNet Large Scale Visual Recognition Challenge*. IJCV, 2015.
24
25
    .. [SIGNUP] http://www.image-net.org/signup
26
27
    Parameters
28
    ----------
29
    which_sets : tuple of str
30
        Which split to load. Valid values are 'train' (1.2M examples)
31
        'valid' (150,000 examples), and 'test' (50,000 examples).
32
33
    """
34
    filename = 'ilsvrc2010.hdf5'
35
    default_transformers = rgb_images_from_encoded_bytes(('encoded_images',))
36
37
    def __init__(self, which_sets, **kwargs):
38
        kwargs.setdefault('load_in_memory', False)
39
        super(ILSVRC2010, self).__init__(
40
            file_or_path=find_in_data_path(self.filename),
41
            which_sets=which_sets, **kwargs)
42