Cleanup
This commit is contained in:
parent
ac7256d4a3
commit
711780126e
|
@ -125,13 +125,6 @@ def define_G(opt, opt_net, scale=None):
|
|||
netG = stylegan2.StyleGan2GeneratorWithLatent(image_size=opt_net['image_size'], latent_dim=opt_net['latent_dim'],
|
||||
style_depth=opt_net['style_depth'], structure_input=is_structured,
|
||||
attn_layers=attn)
|
||||
elif which_model == 'srflow':
|
||||
from models.archs.srflow import SRFlow_arch
|
||||
netG = SRFlow_arch.SRFlowNet(in_nc=3, out_nc=3, nf=opt_net['nf'], nb=opt_net['nb'],
|
||||
quant=opt_net['quant'], flow_block_maps=opt_net['rrdb_block_maps'],
|
||||
noise_quant=opt_net['noise_quant'], hidden_channels=opt_net['nf'],
|
||||
K=opt_net['K'], L=opt_net['L'], train_rrdb_at_step=opt_net['rrdb_train_step'],
|
||||
hr_img_shape=opt_net['hr_shape'], scale=opt_net['scale'])
|
||||
elif which_model == 'srflow_orig':
|
||||
from models.archs.srflow_orig import SRFlowNet_arch
|
||||
netG = SRFlowNet_arch.SRFlowNet(in_nc=3, out_nc=3, nf=opt_net['nf'], nb=opt_net['nb'], scale=opt_net['scale'],
|
||||
|
|
|
@ -13,15 +13,15 @@ import torch
|
|||
def main():
|
||||
split_img = False
|
||||
opt = {}
|
||||
opt['n_thread'] = 20
|
||||
opt['n_thread'] = 10
|
||||
opt['compression_level'] = 90 # JPEG compression quality rating.
|
||||
# CV_IMWRITE_PNG_COMPRESSION from 0 to 9. A higher value means a smaller size and longer
|
||||
# compression time. If read raw images during training, use 0 for faster IO speed.
|
||||
|
||||
opt['dest'] = 'file'
|
||||
opt['input_folder'] = ['F:\\4k6k\datasets\\images\\youtube\\videos\\4k_quote_unquote\\images']
|
||||
opt['save_folder'] = 'F:\\4k6k\\datasets\\images\\ge_full_1024'
|
||||
opt['imgsize'] = 1024
|
||||
opt['input_folder'] = ['F:\\4k6k\\datasets\\ns_images\\other_ns']
|
||||
opt['save_folder'] = 'F:\\4k6k\\datasets\\ns_images\\512_unsupervised'
|
||||
opt['imgsize'] = 512
|
||||
|
||||
save_folder = opt['save_folder']
|
||||
if not osp.exists(save_folder):
|
||||
|
@ -53,7 +53,7 @@ class TiledDataset(data.Dataset):
|
|||
return None
|
||||
h, w, c = img.shape
|
||||
# Uncomment to filter any image that doesnt meet a threshold size.
|
||||
if min(h,w) < 1024:
|
||||
if min(h,w) < 512:
|
||||
return None
|
||||
|
||||
# We must convert the image into a square.
|
||||
|
|
Loading…
Reference in New Issue
Block a user