| 3 | |
| 4 | |
| 5 | class BaseOptions(): |
| 6 | def __init__(self): |
| 7 | self.initialized = False |
| 8 | |
| 9 | def initialize(self, parser): |
| 10 | # Datasets related |
| 11 | g_data = parser.add_argument_group('Data') |
| 12 | g_data.add_argument('--dataroot', type=str, default='./data', |
| 13 | help='path to images (data folder)') |
| 14 | |
| 15 | g_data.add_argument('--loadSize', type=int, default=512, help='load size of input image') |
| 16 | |
| 17 | # Experiment related |
| 18 | g_exp = parser.add_argument_group('Experiment') |
| 19 | g_exp.add_argument('--name', type=str, default='example', |
| 20 | help='name of the experiment. It decides where to store samples and models') |
| 21 | g_exp.add_argument('--debug', action='store_true', help='debug mode or not') |
| 22 | |
| 23 | g_exp.add_argument('--num_views', type=int, default=1, help='How many views to use for multiview network.') |
| 24 | g_exp.add_argument('--random_multiview', action='store_true', help='Select random multiview combination.') |
| 25 | |
| 26 | # Training related |
| 27 | g_train = parser.add_argument_group('Training') |
| 28 | g_train.add_argument('--gpu_id', type=int, default=0, help='gpu id for cuda') |
| 29 | g_train.add_argument('--gpu_ids', type=str, default='0', help='gpu ids: e.g. 0 0,1,2, 0,2, -1 for CPU mode') |
| 30 | |
| 31 | g_train.add_argument('--num_threads', default=1, type=int, help='# sthreads for loading data') |
| 32 | g_train.add_argument('--serial_batches', action='store_true', |
| 33 | help='if true, takes images in order to make batches, otherwise takes them randomly') |
| 34 | g_train.add_argument('--pin_memory', action='store_true', help='pin_memory') |
| 35 | |
| 36 | g_train.add_argument('--batch_size', type=int, default=2, help='input batch size') |
| 37 | g_train.add_argument('--learning_rate', type=float, default=1e-3, help='adam learning rate') |
| 38 | g_train.add_argument('--learning_rateC', type=float, default=1e-3, help='adam learning rate') |
| 39 | g_train.add_argument('--num_epoch', type=int, default=100, help='num epoch to train') |
| 40 | |
| 41 | g_train.add_argument('--freq_plot', type=int, default=10, help='freqency of the error plot') |
| 42 | g_train.add_argument('--freq_save', type=int, default=50, help='freqency of the save_checkpoints') |
| 43 | g_train.add_argument('--freq_save_ply', type=int, default=100, help='freqency of the save ply') |
| 44 | |
| 45 | g_train.add_argument('--no_gen_mesh', action='store_true') |
| 46 | g_train.add_argument('--no_num_eval', action='store_true') |
| 47 | |
| 48 | g_train.add_argument('--resume_epoch', type=int, default=-1, help='epoch resuming the training') |
| 49 | g_train.add_argument('--continue_train', action='store_true', help='continue training: load the latest model') |
| 50 | |
| 51 | # Testing related |
| 52 | g_test = parser.add_argument_group('Testing') |
| 53 | g_test.add_argument('--resolution', type=int, default=256, help='# of grid in mesh reconstruction') |
| 54 | g_test.add_argument('--test_folder_path', type=str, default=None, help='the folder of test image') |
| 55 | |
| 56 | # Sampling related |
| 57 | g_sample = parser.add_argument_group('Sampling') |
| 58 | g_sample.add_argument('--sigma', type=float, default=5.0, help='perturbation standard deviation for positions') |
| 59 | |
| 60 | g_sample.add_argument('--num_sample_inout', type=int, default=5000, help='# of sampling points') |
| 61 | g_sample.add_argument('--num_sample_color', type=int, default=0, help='# of sampling points') |
| 62 |
no outgoing calls
no test coverage detected