MCPcopy
hub / github.com/DingXiaoH/RepVGG / __init__

Method __init__

data/lmdb_dataset.py:30–40  ·  view source on GitHub ↗
(self, db_path, transform=None, target_transform=None)

Source from the content-addressed store, hash-verified

28
29class ImageFolderLMDB(data.Dataset):
30 def __init__(self, db_path, transform=None, target_transform=None):
31 self.db_path = db_path
32 self.env = lmdb.open(db_path, subdir=osp.isdir(db_path),
33 readonly=True, lock=False,
34 readahead=False, meminit=False)
35 with self.env.begin(write=False) as txn:
36 self.length = loads_pyarrow(txn.get(b'__len__'))
37 self.keys = loads_pyarrow(txn.get(b'__keys__'))
38
39 self.transform = transform
40 self.target_transform = target_transform
41
42 def __getstate__(self):
43 state = self.__dict__

Callers

nothing calls this directly

Calls 1

loads_pyarrowFunction · 0.85

Tested by

no test coverage detected