def _make_info(self) -> DatasetInfo: name = "coco" categories, super_categories = zip( *DatasetInfo.read_categories_file(BUILTIN_DIR / f"{name}.categories")) return DatasetInfo( name, dependencies=("pycocotools", ), categories=categories, homepage="https://cocodataset.org/", valid_options=dict( split=("train", "val"), year=("2017", "2014"), annotations=(*self._ANN_DECODERS.keys(), None), ), extra=dict(category_to_super_category=FrozenMapping( zip(categories, super_categories))), )
def _make_info(self) -> DatasetInfo: name = "imagenet" categories, wnids = zip( *DatasetInfo.read_categories_file(BUILTIN_DIR / f"{name}.categories")) return DatasetInfo( name, dependencies=("scipy", ), categories=categories, homepage="https://www.image-net.org/", valid_options=dict(split=("train", "val", "test")), extra=dict( wnid_to_category=FrozenMapping(zip(wnids, categories)), category_to_wnid=FrozenMapping(zip(categories, wnids)), sizes=FrozenMapping([ (DatasetConfig(split="train"), 1_281_167), (DatasetConfig(split="val"), 50_000), (DatasetConfig(split="test"), 100_000), ]), ), )