def add_args(cls, parser): get_reader(cls.READER).add_args(parser) get_renderer(cls.RAYMARCHER).add_args(parser) get_encoder(cls.ENCODER).add_args(parser) get_field(cls.FIELD).add_args(parser) # model-level args parser.add_argument('--hierarchical-sampling', action='store_true', help='if set, a second ray marching pass will be performed based on the first time probs.') parser.add_argument('--use-fine-model', action='store_true', help='if set, we will simultaneously optimize two networks, a coarse field and a fine field.')
def build_model(cls, args, task): """Build a new model instance.""" reader = get_reader(cls.READER)(args) encoder = get_encoder(cls.ENCODER)(args) field = get_field(cls.FIELD)(args) raymarcher = get_renderer(cls.RAYMARCHER)(args) return cls(args, reader, encoder, field, raymarcher)
def build_model(cls, args, task): """Build a new model instance.""" reader = get_reader(cls.READER)(args) encoder = get_encoder(cls.ENCODER)(args) field = get_field(cls.FIELD)(args) raymarcher = get_renderer(cls.RAYMARCHER)(args) setups = { 'reader': reader, 'encoder': encoder, 'field': field, 'raymarcher': raymarcher } return cls(args, setups)
def add_args(cls, parser): get_reader(cls.READER).add_args(parser) get_renderer(cls.RAYMARCHER).add_args(parser) get_encoder(cls.ENCODER).add_args(parser) get_field(cls.FIELD).add_args(parser)