Exemple #1
0
    def __init__(self, split, align=False, partition='all'):

        if not partition == 'all':
            name = 'person_' + partition + '_' + split
        elif partition == 'all':
            name = 'person_' + split

        if align and (partition == 'all' or partition == 'face'):
            name += '_align'

        Imdb.__init__(self, name)

        # Load two children dataset wrappers
        self._face = CelebA(split, align=align)
        self._clothes = DeepFashion(split)
        # The class list is a combination of face and clothing attributes
        self._classes = self._face.classes + self._clothes.classes
        self._face_class_idx = range(self._face.num_classes)
        self._clothes_class_idx = range(
            self._face.num_classes,
            self._face.num_classes + self._clothes.num_classes)

        # load data path
        self._data_path = os.path.join(self.data_path, 'imdb_PersonAttributes')
        # load the image lists and attributes.
        self._load_dataset(split, align, partition)
Exemple #2
0
    def __init__(self, split):
        name = 'celeba_plus_webcam_cls_' + split
        Imdb.__init__(self, name)

        # object classes
        self._classes = ['Bald', 'Hat', 'Hair']

        # load image paths and annotations
        self._data_path = osp.join(self.data_path, 'imdb_CelebA+Webcam')
        self._load_dataset(split)
Exemple #3
0
    def __init__(self, split):
        name = 'mnist_' + split
        Imdb.__init__(self, name)

        # load image paths
        self._data_path = os.path.join(self.data_path, 'imdb_mnist')

        # attribute classes
        self._classes = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

        # load annotations
        self._load_dataset(split)
Exemple #4
0
    def __init__(self, split, align=False):
        name = 'celeba_' + split
        if align is True:
            name += '_align'

        Imdb.__init__(self, name)

        # attribute classes
        self._classes = \
            ['5_o_Clock_Shadow', 'Arched_Eyebrows', 'Attractive', 'Bags_Under_Eyes', 'Bald', 'Bangs', 'Big_Lips', 'Big_Nose', 'Black_Hair', 'Blond_Hair', 'Blurry', 'Brown_Hair', 'Bushy_Eyebrows', 'Chubby', 'Double_Chin', 'Eyeglasses', 'Goatee', 'Gray_Hair', 'Heavy_Makeup', 'High_Cheekbones', 'Male', 'Mouth_Slightly_Open', 'Mustache', 'Narrow_Eyes', 'No_Beard', 'Oval_Face', 'Pale_Skin', 'Pointy_Nose', 'Receding_Hairline', 'Rosy_Cheeks', 'Sideburns', 'Smiling', 'Straight_Hair', 'Wavy_Hair', 'Wearing_Earrings', 'Wearing_Hat', 'Wearing_Lipstick', 'Wearing_Necklace', 'Wearing_Necktie', 'Young']

        # load image paths and annotations
        self._data_path = os.path.join(self.data_path, 'imdb_CelebA')
        self._load_dataset(split, align)
Exemple #5
0
    def __init__(self, split):
        name = 'IBMattributes_' + split
        Imdb.__init__(self, name)

        # attribute classes
        self._classes = [
            'Bald', 'Hat', 'Hair', 'Blackhair', 'Blondehair', 'Facialhair',
            'Asian', 'Black', 'White', 'NoGlasses', 'SunGlasses',
            'VisionGlasses'
        ]
        self._split = split

        # load image paths and annotations
        self._data_path = osp.join(self.data_path, 'imdb_IBMAttributes')
        self._load_config()
        self._load_dataset(split)
Exemple #6
0
    def __init__(self, split):
        name = 'deepfashion_' + split
        Imdb.__init__(self, name)

        # load image paths
        self._data_path = os.path.join(self.data_path, 'imdb_DeepFashion')

        # attribute classes
        self._classes = []
        self._class_types = []
        attr_file = os.path.join(self.data_path, 'Anno',
                                 'list_category_cloth.txt')
        with open(attr_file, 'r') as fid:
            # skip first two lines
            next(fid)
            next(fid)
            # read class list
            for line in fid:
                parsed_line = line.split()
                self._classes.append(' '.join(parsed_line[:-1]))
                self._class_types.append(int(parsed_line[-1]))

        # load annotations
        self._load_dataset(split)