MCPcopy Create free account
hub / github.com/NVlabs/SPADE / modify_commandline_options

Method modify_commandline_options

data/custom_dataset.py:17–33  ·  view source on GitHub ↗
(parser, is_train)

Source from the content-addressed store, hash-verified

15
16 @staticmethod
17 def modify_commandline_options(parser, is_train):
18 parser = Pix2pixDataset.modify_commandline_options(parser, is_train)
19 parser.set_defaults(preprocess_mode='resize_and_crop')
20 load_size = 286 if is_train else 256
21 parser.set_defaults(load_size=load_size)
22 parser.set_defaults(crop_size=256)
23 parser.set_defaults(display_winsize=256)
24 parser.set_defaults(label_nc=13)
25 parser.set_defaults(contain_dontcare_label=False)
26
27 parser.add_argument('--label_dir', type=str, required=True,
28 help='path to the directory that contains label images')
29 parser.add_argument('--image_dir', type=str, required=True,
30 help='path to the directory that contains photo images')
31 parser.add_argument('--instance_dir', type=str, default='',
32 help='path to the directory that contains instance maps. Leave black if not exists')
33 return parser
34
35 def get_paths(self, opt):
36 label_dir = opt.label_dir

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected