12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- """
- @Authors: yangzihao(yangzihao@china-icv.cn)
- @Data: 2024/04/21
- @Last Modified: 2024/04/21
- @Summary: Evaluation entrance
- """
- import os
- import sys
- import time
- from single_case_eval import single_case_eval
- import pandas as pd
- from common import get_subfolders_name
- import log
- import warnings
- warnings.filterwarnings("ignore", category=FutureWarning, module='pandas')
- pd.set_option('future.no_silent_downcasting', True)
- if __name__ == "__main__":
- dataPath = './task/pjibot_pjibot-P1YNYD1M228000127_data_merge_2024-04-07-02-32-11_obstacledetection_9'
- resultPath = dataPath
-
- logFileName = f'{resultPath}/log.txt'
- log.setup_logger(logFileName)
- logger = log.get_logger()
- case_name = dataPath.split('/')[-1].split('.')[0]
-
- if not os.path.exists(dataPath):
- print('Invalid bagPath!')
- logger.error(f"[case:{case_name}] SINGLE_CASE_EVAL: Invalid bagPath!")
- sys.exit(-1)
- else:
- try:
- logger.info(f"[case:{case_name}] SINGLE_CASE_EVAL: Start evaluating:")
- print("SINGLE_CASE_EVAL程序开始运行:")
- configPath = r"./config.json"
- print(f" configPath: {configPath},\n resultPath: {resultPath}")
- t1 = time.time()
-
- single_case_eval(configPath, resultPath, case_name)
- t2 = time.time()
- print(f"程序结束,执行时间:{int(t2 - t1)} s")
- logger.info(f"[case:{case_name}] SINGLE_CASE_EVAL: End.")
- sys.exit(0)
- except Exception as e:
- print("异常,退出...")
- print(repr(e))
- sys.exit(-1)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|