From bde8e36406babd375f2b80aa48e5242118b2dc0f Mon Sep 17 00:00:00 2001 From: Yusuke Niitani Date: Wed, 4 Jul 2018 20:18:53 +0900 Subject: [PATCH 01/15] add ImageNet detection dataset --- chainercv/datasets/__init__.py | 3 + chainercv/datasets/imagenet/__init__.py | 0 .../imagenet/imagenet_det_bbox_dataset.py | 139 ++++++ chainercv/datasets/imagenet/imagenet_utils.py | 405 ++++++++++++++++++ chainercv/datasets/voc/voc_bbox_dataset.py | 31 +- chainercv/datasets/voc/voc_utils.py | 37 ++ docs/source/reference/datasets.rst | 8 + .../test_imagenet_det_bbox_dataset.py | 56 +++ 8 files changed, 655 insertions(+), 24 deletions(-) create mode 100644 chainercv/datasets/imagenet/__init__.py create mode 100644 chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py create mode 100644 chainercv/datasets/imagenet/imagenet_utils.py create mode 100644 tests/datasets_tests/imagenet_tests/test_imagenet_det_bbox_dataset.py diff --git a/chainercv/datasets/__init__.py b/chainercv/datasets/__init__.py index 5cb1aa0734..5786365aee 100644 --- a/chainercv/datasets/__init__.py +++ b/chainercv/datasets/__init__.py @@ -17,6 +17,9 @@ from chainercv.datasets.cub.cub_utils import cub_label_names # NOQA from chainercv.datasets.directory_parsing_label_dataset import directory_parsing_label_names # NOQA from chainercv.datasets.directory_parsing_label_dataset import DirectoryParsingLabelDataset # NOQA +from chainercv.datasets.imagenet.imagenet_utils import imagenet_det_bbox_label_names # NOQA +from chainercv.datasets.imagenet.imagenet_utils import imagenet_det_synset_ids # NOQA +from chainercv.datasets.imagenet.imagenet_det_bbox_dataset import ImagenetDetBboxDataset # NOQA from chainercv.datasets.mixup_soft_label_dataset import MixUpSoftLabelDataset # NOQA from chainercv.datasets.online_products.online_products_dataset import online_products_super_label_names # NOQA from chainercv.datasets.online_products.online_products_dataset import OnlineProductsDataset # NOQA diff --git a/chainercv/datasets/imagenet/__init__.py b/chainercv/datasets/imagenet/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py b/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py new file mode 100644 index 0000000000..5ea0ab78a9 --- /dev/null +++ b/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py @@ -0,0 +1,139 @@ +import numpy as np +import os + +from chainer.dataset import download + +from chainercv.chainer_experimental.datasets.sliceable import GetterDataset +from chainercv.datasets.voc.voc_utils import parse_voc_bbox_annotation +from chainercv.datasets.imagenet.imagenet_utils import imagenet_det_synset_ids +from chainercv.utils import read_image + + +class ImagenetDetBboxDataset(GetterDataset): + + """ILSVRC2014 ImageNet detection dataset + + The data is distributed on the `official Kaggle page`_. + + .. _`official Kaggle page`: https://www.kaggle.com/c/ + imagenet-object-detection-challenge + + Please refer to the readme of ILSVRC2014 dev kit for a comprehensive + documentation. Note that detection part of ILSVRC has not changed from + 2014. Overview of annotation process is described in the `paper`_. + + .. _`paper`: http://ai.stanford.edu/~olga/papers/chi2014-MultiLabel.pdf + + Every image in the training set has one or more image-level labels. + The image-level labels determine the partial presence, full presence or + absence of one or more object categories. + Bounding boxes are provided around instances of the present + categories. + + Args: + data_dir (string): Path to the root of the training data. If this is + :obj:`auto`, this class will automatically download data for you + under :obj:`$CHAINER_DATASET_ROOT/pfnet/chainercv/imagenet`. + split ({'train', 'val', 'trainval', 'test'}): Select a split of the + dataset. :obj:`test` split is only available for + 2007 dataset. + return_img_label (bool): If :obj:`True`, this dataset returns + image-wise labels. This consits of two arrays: + :obj:`img_label` and :obj:`img_label_type`. + + This dataset returns the following data. + + .. csv-table:: + :header: name, shape, dtype, format + + :obj:`img`, ":math:`(3, H, W)`", :obj:`float32`, \ + "RGB, :math:`[0, 255]`" + :obj:`bbox`, ":math:`(R, 4)`", :obj:`float32`, \ + ":math:`(y_{min}, x_{min}, y_{max}, x_{max})`" + :obj:`label`, ":math:`(R,)`", :obj:`int32`, \ + ":math:`[0, \#fg\_class - 1]`" + :obj:`img_label` [#imagenet_det_1]_, ":math:`(M,)`", :obj:`int32`, \ + ":math:`[0, \#fg\_class - 1]`" + :obj:`img_label_type` [#imagenet_det_1]_ [#imagenet_det_2]_, \ + ":math:`(M,)`", :obj:`int32`, ":math:`[-1, 1]`" + + .. [#imagenet_det_1] available \ + if :obj:`return_img_label = True`. + .. [#imagenet_det_2] :obj:`-1` means absent. :obj:`1` means present. \ + :obj:`0` means partially present. When a category is partially \ + present, the image contains at least one + instance of X, but not all instances of X may be annotated with + bounding boxes. + + """ + + def __init__(self, data_dir='auto', split='train', return_img_label=False): + super(ImagenetDetBboxDataset, self).__init__() + if data_dir == 'auto': + data_dir = download.get_dataset_directory( + 'pfnet/chainercv/imagenet') + self.base_dir = os.path.join(data_dir, 'ILSVRC') + imageset_dir = os.path.join(self.base_dir, 'ImageSets/DET') + + if split == 'train': + img_labels = {} + for lb in range(0, 200): + with open(os.path.join( + imageset_dir, 'train_{}.txt'.format(lb + 1))) as f: + for l in f: + id_ = l.split()[0] + anno_type = l.split()[1] + if id_ not in img_labels: + img_labels[id_] = [] + img_labels[id_].append((lb, int(anno_type))) + self.img_labels = img_labels + self.ids = list(img_labels.keys()) + else: + if return_img_label: + raise ValueError('split has to be \'train\' when ' + 'return_img_label is True') + ids = [] + with open(os.path.join( + imageset_dir, 'val.txt')) as f: + for l in f: + id_ = l.split()[0] + ids.append(id_) + self.ids = ids + + self.split = split + + self.add_getter('img', self._get_image) + self.add_getter(('bbox', 'label'), self._get_inst_anno) + if return_img_label: + self.add_getter(('img_label', 'img_label_type'), self._get_img_label) + + def __len__(self): + return len(self.ids) + + def _get_image(self, i): + img_path = os.path.join( + self.base_dir, 'Data/DET', self.split, + self.ids[i] + '.JPEG') + img = read_image(img_path, color=True) + return img + + def _get_inst_anno(self, i): + if 'extra' not in self.ids[i]: + anno_path = os.path.join( + self.base_dir, 'Annotations/DET', self.split, + self.ids[i] + '.xml') + bbox, label, _ = parse_voc_bbox_annotation( + anno_path, imagenet_det_synset_ids, + skip_names_not_in_label_names=True) + else: + bbox = np.zeros((0, 4), dtype=np.float32) + label = np.zeros((0,), dtype=np.int32) + return bbox, label + + def _get_img_label(self, i): + img_label = np.array([val[0] for val in self.img_labels[self.ids[i]]], + dtype=np.int32) + img_label_type = np.array( + [val[1] for val in self.img_labels[self.ids[i]]], + dtype=np.int32) + return img_label, img_label_type diff --git a/chainercv/datasets/imagenet/imagenet_utils.py b/chainercv/datasets/imagenet/imagenet_utils.py new file mode 100644 index 0000000000..f39970a373 --- /dev/null +++ b/chainercv/datasets/imagenet/imagenet_utils.py @@ -0,0 +1,405 @@ +# Look up meta_det.mat from dev kit +imagenet_det_bbox_label_names = ( + 'accordion', + 'airplane', + 'ant', + 'antelope', + 'apple', + 'armadillo', + 'artichoke', + 'axe', + 'baby bed', + 'backpack', + 'bagel', + 'balance beam', + 'banana', + 'band aid', + 'banjo', + 'baseball', + 'basketball', + 'bathing cap', + 'beaker', + 'bear', + 'bee', + 'bell pepper', + 'bench', + 'bicycle', + 'binder', + 'bird', + 'bookshelf', + 'bow tie', + 'bow', + 'bowl', + 'brassiere', + 'burrito', + 'bus', + 'butterfly', + 'camel', + 'can opener', + 'car', + 'cart', + 'cattle', + 'cello', + 'centipede', + 'chain saw', + 'chair', + 'chime', + 'cocktail shaker', + 'coffee maker', + 'computer keyboard', + 'computer mouse', + 'corkscrew', + 'cream', + 'croquet ball', + 'crutch', + 'cucumber', + 'cup or mug', + 'diaper', + 'digital clock', + 'dishwasher', + 'dog', + 'domestic cat', + 'dragonfly', + 'drum', + 'dumbbell', + 'electric fan', + 'elephant', + 'face powder', + 'fig', + 'filing cabinet', + 'flower pot', + 'flute', + 'fox', + 'french horn', + 'frog', + 'frying pan', + 'giant panda', + 'goldfish', + 'golf ball', + 'golfcart', + 'guacamole', + 'guitar', + 'hair dryer', + 'hair spray', + 'hamburger', + 'hammer', + 'hamster', + 'harmonica', + 'harp', + 'hat with a wide brim', + 'head cabbage', + 'helmet', + 'hippopotamus', + 'horizontal bar', + 'horse', + 'hotdog', + 'iPod', + 'isopod', + 'jellyfish', + 'koala bear', + 'ladle', + 'ladybug', + 'lamp', + 'laptop', + 'lemon', + 'lion', + 'lipstick', + 'lizard', + 'lobster', + 'maillot', + 'maraca', + 'microphone', + 'microwave', + 'milk can', + 'miniskirt', + 'monkey', + 'motorcycle', + 'mushroom', + 'nail', + 'neck brace', + 'oboe', + 'orange', + 'otter', + 'pencil box', + 'pencil sharpener', + 'perfume', + 'person', + 'piano', + 'pineapple', + 'ping-pong ball', + 'pitcher', + 'pizza', + 'plastic bag', + 'plate rack', + 'pomegranate', + 'popsicle', + 'porcupine', + 'power drill', + 'pretzel', + 'printer', + 'puck', + 'punching bag', + 'purse', + 'rabbit', + 'racket', + 'ray', + 'red panda', + 'refrigerator', + 'remote control', + 'rubber eraser', + 'rugby ball', + 'ruler', + 'salt or pepper shaker', + 'saxophone', + 'scorpion', + 'screwdriver', + 'seal', + 'sheep', + 'ski', + 'skunk', + 'snail', + 'snake', + 'snowmobile', + 'snowplow', + 'soap dispenser', + 'soccer ball', + 'sofa', + 'spatula', + 'squirrel', + 'starfish', + 'stethoscope', + 'stove', + 'strainer', + 'strawberry', + 'stretcher', + 'sunglasses', + 'swimming trunks', + 'swine', + 'syringe', + 'table', + 'tape player', + 'tennis ball', + 'tick', + 'tie', + 'tiger', + 'toaster', + 'traffic light', + 'train', + 'trombone', + 'trumpet', + 'turtle', + 'tv or monitor', + 'unicycle', + 'vacuum', + 'violin', + 'volleyball', + 'waffle iron', + 'washer', + 'water bottle', + 'watercraft', + 'whale', + 'wine bottle', + 'zebra') + + +imagenet_det_synset_ids = ( + 'n02672831', + 'n02691156', + 'n02219486', + 'n02419796', + 'n07739125', + 'n02454379', + 'n07718747', + 'n02764044', + 'n02766320', + 'n02769748', + 'n07693725', + 'n02777292', + 'n07753592', + 'n02786058', + 'n02787622', + 'n02799071', + 'n02802426', + 'n02807133', + 'n02815834', + 'n02131653', + 'n02206856', + 'n07720875', + 'n02828884', + 'n02834778', + 'n02840245', + 'n01503061', + 'n02870880', + 'n02883205', + 'n02879718', + 'n02880940', + 'n02892767', + 'n07880968', + 'n02924116', + 'n02274259', + 'n02437136', + 'n02951585', + 'n02958343', + 'n02970849', + 'n02402425', + 'n02992211', + 'n01784675', + 'n03000684', + 'n03001627', + 'n03017168', + 'n03062245', + 'n03063338', + 'n03085013', + 'n03793489', + 'n03109150', + 'n03128519', + 'n03134739', + 'n03141823', + 'n07718472', + 'n03797390', + 'n03188531', + 'n03196217', + 'n03207941', + 'n02084071', + 'n02121808', + 'n02268443', + 'n03249569', + 'n03255030', + 'n03271574', + 'n02503517', + 'n03314780', + 'n07753113', + 'n03337140', + 'n03991062', + 'n03372029', + 'n02118333', + 'n03394916', + 'n01639765', + 'n03400231', + 'n02510455', + 'n01443537', + 'n03445777', + 'n03445924', + 'n07583066', + 'n03467517', + 'n03483316', + 'n03476991', + 'n07697100', + 'n03481172', + 'n02342885', + 'n03494278', + 'n03495258', + 'n03124170', + 'n07714571', + 'n03513137', + 'n02398521', + 'n03535780', + 'n02374451', + 'n07697537', + 'n03584254', + 'n01990800', + 'n01910747', + 'n01882714', + 'n03633091', + 'n02165456', + 'n03636649', + 'n03642806', + 'n07749582', + 'n02129165', + 'n03676483', + 'n01674464', + 'n01982650', + 'n03710721', + 'n03720891', + 'n03759954', + 'n03761084', + 'n03764736', + 'n03770439', + 'n02484322', + 'n03790512', + 'n07734744', + 'n03804744', + 'n03814639', + 'n03838899', + 'n07747607', + 'n02444819', + 'n03908618', + 'n03908714', + 'n03916031', + 'n00007846', + 'n03928116', + 'n07753275', + 'n03942813', + 'n03950228', + 'n07873807', + 'n03958227', + 'n03961711', + 'n07768694', + 'n07615774', + 'n02346627', + 'n03995372', + 'n07695742', + 'n04004767', + 'n04019541', + 'n04023962', + 'n04026417', + 'n02324045', + 'n04039381', + 'n01495701', + 'n02509815', + 'n04070727', + 'n04074963', + 'n04116512', + 'n04118538', + 'n04118776', + 'n04131690', + 'n04141076', + 'n01770393', + 'n04154565', + 'n02076196', + 'n02411705', + 'n04228054', + 'n02445715', + 'n01944390', + 'n01726692', + 'n04252077', + 'n04252225', + 'n04254120', + 'n04254680', + 'n04256520', + 'n04270147', + 'n02355227', + 'n02317335', + 'n04317175', + 'n04330267', + 'n04332243', + 'n07745940', + 'n04336792', + 'n04356056', + 'n04371430', + 'n02395003', + 'n04376876', + 'n04379243', + 'n04392985', + 'n04409515', + 'n01776313', + 'n04591157', + 'n02129604', + 'n04442312', + 'n06874185', + 'n04468005', + 'n04487394', + 'n03110669', + 'n01662784', + 'n03211117', + 'n04509417', + 'n04517823', + 'n04536866', + 'n04540053', + 'n04542943', + 'n04554684', + 'n04557648', + 'n04530566', + 'n02062744', + 'n04591713', + 'n02391049') diff --git a/chainercv/datasets/voc/voc_bbox_dataset.py b/chainercv/datasets/voc/voc_bbox_dataset.py index 87ab8ad815..5b4c8b1758 100644 --- a/chainercv/datasets/voc/voc_bbox_dataset.py +++ b/chainercv/datasets/voc/voc_bbox_dataset.py @@ -1,7 +1,6 @@ import numpy as np import os import warnings -import xml.etree.ElementTree as ET from chainercv.chainer_experimental.datasets.sliceable import GetterDataset from chainercv.datasets.voc import voc_utils @@ -89,27 +88,11 @@ def _get_image(self, i): def _get_annotations(self, i): id_ = self.ids[i] - anno = ET.parse( - os.path.join(self.data_dir, 'Annotations', id_ + '.xml')) - bbox = [] - label = [] - difficult = [] - for obj in anno.findall('object'): - # when in not using difficult split, and the object is - # difficult, skipt it. - if not self.use_difficult and int(obj.find('difficult').text) == 1: - continue - - difficult.append(int(obj.find('difficult').text)) - bndbox_anno = obj.find('bndbox') - # subtract 1 to make pixel indexes 0-based - bbox.append([ - int(bndbox_anno.find(tag).text) - 1 - for tag in ('ymin', 'xmin', 'ymax', 'xmax')]) - name = obj.find('name').text.lower().strip() - label.append(voc_utils.voc_bbox_label_names.index(name)) - bbox = np.stack(bbox).astype(np.float32) - label = np.stack(label).astype(np.int32) - # When `use_difficult==False`, all elements in `difficult` are False. - difficult = np.array(difficult, dtype=np.bool) + anno_path = os.path.join(self.data_dir, 'Annotations', id_ + '.xml') + bbox, label, difficult = voc_utils.parse_voc_bbox_annotation( + anno_path, voc_utils.voc_bbox_label_names) + if not self.use_difficult: + bbox = bbox[np.logical_not(difficult)] + label = label[np.logical_not(difficult)] + difficult = difficult[np.logical_not(difficult)] return bbox, label, difficult diff --git a/chainercv/datasets/voc/voc_utils.py b/chainercv/datasets/voc/voc_utils.py index ef09200f3a..08728398e8 100644 --- a/chainercv/datasets/voc/voc_utils.py +++ b/chainercv/datasets/voc/voc_utils.py @@ -1,5 +1,6 @@ import numpy as np import os +import xml.etree.ElementTree as ET from chainer.dataset import download @@ -38,6 +39,42 @@ def get_voc(year, split): return base_path +def parse_voc_bbox_annotation(anno_path, label_names, + skip_names_not_in_label_names=False): + anno = ET.parse(anno_path) + bbox = [] + label = [] + difficult = [] + obj = anno.find('size') + H = int(obj.find('height').text) + W = int(obj.find('width').text) + for obj in anno.findall('object'): + name = obj.find('name').text.lower().strip() + if skip_names_not_in_label_names and name not in label_names: + continue + label.append(label_names.index(name)) + bndbox_anno = obj.find('bndbox') + # subtract 1 to make pixel indexes 0-based + bbox.append([ + int(bndbox_anno.find(tag).text) - 1 + for tag in ('ymin', 'xmin', 'ymax', 'xmax')]) + if obj.find('difficult') is not None: + difficult.append(int(obj.find('difficult').text)) + + if len(bbox) > 0: + bbox = np.stack(bbox).astype(np.float32) + bbox[:, 0:2] = bbox[:, 0:2].clip(0) + bbox[:, 2] = bbox[:, 2].clip(0, H) + bbox[:, 3] = bbox[:, 3].clip(0, W) + label = np.stack(label).astype(np.int32) + difficult = np.array(difficult, dtype=np.bool) + else: + bbox = np.zeros((0, 4), dtype=np.float32) + label = np.zeros((0,), dtype=np.int32) + difficult = np.zeros((0,), dtype=np.bool) + return bbox, label, difficult + + def image_wise_to_instance_wise(label_img, inst_img): mask = [] label = [] diff --git a/docs/source/reference/datasets.rst b/docs/source/reference/datasets.rst index d075c6b1b7..fcbefc9bec 100644 --- a/docs/source/reference/datasets.rst +++ b/docs/source/reference/datasets.rst @@ -64,6 +64,14 @@ CUBPointDataset .. autoclass:: CUBPointDataset +Imagenet +-------- + +ImagenetDetBboxDataset +~~~~~~~~~~~~~~~~~~~~~~ +.. autoclass:: ImagenetDetBboxDataset + + MS COCO ------- diff --git a/tests/datasets_tests/imagenet_tests/test_imagenet_det_bbox_dataset.py b/tests/datasets_tests/imagenet_tests/test_imagenet_det_bbox_dataset.py new file mode 100644 index 0000000000..2504748f54 --- /dev/null +++ b/tests/datasets_tests/imagenet_tests/test_imagenet_det_bbox_dataset.py @@ -0,0 +1,56 @@ +import unittest + +import numpy as np + +from chainer import testing +from chainer.testing import attr +from chainer.testing import condition + +from chainercv.datasets import imagenet_det_bbox_label_names +from chainercv.datasets import ImagenetDetBboxDataset +from chainercv.utils import assert_is_bbox_dataset + + +@testing.parameterize( + {'split': 'train', 'return_img_label': False}, + {'split': 'train', 'return_img_label': True}, + {'split': 'val', 'return_img_label': False}, +) +class TestImagenetDetBboxDataset(unittest.TestCase): + + def setUp(self): + self.dataset = ImagenetDetBboxDataset( + split=self.split, + return_img_label=self.return_img_label) + self.n_out = 5 if self.return_img_label else 3 + + @attr.slow + def test_as_bbox_dataset(self): + assert_is_bbox_dataset( + self.dataset, len(imagenet_det_bbox_label_names), n_example=10) + + @attr.slow + @condition.repeat(10) + def test_img_label(self): + if not self.return_img_label: + return + + i = np.random.randint(0, len(self.dataset)) + _, _, label, img_label, img_label_type = self.dataset[i] + self.assertIsInstance(img_label, np.ndarray) + self.assertEqual(img_label.dtype, np.int32) + self.assertIsInstance(img_label_type, np.ndarray) + self.assertEqual(img_label_type.dtype, np.int32) + + self.assertEqual(img_label.shape, img_label_type.shape) + self.assertTrue(img_label.max() < len(imagenet_det_bbox_label_names) + and img_label.min() >= 0) + self.assertTrue(img_label_type.max() <= 1 + and img_label_type.min() >= -1) + if len(label) > 0: + pos_img_label = img_label[img_label_type >= 0] + for lb in label: + self.assertTrue(np.isin(lb, pos_img_label)) + + +testing.run_module(__name__, __file__) From 06c9b9e11d48c0c75d17e408e40975090fa37d38 Mon Sep 17 00:00:00 2001 From: Yusuke Niitani Date: Wed, 4 Jul 2018 21:10:04 +0900 Subject: [PATCH 02/15] delete test --- .../test_imagenet_det_bbox_dataset.py | 56 ------------------- 1 file changed, 56 deletions(-) delete mode 100644 tests/datasets_tests/imagenet_tests/test_imagenet_det_bbox_dataset.py diff --git a/tests/datasets_tests/imagenet_tests/test_imagenet_det_bbox_dataset.py b/tests/datasets_tests/imagenet_tests/test_imagenet_det_bbox_dataset.py deleted file mode 100644 index 2504748f54..0000000000 --- a/tests/datasets_tests/imagenet_tests/test_imagenet_det_bbox_dataset.py +++ /dev/null @@ -1,56 +0,0 @@ -import unittest - -import numpy as np - -from chainer import testing -from chainer.testing import attr -from chainer.testing import condition - -from chainercv.datasets import imagenet_det_bbox_label_names -from chainercv.datasets import ImagenetDetBboxDataset -from chainercv.utils import assert_is_bbox_dataset - - -@testing.parameterize( - {'split': 'train', 'return_img_label': False}, - {'split': 'train', 'return_img_label': True}, - {'split': 'val', 'return_img_label': False}, -) -class TestImagenetDetBboxDataset(unittest.TestCase): - - def setUp(self): - self.dataset = ImagenetDetBboxDataset( - split=self.split, - return_img_label=self.return_img_label) - self.n_out = 5 if self.return_img_label else 3 - - @attr.slow - def test_as_bbox_dataset(self): - assert_is_bbox_dataset( - self.dataset, len(imagenet_det_bbox_label_names), n_example=10) - - @attr.slow - @condition.repeat(10) - def test_img_label(self): - if not self.return_img_label: - return - - i = np.random.randint(0, len(self.dataset)) - _, _, label, img_label, img_label_type = self.dataset[i] - self.assertIsInstance(img_label, np.ndarray) - self.assertEqual(img_label.dtype, np.int32) - self.assertIsInstance(img_label_type, np.ndarray) - self.assertEqual(img_label_type.dtype, np.int32) - - self.assertEqual(img_label.shape, img_label_type.shape) - self.assertTrue(img_label.max() < len(imagenet_det_bbox_label_names) - and img_label.min() >= 0) - self.assertTrue(img_label_type.max() <= 1 - and img_label_type.min() >= -1) - if len(label) > 0: - pos_img_label = img_label[img_label_type >= 0] - for lb in label: - self.assertTrue(np.isin(lb, pos_img_label)) - - -testing.run_module(__name__, __file__) From 33d8d9e3995a7c688fafffad1185fefec1e39b4b Mon Sep 17 00:00:00 2001 From: Yusuke Niitani Date: Wed, 4 Jul 2018 21:14:49 +0900 Subject: [PATCH 03/15] fix doc --- chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py b/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py index 5ea0ab78a9..b54df704e4 100644 --- a/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py +++ b/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py @@ -34,9 +34,8 @@ class ImagenetDetBboxDataset(GetterDataset): data_dir (string): Path to the root of the training data. If this is :obj:`auto`, this class will automatically download data for you under :obj:`$CHAINER_DATASET_ROOT/pfnet/chainercv/imagenet`. - split ({'train', 'val', 'trainval', 'test'}): Select a split of the - dataset. :obj:`test` split is only available for - 2007 dataset. + split ({'train', 'val'}): Select a split of the + dataset. return_img_label (bool): If :obj:`True`, this dataset returns image-wise labels. This consits of two arrays: :obj:`img_label` and :obj:`img_label_type`. From 6e31126654061c48d9d6bc807a69bb1c1faab208 Mon Sep 17 00:00:00 2001 From: Yusuke Niitani Date: Wed, 4 Jul 2018 21:48:37 +0900 Subject: [PATCH 04/15] flake8 --- chainercv/datasets/__init__.py | 2 +- chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/chainercv/datasets/__init__.py b/chainercv/datasets/__init__.py index 5786365aee..b3290551f1 100644 --- a/chainercv/datasets/__init__.py +++ b/chainercv/datasets/__init__.py @@ -17,9 +17,9 @@ from chainercv.datasets.cub.cub_utils import cub_label_names # NOQA from chainercv.datasets.directory_parsing_label_dataset import directory_parsing_label_names # NOQA from chainercv.datasets.directory_parsing_label_dataset import DirectoryParsingLabelDataset # NOQA +from chainercv.datasets.imagenet.imagenet_det_bbox_dataset import ImagenetDetBboxDataset # NOQA from chainercv.datasets.imagenet.imagenet_utils import imagenet_det_bbox_label_names # NOQA from chainercv.datasets.imagenet.imagenet_utils import imagenet_det_synset_ids # NOQA -from chainercv.datasets.imagenet.imagenet_det_bbox_dataset import ImagenetDetBboxDataset # NOQA from chainercv.datasets.mixup_soft_label_dataset import MixUpSoftLabelDataset # NOQA from chainercv.datasets.online_products.online_products_dataset import online_products_super_label_names # NOQA from chainercv.datasets.online_products.online_products_dataset import OnlineProductsDataset # NOQA diff --git a/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py b/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py index b54df704e4..9476ad77fa 100644 --- a/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py +++ b/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py @@ -4,8 +4,8 @@ from chainer.dataset import download from chainercv.chainer_experimental.datasets.sliceable import GetterDataset -from chainercv.datasets.voc.voc_utils import parse_voc_bbox_annotation from chainercv.datasets.imagenet.imagenet_utils import imagenet_det_synset_ids +from chainercv.datasets.voc.voc_utils import parse_voc_bbox_annotation from chainercv.utils import read_image @@ -104,7 +104,8 @@ def __init__(self, data_dir='auto', split='train', return_img_label=False): self.add_getter('img', self._get_image) self.add_getter(('bbox', 'label'), self._get_inst_anno) if return_img_label: - self.add_getter(('img_label', 'img_label_type'), self._get_img_label) + self.add_getter( + ('img_label', 'img_label_type'), self._get_img_label) def __len__(self): return len(self.ids) From 5b5c88c335137b1e2996ccfbe11345b08eb80876 Mon Sep 17 00:00:00 2001 From: Yusuke Niitani Date: Wed, 4 Jul 2018 22:03:24 +0900 Subject: [PATCH 05/15] fix doc --- chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py b/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py index 9476ad77fa..d0eee41397 100644 --- a/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py +++ b/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py @@ -11,7 +11,7 @@ class ImagenetDetBboxDataset(GetterDataset): - """ILSVRC2014 ImageNet detection dataset + """ILSVRC2014 ImageNet detection dataset. The data is distributed on the `official Kaggle page`_. @@ -32,8 +32,8 @@ class ImagenetDetBboxDataset(GetterDataset): Args: data_dir (string): Path to the root of the training data. If this is - :obj:`auto`, this class will automatically download data for you - under :obj:`$CHAINER_DATASET_ROOT/pfnet/chainercv/imagenet`. + :obj:`auto`, this uses + :obj:`$CHAINER_DATASET_ROOT/pfnet/chainercv/imagenet` by default. split ({'train', 'val'}): Select a split of the dataset. return_img_label (bool): If :obj:`True`, this dataset returns From 6390d7655b7a6e299e1341b2a6734f7c0af5968c Mon Sep 17 00:00:00 2001 From: Yusuke Niitani Date: Thu, 5 Jul 2018 00:31:32 +0900 Subject: [PATCH 06/15] fix doc --- .../imagenet/imagenet_det_bbox_dataset.py | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py b/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py index d0eee41397..697740c294 100644 --- a/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py +++ b/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py @@ -19,25 +19,23 @@ class ImagenetDetBboxDataset(GetterDataset): imagenet-object-detection-challenge Please refer to the readme of ILSVRC2014 dev kit for a comprehensive - documentation. Note that detection part of ILSVRC has not changed from - 2014. Overview of annotation process is described in the `paper`_. + documentation. Note that the detection part of ILSVRC has not changed since + 2014. An overview of annotation process is described in the `paper`_. .. _`paper`: http://ai.stanford.edu/~olga/papers/chi2014-MultiLabel.pdf Every image in the training set has one or more image-level labels. - The image-level labels determine the partial presence, full presence or + The image-level labels determine the full presence, partial presence or absence of one or more object categories. - Bounding boxes are provided around instances of the present - categories. + Bounding boxes are provided around instances of the present categories. Args: data_dir (string): Path to the root of the training data. If this is - :obj:`auto`, this uses - :obj:`$CHAINER_DATASET_ROOT/pfnet/chainercv/imagenet` by default. - split ({'train', 'val'}): Select a split of the - dataset. + :obj:`auto`, + :obj:`$CHAINER_DATASET_ROOT/pfnet/chainercv/imagenet` is used. + split ({'train', 'val'}): Selects a split of the dataset. return_img_label (bool): If :obj:`True`, this dataset returns - image-wise labels. This consits of two arrays: + image-wise labels. This consists of two arrays: :obj:`img_label` and :obj:`img_label_type`. This dataset returns the following data. @@ -56,10 +54,10 @@ class ImagenetDetBboxDataset(GetterDataset): :obj:`img_label_type` [#imagenet_det_1]_ [#imagenet_det_2]_, \ ":math:`(M,)`", :obj:`int32`, ":math:`[-1, 1]`" - .. [#imagenet_det_1] available \ + .. [#imagenet_det_1] available if :obj:`return_img_label = True`. - .. [#imagenet_det_2] :obj:`-1` means absent. :obj:`1` means present. \ - :obj:`0` means partially present. When a category is partially \ + .. [#imagenet_det_2] :obj:`-1` means absent. :obj:`1` means present. + :obj:`0` means partially present. When a category is partially present, the image contains at least one instance of X, but not all instances of X may be annotated with bounding boxes. From 029581435eca37d001e69704d0dc34575ef87fa7 Mon Sep 17 00:00:00 2001 From: Yusuke Niitani Date: Thu, 5 Jul 2018 01:22:10 +0900 Subject: [PATCH 07/15] add ImageNet localization dataset --- chainercv/datasets/__init__.py | 3 + .../imagenet/imagenet_loc_bbox_dataset.py | 87 + chainercv/datasets/imagenet/imagenet_utils.py | 2007 +++++++++++++++++ docs/source/reference/datasets.rst | 4 + 4 files changed, 2101 insertions(+) create mode 100644 chainercv/datasets/imagenet/imagenet_loc_bbox_dataset.py diff --git a/chainercv/datasets/__init__.py b/chainercv/datasets/__init__.py index b3290551f1..9fc59d606a 100644 --- a/chainercv/datasets/__init__.py +++ b/chainercv/datasets/__init__.py @@ -18,8 +18,11 @@ from chainercv.datasets.directory_parsing_label_dataset import directory_parsing_label_names # NOQA from chainercv.datasets.directory_parsing_label_dataset import DirectoryParsingLabelDataset # NOQA from chainercv.datasets.imagenet.imagenet_det_bbox_dataset import ImagenetDetBboxDataset # NOQA +from chainercv.datasets.imagenet.imagenet_loc_bbox_dataset import ImagenetLocBboxDataset # NOQA from chainercv.datasets.imagenet.imagenet_utils import imagenet_det_bbox_label_names # NOQA from chainercv.datasets.imagenet.imagenet_utils import imagenet_det_synset_ids # NOQA +from chainercv.datasets.imagenet.imagenet_utils import imagenet_loc_bbox_label_names # NOQA +from chainercv.datasets.imagenet.imagenet_utils import imagenet_loc_synset_ids # NOQA from chainercv.datasets.mixup_soft_label_dataset import MixUpSoftLabelDataset # NOQA from chainercv.datasets.online_products.online_products_dataset import online_products_super_label_names # NOQA from chainercv.datasets.online_products.online_products_dataset import OnlineProductsDataset # NOQA diff --git a/chainercv/datasets/imagenet/imagenet_loc_bbox_dataset.py b/chainercv/datasets/imagenet/imagenet_loc_bbox_dataset.py new file mode 100644 index 0000000000..1e58a47d9b --- /dev/null +++ b/chainercv/datasets/imagenet/imagenet_loc_bbox_dataset.py @@ -0,0 +1,87 @@ +import os + +from chainer.dataset import download + +from chainercv.chainer_experimental.datasets.sliceable import GetterDataset +from chainercv.datasets.imagenet.imagenet_utils import imagenet_loc_synset_ids +from chainercv.datasets.voc.voc_utils import parse_voc_bbox_annotation +from chainercv.utils import read_image + + +class ImagenetLocBboxDataset(GetterDataset): + + """ILSVRC2012 ImageNet localization dataset. + + The data is distributed on `the official Kaggle page`_. + + .. _`the official Kaggle page`: https://www.kaggle.com/c/ + imagenet-object-localization-challenge + + Please refer to the readme of ILSVRC2012 dev kit for a comprehensive + documentation. Note that the detection part of ILSVRC has not changed since + 2012. + + Every image in the training and validation sets has a single + image-level label specifying the presence of one object category. + + Args: + data_dir (string): Path to the root of the training data. If this is + :obj:`auto`, + :obj:`$CHAINER_DATASET_ROOT/pfnet/chainercv/imagenet` is used. + split ({'train', 'val'}): Selects a split of the dataset. + + This dataset returns the following data. + + .. csv-table:: + :header: name, shape, dtype, format + + :obj:`img`, ":math:`(3, H, W)`", :obj:`float32`, \ + "RGB, :math:`[0, 255]`" + :obj:`bbox`, ":math:`(R, 4)`", :obj:`float32`, \ + ":math:`(y_{min}, x_{min}, y_{max}, x_{max})`" + :obj:`label`, ":math:`(R,)`", :obj:`int32`, \ + ":math:`[0, \#fg\_class - 1]`" + + """ + + def __init__(self, data_dir='auto', split='train'): + super(ImagenetLocBboxDataset, self).__init__() + if data_dir == 'auto': + data_dir = download.get_dataset_directory( + 'pfnet/chainercv/imagenet') + self.base_dir = os.path.join(data_dir, 'ILSVRC') + imageset_dir = os.path.join(self.base_dir, 'ImageSets/CLS-LOC') + + ids = [] + if split == 'train': + imageset_path = os.path.join(imageset_dir, 'train_loc.txt') + elif split == 'val': + imageset_path = os.path.join(imageset_dir, 'val.txt') + with open(imageset_path) as f: + for l in f: + id_ = l.split()[0] + ids.append(id_) + self.ids = ids + self.split = split + + self.add_getter('img', self._get_image) + self.add_getter(('bbox', 'label'), self._get_inst_anno) + + def __len__(self): + return len(self.ids) + + def _get_image(self, i): + img_path = os.path.join( + self.base_dir, 'Data/CLS-LOC', self.split, + self.ids[i] + '.JPEG') + img = read_image(img_path, color=True) + return img + + def _get_inst_anno(self, i): + anno_path = os.path.join( + self.base_dir, 'Annotations/CLS-LOC', self.split, + self.ids[i] + '.xml') + bbox, label, _ = parse_voc_bbox_annotation( + anno_path, imagenet_loc_synset_ids, + skip_names_not_in_label_names=False) + return bbox, label diff --git a/chainercv/datasets/imagenet/imagenet_utils.py b/chainercv/datasets/imagenet/imagenet_utils.py index f39970a373..c03c6e6497 100644 --- a/chainercv/datasets/imagenet/imagenet_utils.py +++ b/chainercv/datasets/imagenet/imagenet_utils.py @@ -403,3 +403,2010 @@ 'n02062744', 'n04591713', 'n02391049') + + +imagenet_loc_bbox_label_names = ( + 'tench', + 'goldfish', + 'great white shark', + 'tiger shark', + 'hammerhead', + 'electric ray', + 'stingray', + 'cock', + 'hen', + 'ostrich', + 'brambling', + 'goldfinch', + 'house finch', + 'junco', + 'indigo bunting', + 'robin', + 'bulbul', + 'jay', + 'magpie', + 'chickadee', + 'water ouzel', + 'kite', + 'bald eagle', + 'vulture', + 'great grey owl', + 'European fire salamander', + 'common newt', + 'eft', + 'spotted salamander', + 'axolotl', + 'bullfrog', + 'tree frog', + 'tailed frog', + 'loggerhead', + 'leatherback turtle', + 'mud turtle', + 'terrapin', + 'box turtle', + 'banded gecko', + 'common iguana', + 'American chameleon', + 'whiptail', + 'agama', + 'frilled lizard', + 'alligator lizard', + 'Gila monster', + 'green lizard', + 'African chameleon', + 'Komodo dragon', + 'African crocodile', + 'American alligator', + 'triceratops', + 'thunder snake', + 'ringneck snake', + 'hognose snake', + 'green snake', + 'king snake', + 'garter snake', + 'water snake', + 'vine snake', + 'night snake', + 'boa constrictor', + 'rock python', + 'Indian cobra', + 'green mamba', + 'sea snake', + 'horned viper', + 'diamondback', + 'sidewinder', + 'trilobite', + 'harvestman', + 'scorpion', + 'black and gold garden spider', + 'barn spider', + 'garden spider', + 'black widow', + 'tarantula', + 'wolf spider', + 'tick', + 'centipede', + 'black grouse', + 'ptarmigan', + 'ruffed grouse', + 'prairie chicken', + 'peacock', + 'quail', + 'partridge', + 'African grey', + 'macaw', + 'sulphur-crested cockatoo', + 'lorikeet', + 'coucal', + 'bee eater', + 'hornbill', + 'hummingbird', + 'jacamar', + 'toucan', + 'drake', + 'red-breasted merganser', + 'goose', + 'black swan', + 'tusker', + 'echidna', + 'platypus', + 'wallaby', + 'koala', + 'wombat', + 'jellyfish', + 'sea anemone', + 'brain coral', + 'flatworm', + 'nematode', + 'conch', + 'snail', + 'slug', + 'sea slug', + 'chiton', + 'chambered nautilus', + 'Dungeness crab', + 'rock crab', + 'fiddler crab', + 'king crab', + 'American lobster', + 'spiny lobster', + 'crayfish', + 'hermit crab', + 'isopod', + 'white stork', + 'black stork', + 'spoonbill', + 'flamingo', + 'little blue heron', + 'American egret', + 'bittern', + 'crane', + 'limpkin', + 'European gallinule', + 'American coot', + 'bustard', + 'ruddy turnstone', + 'red-backed sandpiper', + 'redshank', + 'dowitcher', + 'oystercatcher', + 'pelican', + 'king penguin', + 'albatross', + 'grey whale', + 'killer whale', + 'dugong', + 'sea lion', + 'Chihuahua', + 'Japanese spaniel', + 'Maltese dog', + 'Pekinese', + 'Shih-Tzu', + 'Blenheim spaniel', + 'papillon', + 'toy terrier', + 'Rhodesian ridgeback', + 'Afghan hound', + 'basset', + 'beagle', + 'bloodhound', + 'bluetick', + 'black-and-tan coonhound', + 'Walker hound', + 'English foxhound', + 'redbone', + 'borzoi', + 'Irish wolfhound', + 'Italian greyhound', + 'whippet', + 'Ibizan hound', + 'Norwegian elkhound', + 'otterhound', + 'Saluki', + 'Scottish deerhound', + 'Weimaraner', + 'Staffordshire bullterrier', + 'American Staffordshire terrier', + 'Bedlington terrier', + 'Border terrier', + 'Kerry blue terrier', + 'Irish terrier', + 'Norfolk terrier', + 'Norwich terrier', + 'Yorkshire terrier', + 'wire-haired fox terrier', + 'Lakeland terrier', + 'Sealyham terrier', + 'Airedale', + 'cairn', + 'Australian terrier', + 'Dandie Dinmont', + 'Boston bull', + 'miniature schnauzer', + 'giant schnauzer', + 'standard schnauzer', + 'Scotch terrier', + 'Tibetan terrier', + 'silky terrier', + 'soft-coated wheaten terrier', + 'West Highland white terrier', + 'Lhasa', + 'flat-coated retriever', + 'curly-coated retriever', + 'golden retriever', + 'Labrador retriever', + 'Chesapeake Bay retriever', + 'German short-haired pointer', + 'vizsla', + 'English setter', + 'Irish setter', + 'Gordon setter', + 'Brittany spaniel', + 'clumber', + 'English springer', + 'Welsh springer spaniel', + 'cocker spaniel', + 'Sussex spaniel', + 'Irish water spaniel', + 'kuvasz', + 'schipperke', + 'groenendael', + 'malinois', + 'briard', + 'kelpie', + 'komondor', + 'Old English sheepdog', + 'Shetland sheepdog', + 'collie', + 'Border collie', + 'Bouvier des Flandres', + 'Rottweiler', + 'German shepherd', + 'Doberman', + 'miniature pinscher', + 'Greater Swiss Mountain dog', + 'Bernese mountain dog', + 'Appenzeller', + 'EntleBucher', + 'boxer', + 'bull mastiff', + 'Tibetan mastiff', + 'French bulldog', + 'Great Dane', + 'Saint Bernard', + 'Eskimo dog', + 'malamute', + 'Siberian husky', + 'dalmatian', + 'affenpinscher', + 'basenji', + 'pug', + 'Leonberg', + 'Newfoundland', + 'Great Pyrenees', + 'Samoyed', + 'Pomeranian', + 'chow', + 'keeshond', + 'Brabancon griffon', + 'Pembroke', + 'Cardigan', + 'toy poodle', + 'miniature poodle', + 'standard poodle', + 'Mexican hairless', + 'timber wolf', + 'white wolf', + 'red wolf', + 'coyote', + 'dingo', + 'dhole', + 'African hunting dog', + 'hyena', + 'red fox', + 'kit fox', + 'Arctic fox', + 'grey fox', + 'tabby', + 'tiger cat', + 'Persian cat', + 'Siamese cat', + 'Egyptian cat', + 'cougar', + 'lynx', + 'leopard', + 'snow leopard', + 'jaguar', + 'lion', + 'tiger', + 'cheetah', + 'brown bear', + 'American black bear', + 'ice bear', + 'sloth bear', + 'mongoose', + 'meerkat', + 'tiger beetle', + 'ladybug', + 'ground beetle', + 'long-horned beetle', + 'leaf beetle', + 'dung beetle', + 'rhinoceros beetle', + 'weevil', + 'fly', + 'bee', + 'ant', + 'grasshopper', + 'cricket', + 'walking stick', + 'cockroach', + 'mantis', + 'cicada', + 'leafhopper', + 'lacewing', + 'dragonfly', + 'damselfly', + 'admiral', + 'ringlet', + 'monarch', + 'cabbage butterfly', + 'sulphur butterfly', + 'lycaenid', + 'starfish', + 'sea urchin', + 'sea cucumber', + 'wood rabbit', + 'hare', + 'Angora', + 'hamster', + 'porcupine', + 'fox squirrel', + 'marmot', + 'beaver', + 'guinea pig', + 'sorrel', + 'zebra', + 'hog', + 'wild boar', + 'warthog', + 'hippopotamus', + 'ox', + 'water buffalo', + 'bison', + 'ram', + 'bighorn', + 'ibex', + 'hartebeest', + 'impala', + 'gazelle', + 'Arabian camel', + 'llama', + 'weasel', + 'mink', + 'polecat', + 'black-footed ferret', + 'otter', + 'skunk', + 'badger', + 'armadillo', + 'three-toed sloth', + 'orangutan', + 'gorilla', + 'chimpanzee', + 'gibbon', + 'siamang', + 'guenon', + 'patas', + 'baboon', + 'macaque', + 'langur', + 'colobus', + 'proboscis monkey', + 'marmoset', + 'capuchin', + 'howler monkey', + 'titi', + 'spider monkey', + 'squirrel monkey', + 'Madagascar cat', + 'indri', + 'Indian elephant', + 'African elephant', + 'lesser panda', + 'giant panda', + 'barracouta', + 'eel', + 'coho', + 'rock beauty', + 'anemone fish', + 'sturgeon', + 'gar', + 'lionfish', + 'puffer', + 'abacus', + 'abaya', + 'academic gown', + 'accordion', + 'acoustic guitar', + 'aircraft carrier', + 'airliner', + 'airship', + 'altar', + 'ambulance', + 'amphibian', + 'analog clock', + 'apiary', + 'apron', + 'ashcan', + 'assault rifle', + 'backpack', + 'bakery', + 'balance beam', + 'balloon', + 'ballpoint', + 'Band Aid', + 'banjo', + 'bannister', + 'barbell', + 'barber chair', + 'barbershop', + 'barn', + 'barometer', + 'barrel', + 'barrow', + 'baseball', + 'basketball', + 'bassinet', + 'bassoon', + 'bathing cap', + 'bath towel', + 'bathtub', + 'beach wagon', + 'beacon', + 'beaker', + 'bearskin', + 'beer bottle', + 'beer glass', + 'bell cote', + 'bib', + 'bicycle-built-for-two', + 'bikini', + 'binder', + 'binoculars', + 'birdhouse', + 'boathouse', + 'bobsled', + 'bolo tie', + 'bonnet', + 'bookcase', + 'bookshop', + 'bottlecap', + 'bow', + 'bow tie', + 'brass', + 'brassiere', + 'breakwater', + 'breastplate', + 'broom', + 'bucket', + 'buckle', + 'bulletproof vest', + 'bullet train', + 'butcher shop', + 'cab', + 'caldron', + 'candle', + 'cannon', + 'canoe', + 'can opener', + 'cardigan', + 'car mirror', + 'carousel', + 'carpenters kit', + 'carton', + 'car wheel', + 'cash machine', + 'cassette', + 'cassette player', + 'castle', + 'catamaran', + 'CD player', + 'cello', + 'cellular telephone', + 'chain', + 'chainlink fence', + 'chain mail', + 'chain saw', + 'chest', + 'chiffonier', + 'chime', + 'china cabinet', + 'Christmas stocking', + 'church', + 'cinema', + 'cleaver', + 'cliff dwelling', + 'cloak', + 'clog', + 'cocktail shaker', + 'coffee mug', + 'coffeepot', + 'coil', + 'combination lock', + 'computer keyboard', + 'confectionery', + 'container ship', + 'convertible', + 'corkscrew', + 'cornet', + 'cowboy boot', + 'cowboy hat', + 'cradle', + 'crane', + 'crash helmet', + 'crate', + 'crib', + 'Crock Pot', + 'croquet ball', + 'crutch', + 'cuirass', + 'dam', + 'desk', + 'desktop computer', + 'dial telephone', + 'diaper', + 'digital clock', + 'digital watch', + 'dining table', + 'dishrag', + 'dishwasher', + 'disk brake', + 'dock', + 'dogsled', + 'dome', + 'doormat', + 'drilling platform', + 'drum', + 'drumstick', + 'dumbbell', + 'Dutch oven', + 'electric fan', + 'electric guitar', + 'electric locomotive', + 'entertainment center', + 'envelope', + 'espresso maker', + 'face powder', + 'feather boa', + 'file', + 'fireboat', + 'fire engine', + 'fire screen', + 'flagpole', + 'flute', + 'folding chair', + 'football helmet', + 'forklift', + 'fountain', + 'fountain pen', + 'four-poster', + 'freight car', + 'French horn', + 'frying pan', + 'fur coat', + 'garbage truck', + 'gasmask', + 'gas pump', + 'goblet', + 'go-kart', + 'golf ball', + 'golfcart', + 'gondola', + 'gong', + 'gown', + 'grand piano', + 'greenhouse', + 'grille', + 'grocery store', + 'guillotine', + 'hair slide', + 'hair spray', + 'half track', + 'hammer', + 'hamper', + 'hand blower', + 'hand-held computer', + 'handkerchief', + 'hard disc', + 'harmonica', + 'harp', + 'harvester', + 'hatchet', + 'holster', + 'home theater', + 'honeycomb', + 'hook', + 'hoopskirt', + 'horizontal bar', + 'horse cart', + 'hourglass', + 'iPod', + 'iron', + 'jack-o-lantern', + 'jean', + 'jeep', + 'jersey', + 'jigsaw puzzle', + 'jinrikisha', + 'joystick', + 'kimono', + 'knee pad', + 'knot', + 'lab coat', + 'ladle', + 'lampshade', + 'laptop', + 'lawn mower', + 'lens cap', + 'letter opener', + 'library', + 'lifeboat', + 'lighter', + 'limousine', + 'liner', + 'lipstick', + 'Loafer', + 'lotion', + 'loudspeaker', + 'loupe', + 'lumbermill', + 'magnetic compass', + 'mailbag', + 'mailbox', + 'maillot', + 'maillot', + 'manhole cover', + 'maraca', + 'marimba', + 'mask', + 'matchstick', + 'maypole', + 'maze', + 'measuring cup', + 'medicine chest', + 'megalith', + 'microphone', + 'microwave', + 'military uniform', + 'milk can', + 'minibus', + 'miniskirt', + 'minivan', + 'missile', + 'mitten', + 'mixing bowl', + 'mobile home', + 'Model T', + 'modem', + 'monastery', + 'monitor', + 'moped', + 'mortar', + 'mortarboard', + 'mosque', + 'mosquito net', + 'motor scooter', + 'mountain bike', + 'mountain tent', + 'mouse', + 'mousetrap', + 'moving van', + 'muzzle', + 'nail', + 'neck brace', + 'necklace', + 'nipple', + 'notebook', + 'obelisk', + 'oboe', + 'ocarina', + 'odometer', + 'oil filter', + 'organ', + 'oscilloscope', + 'overskirt', + 'oxcart', + 'oxygen mask', + 'packet', + 'paddle', + 'paddlewheel', + 'padlock', + 'paintbrush', + 'pajama', + 'palace', + 'panpipe', + 'paper towel', + 'parachute', + 'parallel bars', + 'park bench', + 'parking meter', + 'passenger car', + 'patio', + 'pay-phone', + 'pedestal', + 'pencil box', + 'pencil sharpener', + 'perfume', + 'Petri dish', + 'photocopier', + 'pick', + 'pickelhaube', + 'picket fence', + 'pickup', + 'pier', + 'piggy bank', + 'pill bottle', + 'pillow', + 'ping-pong ball', + 'pinwheel', + 'pirate', + 'pitcher', + 'plane', + 'planetarium', + 'plastic bag', + 'plate rack', + 'plow', + 'plunger', + 'Polaroid camera', + 'pole', + 'police van', + 'poncho', + 'pool table', + 'pop bottle', + 'pot', + 'potters wheel', + 'power drill', + 'prayer rug', + 'printer', + 'prison', + 'projectile', + 'projector', + 'puck', + 'punching bag', + 'purse', + 'quill', + 'quilt', + 'racer', + 'racket', + 'radiator', + 'radio', + 'radio telescope', + 'rain barrel', + 'recreational vehicle', + 'reel', + 'reflex camera', + 'refrigerator', + 'remote control', + 'restaurant', + 'revolver', + 'rifle', + 'rocking chair', + 'rotisserie', + 'rubber eraser', + 'rugby ball', + 'rule', + 'running shoe', + 'safe', + 'safety pin', + 'saltshaker', + 'sandal', + 'sarong', + 'sax', + 'scabbard', + 'scale', + 'school bus', + 'schooner', + 'scoreboard', + 'screen', + 'screw', + 'screwdriver', + 'seat belt', + 'sewing machine', + 'shield', + 'shoe shop', + 'shoji', + 'shopping basket', + 'shopping cart', + 'shovel', + 'shower cap', + 'shower curtain', + 'ski', + 'ski mask', + 'sleeping bag', + 'slide rule', + 'sliding door', + 'slot', + 'snorkel', + 'snowmobile', + 'snowplow', + 'soap dispenser', + 'soccer ball', + 'sock', + 'solar dish', + 'sombrero', + 'soup bowl', + 'space bar', + 'space heater', + 'space shuttle', + 'spatula', + 'speedboat', + 'spider web', + 'spindle', + 'sports car', + 'spotlight', + 'stage', + 'steam locomotive', + 'steel arch bridge', + 'steel drum', + 'stethoscope', + 'stole', + 'stone wall', + 'stopwatch', + 'stove', + 'strainer', + 'streetcar', + 'stretcher', + 'studio couch', + 'stupa', + 'submarine', + 'suit', + 'sundial', + 'sunglass', + 'sunglasses', + 'sunscreen', + 'suspension bridge', + 'swab', + 'sweatshirt', + 'swimming trunks', + 'swing', + 'switch', + 'syringe', + 'table lamp', + 'tank', + 'tape player', + 'teapot', + 'teddy', + 'television', + 'tennis ball', + 'thatch', + 'theater curtain', + 'thimble', + 'thresher', + 'throne', + 'tile roof', + 'toaster', + 'tobacco shop', + 'toilet seat', + 'torch', + 'totem pole', + 'tow truck', + 'toyshop', + 'tractor', + 'trailer truck', + 'tray', + 'trench coat', + 'tricycle', + 'trimaran', + 'tripod', + 'triumphal arch', + 'trolleybus', + 'trombone', + 'tub', + 'turnstile', + 'typewriter keyboard', + 'umbrella', + 'unicycle', + 'upright', + 'vacuum', + 'vase', + 'vault', + 'velvet', + 'vending machine', + 'vestment', + 'viaduct', + 'violin', + 'volleyball', + 'waffle iron', + 'wall clock', + 'wallet', + 'wardrobe', + 'warplane', + 'washbasin', + 'washer', + 'water bottle', + 'water jug', + 'water tower', + 'whiskey jug', + 'whistle', + 'wig', + 'window screen', + 'window shade', + 'Windsor tie', + 'wine bottle', + 'wing', + 'wok', + 'wooden spoon', + 'wool', + 'worm fence', + 'wreck', + 'yawl', + 'yurt', + 'web site', + 'comic book', + 'crossword puzzle', + 'street sign', + 'traffic light', + 'book jacket', + 'menu', + 'plate', + 'guacamole', + 'consomme', + 'hot pot', + 'trifle', + 'ice cream', + 'ice lolly', + 'French loaf', + 'bagel', + 'pretzel', + 'cheeseburger', + 'hotdog', + 'mashed potato', + 'head cabbage', + 'broccoli', + 'cauliflower', + 'zucchini', + 'spaghetti squash', + 'acorn squash', + 'butternut squash', + 'cucumber', + 'artichoke', + 'bell pepper', + 'cardoon', + 'mushroom', + 'Granny Smith', + 'strawberry', + 'orange', + 'lemon', + 'fig', + 'pineapple', + 'banana', + 'jackfruit', + 'custard apple', + 'pomegranate', + 'hay', + 'carbonara', + 'chocolate sauce', + 'dough', + 'meat loaf', + 'pizza', + 'potpie', + 'burrito', + 'red wine', + 'espresso', + 'cup', + 'eggnog', + 'alp', + 'bubble', + 'cliff', + 'coral reef', + 'geyser', + 'lakeside', + 'promontory', + 'sandbar', + 'seashore', + 'valley', + 'volcano', + 'ballplayer', + 'groom', + 'scuba diver', + 'rapeseed', + 'daisy', + 'yellow ladys slipper', + 'corn', + 'acorn', + 'hip', + 'buckeye', + 'coral fungus', + 'agaric', + 'gyromitra', + 'stinkhorn', + 'earthstar', + 'hen-of-the-woods', + 'bolete', + 'ear', + 'toilet tissue', +) + + +imagenet_loc_synset_ids = ( + 'n01440764', + 'n01443537', + 'n01484850', + 'n01491361', + 'n01494475', + 'n01496331', + 'n01498041', + 'n01514668', + 'n01514859', + 'n01518878', + 'n01530575', + 'n01531178', + 'n01532829', + 'n01534433', + 'n01537544', + 'n01558993', + 'n01560419', + 'n01580077', + 'n01582220', + 'n01592084', + 'n01601694', + 'n01608432', + 'n01614925', + 'n01616318', + 'n01622779', + 'n01629819', + 'n01630670', + 'n01631663', + 'n01632458', + 'n01632777', + 'n01641577', + 'n01644373', + 'n01644900', + 'n01664065', + 'n01665541', + 'n01667114', + 'n01667778', + 'n01669191', + 'n01675722', + 'n01677366', + 'n01682714', + 'n01685808', + 'n01687978', + 'n01688243', + 'n01689811', + 'n01692333', + 'n01693334', + 'n01694178', + 'n01695060', + 'n01697457', + 'n01698640', + 'n01704323', + 'n01728572', + 'n01728920', + 'n01729322', + 'n01729977', + 'n01734418', + 'n01735189', + 'n01737021', + 'n01739381', + 'n01740131', + 'n01742172', + 'n01744401', + 'n01748264', + 'n01749939', + 'n01751748', + 'n01753488', + 'n01755581', + 'n01756291', + 'n01768244', + 'n01770081', + 'n01770393', + 'n01773157', + 'n01773549', + 'n01773797', + 'n01774384', + 'n01774750', + 'n01775062', + 'n01776313', + 'n01784675', + 'n01795545', + 'n01796340', + 'n01797886', + 'n01798484', + 'n01806143', + 'n01806567', + 'n01807496', + 'n01817953', + 'n01818515', + 'n01819313', + 'n01820546', + 'n01824575', + 'n01828970', + 'n01829413', + 'n01833805', + 'n01843065', + 'n01843383', + 'n01847000', + 'n01855032', + 'n01855672', + 'n01860187', + 'n01871265', + 'n01872401', + 'n01873310', + 'n01877812', + 'n01882714', + 'n01883070', + 'n01910747', + 'n01914609', + 'n01917289', + 'n01924916', + 'n01930112', + 'n01943899', + 'n01944390', + 'n01945685', + 'n01950731', + 'n01955084', + 'n01968897', + 'n01978287', + 'n01978455', + 'n01980166', + 'n01981276', + 'n01983481', + 'n01984695', + 'n01985128', + 'n01986214', + 'n01990800', + 'n02002556', + 'n02002724', + 'n02006656', + 'n02007558', + 'n02009229', + 'n02009912', + 'n02011460', + 'n02012849', + 'n02013706', + 'n02017213', + 'n02018207', + 'n02018795', + 'n02025239', + 'n02027492', + 'n02028035', + 'n02033041', + 'n02037110', + 'n02051845', + 'n02056570', + 'n02058221', + 'n02066245', + 'n02071294', + 'n02074367', + 'n02077923', + 'n02085620', + 'n02085782', + 'n02085936', + 'n02086079', + 'n02086240', + 'n02086646', + 'n02086910', + 'n02087046', + 'n02087394', + 'n02088094', + 'n02088238', + 'n02088364', + 'n02088466', + 'n02088632', + 'n02089078', + 'n02089867', + 'n02089973', + 'n02090379', + 'n02090622', + 'n02090721', + 'n02091032', + 'n02091134', + 'n02091244', + 'n02091467', + 'n02091635', + 'n02091831', + 'n02092002', + 'n02092339', + 'n02093256', + 'n02093428', + 'n02093647', + 'n02093754', + 'n02093859', + 'n02093991', + 'n02094114', + 'n02094258', + 'n02094433', + 'n02095314', + 'n02095570', + 'n02095889', + 'n02096051', + 'n02096177', + 'n02096294', + 'n02096437', + 'n02096585', + 'n02097047', + 'n02097130', + 'n02097209', + 'n02097298', + 'n02097474', + 'n02097658', + 'n02098105', + 'n02098286', + 'n02098413', + 'n02099267', + 'n02099429', + 'n02099601', + 'n02099712', + 'n02099849', + 'n02100236', + 'n02100583', + 'n02100735', + 'n02100877', + 'n02101006', + 'n02101388', + 'n02101556', + 'n02102040', + 'n02102177', + 'n02102318', + 'n02102480', + 'n02102973', + 'n02104029', + 'n02104365', + 'n02105056', + 'n02105162', + 'n02105251', + 'n02105412', + 'n02105505', + 'n02105641', + 'n02105855', + 'n02106030', + 'n02106166', + 'n02106382', + 'n02106550', + 'n02106662', + 'n02107142', + 'n02107312', + 'n02107574', + 'n02107683', + 'n02107908', + 'n02108000', + 'n02108089', + 'n02108422', + 'n02108551', + 'n02108915', + 'n02109047', + 'n02109525', + 'n02109961', + 'n02110063', + 'n02110185', + 'n02110341', + 'n02110627', + 'n02110806', + 'n02110958', + 'n02111129', + 'n02111277', + 'n02111500', + 'n02111889', + 'n02112018', + 'n02112137', + 'n02112350', + 'n02112706', + 'n02113023', + 'n02113186', + 'n02113624', + 'n02113712', + 'n02113799', + 'n02113978', + 'n02114367', + 'n02114548', + 'n02114712', + 'n02114855', + 'n02115641', + 'n02115913', + 'n02116738', + 'n02117135', + 'n02119022', + 'n02119789', + 'n02120079', + 'n02120505', + 'n02123045', + 'n02123159', + 'n02123394', + 'n02123597', + 'n02124075', + 'n02125311', + 'n02127052', + 'n02128385', + 'n02128757', + 'n02128925', + 'n02129165', + 'n02129604', + 'n02130308', + 'n02132136', + 'n02133161', + 'n02134084', + 'n02134418', + 'n02137549', + 'n02138441', + 'n02165105', + 'n02165456', + 'n02167151', + 'n02168699', + 'n02169497', + 'n02172182', + 'n02174001', + 'n02177972', + 'n02190166', + 'n02206856', + 'n02219486', + 'n02226429', + 'n02229544', + 'n02231487', + 'n02233338', + 'n02236044', + 'n02256656', + 'n02259212', + 'n02264363', + 'n02268443', + 'n02268853', + 'n02276258', + 'n02277742', + 'n02279972', + 'n02280649', + 'n02281406', + 'n02281787', + 'n02317335', + 'n02319095', + 'n02321529', + 'n02325366', + 'n02326432', + 'n02328150', + 'n02342885', + 'n02346627', + 'n02356798', + 'n02361337', + 'n02363005', + 'n02364673', + 'n02389026', + 'n02391049', + 'n02395406', + 'n02396427', + 'n02397096', + 'n02398521', + 'n02403003', + 'n02408429', + 'n02410509', + 'n02412080', + 'n02415577', + 'n02417914', + 'n02422106', + 'n02422699', + 'n02423022', + 'n02437312', + 'n02437616', + 'n02441942', + 'n02442845', + 'n02443114', + 'n02443484', + 'n02444819', + 'n02445715', + 'n02447366', + 'n02454379', + 'n02457408', + 'n02480495', + 'n02480855', + 'n02481823', + 'n02483362', + 'n02483708', + 'n02484975', + 'n02486261', + 'n02486410', + 'n02487347', + 'n02488291', + 'n02488702', + 'n02489166', + 'n02490219', + 'n02492035', + 'n02492660', + 'n02493509', + 'n02493793', + 'n02494079', + 'n02497673', + 'n02500267', + 'n02504013', + 'n02504458', + 'n02509815', + 'n02510455', + 'n02514041', + 'n02526121', + 'n02536864', + 'n02606052', + 'n02607072', + 'n02640242', + 'n02641379', + 'n02643566', + 'n02655020', + 'n02666196', + 'n02667093', + 'n02669723', + 'n02672831', + 'n02676566', + 'n02687172', + 'n02690373', + 'n02692877', + 'n02699494', + 'n02701002', + 'n02704792', + 'n02708093', + 'n02727426', + 'n02730930', + 'n02747177', + 'n02749479', + 'n02769748', + 'n02776631', + 'n02777292', + 'n02782093', + 'n02783161', + 'n02786058', + 'n02787622', + 'n02788148', + 'n02790996', + 'n02791124', + 'n02791270', + 'n02793495', + 'n02794156', + 'n02795169', + 'n02797295', + 'n02799071', + 'n02802426', + 'n02804414', + 'n02804610', + 'n02807133', + 'n02808304', + 'n02808440', + 'n02814533', + 'n02814860', + 'n02815834', + 'n02817516', + 'n02823428', + 'n02823750', + 'n02825657', + 'n02834397', + 'n02835271', + 'n02837789', + 'n02840245', + 'n02841315', + 'n02843684', + 'n02859443', + 'n02860847', + 'n02865351', + 'n02869837', + 'n02870880', + 'n02871525', + 'n02877765', + 'n02879718', + 'n02883205', + 'n02892201', + 'n02892767', + 'n02894605', + 'n02895154', + 'n02906734', + 'n02909870', + 'n02910353', + 'n02916936', + 'n02917067', + 'n02927161', + 'n02930766', + 'n02939185', + 'n02948072', + 'n02950826', + 'n02951358', + 'n02951585', + 'n02963159', + 'n02965783', + 'n02966193', + 'n02966687', + 'n02971356', + 'n02974003', + 'n02977058', + 'n02978881', + 'n02979186', + 'n02980441', + 'n02981792', + 'n02988304', + 'n02992211', + 'n02992529', + 'n02999410', + 'n03000134', + 'n03000247', + 'n03000684', + 'n03014705', + 'n03016953', + 'n03017168', + 'n03018349', + 'n03026506', + 'n03028079', + 'n03032252', + 'n03041632', + 'n03042490', + 'n03045698', + 'n03047690', + 'n03062245', + 'n03063599', + 'n03063689', + 'n03065424', + 'n03075370', + 'n03085013', + 'n03089624', + 'n03095699', + 'n03100240', + 'n03109150', + 'n03110669', + 'n03124043', + 'n03124170', + 'n03125729', + 'n03126707', + 'n03127747', + 'n03127925', + 'n03131574', + 'n03133878', + 'n03134739', + 'n03141823', + 'n03146219', + 'n03160309', + 'n03179701', + 'n03180011', + 'n03187595', + 'n03188531', + 'n03196217', + 'n03197337', + 'n03201208', + 'n03207743', + 'n03207941', + 'n03208938', + 'n03216828', + 'n03218198', + 'n03220513', + 'n03223299', + 'n03240683', + 'n03249569', + 'n03250847', + 'n03255030', + 'n03259280', + 'n03271574', + 'n03272010', + 'n03272562', + 'n03290653', + 'n03291819', + 'n03297495', + 'n03314780', + 'n03325584', + 'n03337140', + 'n03344393', + 'n03345487', + 'n03347037', + 'n03355925', + 'n03372029', + 'n03376595', + 'n03379051', + 'n03384352', + 'n03388043', + 'n03388183', + 'n03388549', + 'n03393912', + 'n03394916', + 'n03400231', + 'n03404251', + 'n03417042', + 'n03424325', + 'n03425413', + 'n03443371', + 'n03444034', + 'n03445777', + 'n03445924', + 'n03447447', + 'n03447721', + 'n03450230', + 'n03452741', + 'n03457902', + 'n03459775', + 'n03461385', + 'n03467068', + 'n03476684', + 'n03476991', + 'n03478589', + 'n03481172', + 'n03482405', + 'n03483316', + 'n03485407', + 'n03485794', + 'n03492542', + 'n03494278', + 'n03495258', + 'n03496892', + 'n03498962', + 'n03527444', + 'n03529860', + 'n03530642', + 'n03532672', + 'n03534580', + 'n03535780', + 'n03538406', + 'n03544143', + 'n03584254', + 'n03584829', + 'n03590841', + 'n03594734', + 'n03594945', + 'n03595614', + 'n03598930', + 'n03599486', + 'n03602883', + 'n03617480', + 'n03623198', + 'n03627232', + 'n03630383', + 'n03633091', + 'n03637318', + 'n03642806', + 'n03649909', + 'n03657121', + 'n03658185', + 'n03661043', + 'n03662601', + 'n03666591', + 'n03670208', + 'n03673027', + 'n03676483', + 'n03680355', + 'n03690938', + 'n03691459', + 'n03692522', + 'n03697007', + 'n03706229', + 'n03709823', + 'n03710193', + 'n03710637', + 'n03710721', + 'n03717622', + 'n03720891', + 'n03721384', + 'n03724870', + 'n03729826', + 'n03733131', + 'n03733281', + 'n03733805', + 'n03742115', + 'n03743016', + 'n03759954', + 'n03761084', + 'n03763968', + 'n03764736', + 'n03769881', + 'n03770439', + 'n03770679', + 'n03773504', + 'n03775071', + 'n03775546', + 'n03776460', + 'n03777568', + 'n03777754', + 'n03781244', + 'n03782006', + 'n03785016', + 'n03786901', + 'n03787032', + 'n03788195', + 'n03788365', + 'n03791053', + 'n03792782', + 'n03792972', + 'n03793489', + 'n03794056', + 'n03796401', + 'n03803284', + 'n03804744', + 'n03814639', + 'n03814906', + 'n03825788', + 'n03832673', + 'n03837869', + 'n03838899', + 'n03840681', + 'n03841143', + 'n03843555', + 'n03854065', + 'n03857828', + 'n03866082', + 'n03868242', + 'n03868863', + 'n03871628', + 'n03873416', + 'n03874293', + 'n03874599', + 'n03876231', + 'n03877472', + 'n03877845', + 'n03884397', + 'n03887697', + 'n03888257', + 'n03888605', + 'n03891251', + 'n03891332', + 'n03895866', + 'n03899768', + 'n03902125', + 'n03903868', + 'n03908618', + 'n03908714', + 'n03916031', + 'n03920288', + 'n03924679', + 'n03929660', + 'n03929855', + 'n03930313', + 'n03930630', + 'n03933933', + 'n03935335', + 'n03937543', + 'n03938244', + 'n03942813', + 'n03944341', + 'n03947888', + 'n03950228', + 'n03954731', + 'n03956157', + 'n03958227', + 'n03961711', + 'n03967562', + 'n03970156', + 'n03976467', + 'n03976657', + 'n03977966', + 'n03980874', + 'n03982430', + 'n03983396', + 'n03991062', + 'n03992509', + 'n03995372', + 'n03998194', + 'n04004767', + 'n04005630', + 'n04008634', + 'n04009552', + 'n04019541', + 'n04023962', + 'n04026417', + 'n04033901', + 'n04033995', + 'n04037443', + 'n04039381', + 'n04040759', + 'n04041544', + 'n04044716', + 'n04049303', + 'n04065272', + 'n04067472', + 'n04069434', + 'n04070727', + 'n04074963', + 'n04081281', + 'n04086273', + 'n04090263', + 'n04099969', + 'n04111531', + 'n04116512', + 'n04118538', + 'n04118776', + 'n04120489', + 'n04125021', + 'n04127249', + 'n04131690', + 'n04133789', + 'n04136333', + 'n04141076', + 'n04141327', + 'n04141975', + 'n04146614', + 'n04147183', + 'n04149813', + 'n04152593', + 'n04153751', + 'n04154565', + 'n04162706', + 'n04179913', + 'n04192698', + 'n04200800', + 'n04201297', + 'n04204238', + 'n04204347', + 'n04208210', + 'n04209133', + 'n04209239', + 'n04228054', + 'n04229816', + 'n04235860', + 'n04238763', + 'n04239074', + 'n04243546', + 'n04251144', + 'n04252077', + 'n04252225', + 'n04254120', + 'n04254680', + 'n04254777', + 'n04258138', + 'n04259630', + 'n04263257', + 'n04264628', + 'n04265275', + 'n04266014', + 'n04270147', + 'n04273569', + 'n04275548', + 'n04277352', + 'n04285008', + 'n04286575', + 'n04296562', + 'n04310018', + 'n04311004', + 'n04311174', + 'n04317175', + 'n04325704', + 'n04326547', + 'n04328186', + 'n04330267', + 'n04332243', + 'n04335435', + 'n04336792', + 'n04344873', + 'n04346328', + 'n04347754', + 'n04350905', + 'n04355338', + 'n04355933', + 'n04356056', + 'n04357314', + 'n04366367', + 'n04367480', + 'n04370456', + 'n04371430', + 'n04371774', + 'n04372370', + 'n04376876', + 'n04380533', + 'n04389033', + 'n04392985', + 'n04398044', + 'n04399382', + 'n04404412', + 'n04409515', + 'n04417672', + 'n04418357', + 'n04423845', + 'n04428191', + 'n04429376', + 'n04435653', + 'n04442312', + 'n04443257', + 'n04447861', + 'n04456115', + 'n04458633', + 'n04461696', + 'n04462240', + 'n04465501', + 'n04467665', + 'n04476259', + 'n04479046', + 'n04482393', + 'n04483307', + 'n04485082', + 'n04486054', + 'n04487081', + 'n04487394', + 'n04493381', + 'n04501370', + 'n04505470', + 'n04507155', + 'n04509417', + 'n04515003', + 'n04517823', + 'n04522168', + 'n04523525', + 'n04525038', + 'n04525305', + 'n04532106', + 'n04532670', + 'n04536866', + 'n04540053', + 'n04542943', + 'n04548280', + 'n04548362', + 'n04550184', + 'n04552348', + 'n04553703', + 'n04554684', + 'n04557648', + 'n04560804', + 'n04562935', + 'n04579145', + 'n04579432', + 'n04584207', + 'n04589890', + 'n04590129', + 'n04591157', + 'n04591713', + 'n04592741', + 'n04596742', + 'n04597913', + 'n04599235', + 'n04604644', + 'n04606251', + 'n04612504', + 'n04613696', + 'n06359193', + 'n06596364', + 'n06785654', + 'n06794110', + 'n06874185', + 'n07248320', + 'n07565083', + 'n07579787', + 'n07583066', + 'n07584110', + 'n07590611', + 'n07613480', + 'n07614500', + 'n07615774', + 'n07684084', + 'n07693725', + 'n07695742', + 'n07697313', + 'n07697537', + 'n07711569', + 'n07714571', + 'n07714990', + 'n07715103', + 'n07716358', + 'n07716906', + 'n07717410', + 'n07717556', + 'n07718472', + 'n07718747', + 'n07720875', + 'n07730033', + 'n07734744', + 'n07742313', + 'n07745940', + 'n07747607', + 'n07749582', + 'n07753113', + 'n07753275', + 'n07753592', + 'n07754684', + 'n07760859', + 'n07768694', + 'n07802026', + 'n07831146', + 'n07836838', + 'n07860988', + 'n07871810', + 'n07873807', + 'n07875152', + 'n07880968', + 'n07892512', + 'n07920052', + 'n07930864', + 'n07932039', + 'n09193705', + 'n09229709', + 'n09246464', + 'n09256479', + 'n09288635', + 'n09332890', + 'n09399592', + 'n09421951', + 'n09428293', + 'n09468604', + 'n09472597', + 'n09835506', + 'n10148035', + 'n10565667', + 'n11879895', + 'n11939491', + 'n12057211', + 'n12144580', + 'n12267677', + 'n12620546', + 'n12768682', + 'n12985857', + 'n12998815', + 'n13037406', + 'n13040303', + 'n13044778', + 'n13052670', + 'n13054560', + 'n13133613', + 'n15075141') diff --git a/docs/source/reference/datasets.rst b/docs/source/reference/datasets.rst index fcbefc9bec..d8e6485b61 100644 --- a/docs/source/reference/datasets.rst +++ b/docs/source/reference/datasets.rst @@ -71,6 +71,10 @@ ImagenetDetBboxDataset ~~~~~~~~~~~~~~~~~~~~~~ .. autoclass:: ImagenetDetBboxDataset +ImagenetLocBboxDataset +~~~~~~~~~~~~~~~~~~~~~~ +.. autoclass:: ImagenetLocBboxDataset + MS COCO ------- From 300a5f60ae57ccdb824813e621854d2d8b11c678 Mon Sep 17 00:00:00 2001 From: Yusuke Niitani Date: Sat, 7 Jul 2018 21:37:07 +0900 Subject: [PATCH 08/15] support year 2013 --- .../imagenet/imagenet_det_bbox_dataset.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py b/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py index 697740c294..7797afa38a 100644 --- a/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py +++ b/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py @@ -11,7 +11,7 @@ class ImagenetDetBboxDataset(GetterDataset): - """ILSVRC2014 ImageNet detection dataset. + """ILSVRC ImageNet detection dataset. The data is distributed on the `official Kaggle page`_. @@ -33,7 +33,10 @@ class ImagenetDetBboxDataset(GetterDataset): data_dir (string): Path to the root of the training data. If this is :obj:`auto`, :obj:`$CHAINER_DATASET_ROOT/pfnet/chainercv/imagenet` is used. - split ({'train', 'val'}): Selects a split of the dataset. + split ({'train', 'val', 'val1', 'val2'}): Selects a split of the + dataset. + year ({'2013', '2014'}): Use a dataset prepared for a challenge + held in :obj:`year`. The default value is :obj:`2014`. return_img_label (bool): If :obj:`True`, this dataset returns image-wise labels. This consists of two arrays: :obj:`img_label` and :obj:`img_label_type`. @@ -64,11 +67,16 @@ class ImagenetDetBboxDataset(GetterDataset): """ - def __init__(self, data_dir='auto', split='train', return_img_label=False): + def __init__(self, data_dir='auto', split='train', year='2014', + return_img_label=False): super(ImagenetDetBboxDataset, self).__init__() if data_dir == 'auto': data_dir = download.get_dataset_directory( 'pfnet/chainercv/imagenet') + + if year not in ('2013', '2014'): + raise ValueError('\'year\' has to be either ' + '\'2013\' or \'2014\'.') self.base_dir = os.path.join(data_dir, 'ILSVRC') imageset_dir = os.path.join(self.base_dir, 'ImageSets/DET') @@ -79,6 +87,9 @@ def __init__(self, data_dir='auto', split='train', return_img_label=False): imageset_dir, 'train_{}.txt'.format(lb + 1))) as f: for l in f: id_ = l.split()[0] + if 'ILSVRC2014' in id_ and year != '2014': + continue + anno_type = l.split()[1] if id_ not in img_labels: img_labels[id_] = [] @@ -91,7 +102,7 @@ def __init__(self, data_dir='auto', split='train', return_img_label=False): 'return_img_label is True') ids = [] with open(os.path.join( - imageset_dir, 'val.txt')) as f: + imageset_dir, '{}.txt'.format(split))) as f: for l in f: id_ = l.split()[0] ids.append(id_) From 746eb58a883c640b70e624517eb65974f6f9b5b8 Mon Sep 17 00:00:00 2001 From: Yusuke Niitani Date: Sat, 7 Jul 2018 21:43:45 +0900 Subject: [PATCH 09/15] fix bug with val1 and val2 --- chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py b/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py index 7797afa38a..a9d1122ad7 100644 --- a/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py +++ b/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py @@ -96,6 +96,7 @@ def __init__(self, data_dir='auto', split='train', year='2014', img_labels[id_].append((lb, int(anno_type))) self.img_labels = img_labels self.ids = list(img_labels.keys()) + self.split_type = 'train' else: if return_img_label: raise ValueError('split has to be \'train\' when ' @@ -107,8 +108,7 @@ def __init__(self, data_dir='auto', split='train', year='2014', id_ = l.split()[0] ids.append(id_) self.ids = ids - - self.split = split + self.split_type = 'val' self.add_getter('img', self._get_image) self.add_getter(('bbox', 'label'), self._get_inst_anno) @@ -121,7 +121,7 @@ def __len__(self): def _get_image(self, i): img_path = os.path.join( - self.base_dir, 'Data/DET', self.split, + self.base_dir, 'Data/DET', self.split_type, self.ids[i] + '.JPEG') img = read_image(img_path, color=True) return img @@ -129,7 +129,7 @@ def _get_image(self, i): def _get_inst_anno(self, i): if 'extra' not in self.ids[i]: anno_path = os.path.join( - self.base_dir, 'Annotations/DET', self.split, + self.base_dir, 'Annotations/DET', self.split_type, self.ids[i] + '.xml') bbox, label, _ = parse_voc_bbox_annotation( anno_path, imagenet_det_synset_ids, From 07097045a269d993a8419035b5f2591553e204b1 Mon Sep 17 00:00:00 2001 From: Yusuke Niitani Date: Mon, 9 Jul 2018 10:54:05 +0900 Subject: [PATCH 10/15] add an option to ignore blacklist --- .../imagenet/imagenet_det_bbox_dataset.py | 28 +++++++++++++++++-- chainercv/datasets/imagenet/imagenet_utils.py | 20 +++++++++++++ 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py b/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py index a9d1122ad7..21ef3ee7e3 100644 --- a/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py +++ b/chainercv/datasets/imagenet/imagenet_det_bbox_dataset.py @@ -4,6 +4,7 @@ from chainer.dataset import download from chainercv.chainer_experimental.datasets.sliceable import GetterDataset +from chainercv.datasets.imagenet.imagenet_utils import get_ilsvrc_devkit from chainercv.datasets.imagenet.imagenet_utils import imagenet_det_synset_ids from chainercv.datasets.voc.voc_utils import parse_voc_bbox_annotation from chainercv.utils import read_image @@ -40,6 +41,9 @@ class ImagenetDetBboxDataset(GetterDataset): return_img_label (bool): If :obj:`True`, this dataset returns image-wise labels. This consists of two arrays: :obj:`img_label` and :obj:`img_label_type`. + use_val_blacklist (bool): If :obj:`False`, images that are + included in the blacklist are avoided when + the split is :obj:`val`. The default value is :obj:`False`. This dataset returns the following data. @@ -68,11 +72,15 @@ class ImagenetDetBboxDataset(GetterDataset): """ def __init__(self, data_dir='auto', split='train', year='2014', - return_img_label=False): + return_img_label=False, use_val_blacklist=False): super(ImagenetDetBboxDataset, self).__init__() if data_dir == 'auto': data_dir = download.get_dataset_directory( 'pfnet/chainercv/imagenet') + get_ilsvrc_devkit() + val_blacklist_path = os.path.join( + data_dir, 'ILSVRC2014_devkit/data/', + 'ILSVRC2014_det_validation_blacklist.txt') if year not in ('2013', '2014'): raise ValueError('\'year\' has to be either ' @@ -101,12 +109,28 @@ def __init__(self, data_dir='auto', split='train', year='2014', if return_img_label: raise ValueError('split has to be \'train\' when ' 'return_img_label is True') + if use_val_blacklist: + blacklist_ids = [] + else: + ids = [] + with open(os.path.join( + imageset_dir, 'val.txt'.format(split))) as f: + for l in f: + id_ = l.split()[0] + ids.append(id_) + blacklist_ids = [] + with open(val_blacklist_path) as f: + for l in f: + index = int(l.split()[0]) + blacklist_ids.append(ids[index]) + ids = [] with open(os.path.join( imageset_dir, '{}.txt'.format(split))) as f: for l in f: id_ = l.split()[0] - ids.append(id_) + if id_ not in blacklist_ids: + ids.append(id_) self.ids = ids self.split_type = 'val' diff --git a/chainercv/datasets/imagenet/imagenet_utils.py b/chainercv/datasets/imagenet/imagenet_utils.py index f39970a373..cfa28b2c78 100644 --- a/chainercv/datasets/imagenet/imagenet_utils.py +++ b/chainercv/datasets/imagenet/imagenet_utils.py @@ -1,3 +1,23 @@ +import os + +from chainer.dataset import download +from chainercv import utils + +root = 'pfnet/chainercv/imagenet' +devkit_url = 'http://image-net.org/image/ilsvrc2014/ILSVRC2014_devkit.tgz' + + +def get_ilsvrc_devkit(): + data_root = download.get_dataset_directory(root) + base_dir = os.path.join(data_root, 'ILSVRC2014_devkit') + if os.path.exists(base_dir): + return data_root + download_file_path = utils.cached_download(devkit_url) + ext = os.path.splitext(devkit_url)[1] + utils.extractall(download_file_path, data_root, ext) + return data_root + + # Look up meta_det.mat from dev kit imagenet_det_bbox_label_names = ( 'accordion', From 6104a378b6752021bab6a40441722a2b10c2bcdc Mon Sep 17 00:00:00 2001 From: Yusuke Niitani Date: Mon, 9 Jul 2018 15:13:26 +0900 Subject: [PATCH 11/15] support use_val_blacklist --- .../imagenet/imagenet_loc_bbox_dataset.py | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/chainercv/datasets/imagenet/imagenet_loc_bbox_dataset.py b/chainercv/datasets/imagenet/imagenet_loc_bbox_dataset.py index 1e58a47d9b..93ddfffe18 100644 --- a/chainercv/datasets/imagenet/imagenet_loc_bbox_dataset.py +++ b/chainercv/datasets/imagenet/imagenet_loc_bbox_dataset.py @@ -3,6 +3,7 @@ from chainer.dataset import download from chainercv.chainer_experimental.datasets.sliceable import GetterDataset +from chainercv.datasets.imagenet.imagenet_utils import get_ilsvrc_devkit from chainercv.datasets.imagenet.imagenet_utils import imagenet_loc_synset_ids from chainercv.datasets.voc.voc_utils import parse_voc_bbox_annotation from chainercv.utils import read_image @@ -29,6 +30,9 @@ class ImagenetLocBboxDataset(GetterDataset): :obj:`auto`, :obj:`$CHAINER_DATASET_ROOT/pfnet/chainercv/imagenet` is used. split ({'train', 'val'}): Selects a split of the dataset. + use_val_blacklist (bool): If :obj:`False`, images that are + included in the blacklist are avoided when + the split is :obj:`val`. The default value is :obj:`False`. This dataset returns the following data. @@ -44,11 +48,16 @@ class ImagenetLocBboxDataset(GetterDataset): """ - def __init__(self, data_dir='auto', split='train'): + def __init__(self, data_dir='auto', split='train', + use_val_blacklist=False): super(ImagenetLocBboxDataset, self).__init__() if data_dir == 'auto': data_dir = download.get_dataset_directory( 'pfnet/chainercv/imagenet') + get_ilsvrc_devkit() + val_blacklist_path = os.path.join( + data_dir, 'ILSVRC2014_devkit/data/', + 'ILSVRC2014_clsloc_validation_blacklist.txt') self.base_dir = os.path.join(data_dir, 'ILSVRC') imageset_dir = os.path.join(self.base_dir, 'ImageSets/CLS-LOC') @@ -57,10 +66,19 @@ def __init__(self, data_dir='auto', split='train'): imageset_path = os.path.join(imageset_dir, 'train_loc.txt') elif split == 'val': imageset_path = os.path.join(imageset_dir, 'val.txt') + + if not use_val_blacklist: + blacklist = [] + with open(val_blacklist_path) as f: + for l in f: + blacklist.append(int(l)) + else: + blacklist = [] with open(imageset_path) as f: for l in f: - id_ = l.split()[0] - ids.append(id_) + if int(l.split()[1]) not in blacklist: + id_ = l.split()[0] + ids.append(id_) self.ids = ids self.split = split From aab3fd34df953749509fd17ed7aeefd180983a5b Mon Sep 17 00:00:00 2001 From: Yusuke Niitani Date: Mon, 9 Jul 2018 15:50:03 +0900 Subject: [PATCH 12/15] add ImagenetFullBboxDataset --- chainercv/datasets/__init__.py | 3 + .../imagenet/imagenet_full_bbox_dataset.py | 126 + chainercv/datasets/imagenet/imagenet_utils.py | 3657 +++++++++++++++++ docs/source/reference/datasets.rst | 4 + 4 files changed, 3790 insertions(+) create mode 100644 chainercv/datasets/imagenet/imagenet_full_bbox_dataset.py diff --git a/chainercv/datasets/__init__.py b/chainercv/datasets/__init__.py index 54736c3d6f..b2bc6b5f2f 100644 --- a/chainercv/datasets/__init__.py +++ b/chainercv/datasets/__init__.py @@ -20,9 +20,12 @@ from chainercv.datasets.directory_parsing_label_dataset import directory_parsing_label_names # NOQA from chainercv.datasets.directory_parsing_label_dataset import DirectoryParsingLabelDataset # NOQA from chainercv.datasets.imagenet.imagenet_det_bbox_dataset import ImagenetDetBboxDataset # NOQA +from chainercv.datasets.imagenet.imagenet_full_bbox_dataset import ImagenetFullBboxDataset # NOQA from chainercv.datasets.imagenet.imagenet_loc_bbox_dataset import ImagenetLocBboxDataset # NOQA +from chainercv.datasets.imagenet.imagenet_utils import get_imagenet_full_bbox_label_names # NOQA from chainercv.datasets.imagenet.imagenet_utils import imagenet_det_bbox_label_names # NOQA from chainercv.datasets.imagenet.imagenet_utils import imagenet_det_synset_ids # NOQA +from chainercv.datasets.imagenet.imagenet_utils import imagenet_full_bbox_synset_ids # NOQA from chainercv.datasets.imagenet.imagenet_utils import imagenet_loc_bbox_label_names # NOQA from chainercv.datasets.imagenet.imagenet_utils import imagenet_loc_synset_ids # NOQA from chainercv.datasets.mixup_soft_label_dataset import MixUpSoftLabelDataset # NOQA diff --git a/chainercv/datasets/imagenet/imagenet_full_bbox_dataset.py b/chainercv/datasets/imagenet/imagenet_full_bbox_dataset.py new file mode 100644 index 0000000000..6ad799988b --- /dev/null +++ b/chainercv/datasets/imagenet/imagenet_full_bbox_dataset.py @@ -0,0 +1,126 @@ +import numpy as np +import os + +from chainer.dataset import download + +from chainercv.chainer_experimental.datasets.sliceable import GetterDataset +from chainercv.datasets.imagenet.imagenet_utils import \ + imagenet_full_bbox_synset_ids +from chainercv.datasets.voc.voc_utils import parse_voc_bbox_annotation +from chainercv.utils import read_image + + +class ImagenetFullBboxDataset(GetterDataset): + + """ImageNet with bounding box annotation. + + There are 3627 categories in this dataset. + + Readable label names can be found by + :obj:`chainercv.datasets.get_imagenet_full_bbox_label_names`. + + The data needs to be downloaded from the official page. + There are four steps to prepare data. + + 1. Download annotations http://image-net.org/download-bboxes from \ + http://image-net.org/Annotation/Annotation.tar.gz. + 2. Expand it under :obj:`DATA_DIR/Full/Annotation` with the following \ + command. + + .. code:: + + find -name "*.tar.gz" | while read NAME ; \\ + do tar -xvf "${NAME%.tar.gz}.tar.gz" ; done + + 3. Download images using ImageNet API for all synset ids in \ + :obj:`imagenet_full_bbox_synset_ids`. Images for each synset \ + can be downloaded by a command like below. You need to register \ + ImageNet website to use this API. + + .. code:: + + wget -O Data/.tar "http://www.image-net.org/download/synset? \\ + wnid=&username=&accesskey=&release=latest& \\ + src=stanford + + 4. Expand images under :obj:`DATA_DIR/Full/Data` with the following \ + command. + + .. code:: + + find -name "*.tar" | while read NAME ; do mkdir ${NAME%.tar}; \\ + mv ${NAME%.tar}.tar ${NAME%.tar}; cd ${NAME%.tar}; \\ + tar -xvf ${NAME%.tar}.tar; rm ${NAME%.tar}.tar ; cd ..; done + + Args: + data_dir (string): Path to the root of the data. If this is + :obj:`auto`, + :obj:`$CHAINER_DATASET_ROOT/pfnet/chainercv/imagenet` is used. + return_img_label (bool): If :obj:`True`, this dataset returns + image-wise labels. + + This dataset returns the following data. + + .. csv-table:: + :header: name, shape, dtype, format + + :obj:`img`, ":math:`(3, H, W)`", :obj:`float32`, \ + "RGB, :math:`[0, 255]`" + :obj:`bbox`, ":math:`(R, 4)`", :obj:`float32`, \ + ":math:`(y_{min}, x_{min}, y_{max}, x_{max})`" + :obj:`label`, ":math:`(R,)`", :obj:`int32`, \ + ":math:`[0, \#fg\_class - 1]`" + :obj:`img_label` [#imagenet_full_1]_, ":math:`()`", :obj:`int32`, \ + ":math:`[0, \#fg\_class - 1]`" + + .. [#imagenet_full_1] available + if :obj:`return_img_label = True`. + + """ + def __init__(self, data_dir='auto', + return_img_label=False): + super(ImagenetFullBboxDataset, self).__init__() + if data_dir == 'auto': + data_dir = download.get_dataset_directory( + 'pfnet/chainercv/imagenet') + self.base_dir = os.path.join(data_dir, 'Full') + + self.paths = [] + self.cls_names = [] + self.img_paths = [] + image_dir = os.path.join(self.base_dir, 'Annotation') + count = 0 + for cls_name in sorted(os.listdir(image_dir)): + count += 1 + cls_dir = os.path.join(image_dir, cls_name) + for name in sorted(os.listdir(cls_dir)): + img_path = os.path.join( + self.base_dir, 'Data', cls_name, name[:-4] + '.JPEG') + if os.path.exists(img_path): + self.paths.append(os.path.join(cls_dir, name)) + self.img_paths.append(img_path) + self.cls_names.append(cls_name) + + self.add_getter('img', self._get_image) + self.add_getter(('bbox', 'label'), self._get_inst_anno) + self.add_getter('img_label', self._get_img_label) + if not return_img_label: + self.keys = ('img', 'bbox', 'label') + + def __len__(self): + return len(self.paths) + + def _get_image(self, i): + img = read_image(self.img_paths[i], color=True) + return img + + def _get_inst_anno(self, i): + bbox, label, _ = parse_voc_bbox_annotation( + self.paths[i], imagenet_full_bbox_synset_ids, + skip_names_not_in_label_names=False) + return bbox, label + + def _get_img_label(self, i): + label = imagenet_full_bbox_synset_ids.index( + self.cls_names[i]) + return np.array([label], dtype=np.int32) diff --git a/chainercv/datasets/imagenet/imagenet_utils.py b/chainercv/datasets/imagenet/imagenet_utils.py index aa257b2026..4b56234e0c 100644 --- a/chainercv/datasets/imagenet/imagenet_utils.py +++ b/chainercv/datasets/imagenet/imagenet_utils.py @@ -1,10 +1,12 @@ import os +import shutil from chainer.dataset import download from chainercv import utils root = 'pfnet/chainercv/imagenet' devkit_url = 'http://image-net.org/image/ilsvrc2014/ILSVRC2014_devkit.tgz' +synset_to_name_url = 'http://image-net.org/archive/words.txt' def get_ilsvrc_devkit(): @@ -18,6 +20,31 @@ def get_ilsvrc_devkit(): return data_root +def get_imagenet_full_bbox_label_names( + path=None, base_dir='auto', keep_n=2): + if path is None: + if base_dir == 'auto': + data_root = download.get_dataset_directory(root) + path = os.path.join(data_root, 'word.txt') + if not os.path.exists(path): + download_file_path = utils.cached_download(synset_to_name_url) + shutil.move(download_file_path, path) + + syn_to_name = {} + with open(path) as f: + for l in f: + out = l.split() + synset_id = out[0] + rest = out[1:keep_n + 1] + + syn_to_name[synset_id] = ','.join(rest) + + label_names = [] + for name in imagenet_full_bbox_synset_ids: + label_names.append(syn_to_name[name]) + return label_names + + # Look up meta_det.mat from dev kit imagenet_det_bbox_label_names = ( 'accordion', @@ -2430,3 +2457,3633 @@ def get_ilsvrc_devkit(): 'n13054560', 'n13133613', 'n15075141') + + +imagenet_full_bbox_synset_ids = ( + 'n00007846', + 'n00015388', + 'n00017222', + 'n00021265', + 'n00439826', + 'n00440039', + 'n00440941', + 'n00441824', + 'n00443692', + 'n00445351', + 'n00451186', + 'n00452293', + 'n00464894', + 'n00467719', + 'n00468480', + 'n00470966', + 'n00471613', + 'n00474568', + 'n00478262', + 'n00479076', + 'n00480993', + 'n00482298', + 'n00483205', + 'n00483705', + 'n00523513', + 'n01055165', + 'n01315805', + 'n01316949', + 'n01318381', + 'n01318894', + 'n01319467', + 'n01321123', + 'n01321230', + 'n01321579', + 'n01322604', + 'n01440242', + 'n01440764', + 'n01443537', + 'n01447331', + 'n01458842', + 'n01482330', + 'n01483021', + 'n01484850', + 'n01486540', + 'n01487506', + 'n01489709', + 'n01489920', + 'n01491361', + 'n01494475', + 'n01496331', + 'n01498041', + 'n01503061', + 'n01514668', + 'n01514859', + 'n01515078', + 'n01518878', + 'n01527347', + 'n01530575', + 'n01531178', + 'n01532829', + 'n01534433', + 'n01537544', + 'n01538200', + 'n01538630', + 'n01546039', + 'n01558993', + 'n01560419', + 'n01569566', + 'n01578180', + 'n01579028', + 'n01580077', + 'n01581434', + 'n01582220', + 'n01586374', + 'n01592084', + 'n01594372', + 'n01594787', + 'n01594968', + 'n01595624', + 'n01596273', + 'n01601694', + 'n01605630', + 'n01606978', + 'n01608432', + 'n01613294', + 'n01613615', + 'n01614925', + 'n01615121', + 'n01616318', + 'n01621127', + 'n01622779', + 'n01629819', + 'n01630670', + 'n01631663', + 'n01632458', + 'n01632777', + 'n01639765', + 'n01641206', + 'n01641391', + 'n01641577', + 'n01644373', + 'n01644900', + 'n01661091', + 'n01662784', + 'n01663401', + 'n01664065', + 'n01665541', + 'n01667114', + 'n01667778', + 'n01669191', + 'n01674464', + 'n01675722', + 'n01677366', + 'n01680478', + 'n01680655', + 'n01680813', + 'n01681328', + 'n01682714', + 'n01683558', + 'n01685808', + 'n01687978', + 'n01688243', + 'n01689811', + 'n01692333', + 'n01693334', + 'n01694178', + 'n01694709', + 'n01694955', + 'n01695060', + 'n01697457', + 'n01698640', + 'n01704323', + 'n01726692', + 'n01728572', + 'n01728920', + 'n01729322', + 'n01729977', + 'n01732789', + 'n01734418', + 'n01735189', + 'n01736375', + 'n01737021', + 'n01737875', + 'n01738601', + 'n01739381', + 'n01740131', + 'n01742172', + 'n01743936', + 'n01744401', + 'n01748264', + 'n01749939', + 'n01751748', + 'n01752165', + 'n01752736', + 'n01753488', + 'n01755581', + 'n01756291', + 'n01768244', + 'n01770081', + 'n01770393', + 'n01772222', + 'n01773157', + 'n01773549', + 'n01773797', + 'n01774384', + 'n01774750', + 'n01775062', + 'n01776313', + 'n01779629', + 'n01782516', + 'n01784675', + 'n01786646', + 'n01787835', + 'n01790812', + 'n01791625', + 'n01792042', + 'n01792640', + 'n01792955', + 'n01793085', + 'n01793340', + 'n01793435', + 'n01794158', + 'n01795545', + 'n01796340', + 'n01797020', + 'n01797886', + 'n01798484', + 'n01801876', + 'n01803078', + 'n01806143', + 'n01806567', + 'n01807496', + 'n01811243', + 'n01811909', + 'n01812337', + 'n01816887', + 'n01817953', + 'n01818515', + 'n01819313', + 'n01820052', + 'n01820546', + 'n01824344', + 'n01824575', + 'n01828970', + 'n01829413', + 'n01830042', + 'n01831360', + 'n01832493', + 'n01833805', + 'n01835769', + 'n01838598', + 'n01843065', + 'n01843383', + 'n01846331', + 'n01847000', + 'n01851731', + 'n01852142', + 'n01852861', + 'n01853195', + 'n01853498', + 'n01855032', + 'n01855672', + 'n01857079', + 'n01858441', + 'n01858845', + 'n01860187', + 'n01861778', + 'n01871265', + 'n01871875', + 'n01872401', + 'n01873310', + 'n01874434', + 'n01876034', + 'n01876326', + 'n01877134', + 'n01877812', + 'n01879217', + 'n01880473', + 'n01880716', + 'n01881171', + 'n01881564', + 'n01882714', + 'n01883070', + 'n01884476', + 'n01885498', + 'n01886756', + 'n01887474', + 'n01887787', + 'n01887896', + 'n01889074', + 'n01889520', + 'n01892030', + 'n01894207', + 'n01909906', + 'n01910747', + 'n01914609', + 'n01915700', + 'n01915811', + 'n01916481', + 'n01917289', + 'n01917611', + 'n01917882', + 'n01922303', + 'n01924916', + 'n01930112', + 'n01935395', + 'n01943899', + 'n01944390', + 'n01945685', + 'n01950731', + 'n01953361', + 'n01955084', + 'n01956481', + 'n01959029', + 'n01963571', + 'n01968897', + 'n01978287', + 'n01978455', + 'n01978930', + 'n01979526', + 'n01980166', + 'n01981276', + 'n01983481', + 'n01984695', + 'n01985128', + 'n01986214', + 'n01986806', + 'n01990800', + 'n01998183', + 'n02000954', + 'n02002556', + 'n02002724', + 'n02006656', + 'n02007558', + 'n02009229', + 'n02009380', + 'n02009912', + 'n02010453', + 'n02010728', + 'n02011460', + 'n02011805', + 'n02012849', + 'n02013177', + 'n02013706', + 'n02014941', + 'n02015357', + 'n02015797', + 'n02017213', + 'n02018207', + 'n02018795', + 'n02022684', + 'n02025239', + 'n02027492', + 'n02028035', + 'n02031934', + 'n02033041', + 'n02037110', + 'n02041246', + 'n02049088', + 'n02051845', + 'n02055803', + 'n02056570', + 'n02058221', + 'n02062430', + 'n02062744', + 'n02064000', + 'n02064338', + 'n02065026', + 'n02066245', + 'n02068974', + 'n02070430', + 'n02070776', + 'n02071294', + 'n02071636', + 'n02072040', + 'n02072493', + 'n02073250', + 'n02073831', + 'n02074367', + 'n02074726', + 'n02075296', + 'n02076196', + 'n02077923', + 'n02080415', + 'n02081571', + 'n02081927', + 'n02082791', + 'n02084071', + 'n02084732', + 'n02084861', + 'n02085019', + 'n02085118', + 'n02085272', + 'n02085374', + 'n02085620', + 'n02085782', + 'n02085936', + 'n02086079', + 'n02086240', + 'n02086346', + 'n02086478', + 'n02086646', + 'n02086753', + 'n02086910', + 'n02087046', + 'n02087314', + 'n02087394', + 'n02087551', + 'n02088094', + 'n02088238', + 'n02088364', + 'n02088466', + 'n02088632', + 'n02088839', + 'n02088992', + 'n02089078', + 'n02089232', + 'n02089468', + 'n02089555', + 'n02089725', + 'n02089867', + 'n02089973', + 'n02090129', + 'n02090379', + 'n02090475', + 'n02090622', + 'n02090721', + 'n02090827', + 'n02091032', + 'n02091134', + 'n02091244', + 'n02091467', + 'n02091635', + 'n02091831', + 'n02092002', + 'n02092173', + 'n02092339', + 'n02092468', + 'n02093056', + 'n02093256', + 'n02093428', + 'n02093647', + 'n02093754', + 'n02093859', + 'n02093991', + 'n02094114', + 'n02094258', + 'n02094433', + 'n02094931', + 'n02095212', + 'n02095314', + 'n02095412', + 'n02095570', + 'n02095889', + 'n02096051', + 'n02096177', + 'n02096294', + 'n02096437', + 'n02096585', + 'n02096756', + 'n02097047', + 'n02097130', + 'n02097209', + 'n02097298', + 'n02097474', + 'n02097658', + 'n02098105', + 'n02098286', + 'n02098413', + 'n02098806', + 'n02098906', + 'n02099029', + 'n02099267', + 'n02099429', + 'n02099601', + 'n02099712', + 'n02099849', + 'n02100236', + 'n02100583', + 'n02100735', + 'n02100877', + 'n02101006', + 'n02101108', + 'n02101388', + 'n02101556', + 'n02101670', + 'n02102040', + 'n02102177', + 'n02102318', + 'n02102480', + 'n02102973', + 'n02103181', + 'n02103406', + 'n02104029', + 'n02104184', + 'n02104280', + 'n02104365', + 'n02104523', + 'n02105056', + 'n02105162', + 'n02105251', + 'n02105412', + 'n02105505', + 'n02105641', + 'n02105855', + 'n02106030', + 'n02106166', + 'n02106382', + 'n02106550', + 'n02106662', + 'n02106854', + 'n02106966', + 'n02107142', + 'n02107312', + 'n02107574', + 'n02107683', + 'n02107908', + 'n02108000', + 'n02108089', + 'n02108254', + 'n02108422', + 'n02108551', + 'n02108672', + 'n02108915', + 'n02109047', + 'n02109150', + 'n02109256', + 'n02109525', + 'n02109961', + 'n02110063', + 'n02110185', + 'n02110341', + 'n02110627', + 'n02110806', + 'n02110958', + 'n02111129', + 'n02111277', + 'n02111500', + 'n02111626', + 'n02111889', + 'n02112018', + 'n02112137', + 'n02112350', + 'n02112497', + 'n02112706', + 'n02112826', + 'n02113023', + 'n02113186', + 'n02113335', + 'n02113624', + 'n02113712', + 'n02113799', + 'n02113892', + 'n02113978', + 'n02114100', + 'n02114367', + 'n02114548', + 'n02114712', + 'n02114855', + 'n02115012', + 'n02115096', + 'n02115641', + 'n02115913', + 'n02116185', + 'n02116450', + 'n02116738', + 'n02117135', + 'n02118176', + 'n02118333', + 'n02119022', + 'n02119789', + 'n02120079', + 'n02120505', + 'n02120997', + 'n02121620', + 'n02122430', + 'n02123045', + 'n02123159', + 'n02123394', + 'n02123597', + 'n02124075', + 'n02125010', + 'n02125311', + 'n02125689', + 'n02126139', + 'n02126640', + 'n02126787', + 'n02127052', + 'n02127482', + 'n02127678', + 'n02128385', + 'n02128598', + 'n02128757', + 'n02128925', + 'n02129165', + 'n02129530', + 'n02129604', + 'n02129923', + 'n02129991', + 'n02130086', + 'n02130308', + 'n02131653', + 'n02132136', + 'n02132580', + 'n02133161', + 'n02134084', + 'n02134418', + 'n02135220', + 'n02136103', + 'n02136794', + 'n02137549', + 'n02137888', + 'n02138169', + 'n02138441', + 'n02138777', + 'n02139199', + 'n02142407', + 'n02147328', + 'n02147947', + 'n02149420', + 'n02152740', + 'n02152881', + 'n02153203', + 'n02159955', + 'n02163008', + 'n02165105', + 'n02165456', + 'n02167151', + 'n02168699', + 'n02169497', + 'n02170400', + 'n02172182', + 'n02174001', + 'n02176261', + 'n02177972', + 'n02190166', + 'n02196896', + 'n02200198', + 'n02205219', + 'n02206856', + 'n02211444', + 'n02219486', + 'n02220518', + 'n02226429', + 'n02229544', + 'n02230634', + 'n02231487', + 'n02233338', + 'n02236044', + 'n02243562', + 'n02243878', + 'n02244515', + 'n02247216', + 'n02256656', + 'n02259212', + 'n02262449', + 'n02264363', + 'n02268443', + 'n02268853', + 'n02270623', + 'n02274259', + 'n02274822', + 'n02276258', + 'n02277742', + 'n02279972', + 'n02280649', + 'n02281015', + 'n02281136', + 'n02281406', + 'n02281787', + 'n02283201', + 'n02299846', + 'n02313709', + 'n02317335', + 'n02318167', + 'n02319095', + 'n02319555', + 'n02321529', + 'n02323449', + 'n02323902', + 'n02324045', + 'n02325366', + 'n02326432', + 'n02326763', + 'n02327028', + 'n02328150', + 'n02328429', + 'n02329401', + 'n02330245', + 'n02331046', + 'n02332156', + 'n02332755', + 'n02333819', + 'n02333909', + 'n02336641', + 'n02339376', + 'n02342885', + 'n02343772', + 'n02344175', + 'n02344528', + 'n02346627', + 'n02348788', + 'n02350989', + 'n02351870', + 'n02352591', + 'n02352932', + 'n02353411', + 'n02355227', + 'n02356798', + 'n02357585', + 'n02358091', + 'n02358584', + 'n02358712', + 'n02359915', + 'n02360282', + 'n02361337', + 'n02361587', + 'n02363005', + 'n02364520', + 'n02364673', + 'n02364840', + 'n02366002', + 'n02366959', + 'n02368116', + 'n02368399', + 'n02370806', + 'n02372584', + 'n02373336', + 'n02374451', + 'n02375302', + 'n02375438', + 'n02376918', + 'n02377181', + 'n02377388', + 'n02377480', + 'n02377603', + 'n02377703', + 'n02378415', + 'n02378625', + 'n02378755', + 'n02379081', + 'n02379743', + 'n02380335', + 'n02380583', + 'n02380745', + 'n02381004', + 'n02381261', + 'n02381460', + 'n02381609', + 'n02382039', + 'n02382437', + 'n02383231', + 'n02384741', + 'n02386310', + 'n02386746', + 'n02386853', + 'n02387722', + 'n02388143', + 'n02388453', + 'n02388735', + 'n02389026', + 'n02389128', + 'n02389261', + 'n02389779', + 'n02390015', + 'n02390101', + 'n02390258', + 'n02390738', + 'n02390938', + 'n02391049', + 'n02391617', + 'n02391994', + 'n02393580', + 'n02395003', + 'n02395406', + 'n02395931', + 'n02396088', + 'n02396427', + 'n02396796', + 'n02397096', + 'n02397529', + 'n02398521', + 'n02399000', + 'n02401031', + 'n02402010', + 'n02402425', + 'n02403003', + 'n02403325', + 'n02403454', + 'n02403740', + 'n02403820', + 'n02404186', + 'n02404432', + 'n02404906', + 'n02405440', + 'n02406174', + 'n02407763', + 'n02408429', + 'n02408817', + 'n02409038', + 'n02410011', + 'n02410509', + 'n02410900', + 'n02411705', + 'n02411999', + 'n02412080', + 'n02412210', + 'n02412440', + 'n02413050', + 'n02413131', + 'n02414209', + 'n02414290', + 'n02414578', + 'n02414763', + 'n02415130', + 'n02415253', + 'n02415435', + 'n02415577', + 'n02415829', + 'n02416104', + 'n02416519', + 'n02416820', + 'n02417785', + 'n02417914', + 'n02418465', + 'n02418770', + 'n02419056', + 'n02419634', + 'n02419796', + 'n02420509', + 'n02420828', + 'n02421136', + 'n02421449', + 'n02421792', + 'n02422106', + 'n02422391', + 'n02422699', + 'n02423022', + 'n02423589', + 'n02424305', + 'n02425228', + 'n02425532', + 'n02426176', + 'n02426481', + 'n02426813', + 'n02427470', + 'n02427576', + 'n02427724', + 'n02428089', + 'n02428349', + 'n02428508', + 'n02429456', + 'n02430045', + 'n02431337', + 'n02431441', + 'n02431628', + 'n02431785', + 'n02432983', + 'n02433729', + 'n02433925', + 'n02434954', + 'n02435853', + 'n02436353', + 'n02437136', + 'n02437312', + 'n02437616', + 'n02438173', + 'n02439033', + 'n02439398', + 'n02441942', + 'n02442336', + 'n02442845', + 'n02443114', + 'n02443484', + 'n02444819', + 'n02445004', + 'n02445715', + 'n02447366', + 'n02448318', + 'n02450034', + 'n02451415', + 'n02453108', + 'n02454379', + 'n02455135', + 'n02455428', + 'n02455720', + 'n02456275', + 'n02457408', + 'n02460451', + 'n02461128', + 'n02461830', + 'n02470238', + 'n02470325', + 'n02471762', + 'n02472293', + 'n02472987', + 'n02476219', + 'n02480495', + 'n02480855', + 'n02481500', + 'n02481823', + 'n02482474', + 'n02483362', + 'n02483708', + 'n02484322', + 'n02484473', + 'n02484975', + 'n02485371', + 'n02485536', + 'n02485688', + 'n02486261', + 'n02486410', + 'n02486657', + 'n02486908', + 'n02487347', + 'n02487547', + 'n02488291', + 'n02488415', + 'n02488702', + 'n02488894', + 'n02489166', + 'n02489589', + 'n02490219', + 'n02491107', + 'n02491474', + 'n02492035', + 'n02492356', + 'n02492660', + 'n02493224', + 'n02493509', + 'n02493793', + 'n02494079', + 'n02496052', + 'n02496913', + 'n02497673', + 'n02498153', + 'n02499808', + 'n02500267', + 'n02501583', + 'n02503127', + 'n02503517', + 'n02504013', + 'n02504458', + 'n02504770', + 'n02508021', + 'n02508742', + 'n02509197', + 'n02509515', + 'n02509815', + 'n02510455', + 'n02512053', + 'n02512830', + 'n02512938', + 'n02513248', + 'n02513560', + 'n02514041', + 'n02526121', + 'n02530831', + 'n02534734', + 'n02535759', + 'n02536864', + 'n02537525', + 'n02538010', + 'n02539424', + 'n02542958', + 'n02548689', + 'n02564403', + 'n02567633', + 'n02568087', + 'n02568447', + 'n02581957', + 'n02605316', + 'n02606052', + 'n02607072', + 'n02607470', + 'n02608996', + 'n02631628', + 'n02640242', + 'n02641379', + 'n02643566', + 'n02655020', + 'n02656670', + 'n02666196', + 'n02667093', + 'n02667379', + 'n02669723', + 'n02672831', + 'n02676566', + 'n02676938', + 'n02680754', + 'n02681392', + 'n02686121', + 'n02686568', + 'n02687172', + 'n02687423', + 'n02687682', + 'n02687821', + 'n02687992', + 'n02688273', + 'n02689274', + 'n02690373', + 'n02691156', + 'n02692086', + 'n02692232', + 'n02692877', + 'n02693246', + 'n02694045', + 'n02694426', + 'n02694662', + 'n02699494', + 'n02699629', + 'n02699770', + 'n02701002', + 'n02701730', + 'n02704645', + 'n02704792', + 'n02708093', + 'n02709637', + 'n02709763', + 'n02709908', + 'n02710044', + 'n02715513', + 'n02726305', + 'n02727426', + 'n02727825', + 'n02728440', + 'n02729965', + 'n02730930', + 'n02731629', + 'n02732072', + 'n02733213', + 'n02733524', + 'n02735268', + 'n02738535', + 'n02742753', + 'n02747177', + 'n02747802', + 'n02749479', + 'n02755823', + 'n02755984', + 'n02756098', + 'n02759387', + 'n02761392', + 'n02761834', + 'n02762169', + 'n02762725', + 'n02762909', + 'n02763306', + 'n02763901', + 'n02764044', + 'n02766320', + 'n02766534', + 'n02766792', + 'n02767147', + 'n02767433', + 'n02767665', + 'n02768226', + 'n02769075', + 'n02769748', + 'n02770211', + 'n02770585', + 'n02772700', + 'n02773037', + 'n02773838', + 'n02774152', + 'n02774630', + 'n02774921', + 'n02775039', + 'n02775178', + 'n02776631', + 'n02777292', + 'n02777734', + 'n02778456', + 'n02778669', + 'n02779435', + 'n02782093', + 'n02782602', + 'n02783161', + 'n02786058', + 'n02787622', + 'n02788021', + 'n02788148', + 'n02788572', + 'n02789487', + 'n02790669', + 'n02790996', + 'n02791124', + 'n02791270', + 'n02793495', + 'n02794156', + 'n02794972', + 'n02795169', + 'n02796207', + 'n02796995', + 'n02797295', + 'n02797692', + 'n02799071', + 'n02800213', + 'n02800497', + 'n02801938', + 'n02802215', + 'n02802426', + 'n02802544', + 'n02803809', + 'n02803934', + 'n02804123', + 'n02804414', + 'n02804610', + 'n02807133', + 'n02807523', + 'n02807616', + 'n02807731', + 'n02808304', + 'n02808440', + 'n02810471', + 'n02814428', + 'n02814533', + 'n02814860', + 'n02815834', + 'n02815950', + 'n02817516', + 'n02818832', + 'n02820210', + 'n02821627', + 'n02821943', + 'n02822220', + 'n02823335', + 'n02823428', + 'n02823510', + 'n02823750', + 'n02824058', + 'n02824448', + 'n02825442', + 'n02825657', + 'n02826068', + 'n02826886', + 'n02827606', + 'n02828884', + 'n02829596', + 'n02831724', + 'n02834397', + 'n02834778', + 'n02835271', + 'n02835412', + 'n02835915', + 'n02836035', + 'n02836174', + 'n02837789', + 'n02839351', + 'n02839592', + 'n02839910', + 'n02840245', + 'n02840619', + 'n02841063', + 'n02841315', + 'n02842573', + 'n02843684', + 'n02846511', + 'n02846619', + 'n02848216', + 'n02848921', + 'n02849154', + 'n02850732', + 'n02850950', + 'n02851099', + 'n02856013', + 'n02857907', + 'n02858304', + 'n02859184', + 'n02859343', + 'n02859443', + 'n02860415', + 'n02860847', + 'n02865351', + 'n02865665', + 'n02866578', + 'n02867715', + 'n02869155', + 'n02869249', + 'n02869563', + 'n02869837', + 'n02870526', + 'n02870676', + 'n02870880', + 'n02871439', + 'n02871525', + 'n02871824', + 'n02871963', + 'n02872752', + 'n02873520', + 'n02873623', + 'n02873839', + 'n02874214', + 'n02876657', + 'n02877765', + 'n02877962', + 'n02878222', + 'n02879087', + 'n02879309', + 'n02879718', + 'n02880940', + 'n02881193', + 'n02882190', + 'n02882301', + 'n02882483', + 'n02882647', + 'n02882894', + 'n02883205', + 'n02883344', + 'n02884450', + 'n02884859', + 'n02885882', + 'n02886434', + 'n02887489', + 'n02889425', + 'n02890804', + 'n02892201', + 'n02892767', + 'n02894605', + 'n02895154', + 'n02897820', + 'n02898269', + 'n02898585', + 'n02898711', + 'n02899439', + 'n02902687', + 'n02906734', + 'n02907391', + 'n02908217', + 'n02908773', + 'n02909870', + 'n02910145', + 'n02910353', + 'n02912065', + 'n02912557', + 'n02913152', + 'n02914991', + 'n02916179', + 'n02916350', + 'n02916936', + 'n02917067', + 'n02918964', + 'n02919414', + 'n02919792', + 'n02920083', + 'n02920164', + 'n02920259', + 'n02920369', + 'n02921029', + 'n02921756', + 'n02923129', + 'n02924116', + 'n02925385', + 'n02925666', + 'n02927161', + 'n02927764', + 'n02928608', + 'n02929289', + 'n02930766', + 'n02931417', + 'n02932019', + 'n02932400', + 'n02932523', + 'n02932693', + 'n02932891', + 'n02933112', + 'n02933340', + 'n02934451', + 'n02935658', + 'n02936714', + 'n02939185', + 'n02942349', + 'n02942699', + 'n02943871', + 'n02945813', + 'n02946348', + 'n02946921', + 'n02947818', + 'n02948072', + 'n02948557', + 'n02949202', + 'n02949542', + 'n02950632', + 'n02950826', + 'n02951358', + 'n02951585', + 'n02951703', + 'n02951843', + 'n02952109', + 'n02952237', + 'n02952374', + 'n02953673', + 'n02954163', + 'n02954340', + 'n02954938', + 'n02955065', + 'n02956795', + 'n02958343', + 'n02959942', + 'n02960352', + 'n02961035', + 'n02963159', + 'n02963302', + 'n02963821', + 'n02964075', + 'n02964196', + 'n02964634', + 'n02965783', + 'n02966193', + 'n02966687', + 'n02968333', + 'n02970685', + 'n02970849', + 'n02971167', + 'n02971356', + 'n02971579', + 'n02972714', + 'n02973236', + 'n02973904', + 'n02974003', + 'n02974348', + 'n02975212', + 'n02976123', + 'n02976249', + 'n02976815', + 'n02977058', + 'n02977438', + 'n02978881', + 'n02979186', + 'n02979836', + 'n02980441', + 'n02981792', + 'n02984061', + 'n02988304', + 'n02990373', + 'n02991048', + 'n02991302', + 'n02992211', + 'n02992529', + 'n02993194', + 'n02993546', + 'n02995998', + 'n02997391', + 'n02997607', + 'n02998563', + 'n02999410', + 'n03000134', + 'n03000247', + 'n03000684', + 'n03001627', + 'n03002096', + 'n03003091', + 'n03004275', + 'n03011741', + 'n03012159', + 'n03012897', + 'n03013580', + 'n03014440', + 'n03014705', + 'n03015254', + 'n03016737', + 'n03016953', + 'n03017168', + 'n03017698', + 'n03017835', + 'n03018209', + 'n03018349', + 'n03018712', + 'n03020034', + 'n03020416', + 'n03020692', + 'n03025250', + 'n03026506', + 'n03028079', + 'n03028596', + 'n03028785', + 'n03029197', + 'n03032252', + 'n03033986', + 'n03034663', + 'n03035252', + 'n03035510', + 'n03035715', + 'n03036022', + 'n03036244', + 'n03036469', + 'n03038685', + 'n03039493', + 'n03041632', + 'n03042490', + 'n03044934', + 'n03045698', + 'n03046257', + 'n03046921', + 'n03047690', + 'n03049457', + 'n03049924', + 'n03050546', + 'n03051396', + 'n03052464', + 'n03055670', + 'n03057021', + 'n03057920', + 'n03058107', + 'n03062245', + 'n03062985', + 'n03063073', + 'n03063599', + 'n03063689', + 'n03063968', + 'n03064758', + 'n03065424', + 'n03067212', + 'n03067339', + 'n03067518', + 'n03068998', + 'n03071160', + 'n03072201', + 'n03073977', + 'n03074380', + 'n03075097', + 'n03075370', + 'n03075768', + 'n03079136', + 'n03079494', + 'n03080497', + 'n03082979', + 'n03085013', + 'n03085219', + 'n03085602', + 'n03086457', + 'n03087816', + 'n03089477', + 'n03089624', + 'n03089753', + 'n03089879', + 'n03090000', + 'n03092476', + 'n03092656', + 'n03092883', + 'n03095699', + 'n03096960', + 'n03097362', + 'n03097673', + 'n03098140', + 'n03098688', + 'n03100240', + 'n03100346', + 'n03101517', + 'n03101664', + 'n03101796', + 'n03106722', + 'n03109150', + 'n03110669', + 'n03113657', + 'n03115180', + 'n03116530', + 'n03116767', + 'n03118969', + 'n03119203', + 'n03119396', + 'n03120198', + 'n03120491', + 'n03120778', + 'n03122073', + 'n03122202', + 'n03122295', + 'n03124043', + 'n03124170', + 'n03124590', + 'n03125057', + 'n03125729', + 'n03126385', + 'n03126707', + 'n03127747', + 'n03127925', + 'n03128519', + 'n03129001', + 'n03131574', + 'n03133415', + 'n03133878', + 'n03134739', + 'n03135532', + 'n03138669', + 'n03141823', + 'n03142679', + 'n03143572', + 'n03145522', + 'n03145719', + 'n03146219', + 'n03147509', + 'n03148324', + 'n03148518', + 'n03149135', + 'n03149401', + 'n03150511', + 'n03151077', + 'n03154073', + 'n03154446', + 'n03159640', + 'n03160309', + 'n03166809', + 'n03167978', + 'n03168107', + 'n03168217', + 'n03173387', + 'n03173929', + 'n03179701', + 'n03179910', + 'n03180011', + 'n03180969', + 'n03187595', + 'n03188531', + 'n03196062', + 'n03196217', + 'n03197337', + 'n03200231', + 'n03200357', + 'n03200906', + 'n03201035', + 'n03201208', + 'n03201895', + 'n03201996', + 'n03204558', + 'n03205143', + 'n03206282', + 'n03206908', + 'n03207305', + 'n03207743', + 'n03207941', + 'n03208556', + 'n03208938', + 'n03211117', + 'n03211616', + 'n03211789', + 'n03216710', + 'n03216828', + 'n03218198', + 'n03220237', + 'n03220513', + 'n03220692', + 'n03221720', + 'n03222176', + 'n03222318', + 'n03222516', + 'n03223299', + 'n03223686', + 'n03224893', + 'n03225988', + 'n03226254', + 'n03226880', + 'n03227184', + 'n03231368', + 'n03232543', + 'n03233905', + 'n03234952', + 'n03235042', + 'n03235180', + 'n03236580', + 'n03237212', + 'n03237340', + 'n03238586', + 'n03238879', + 'n03239726', + 'n03240683', + 'n03241335', + 'n03244047', + 'n03244775', + 'n03245724', + 'n03245889', + 'n03246454', + 'n03249569', + 'n03249956', + 'n03250847', + 'n03251533', + 'n03252637', + 'n03252787', + 'n03254737', + 'n03255030', + 'n03256166', + 'n03259280', + 'n03259401', + 'n03259505', + 'n03261776', + 'n03262809', + 'n03262932', + 'n03266371', + 'n03267113', + 'n03268790', + 'n03270854', + 'n03271030', + 'n03271574', + 'n03272010', + 'n03272239', + 'n03272562', + 'n03273551', + 'n03273740', + 'n03273913', + 'n03278248', + 'n03281145', + 'n03281524', + 'n03282060', + 'n03282295', + 'n03287733', + 'n03290653', + 'n03291819', + 'n03294048', + 'n03296328', + 'n03297495', + 'n03301568', + 'n03302671', + 'n03302790', + 'n03308152', + 'n03309356', + 'n03309808', + 'n03314780', + 'n03314884', + 'n03316105', + 'n03316406', + 'n03320519', + 'n03321419', + 'n03325088', + 'n03325584', + 'n03327234', + 'n03329302', + 'n03329663', + 'n03333129', + 'n03333610', + 'n03335030', + 'n03337140', + 'n03337383', + 'n03337494', + 'n03338821', + 'n03339643', + 'n03341153', + 'n03341606', + 'n03343354', + 'n03343560', + 'n03343737', + 'n03343853', + 'n03344305', + 'n03344393', + 'n03345487', + 'n03346135', + 'n03347037', + 'n03347617', + 'n03351262', + 'n03351979', + 'n03354903', + 'n03355925', + 'n03358172', + 'n03358726', + 'n03359137', + 'n03359436', + 'n03360133', + 'n03360622', + 'n03364156', + 'n03365231', + 'n03365374', + 'n03365991', + 'n03366823', + 'n03366974', + 'n03367059', + 'n03367410', + 'n03370387', + 'n03372029', + 'n03376159', + 'n03376595', + 'n03376771', + 'n03376938', + 'n03379051', + 'n03379828', + 'n03380724', + 'n03382292', + 'n03384167', + 'n03384352', + 'n03388043', + 'n03388183', + 'n03388549', + 'n03390983', + 'n03393017', + 'n03393912', + 'n03394149', + 'n03394649', + 'n03394916', + 'n03395256', + 'n03395514', + 'n03399677', + 'n03400231', + 'n03402941', + 'n03404251', + 'n03405725', + 'n03409393', + 'n03412058', + 'n03414162', + 'n03416489', + 'n03416640', + 'n03416775', + 'n03417042', + 'n03418242', + 'n03420801', + 'n03422072', + 'n03422771', + 'n03423306', + 'n03423479', + 'n03424325', + 'n03425241', + 'n03425413', + 'n03425595', + 'n03426134', + 'n03427296', + 'n03431243', + 'n03431745', + 'n03435593', + 'n03436417', + 'n03436891', + 'n03438257', + 'n03438863', + 'n03441112', + 'n03442756', + 'n03443371', + 'n03443912', + 'n03444034', + 'n03445777', + 'n03445924', + 'n03447447', + 'n03447721', + 'n03449564', + 'n03450230', + 'n03450516', + 'n03452741', + 'n03457902', + 'n03459591', + 'n03459775', + 'n03461385', + 'n03461882', + 'n03462747', + 'n03463381', + 'n03467068', + 'n03467517', + 'n03467796', + 'n03467984', + 'n03471779', + 'n03474779', + 'n03476684', + 'n03476991', + 'n03478589', + 'n03478756', + 'n03478907', + 'n03481172', + 'n03482405', + 'n03482523', + 'n03483316', + 'n03483823', + 'n03484083', + 'n03484931', + 'n03485198', + 'n03485407', + 'n03485794', + 'n03489162', + 'n03490006', + 'n03490119', + 'n03490884', + 'n03492542', + 'n03492922', + 'n03494278', + 'n03494537', + 'n03495258', + 'n03496892', + 'n03497657', + 'n03498781', + 'n03498962', + 'n03499907', + 'n03500389', + 'n03500699', + 'n03501288', + 'n03501614', + 'n03502200', + 'n03502331', + 'n03504723', + 'n03505504', + 'n03505667', + 'n03506560', + 'n03508101', + 'n03510244', + 'n03511175', + 'n03511333', + 'n03512147', + 'n03513137', + 'n03517647', + 'n03517899', + 'n03518829', + 'n03521675', + 'n03522100', + 'n03527444', + 'n03528100', + 'n03529860', + 'n03530642', + 'n03532342', + 'n03532672', + 'n03532919', + 'n03534580', + 'n03535780', + 'n03538037', + 'n03538406', + 'n03539433', + 'n03540090', + 'n03540595', + 'n03540914', + 'n03541696', + 'n03541923', + 'n03542333', + 'n03543254', + 'n03543394', + 'n03544143', + 'n03544238', + 'n03544360', + 'n03545150', + 'n03545756', + 'n03546340', + 'n03547054', + 'n03557692', + 'n03557840', + 'n03558176', + 'n03558404', + 'n03561169', + 'n03563200', + 'n03565830', + 'n03571625', + 'n03571942', + 'n03574816', + 'n03577672', + 'n03579982', + 'n03580615', + 'n03581125', + 'n03584254', + 'n03584400', + 'n03584829', + 'n03585073', + 'n03589791', + 'n03590306', + 'n03590475', + 'n03590841', + 'n03593526', + 'n03594734', + 'n03594945', + 'n03595614', + 'n03595860', + 'n03596543', + 'n03598930', + 'n03599486', + 'n03602883', + 'n03604311', + 'n03604400', + 'n03610682', + 'n03612814', + 'n03612965', + 'n03613294', + 'n03614007', + 'n03614532', + 'n03615655', + 'n03617480', + 'n03618101', + 'n03618678', + 'n03619396', + 'n03619890', + 'n03621694', + 'n03623198', + 'n03623556', + 'n03624134', + 'n03627232', + 'n03630262', + 'n03630383', + 'n03631177', + 'n03632577', + 'n03632729', + 'n03632852', + 'n03633091', + 'n03634034', + 'n03636248', + 'n03636649', + 'n03637318', + 'n03639497', + 'n03642806', + 'n03643253', + 'n03643737', + 'n03648219', + 'n03648431', + 'n03649674', + 'n03649797', + 'n03649909', + 'n03652389', + 'n03652932', + 'n03653583', + 'n03654826', + 'n03657121', + 'n03658185', + 'n03661043', + 'n03661340', + 'n03662601', + 'n03662719', + 'n03665366', + 'n03665924', + 'n03666591', + 'n03670208', + 'n03672827', + 'n03673027', + 'n03676483', + 'n03678558', + 'n03680355', + 'n03682487', + 'n03684143', + 'n03684823', + 'n03686130', + 'n03686924', + 'n03688066', + 'n03688605', + 'n03690938', + 'n03691459', + 'n03691817', + 'n03692522', + 'n03696065', + 'n03696301', + 'n03697007', + 'n03699975', + 'n03700963', + 'n03701391', + 'n03704549', + 'n03706229', + 'n03706653', + 'n03709823', + 'n03710193', + 'n03710637', + 'n03710721', + 'n03711044', + 'n03714235', + 'n03715892', + 'n03717622', + 'n03718335', + 'n03720891', + 'n03721047', + 'n03721384', + 'n03722288', + 'n03724066', + 'n03724870', + 'n03725600', + 'n03726760', + 'n03726993', + 'n03727946', + 'n03728437', + 'n03729826', + 'n03729951', + 'n03731019', + 'n03733131', + 'n03733281', + 'n03733805', + 'n03735637', + 'n03735963', + 'n03736147', + 'n03736470', + 'n03738066', + 'n03738472', + 'n03742019', + 'n03742115', + 'n03743016', + 'n03743902', + 'n03744276', + 'n03744684', + 'n03746005', + 'n03746330', + 'n03748162', + 'n03751269', + 'n03751757', + 'n03752185', + 'n03752398', + 'n03752922', + 'n03757604', + 'n03758089', + 'n03758220', + 'n03759954', + 'n03760671', + 'n03761084', + 'n03763968', + 'n03764736', + 'n03765128', + 'n03765561', + 'n03766508', + 'n03769881', + 'n03770439', + 'n03770679', + 'n03772584', + 'n03773035', + 'n03773504', + 'n03775071', + 'n03775546', + 'n03775636', + 'n03776460', + 'n03777568', + 'n03777754', + 'n03781244', + 'n03781683', + 'n03781787', + 'n03782006', + 'n03782190', + 'n03783873', + 'n03784793', + 'n03785016', + 'n03786096', + 'n03786621', + 'n03786901', + 'n03787032', + 'n03788195', + 'n03788365', + 'n03789400', + 'n03790230', + 'n03790512', + 'n03790755', + 'n03790953', + 'n03791053', + 'n03792048', + 'n03792334', + 'n03792782', + 'n03792972', + 'n03793489', + 'n03793850', + 'n03794056', + 'n03796401', + 'n03797390', + 'n03798610', + 'n03799375', + 'n03800933', + 'n03801353', + 'n03801533', + 'n03801671', + 'n03801760', + 'n03801880', + 'n03802228', + 'n03803284', + 'n03804744', + 'n03805280', + 'n03805725', + 'n03807537', + 'n03809312', + 'n03814639', + 'n03814906', + 'n03815615', + 'n03816136', + 'n03819336', + 'n03819595', + 'n03819994', + 'n03820154', + 'n03820318', + 'n03822767', + 'n03825442', + 'n03825788', + 'n03826186', + 'n03831757', + 'n03832673', + 'n03834040', + 'n03836062', + 'n03837422', + 'n03837869', + 'n03838899', + 'n03840681', + 'n03841143', + 'n03841666', + 'n03842012', + 'n03842156', + 'n03842377', + 'n03843555', + 'n03844815', + 'n03845190', + 'n03846677', + 'n03847471', + 'n03847823', + 'n03848033', + 'n03848168', + 'n03850492', + 'n03851787', + 'n03852688', + 'n03853924', + 'n03854065', + 'n03854815', + 'n03855604', + 'n03857828', + 'n03858418', + 'n03859958', + 'n03861842', + 'n03862676', + 'n03863108', + 'n03866082', + 'n03868242', + 'n03868863', + 'n03870546', + 'n03870672', + 'n03870980', + 'n03871628', + 'n03873416', + 'n03874293', + 'n03874599', + 'n03874823', + 'n03875218', + 'n03875806', + 'n03876231', + 'n03877472', + 'n03877674', + 'n03877845', + 'n03879456', + 'n03880531', + 'n03884397', + 'n03885535', + 'n03886762', + 'n03887697', + 'n03888257', + 'n03888605', + 'n03891251', + 'n03891332', + 'n03894379', + 'n03894677', + 'n03895866', + 'n03896419', + 'n03897943', + 'n03899768', + 'n03900194', + 'n03900979', + 'n03902125', + 'n03903424', + 'n03903868', + 'n03904060', + 'n03905947', + 'n03906997', + 'n03908204', + 'n03908618', + 'n03908714', + 'n03909406', + 'n03911513', + 'n03911767', + 'n03912218', + 'n03916031', + 'n03920288', + 'n03920867', + 'n03924679', + 'n03926412', + 'n03928116', + 'n03928589', + 'n03928814', + 'n03929091', + 'n03929660', + 'n03929855', + 'n03930313', + 'n03930630', + 'n03931044', + 'n03931885', + 'n03931980', + 'n03933933', + 'n03935335', + 'n03936466', + 'n03937543', + 'n03938244', + 'n03938401', + 'n03938522', + 'n03939062', + 'n03939178', + 'n03939565', + 'n03939844', + 'n03940256', + 'n03940894', + 'n03941417', + 'n03942813', + 'n03943115', + 'n03944341', + 'n03945459', + 'n03945615', + 'n03945928', + 'n03946076', + 'n03947888', + 'n03948459', + 'n03950228', + 'n03950647', + 'n03953020', + 'n03953416', + 'n03954731', + 'n03956157', + 'n03956922', + 'n03958227', + 'n03959701', + 'n03960374', + 'n03960490', + 'n03961711', + 'n03962852', + 'n03962932', + 'n03963645', + 'n03964495', + 'n03967562', + 'n03967942', + 'n03970156', + 'n03972524', + 'n03973628', + 'n03974915', + 'n03976467', + 'n03976657', + 'n03977158', + 'n03977592', + 'n03977966', + 'n03978686', + 'n03978966', + 'n03980478', + 'n03980874', + 'n03982232', + 'n03982430', + 'n03983396', + 'n03985232', + 'n03988170', + 'n03989777', + 'n03989898', + 'n03990474', + 'n03991062', + 'n03991646', + 'n03992509', + 'n03992703', + 'n03993703', + 'n03995265', + 'n03995372', + 'n03996004', + 'n03998194', + 'n04000311', + 'n04000592', + 'n04000998', + 'n04003241', + 'n04004475', + 'n04004767', + 'n04004990', + 'n04005630', + 'n04008385', + 'n04008634', + 'n04009552', + 'n04011827', + 'n04012482', + 'n04018399', + 'n04018667', + 'n04019541', + 'n04020298', + 'n04021028', + 'n04021798', + 'n04022434', + 'n04023962', + 'n04025508', + 'n04026417', + 'n04026918', + 'n04027023', + 'n04028315', + 'n04028581', + 'n04028764', + 'n04030274', + 'n04033901', + 'n04033995', + 'n04036303', + 'n04037443', + 'n04037964', + 'n04038440', + 'n04038727', + 'n04039381', + 'n04040759', + 'n04041544', + 'n04041747', + 'n04043733', + 'n04044716', + 'n04045255', + 'n04045941', + 'n04046590', + 'n04046974', + 'n04047401', + 'n04047733', + 'n04047834', + 'n04049303', + 'n04050066', + 'n04051825', + 'n04054670', + 'n04058721', + 'n04059947', + 'n04061681', + 'n04061969', + 'n04063868', + 'n04064401', + 'n04065272', + 'n04065789', + 'n04065909', + 'n04066270', + 'n04067472', + 'n04067658', + 'n04069434', + 'n04070727', + 'n04070964', + 'n04074963', + 'n04075291', + 'n04081281', + 'n04086273', + 'n04087709', + 'n04090263', + 'n04095210', + 'n04096066', + 'n04097373', + 'n04098399', + 'n04098795', + 'n04099429', + 'n04099969', + 'n04101375', + 'n04102037', + 'n04102406', + 'n04105068', + 'n04105893', + 'n04107743', + 'n04108268', + 'n04108822', + 'n04108999', + 'n04111531', + 'n04113765', + 'n04114301', + 'n04115256', + 'n04115456', + 'n04115996', + 'n04116512', + 'n04118021', + 'n04118538', + 'n04118635', + 'n04118776', + 'n04120489', + 'n04120842', + 'n04121228', + 'n04121426', + 'n04123740', + 'n04124202', + 'n04125021', + 'n04126066', + 'n04126980', + 'n04127117', + 'n04127249', + 'n04127521', + 'n04127633', + 'n04127904', + 'n04128413', + 'n04128499', + 'n04128837', + 'n04131208', + 'n04131690', + 'n04133789', + 'n04136333', + 'n04137444', + 'n04138977', + 'n04140064', + 'n04140631', + 'n04141076', + 'n04141327', + 'n04141712', + 'n04141975', + 'n04143140', + 'n04144539', + 'n04146050', + 'n04146504', + 'n04146614', + 'n04146862', + 'n04147183', + 'n04147793', + 'n04148054', + 'n04148579', + 'n04148703', + 'n04149374', + 'n04149813', + 'n04152387', + 'n04152593', + 'n04153025', + 'n04153751', + 'n04154565', + 'n04156140', + 'n04156297', + 'n04158807', + 'n04160586', + 'n04161358', + 'n04161981', + 'n04162433', + 'n04162706', + 'n04164757', + 'n04164868', + 'n04165675', + 'n04165945', + 'n04166281', + 'n04168199', + 'n04169437', + 'n04176068', + 'n04176190', + 'n04176528', + 'n04177041', + 'n04179712', + 'n04179824', + 'n04179913', + 'n04180063', + 'n04180229', + 'n04181228', + 'n04182322', + 'n04183217', + 'n04185804', + 'n04185946', + 'n04186051', + 'n04188179', + 'n04190052', + 'n04190376', + 'n04191595', + 'n04191943', + 'n04192238', + 'n04192698', + 'n04192858', + 'n04194127', + 'n04194289', + 'n04197391', + 'n04197781', + 'n04199027', + 'n04200000', + 'n04200800', + 'n04201297', + 'n04202417', + 'n04204081', + 'n04204238', + 'n04204347', + 'n04204755', + 'n04205062', + 'n04205318', + 'n04206790', + 'n04208210', + 'n04208936', + 'n04209133', + 'n04209239', + 'n04209509', + 'n04209613', + 'n04210120', + 'n04211356', + 'n04211528', + 'n04212165', + 'n04212282', + 'n04213105', + 'n04215402', + 'n04216634', + 'n04217882', + 'n04220250', + 'n04222210', + 'n04224543', + 'n04225987', + 'n04228054', + 'n04228581', + 'n04229816', + 'n04230487', + 'n04230603', + 'n04230808', + 'n04231693', + 'n04232800', + 'n04233124', + 'n04235860', + 'n04236377', + 'n04238128', + 'n04238617', + 'n04238763', + 'n04239074', + 'n04239333', + 'n04239436', + 'n04241394', + 'n04241573', + 'n04243546', + 'n04243941', + 'n04244997', + 'n04245218', + 'n04245508', + 'n04246731', + 'n04247011', + 'n04247736', + 'n04249415', + 'n04251144', + 'n04251701', + 'n04251791', + 'n04252077', + 'n04252225', + 'n04252331', + 'n04254009', + 'n04254120', + 'n04254450', + 'n04254680', + 'n04254777', + 'n04255670', + 'n04255768', + 'n04256520', + 'n04257223', + 'n04258138', + 'n04259630', + 'n04261638', + 'n04263257', + 'n04264628', + 'n04265275', + 'n04266014', + 'n04266162', + 'n04270147', + 'n04272054', + 'n04273569', + 'n04275548', + 'n04277352', + 'n04279353', + 'n04280487', + 'n04282872', + 'n04284002', + 'n04284341', + 'n04285008', + 'n04285146', + 'n04285965', + 'n04286575', + 'n04288272', + 'n04292080', + 'n04292414', + 'n04292572', + 'n04294879', + 'n04295881', + 'n04296562', + 'n04297098', + 'n04299215', + 'n04299370', + 'n04299963', + 'n04301000', + 'n04304215', + 'n04304680', + 'n04308084', + 'n04310018', + 'n04310157', + 'n04311004', + 'n04311174', + 'n04312154', + 'n04313503', + 'n04314107', + 'n04314914', + 'n04315342', + 'n04315713', + 'n04315828', + 'n04317175', + 'n04317420', + 'n04317833', + 'n04317976', + 'n04318131', + 'n04318892', + 'n04322801', + 'n04325704', + 'n04326547', + 'n04326896', + 'n04328186', + 'n04330267', + 'n04330340', + 'n04331277', + 'n04332074', + 'n04332243', + 'n04334105', + 'n04334599', + 'n04335209', + 'n04335435', + 'n04335693', + 'n04335886', + 'n04336792', + 'n04341686', + 'n04344873', + 'n04345028', + 'n04346328', + 'n04347754', + 'n04349306', + 'n04350458', + 'n04350769', + 'n04350905', + 'n04351550', + 'n04355115', + 'n04355267', + 'n04355338', + 'n04355821', + 'n04355933', + 'n04356056', + 'n04356595', + 'n04356925', + 'n04357314', + 'n04358707', + 'n04359589', + 'n04360798', + 'n04360914', + 'n04363082', + 'n04363210', + 'n04366033', + 'n04366367', + 'n04367011', + 'n04367480', + 'n04370048', + 'n04370456', + 'n04371430', + 'n04371774', + 'n04372370', + 'n04373089', + 'n04373428', + 'n04373704', + 'n04373894', + 'n04374735', + 'n04376400', + 'n04376876', + 'n04379243', + 'n04379964', + 'n04380346', + 'n04380533', + 'n04381587', + 'n04381724', + 'n04382438', + 'n04388743', + 'n04389033', + 'n04389521', + 'n04389854', + 'n04390977', + 'n04391838', + 'n04392113', + 'n04392985', + 'n04393913', + 'n04395875', + 'n04397027', + 'n04398044', + 'n04399046', + 'n04399382', + 'n04401088', + 'n04402057', + 'n04402449', + 'n04402746', + 'n04402984', + 'n04404412', + 'n04404997', + 'n04405540', + 'n04405762', + 'n04405907', + 'n04406239', + 'n04407435', + 'n04407686', + 'n04409011', + 'n04409128', + 'n04409515', + 'n04409625', + 'n04409806', + 'n04411264', + 'n04412097', + 'n04414476', + 'n04415257', + 'n04415663', + 'n04415815', + 'n04417672', + 'n04418357', + 'n04421872', + 'n04423845', + 'n04426184', + 'n04428191', + 'n04429376', + 'n04431745', + 'n04432043', + 'n04432203', + 'n04433377', + 'n04433585', + 'n04435180', + 'n04435653', + 'n04438897', + 'n04440963', + 'n04442312', + 'n04442441', + 'n04443257', + 'n04443766', + 'n04445952', + 'n04446844', + 'n04447028', + 'n04447861', + 'n04449449', + 'n04449700', + 'n04450465', + 'n04451818', + 'n04452615', + 'n04453037', + 'n04453156', + 'n04453666', + 'n04454654', + 'n04456115', + 'n04458633', + 'n04459362', + 'n04460130', + 'n04461696', + 'n04461879', + 'n04462011', + 'n04462240', + 'n04464615', + 'n04465501', + 'n04466871', + 'n04467665', + 'n04468005', + 'n04469813', + 'n04472243', + 'n04474035', + 'n04474187', + 'n04474466', + 'n04476259', + 'n04478512', + 'n04479046', + 'n04480853', + 'n04482393', + 'n04483307', + 'n04485082', + 'n04486054', + 'n04487081', + 'n04487394', + 'n04488202', + 'n04489008', + 'n04489817', + 'n04490091', + 'n04491638', + 'n04493381', + 'n04495843', + 'n04496726', + 'n04497801', + 'n04498389', + 'n04501370', + 'n04503413', + 'n04503499', + 'n04505470', + 'n04507155', + 'n04507326', + 'n04509260', + 'n04509417', + 'n04509592', + 'n04513998', + 'n04514648', + 'n04515003', + 'n04517823', + 'n04520170', + 'n04520382', + 'n04521571', + 'n04522168', + 'n04523525', + 'n04523831', + 'n04524313', + 'n04525038', + 'n04525305', + 'n04525584', + 'n04529681', + 'n04530566', + 'n04531098', + 'n04532106', + 'n04532670', + 'n04534127', + 'n04534895', + 'n04535252', + 'n04536866', + 'n04540053', + 'n04540255', + 'n04541987', + 'n04542095', + 'n04542943', + 'n04543158', + 'n04545305', + 'n04545471', + 'n04546081', + 'n04546855', + 'n04547592', + 'n04548280', + 'n04548362', + 'n04549028', + 'n04549122', + 'n04549629', + 'n04549919', + 'n04550184', + 'n04552348', + 'n04553703', + 'n04554684', + 'n04555400', + 'n04555700', + 'n04555897', + 'n04556408', + 'n04556948', + 'n04557522', + 'n04557648', + 'n04558478', + 'n04559910', + 'n04560113', + 'n04560292', + 'n04560804', + 'n04562122', + 'n04562935', + 'n04565375', + 'n04570958', + 'n04571292', + 'n04573513', + 'n04574999', + 'n04576002', + 'n04577769', + 'n04578801', + 'n04579145', + 'n04579230', + 'n04579432', + 'n04582869', + 'n04583620', + 'n04584207', + 'n04585128', + 'n04587404', + 'n04587559', + 'n04587648', + 'n04588739', + 'n04589325', + 'n04589593', + 'n04589890', + 'n04590021', + 'n04590129', + 'n04590746', + 'n04591157', + 'n04591631', + 'n04591713', + 'n04591887', + 'n04592005', + 'n04592741', + 'n04593077', + 'n04593524', + 'n04594218', + 'n04594489', + 'n04594828', + 'n04596742', + 'n04596852', + 'n04597066', + 'n04597913', + 'n04598582', + 'n04599235', + 'n04602956', + 'n04603729', + 'n04604644', + 'n04606251', + 'n04607035', + 'n04608329', + 'n04608435', + 'n04610013', + 'n04612504', + 'n04613696', + 'n06255613', + 'n06267145', + 'n06267758', + 'n06272290', + 'n06272803', + 'n06277135', + 'n06277280', + 'n06281040', + 'n06359193', + 'n06470073', + 'n06592281', + 'n06595351', + 'n06596364', + 'n06596474', + 'n06596845', + 'n06785654', + 'n06793231', + 'n06794110', + 'n06874185', + 'n06892775', + 'n06998748', + 'n07248320', + 'n07556637', + 'n07557434', + 'n07560331', + 'n07560542', + 'n07560903', + 'n07564796', + 'n07564971', + 'n07565083', + 'n07565259', + 'n07567139', + 'n07567980', + 'n07568095', + 'n07568241', + 'n07568818', + 'n07569106', + 'n07569644', + 'n07572353', + 'n07572616', + 'n07573103', + 'n07573696', + 'n07574504', + 'n07574602', + 'n07574923', + 'n07575076', + 'n07575726', + 'n07575984', + 'n07576182', + 'n07576577', + 'n07576781', + 'n07577374', + 'n07578093', + 'n07579575', + 'n07579787', + 'n07579917', + 'n07580053', + 'n07580359', + 'n07581346', + 'n07583066', + 'n07583197', + 'n07584110', + 'n07585557', + 'n07585644', + 'n07585758', + 'n07586318', + 'n07587023', + 'n07587441', + 'n07590320', + 'n07590611', + 'n07591813', + 'n07592656', + 'n07592922', + 'n07593004', + 'n07593107', + 'n07593774', + 'n07594066', + 'n07596967', + 'n07597145', + 'n07597263', + 'n07597365', + 'n07598622', + 'n07598928', + 'n07599161', + 'n07599649', + 'n07600394', + 'n07601686', + 'n07601809', + 'n07605380', + 'n07605804', + 'n07607832', + 'n07608339', + 'n07608866', + 'n07608980', + 'n07609316', + 'n07609407', + 'n07611267', + 'n07611991', + 'n07612632', + 'n07613266', + 'n07613480', + 'n07614198', + 'n07614500', + 'n07614730', + 'n07614825', + 'n07615289', + 'n07615460', + 'n07615569', + 'n07615774', + 'n07616386', + 'n07617188', + 'n07619881', + 'n07621497', + 'n07623136', + 'n07624924', + 'n07625061', + 'n07628068', + 'n07631926', + 'n07641928', + 'n07642361', + 'n07642471', + 'n07642742', + 'n07642933', + 'n07643200', + 'n07650903', + 'n07654148', + 'n07655263', + 'n07663899', + 'n07672914', + 'n07679356', + 'n07680313', + 'n07680416', + 'n07680517', + 'n07680655', + 'n07680932', + 'n07681926', + 'n07682197', + 'n07682316', + 'n07683360', + 'n07683490', + 'n07683617', + 'n07683786', + 'n07684084', + 'n07684600', + 'n07685031', + 'n07686202', + 'n07686873', + 'n07687053', + 'n07687211', + 'n07687381', + 'n07687469', + 'n07687626', + 'n07687789', + 'n07688265', + 'n07689003', + 'n07689313', + 'n07690273', + 'n07690431', + 'n07690739', + 'n07690892', + 'n07691237', + 'n07691539', + 'n07691758', + 'n07692517', + 'n07692614', + 'n07693725', + 'n07694659', + 'n07694839', + 'n07695187', + 'n07695742', + 'n07696625', + 'n07696728', + 'n07696839', + 'n07696977', + 'n07697100', + 'n07697313', + 'n07697537', + 'n07697825', + 'n07698250', + 'n07698672', + 'n07700003', + 'n07704054', + 'n07704205', + 'n07704305', + 'n07707451', + 'n07711080', + 'n07711569', + 'n07712559', + 'n07712748', + 'n07712959', + 'n07713763', + 'n07714448', + 'n07714571', + 'n07714990', + 'n07715103', + 'n07715221', + 'n07716358', + 'n07716906', + 'n07717410', + 'n07717556', + 'n07718472', + 'n07718747', + 'n07719213', + 'n07720277', + 'n07720875', + 'n07721195', + 'n07721678', + 'n07722485', + 'n07723039', + 'n07723177', + 'n07723559', + 'n07724269', + 'n07725531', + 'n07726095', + 'n07727048', + 'n07728585', + 'n07729485', + 'n07730033', + 'n07730406', + 'n07731952', + 'n07732302', + 'n07732747', + 'n07734017', + 'n07734292', + 'n07734744', + 'n07734879', + 'n07735404', + 'n07735510', + 'n07735803', + 'n07736692', + 'n07737745', + 'n07739125', + 'n07739344', + 'n07742012', + 'n07742313', + 'n07742704', + 'n07743544', + 'n07743902', + 'n07744246', + 'n07744811', + 'n07745466', + 'n07745940', + 'n07746186', + 'n07747607', + 'n07748912', + 'n07749446', + 'n07749582', + 'n07749969', + 'n07751451', + 'n07753113', + 'n07753275', + 'n07753448', + 'n07753592', + 'n07754684', + 'n07757132', + 'n07758680', + 'n07760859', + 'n07761954', + 'n07762913', + 'n07764155', + 'n07764847', + 'n07765208', + 'n07765361', + 'n07766173', + 'n07767171', + 'n07767549', + 'n07767847', + 'n07768230', + 'n07768694', + 'n07769584', + 'n07769731', + 'n07770763', + 'n07771212', + 'n07772147', + 'n07772274', + 'n07772788', + 'n07772935', + 'n07774719', + 'n07775050', + 'n07775197', + 'n07785487', + 'n07801091', + 'n07801508', + 'n07802026', + 'n07802246', + 'n07802417', + 'n07802863', + 'n07803093', + 'n07803545', + 'n07804323', + 'n07805731', + 'n07805966', + 'n07806221', + 'n07807922', + 'n07808479', + 'n07808587', + 'n07808675', + 'n07808904', + 'n07809368', + 'n07810907', + 'n07811416', + 'n07814487', + 'n07816296', + 'n07818277', + 'n07820497', + 'n07822197', + 'n07823105', + 'n07823460', + 'n07823951', + 'n07824502', + 'n07829248', + 'n07829412', + 'n07831146', + 'n07832416', + 'n07832592', + 'n07834507', + 'n07834774', + 'n07835331', + 'n07835823', + 'n07836600', + 'n07836731', + 'n07836838', + 'n07837755', + 'n07838073', + 'n07838441', + 'n07840027', + 'n07840804', + 'n07841037', + 'n07841345', + 'n07842433', + 'n07842753', + 'n07843464', + 'n07844042', + 'n07847047', + 'n07847585', + 'n07848338', + 'n07848936', + 'n07849336', + 'n07849619', + 'n07850329', + 'n07851298', + 'n07851443', + 'n07851767', + 'n07851926', + 'n07852045', + 'n07852376', + 'n07852712', + 'n07853852', + 'n07854184', + 'n07854614', + 'n07855188', + 'n07856270', + 'n07857170', + 'n07857731', + 'n07857959', + 'n07858978', + 'n07859284', + 'n07859583', + 'n07860331', + 'n07860988', + 'n07861813', + 'n07863374', + 'n07863547', + 'n07864934', + 'n07865700', + 'n07866015', + 'n07866409', + 'n07866723', + 'n07867164', + 'n07867324', + 'n07867421', + 'n07868830', + 'n07869291', + 'n07869611', + 'n07869937', + 'n07871335', + 'n07871436', + 'n07871810', + 'n07872593', + 'n07873807', + 'n07874780', + 'n07874995', + 'n07875086', + 'n07875152', + 'n07875693', + 'n07875835', + 'n07876189', + 'n07878647', + 'n07878785', + 'n07878926', + 'n07879072', + 'n07879174', + 'n07879450', + 'n07880080', + 'n07880213', + 'n07880458', + 'n07880968', + 'n07881205', + 'n07881404', + 'n07881800', + 'n07883156', + 'n07886176', + 'n07886572', + 'n07886849', + 'n07887461', + 'n07887967', + 'n07888465', + 'n07889510', + 'n07890970', + 'n07891189', + 'n07891726', + 'n07892418', + 'n07892512', + 'n07892813', + 'n07893253', + 'n07893425', + 'n07893642', + 'n07893792', + 'n07897116', + 'n07898617', + 'n07899108', + 'n07899976', + 'n07900225', + 'n07900734', + 'n07900825', + 'n07902799', + 'n07902937', + 'n07903208', + 'n07903962', + 'n07904072', + 'n07904293', + 'n07904395', + 'n07904934', + 'n07905474', + 'n07905618', + 'n07906284', + 'n07907037', + 'n07907943', + 'n07908411', + 'n07908647', + 'n07910152', + 'n07910245', + 'n07910379', + 'n07911249', + 'n07911677', + 'n07912211', + 'n07913644', + 'n07914413', + 'n07915491', + 'n07916041', + 'n07917272', + 'n07917392', + 'n07917618', + 'n07920052', + 'n07920349', + 'n07921834', + 'n07922764', + 'n07923748', + 'n07924834', + 'n07925966', + 'n07926250', + 'n07926346', + 'n07926442', + 'n07927512', + 'n07929351', + 'n07929519', + 'n07930554', + 'n07930864', + 'n07931280', + 'n07931870', + 'n07932039', + 'n07932841', + 'n07933274', + 'n07933799', + 'n07934032', + 'n07934373', + 'n07935043', + 'n07935288', + 'n07935504', + 'n07936015', + 'n07936459', + 'n07936979', + 'n07937621', + 'n07942152', + 'n07954211', + 'n08182379', + 'n08249459', + 'n08494231', + 'n08505018', + 'n08517676', + 'n08518171', + 'n08598301', + 'n08613733', + 'n08640531', + 'n08640739', + 'n08649711', + 'n09193705', + 'n09217230', + 'n09229709', + 'n09230041', + 'n09238926', + 'n09246464', + 'n09247410', + 'n09256479', + 'n09265620', + 'n09270735', + 'n09282208', + 'n09288635', + 'n09289331', + 'n09303008', + 'n09308572', + 'n09309168', + 'n09332890', + 'n09337253', + 'n09344324', + 'n09351905', + 'n09359803', + 'n09376198', + 'n09376526', + 'n09393605', + 'n09399592', + 'n09403734', + 'n09409752', + 'n09410224', + 'n09415671', + 'n09416076', + 'n09421951', + 'n09428293', + 'n09435739', + 'n09436444', + 'n09436708', + 'n09437454', + 'n09450163', + 'n09453008', + 'n09468604', + 'n09472597', + 'n09835506', + 'n09842047', + 'n09859684', + 'n09874725', + 'n09889941', + 'n09918248', + 'n10019406', + 'n10077593', + 'n10084295', + 'n10148035', + 'n10223177', + 'n10340312', + 'n10439851', + 'n10514429', + 'n10565667', + 'n10599806', + 'n10624074', + 'n10665698', + 'n10694258', + 'n11524451', + 'n11608250', + 'n11610047', + 'n11611356', + 'n11611561', + 'n11611758', + 'n11613459', + 'n11615026', + 'n11615967', + 'n11616852', + 'n11622368', + 'n11629047', + 'n11636835', + 'n11646344', + 'n11660300', + 'n11664418', + 'n11669921', + 'n11672400', + 'n11695285', + 'n11695974', + 'n11700058', + 'n11703669', + 'n11704093', + 'n11709205', + 'n11709674', + 'n11710136', + 'n11710393', + 'n11711289', + 'n11712282', + 'n11721337', + 'n11725821', + 'n11727540', + 'n11733054', + 'n11736694', + 'n11748811', + 'n11756669', + 'n11757851', + 'n11759404', + 'n11759853', + 'n11761202', + 'n11770256', + 'n11782036', + 'n11793779', + 'n11805956', + 'n11807979', + 'n11808721', + 'n11810358', + 'n11814584', + 'n11821184', + 'n11826198', + 'n11839568', + 'n11857875', + 'n11859737', + 'n11879895', + 'n11887119', + 'n11888800', + 'n11889619', + 'n11901294', + 'n11901597', + 'n11901977', + 'n11903671', + 'n11904109', + 'n11906917', + 'n11907100', + 'n11908846', + 'n11921395', + 'n11923397', + 'n11939491', + 'n11943660', + 'n11943992', + 'n11947802', + 'n11950345', + 'n11955896', + 'n11958080', + 'n11960245', + 'n11962272', + 'n11969607', + 'n11971248', + 'n11971406', + 'n11971783', + 'n11978233', + 'n11978713', + 'n11978961', + 'n11979715', + 'n11980318', + 'n12023407', + 'n12023726', + 'n12036226', + 'n12043673', + 'n12043836', + 'n12044467', + 'n12047345', + 'n12047884', + 'n12049282', + 'n12049562', + 'n12050533', + 'n12051103', + 'n12052787', + 'n12055516', + 'n12056217', + 'n12057211', + 'n12057447', + 'n12058630', + 'n12059314', + 'n12059625', + 'n12062468', + 'n12064389', + 'n12065316', + 'n12066018', + 'n12067672', + 'n12069679', + 'n12070016', + 'n12072722', + 'n12073991', + 'n12074408', + 'n12074867', + 'n12075010', + 'n12075151', + 'n12076223', + 'n12076577', + 'n12083591', + 'n12084890', + 'n12085267', + 'n12086012', + 'n12093329', + 'n12102133', + 'n12130549', + 'n12131405', + 'n12133682', + 'n12142085', + 'n12144580', + 'n12154773', + 'n12158031', + 'n12172364', + 'n12189987', + 'n12190410', + 'n12199790', + 'n12201580', + 'n12202936', + 'n12242409', + 'n12261808', + 'n12266796', + 'n12267677', + 'n12269241', + 'n12272883', + 'n12273939', + 'n12275888', + 'n12276872', + 'n12278650', + 'n12281788', + 'n12281974', + 'n12282737', + 'n12282933', + 'n12284262', + 'n12290748', + 'n12293723', + 'n12301445', + 'n12302071', + 'n12304703', + 'n12305089', + 'n12317296', + 'n12333771', + 'n12336727', + 'n12345899', + 'n12360108', + 'n12401684', + 'n12403994', + 'n12407079', + 'n12407222', + 'n12478768', + 'n12492106', + 'n12495895', + 'n12496427', + 'n12496949', + 'n12513613', + 'n12513933', + 'n12523475', + 'n12527738', + 'n12544539', + 'n12560282', + 'n12570394', + 'n12570972', + 'n12582231', + 'n12583126', + 'n12587803', + 'n12593994', + 'n12595964', + 'n12597798', + 'n12606438', + 'n12620546', + 'n12633994', + 'n12651611', + 'n12651821', + 'n12658118', + 'n12662772', + 'n12663023', + 'n12683407', + 'n12691428', + 'n12708293', + 'n12710693', + 'n12710917', + 'n12712626', + 'n12713866', + 'n12717072', + 'n12726670', + 'n12727101', + 'n12727518', + 'n12732966', + 'n12741792', + 'n12749852', + 'n12753007', + 'n12754003', + 'n12754174', + 'n12754648', + 'n12754981', + 'n12755225', + 'n12755727', + 'n12756457', + 'n12765115', + 'n12768682', + 'n12774299', + 'n12822115', + 'n12830222', + 'n12833149', + 'n12833985', + 'n12836862', + 'n12879527', + 'n12884260', + 'n12890265', + 'n12909614', + 'n12916511', + 'n12920204', + 'n12946849', + 'n12966945', + 'n12983048', + 'n12985420', + 'n12985857', + 'n12987056', + 'n12989938', + 'n12991184', + 'n12997919', + 'n12998815', + 'n13001930', + 'n13011595', + 'n13020191', + 'n13032115', + 'n13037406', + 'n13040303', + 'n13043926', + 'n13044778', + 'n13049953', + 'n13050397', + 'n13052670', + 'n13054560', + 'n13060190', + 'n13066448', + 'n13068917', + 'n13069224', + 'n13077033', + 'n13104059', + 'n13111881', + 'n13133613', + 'n13134947', + 'n13135832', + 'n13136316', + 'n13136556', + 'n13138308', + 'n13926786', + 'n14582716', + 'n14696793', + 'n14698884', + 'n14844693', + 'n14974264', + 'n15019030', + 'n15075141', + 'n15092650') diff --git a/docs/source/reference/datasets.rst b/docs/source/reference/datasets.rst index 732ff8122c..b16a152c94 100644 --- a/docs/source/reference/datasets.rst +++ b/docs/source/reference/datasets.rst @@ -69,6 +69,10 @@ ImagenetDetBboxDataset ~~~~~~~~~~~~~~~~~~~~~~ .. autoclass:: ImagenetDetBboxDataset +ImagenetFullBboxDataset +~~~~~~~~~~~~~~~~~~~~~~~ +.. autoclass:: ImagenetFullBboxDataset + ImagenetLocBboxDataset ~~~~~~~~~~~~~~~~~~~~~~ .. autoclass:: ImagenetLocBboxDataset From feb6554dbf9e888e186cd446f89fabf5902d4a69 Mon Sep 17 00:00:00 2001 From: Yusuke Niitani Date: Mon, 9 Jul 2018 16:45:55 +0900 Subject: [PATCH 13/15] flake8 and doc fix --- chainercv/datasets/imagenet/imagenet_full_bbox_dataset.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chainercv/datasets/imagenet/imagenet_full_bbox_dataset.py b/chainercv/datasets/imagenet/imagenet_full_bbox_dataset.py index 6ad799988b..8adb9432ba 100644 --- a/chainercv/datasets/imagenet/imagenet_full_bbox_dataset.py +++ b/chainercv/datasets/imagenet/imagenet_full_bbox_dataset.py @@ -22,7 +22,7 @@ class ImagenetFullBboxDataset(GetterDataset): The data needs to be downloaded from the official page. There are four steps to prepare data. - 1. Download annotations http://image-net.org/download-bboxes from \ + 1. Download annotations from \ http://image-net.org/Annotation/Annotation.tar.gz. 2. Expand it under :obj:`DATA_DIR/Full/Annotation` with the following \ command. @@ -95,7 +95,7 @@ def __init__(self, data_dir='auto', cls_dir = os.path.join(image_dir, cls_name) for name in sorted(os.listdir(cls_dir)): img_path = os.path.join( - self.base_dir, 'Data', cls_name, name[:-4] + '.JPEG') + self.base_dir, 'Data', cls_name, name[:-4] + '.JPEG') if os.path.exists(img_path): self.paths.append(os.path.join(cls_dir, name)) self.img_paths.append(img_path) From 1456e1e9121ee6b7c4142f56e7ab9c641cd3d412 Mon Sep 17 00:00:00 2001 From: Yusuke Niitani Date: Mon, 9 Jul 2018 17:43:02 +0900 Subject: [PATCH 14/15] flake8 --- chainercv/datasets/imagenet/imagenet_full_bbox_dataset.py | 1 + 1 file changed, 1 insertion(+) diff --git a/chainercv/datasets/imagenet/imagenet_full_bbox_dataset.py b/chainercv/datasets/imagenet/imagenet_full_bbox_dataset.py index 8adb9432ba..a7f2f5e31c 100644 --- a/chainercv/datasets/imagenet/imagenet_full_bbox_dataset.py +++ b/chainercv/datasets/imagenet/imagenet_full_bbox_dataset.py @@ -77,6 +77,7 @@ class ImagenetFullBboxDataset(GetterDataset): if :obj:`return_img_label = True`. """ + def __init__(self, data_dir='auto', return_img_label=False): super(ImagenetFullBboxDataset, self).__init__() From 8d8f0e5678f91b56a3fdfac5e9189d44808d96b4 Mon Sep 17 00:00:00 2001 From: Yusuke Niitani Date: Tue, 10 Jul 2018 22:19:11 +0900 Subject: [PATCH 15/15] delete unnecessary lines --- chainercv/datasets/imagenet/imagenet_full_bbox_dataset.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/chainercv/datasets/imagenet/imagenet_full_bbox_dataset.py b/chainercv/datasets/imagenet/imagenet_full_bbox_dataset.py index 6ad799988b..729d738dd3 100644 --- a/chainercv/datasets/imagenet/imagenet_full_bbox_dataset.py +++ b/chainercv/datasets/imagenet/imagenet_full_bbox_dataset.py @@ -89,9 +89,7 @@ def __init__(self, data_dir='auto', self.cls_names = [] self.img_paths = [] image_dir = os.path.join(self.base_dir, 'Annotation') - count = 0 for cls_name in sorted(os.listdir(image_dir)): - count += 1 cls_dir = os.path.join(image_dir, cls_name) for name in sorted(os.listdir(cls_dir)): img_path = os.path.join(