__author__ = 'chunk' __all__ = ['DataDumperBase', ] class DataDumperBase(object): """ Base class for image data dumping & retrieving. A regular directory pattern would be like this: ├── file-tag-list.tsv │ ├── Feat │   ├── 0a1 │   └── 53e │   └── ... | └── Img ├── 0a1 └── 53e └── ... It can be refractored from the original pattern which is supposed to be generated from web crawlers: ├── Neg │   ├── aaa.jpg │   └── bbb.jpg │   └── ... | └── Pos ├── ccc.jpg └── ddd.jpg └── ... convention: 'img' for image file data while 'image' for file path; """ def __init__(self): self.base_dir = None self.list_file = None self.dict_data = None # self.table_name = None # self.table = None # self.connection = None def format(self): pass def get_table(self, tablename, connection=None): pass def store_img(self, table): pass def store_tag(self, table, category): pass def get_feat(self, category): pass def store_feat(self, table, category): pass