示例#1
0
 def test_predict_and_eval_uw3_with_voting(self):
     from calamari_ocr.test.test_train_file import uw3_trainer_params
     checkpoint = os.path.join(this_dir, "models", "best.ckpt")
     trainer_params = uw3_trainer_params(with_validation=True)
     args = PredictAndEvalArgs(
         checkpoint=[checkpoint, checkpoint, checkpoint],
         predictor=PredictorParams(pipeline=DataPipelineParams(
             batch_size=5)),
         data=trainer_params.gen.val_gen(),
     )
     main(args)
示例#2
0
 def test_predict_and_eval_hdf5(self):
     from calamari_ocr.test.test_train_hdf5 import default_trainer_params
     checkpoint = os.path.join(this_dir, "models", "best.ckpt")
     trainer_params = default_trainer_params(with_validation=True)
     args = PredictAndEvalArgs(
         checkpoint=[checkpoint],
         predictor=PredictorParams(pipeline=DataPipelineParams(
             num_processes=1)),
         data=trainer_params.gen.val_gen(),
     )
     main(args)