def _make_pred_func(self, load): from train import ResNetFPNTrackModel pred_model = ResNetFPNTrackModel() predcfg = PredictConfig( model=pred_model, session_init=get_model_loader(load), input_names=pred_model.get_inference_tensor_names()[0], output_names=pred_model.get_inference_tensor_names()[1]) return OfflinePredictor(predcfg)
def _init_model(self): logger.set_logger_dir("/tmp/test_log/", 'd') from dataset import DetectionDataset from train import ResNetFPNTrackModel # init tensorpack model cfg.freeze(False) model = ResNetFPNTrackModel() DetectionDataset( ) # initialize the config with information from our dataset finalize_configs(is_training=False) return model