MCPcopy Create free account
hub / github.com/NVIDIA/vid2vid / initialize

Method initialize

options/base_options.py:11–85  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

9 self.initialized = False
10
11 def initialize(self):
12 self.parser.add_argument('--dataroot', type=str, default='datasets/Cityscapes/')
13 self.parser.add_argument('--batchSize', type=int, default=1, help='input batch size')
14 self.parser.add_argument('--loadSize', type=int, default=512, help='scale images to this size')
15 self.parser.add_argument('--fineSize', type=int, default=512, help='then crop to this size')
16 self.parser.add_argument('--input_nc', type=int, default=3, help='# of input image channels')
17 self.parser.add_argument('--label_nc', type=int, default=0, help='number of labels')
18 self.parser.add_argument('--output_nc', type=int, default=3, help='# of output image channels')
19
20 # network arch
21 self.parser.add_argument('--netG', type=str, default='composite', help='selects model to use for netG')
22 self.parser.add_argument('--ngf', type=int, default=128, help='# of gen filters in first conv layer')
23 self.parser.add_argument('--ndf', type=int, default=64, help='# of discrim filters in first conv layer')
24 self.parser.add_argument('--n_blocks', type=int, default=9, help='number of resnet blocks in generator')
25 self.parser.add_argument('--n_downsample_G', type=int, default=3, help='number of downsampling layers in netG')
26
27 self.parser.add_argument('--gpu_ids', type=str, default='0', help='gpu ids: e.g. 0 0,1,2, 0,2. use -1 for CPU')
28 self.parser.add_argument('--n_gpus_gen', type=int, default=-1, help='how many gpus are used for generator (the rest are used for discriminator). -1 means use all gpus')
29 self.parser.add_argument('--name', type=str, default='experiment_name', help='name of the experiment. It decides where to store samples and models')
30 self.parser.add_argument('--dataset_mode', type=str, default='temporal', help='chooses how datasets are loaded. [unaligned | aligned | single]')
31 self.parser.add_argument('--model', type=str, default='vid2vid', help='chooses which model to use. vid2vid, test')
32 self.parser.add_argument('--nThreads', default=2, type=int, help='# threads for loading data')
33 self.parser.add_argument('--checkpoints_dir', type=str, default='./checkpoints', help='models are saved here')
34 self.parser.add_argument('--norm', type=str, default='batch', help='instance normalization or batch normalization')
35 self.parser.add_argument('--serial_batches', action='store_true', help='if true, takes images in order to make batches, otherwise takes them randomly')
36 self.parser.add_argument('--display_winsize', type=int, default=512, help='display window size')
37 self.parser.add_argument('--display_id', type=int, default=0, help='window id of the web display')
38 self.parser.add_argument('--tf_log', action='store_true', help='if specified, use tensorboard logging. Requires tensorflow installed')
39
40 self.parser.add_argument('--max_dataset_size', type=int, default=float("inf"), help='Maximum number of samples allowed per dataset. If the dataset directory contains more than max_dataset_size, only a subset is loaded.')
41 self.parser.add_argument('--resize_or_crop', type=str, default='scaleWidth', help='scaling and cropping of images at load time [resize_and_crop|crop|scaledCrop|scaleWidth|scaleWidth_and_crop|scaleWidth_and_scaledCrop|scaleHeight|scaleHeight_and_crop] etc')
42 self.parser.add_argument('--no_flip', action='store_true', help='if specified, do not flip the images for data argumentation')
43
44 # more features as input
45 self.parser.add_argument('--use_instance', action='store_true', help='if specified, add instance map as feature for class A')
46 self.parser.add_argument('--label_feat', action='store_true', help='if specified, encode label features as input')
47 self.parser.add_argument('--feat_num', type=int, default=3, help='number of encoded features')
48 self.parser.add_argument('--nef', type=int, default=32, help='# of encoder filters in first conv layer')
49 self.parser.add_argument('--load_features', action='store_true', help='if specified, load precomputed feature maps')
50 self.parser.add_argument('--netE', type=str, default='simple', help='which model to use for encoder')
51 self.parser.add_argument('--n_downsample_E', type=int, default=3, help='number of downsampling layers in netE')
52
53 # for cascaded resnet
54 self.parser.add_argument('--n_blocks_local', type=int, default=3, help='number of resnet blocks in outmost multiscale resnet')
55 self.parser.add_argument('--n_local_enhancers', type=int, default=1, help='number of cascaded layers')
56
57 # temporal
58 self.parser.add_argument('--n_frames_G', type=int, default=3, help='number of input frames to feed into generator, i.e., n_frames_G-1 is the number of frames we look into past')
59 self.parser.add_argument('--n_scales_spatial', type=int, default=1, help='number of spatial scales in the coarse-to-fine generator')
60 self.parser.add_argument('--no_first_img', action='store_true', help='if specified, generator also tries to synthesize first image')
61 self.parser.add_argument('--use_single_G', action='store_true', help='if specified, use single frame generator for the first frame')
62 self.parser.add_argument('--fg', action='store_true', help='if specified, use foreground-background seperation model')
63 self.parser.add_argument('--fg_labels', type=str, default='26', help='label indices for foreground objects')
64 self.parser.add_argument('--no_flow', action='store_true', help='if specified, do not use flow warping and directly synthesize frames')
65
66 # face specific
67 self.parser.add_argument('--no_canny_edge', action='store_true', help='do *not* use canny edge as input')
68 self.parser.add_argument('--no_dist_map', action='store_true', help='do *not* use distance transform map as input')

Callers 1

parseMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected