diff --git a/tools/eval.py b/tools/eval.py
index 4a59f2c..45b1734 100755
--- a/tools/eval.py
+++ b/tools/eval.py
@@ -151,13 +151,9 @@ def main():
     else:
         scaler = None
 
-    best_model_dict = load_model(
-        config, model, model_type=config["Architecture"]["model_type"]
-    )
-    if len(best_model_dict):
-        logger.info("metric in ckpt ***************")
-        for k, v in best_model_dict.items():
-            logger.info("{}:{}".format(k, v))
+    from ais_bench.infer.interface import InferSession
+    om_path = os.path.join(config["Global"].get("pretrained_model", "PP-OCRv5_server_det_infer/inference_linux_aarch64.om"))
+    model = InferSession(0, om_path)
 
     # start eval
     metric = program.eval(
diff --git a/tools/program.py b/tools/program.py
index ec284f5..b205221 100755
--- a/tools/program.py
+++ b/tools/program.py
@@ -662,55 +662,38 @@ def eval(
     amp_custom_white_list=[],
     amp_dtype="float16",
 ):
-    model.eval()
-    with paddle.no_grad():
-        total_frame = 0.0
-        total_time = 0.0
-        pbar = tqdm(
-            total=len(valid_dataloader), desc="eval model:", position=0, leave=True
-        )
-        max_iter = (
-            len(valid_dataloader) - 1
-            if platform.system() == "Windows"
-            else len(valid_dataloader)
-        )
-        sum_images = 0
-        for idx, batch in enumerate(valid_dataloader):
-            if idx >= max_iter:
-                break
-            images = batch[0]
-            start = time.time()
+    
+    total_frame = 0.0
+    total_time = 0.0
+    pbar = tqdm(
+        total=len(valid_dataloader), desc="eval model:", position=0, leave=True
+    )
+    max_iter = (
+        len(valid_dataloader) - 1
+        if platform.system() == "Windows"
+        else len(valid_dataloader)
+    )
+    sum_images = 0
+    for idx, batch in enumerate(valid_dataloader):
+        if idx >= max_iter:
+            break
+        images = batch[0]
+        start = time.time()
 
-            # use amp
-            if scaler:
-                with paddle.amp.auto_cast(
-                    level=amp_level,
-                    custom_black_list=amp_custom_black_list,
-                    dtype=amp_dtype,
-                ):
-                    if model_type == "table" or extra_input:
-                        preds = model(images, data=batch[1:])
-                    elif model_type in ["kie"]:
-                        preds = model(batch)
-                    elif model_type in ["can"]:
-                        preds = model(batch[:3])
-                    elif model_type in ["latexocr"]:
-                        preds = model(batch)
-                    elif model_type in ["sr"]:
-                        preds = model(batch)
-                        sr_img = preds["sr_img"]
-                        lr_img = preds["lr_img"]
-                    else:
-                        preds = model(images)
-                preds = to_float32(preds)
-            else:
+        # use amp
+        if scaler:
+            with paddle.amp.auto_cast(
+                level=amp_level,
+                custom_black_list=amp_custom_black_list,
+                dtype=amp_dtype,
+            ):
                 if model_type == "table" or extra_input:
                     preds = model(images, data=batch[1:])
                 elif model_type in ["kie"]:
                     preds = model(batch)
                 elif model_type in ["can"]:
                     preds = model(batch[:3])
-                elif model_type in ["latexocr", "unimernet", "pp_formulanet"]:
+                elif model_type in ["latexocr"]:
                     preds = model(batch)
                 elif model_type in ["sr"]:
                     preds = model(batch)
@@ -718,41 +701,58 @@ def eval(
                     lr_img = preds["lr_img"]
                 else:
                     preds = model(images)
-
-            batch_numpy = []
-            for item in batch:
-                if isinstance(item, paddle.Tensor):
-                    batch_numpy.append(item.numpy())
-                else:
-                    batch_numpy.append(item)
-            # Obtain usable results from post-processing methods
-            total_time += time.time() - start
-            # Evaluate the results of the current batch
-            if model_type in ["table", "kie"]:
-                if post_process_class is None:
-                    eval_class(preds, batch_numpy)
-                else:
-                    post_result = post_process_class(preds, batch_numpy)
-                    eval_class(post_result, batch_numpy)
-            elif model_type in ["sr"]:
-                eval_class(preds, batch_numpy)
+            preds = to_float32(preds)
+        else:
+            if model_type == "table" or extra_input:
+                preds = model.infer([images.numpy()], mode='dymshape', custom_sizes=1000000000)[0]
+            elif model_type in ["kie"]:
+                preds = model(batch)
             elif model_type in ["can"]:
-                eval_class(preds[0], batch_numpy[2:], epoch_reset=(idx == 0))
+                preds = model(batch[:3])
             elif model_type in ["latexocr", "unimernet", "pp_formulanet"]:
-                post_result = post_process_class(preds, batch[1], "eval")
-                eval_class(post_result[0], post_result[1], epoch_reset=(idx == 0))
+                preds = model(batch)
+            elif model_type in ["sr"]:
+                preds = model(batch)
+                sr_img = preds["sr_img"]
+                lr_img = preds["lr_img"]
+            else:
+                outputs = model.infer([images.numpy()], mode='dymshape', custom_sizes=1000000000)
+                preds = {}
+                preds["maps"] = outputs[0]
+
+        batch_numpy = []
+        for item in batch:
+            if isinstance(item, paddle.Tensor):
+                batch_numpy.append(item.numpy())
             else:
-                post_result = post_process_class(preds, batch_numpy[1])
+                batch_numpy.append(item)
+        # Obtain usable results from post-processing methods
+        total_time += time.time() - start
+        # Evaluate the results of the current batch
+        if model_type in ["table", "kie"]:
+            if post_process_class is None:
+                eval_class(preds, batch_numpy)
+            else:
+                post_result = post_process_class(preds, batch_numpy)
                 eval_class(post_result, batch_numpy)
+        elif model_type in ["sr"]:
+            eval_class(preds, batch_numpy)
+        elif model_type in ["can"]:
+            eval_class(preds[0], batch_numpy[2:], epoch_reset=(idx == 0))
+        elif model_type in ["latexocr", "unimernet", "pp_formulanet"]:
+            post_result = post_process_class(preds, batch[1], "eval")
+            eval_class(post_result[0], post_result[1], epoch_reset=(idx == 0))
+        else:
+            post_result = post_process_class(preds, batch_numpy[1])
+            eval_class(post_result, batch_numpy)
 
-            pbar.update(1)
-            total_frame += len(images)
-            sum_images += 1
-        # Get final metric,eg. acc or hmean
-        metric = eval_class.get_metric()
+        pbar.update(1)
+        total_frame += len(images)
+        sum_images += 1
+    # Get final metric,eg. acc or hmean
+    metric = eval_class.get_metric()
 
     pbar.close()
-    model.train()
     # Avoid ZeroDivisionError
     if total_time > 0:
         metric["fps"] = total_frame / total_time