MCPcopy Create free account
hub / github.com/tensorpack/tensorpack / get_synset_1000

Method get_synset_1000

tensorpack/dataflow/dataset/ilsvrc.py:46–54  ·  view source on GitHub ↗

Returns: dict: {cls_number: synset_id}

(self)

Source from the content-addressed store, hash-verified

44 return dict(enumerate(lines))
45
46 def get_synset_1000(self):
47 """
48 Returns:
49 dict: {cls_number: synset_id}
50 """
51 fname = os.path.join(self.dir, 'synsets.txt')
52 assert os.path.isfile(fname)
53 lines = [x.strip() for x in open(fname).readlines()]
54 return dict(enumerate(lines))
55
56 def _download_caffe_meta(self):
57 fpath = download(CAFFE_ILSVRC12_URL[0], self.dir, expect_size=CAFFE_ILSVRC12_URL[1])

Callers 1

get_image_listMethod · 0.95

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected