Example #1
0
            'pretrain_net': args.pretrain_net,
            'freeze_pretrain_cnn': args.freeze_pretrain_cnn,
            'squash_ctrl_params': args.squash_ctrl_params,
            'clip_gradient': args.clip_gradient,
            'fixed_order': args.fixed_order,
            'ctrl_rnn_inp_struct': "attn",
            'num_ctrl_rnn_iter': args.num_ctrl_rnn_iter,
            'num_glimpse_mlp_layers': args.num_glimpse_mlp_layers,
            'fixed_var': args.fixed_var,
            'use_iou_box': args.use_iou_box,
            'dynamic_var': args.dynamic_var,
            'add_d_out': args.add_d_out,
            'add_y_out': args.add_y_out,
            'rnd_hflip': rnd_hflip,
            'rnd_vflip': rnd_vflip,
            'rnd_transpose': rnd_transpose,
            'rnd_colour': rnd_colour,
            'num_semantic_classes': args.num_semantic_classes
        }
        return model_opt


if __name__ == '__main__':
    parsers = {
        'default': TrainArgsParser(),
        'data': DataArgsParser(),
        'model': BoxModelArgsParser()
    }
    BoxExperiment.create_from_main('box_model',
                                   parsers=parsers,
                                   description='training').run()
Example #2
0
      for ii in range(y_out.shape[0]):
        idx = inp['idx_map'][ii]
        group = h5f[self.dataset.get_str_id(idx)]
        if 'instance_pred' in group:
          del group['instance_pred']
        for ins in range(y_out.shape[1]):
          y_out_arr = y_out[ii, ins]
          y_out_arr = (y_out_arr * 255).astype('uint8')
          y_out_str = cv2.imencode('.png', y_out_arr)[1]
          group['instance_pred/{:02d}'.format(ins)] = y_out_str
        if 'score_pred' in group:
          del group['score_pred']
        group['score_pred'] = s_out[ii]


class PackExperiment(EvalExperimentBase):

  def get_runner(self, split):
    return PackRunner(self.sess, self.model, self.dataset[split], self.opt,
                      self.model_opt)

  def get_model(self):
    self.model_opt['use_knob'] = False
    return get_model(self.model_opt)


if __name__ == '__main__':
  parsers = {'default': EvalArgsParser(), 'data': DataArgsParser()}
  PackExperiment.create_from_main(
      'ris_pack', parsers=parsers, description='Pack ris output').run()
def main():
    parsers = {'default': EvalArgsParser(), 'data': DataArgsParser()}
    FGPackExperiment.create_from_main('fg_pack',
                                      parsers=parsers,
                                      description='Pack fg output').run()
Example #4
0
def main():
    parsers = {'default': MyEvalArgsParser(), 'data': DataArgsParser()}
    EvalExperiment.create_from_main('eval',
                                    parsers=parsers,
                                    description='Evaluate output').run()
def main():
    parsers = {'default': FGEvalArgsParser(), 'data': DataArgsParser()}
    FGEvalExperiment.create_from_main('fg_eval',
                                      parsers=parsers,
                                      description='Eval fg output').run()
Example #6
0
def main():
    parsers = {'default': CityscapesEvalArgsParser(), 'data': DataArgsParser()}
    CityscapesEvalExperiment.create_from_main(
        'ris_pp_eval', parsers=parsers,
        description='Eval ris pp output').run()