from app.core.config import DEBUG


class Config:
    def __init__(self):
        # 基本参数
        self.dataroot = "app/service/image2sketch/datasets/ref_unpair"
        self.name = 'semi_unpair'
        self.gpu_ids = [0]
        # 模型参数
        self.model = 'unpaired'
        self.input_nc = 3
        self.output_nc = 3
        self.ngf = 64
        self.ndf = 64
        self.netD = 'basic'
        self.netG = 'ref_unpair_cbam_cat'
        self.netG2 = 'ref_unpair_recon'
        self.n_layers_D = 3
        self.norm = 'instance'
        self.init_type = 'normal'
        self.init_gain = 0.02
        self.no_dropout = False  # 对应 `--no_dropout`
        # 数据集参数
        self.dataset_mode = 'single'
        self.direction = 'AtoB'
        self.serial_batches = True  # 对应 `--serial_batches`
        self.num_threads = 4
        self.batch_size = 4
        self.load_size = 512
        self.crop_size = 512
        self.max_dataset_size = float("inf")
        self.preprocess = 'resize_and_crop'
        self.no_flip = False  # 对应 `--no_flip`
        self.display_winsize = 256
        # 额外参数
        self.epoch = '100'
        self.load_iter = 0
        self.verbose = False  # 对应 `--verbose`
        self.suffix = ''
        self.isTrain = False
        self.results_dir = 'service/image2sketch/results'
        self.aspect_ratio = 1.0
        self.phase = 'test'
        self.eval = False
        self.num_test = 1000
        self.morm = 'batch'
        if DEBUG:
            self.style_image1 = "service/image2sketch/datasets/ref_unpair/testC/style_1.jpg"
            self.style_image2 = "service/image2sketch/datasets/ref_unpair/testC/style_2.jpeg"
            self.style_image3 = "service/image2sketch/datasets/ref_unpair/testC/style_3.png"
            self.checkpoints_dir = 'service/image2sketch/checkpoints/'
        else:
            self.checkpoints_dir = 'app/service/image2sketch/checkpoints/'
            self.style_image1 = "app/service/image2sketch/datasets/ref_unpair/testC/style_1.jpg"
            self.style_image2 = "app/service/image2sketch/datasets/ref_unpair/testC/style_2.jpeg"
            self.style_image3 = "app/service/image2sketch/datasets/ref_unpair/testC/style_3.png"
