def __init__(self, root=None, crop=False, origin_width=256, width=224, ratio=0.16): # Data loading code transform_Dict = Generate_transform_Dict(origin_width=origin_width, width=width, ratio=ratio) # if crop: # root = '/opt/intern/users/xunwang/DataSet/In_shop_clothes_retrieval/cropIms' # else: # root = '/home/xunwang' if root is None: root = '/opt/intern/users/xunwang/DataSet/In_shop_clothes' train_txt = os.path.join(root, 'train.txt') gallery_txt = os.path.join(root, 'gallery.txt') query_txt = os.path.join(root, 'query.txt') self.train = MyData(root, label_txt=train_txt, transform=transform_Dict['rand-crop']) self.gallery = MyData(root, label_txt=gallery_txt, transform=transform_Dict['center-crop']) self.query = MyData(root, label_txt=query_txt, transform=transform_Dict['center-crop'])
def __init__(self, root=None, crop=False, origin_width=256, width=224, ratio=0.16): # Data loading code transform_Dict = Generate_transform_Dict(origin_width=origin_width, width=width, ratio=ratio) if root is None: root = 'data/In_shop_clothes' train_txt = os.path.join(root, 'train.txt') gallery_txt = os.path.join(root, 'gallery.txt') query_txt = os.path.join(root, 'query.txt') self.train = MyData(root, label_txt=train_txt, transform=transform_Dict['rand-crop']) self.gallery = MyData(root, label_txt=gallery_txt, transform=transform_Dict['center-crop']) self.query = MyData(root, label_txt=query_txt, transform=transform_Dict['center-crop'])
def __init__(self, root=None, origin_width=256, width=227, ratio=0.16, transform=None): if transform is None: transform_Dict = Generate_transform_Dict(origin_width=origin_width, width=width, ratio=ratio) if root is None: root = 'data/Cars196/' train_txt = os.path.join(root, 'train.txt') test_txt = os.path.join(root, 'test.txt') self.train = MyData(root, label_txt=train_txt, transform=transform_Dict['rand-crop']) self.gallery = MyData(root, label_txt=test_txt, transform=transform_Dict['center-crop'])
def __init__(self, root=None, origin_width=256, width=224, ratio=0.16, transform=None): # Data loading code if transform is None: transform_Dict = Generate_transform_Dict(origin_width=origin_width, width=width, ratio=ratio) if root is None: root = '/opt/intern/users/xunwang/DataSet/Car196/' train_txt = os.path.join(root, 'train.txt') test_txt = os.path.join(root, 'test.txt') self.train = MyData(root, label_txt=train_txt, transform=transform_Dict['rand-crop']) self.gallery = MyData(root, label_txt=test_txt, transform=transform_Dict['center-crop'])
def __init__(self, width=224, origin_width=256, ratio=0.16, root=None, transform=None): transform_Dict = Generate_transform_Dict(origin_width=origin_width, width=width, ratio=ratio) if root is None: root = '/opt/intern/users/xunwang/DataSet/Products' train_txt = osp.join(root, 'train.txt') test_txt = osp.join(root, 'test.txt') self.train = MyData(root, label_txt=train_txt, transform=transform_Dict['rand-crop']) self.gallery = MyData(root, label_txt=test_txt, transform=transform_Dict['center-crop'])
def __init__(self, width=224, origin_width=256, ratio=0.16, root=None, transform=None, RAE='None'): transform_Dict = Generate_transform_Dict(origin_width=origin_width, width=width, ratio=ratio, RAE=RAE) if root is None: root = '../data/Products' train_txt = osp.join(root, 'train.txt') test_txt = osp.join(root, 'test.txt') self.train = MyData(root, label_txt=train_txt, transform=transform_Dict['rand-crop']) self.gallery = MyData(root, label_txt=test_txt, transform=transform_Dict['center-crop'])