def initialize(self, opt):
        self.opt = opt

        self.A_paths = []
        self.B_paths = []
        for root_dir_item in opt.root_dir:
            dir_A_tmp = os.path.join(root_dir_item, opt.phase + '_A')
            dir_B_tmp = os.path.join(root_dir_item, opt.phase + '_B')

            img_list = os.path.join(root_dir_item, opt.name_img_list)

            A_labels_tmp, A_paths_tmp = get_list(dir_A_tmp, img_list)
            B_labels_tmp, B_paths_tmp = get_list(dir_B_tmp, img_list)

            self.A_paths += A_paths_tmp
            self.B_paths += B_paths_tmp

        assert (len(self.A_paths) == len(self.B_paths))
        assert (opt.resize_or_crop == 'resize_and_crop')

        transform_list = [
            transforms.ToTensor(),
            transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
        ]
        self.transform = transforms.Compose(transform_list)

        self.crop_type = opt.crop_type
    def initialize(self, opt):
        self.opt = opt

        self.A_paths = []
        self.B_paths = []
        for root_dir_item in opt.root_dir:
            dir_A_tmp = os.path.join(root_dir_item, opt.phase + '_A')
            dir_B_tmp = os.path.join(root_dir_item, opt.phase + '_B')

            img_list = os.path.join(root_dir_item, opt.name_img_list)

            A_labels_tmp, A_paths_tmp = get_list(dir_A_tmp, img_list)
            B_labels_tmp, B_paths_tmp = get_list(dir_B_tmp, img_list)

            self.A_paths += A_paths_tmp
            self.B_paths += B_paths_tmp

        self.color_A = opt.color_A
        self.color_B = opt.color_B
        self.heatmap_size = opt.fineSize_B
        self.transform = AffineCompose(
            rotation_range=opt.rotate_range,
            translation_range=opt.translate_range,
            zoom_range=opt.zoom_range,
            output_img_width=opt.fineSize_A,
            output_img_height=opt.fineSize_A,
            mirror=opt.mirror,
            corr_list=None,
            normalise=opt.normalise,
            normalisation_type=opt.normalisation_type)
    def initialize(self, opt):
        self.opt = opt
        self.dir_A = os.path.join(opt.dir_landmarks_list_A, opt.name_landmarks_list)
        self.dir_B = os.path.join(opt.dir_landmarks_list_B, opt.name_landmarks_list)

        self.A_items = get_list(self.dir_A)
        self.B_items = get_list(self.dir_B)

        self.A_size = len(self.A_items)
        self.B_size = len(self.B_items)
    def initialize(self, opt):
        self.opt = opt

        self.F1_paths = []
        self.F1_labels = []
        for root_dir_item in opt.root_dir:
            dir_F1_tmp = os.path.join(root_dir_item, 'train' + '_F1')
            img_list = os.path.join(root_dir_item, opt.name_landmarks_list)
            F1_labels_tmp, F1_paths_tmp = get_list(dir_F1_tmp, img_list)

            self.F1_paths += F1_paths_tmp
            self.F1_labels += F1_labels_tmp

        self.color_F1 = opt.color_F1
        self.fineSize_F1 = opt.fineSize_F1
        self.sigma = opt.sigma
        self.label_num = opt.label_num
        self.transform = AffineCompose(
            rotation_range=opt.rotate_range,
            translation_range=opt.translate_range,
            zoom_range=opt.zoom_range,
            output_img_width=self.fineSize_F1,
            output_img_height=self.fineSize_F1,
            mirror=opt.mirror,
            corr_list=opt.corr_list,
            normalise=opt.normalise,
            normalisation_type=opt.normalisation_type)
    def initialize(self, opt):
        self.opt = opt

        self.A_paths = []
        self.A_labels = []
        for root_dir_item in opt.root_dir:
            dir_A_tmp = os.path.join(root_dir_item, 'Image')
            img_list = os.path.join(root_dir_item, opt.name_landmarks_list)
            A_labels_tmp, A_paths_tmp = get_list(dir_A_tmp, img_list)

            self.A_paths += A_paths_tmp
            self.A_labels += A_labels_tmp

        self.color_A = opt.color_A
        self.label_size = opt.fineSize_A
        self.heatmap_size = opt.fineSize_B
        self.heatmap_num = opt.output_nc
        self.sigma = opt.sigma
        self.label_num = opt.label_num
        self.transform = AffineCompose(
            rotation_range=opt.rotate_range,
            translation_range=opt.translate_range,
            zoom_range=opt.zoom_range,
            output_img_width=self.label_size,
            output_img_height=self.label_size,
            mirror=opt.mirror,
            corr_list=opt.corr_list,
            normalise=opt.normalise,
            normalisation_type=opt.normalisation_type)