|
13 hodín pred | |
---|---|---|
config | 1 deň pred | |
custom_metrics | 2 týždňov pred | |
modules | 13 hodín pred | |
scripts | 1 deň pred | |
templates | 2 mesiacov pred | |
test | 2 mesiacov pred | |
README.md | 1 deň pred |
本系统是一个模块化的自动驾驶评估框架,用于对自动驾驶系统的各项性能指标进行全面评估。系统采用组件化设计,支持内置指标和自定义指标的灵活配置,能够并行处理多种评估任务,并生成结构化的评估报告。
系统由以下核心组件构成:
负责加载、解析和合并配置文件,支持内置指标配置和自定义指标配置的智能合并。主要功能包括:
配置管理特性:
负责动态加载内置和自定义评估指标模块。主要功能包括:
系统的核心组件,负责协调各个指标模块执行评估任务。主要功能包括:
负责系统日志的配置和管理,支持多级日志记录。主要功能包括:
负责加载和预处理评估所需的数据。主要功能包括:
整个系统的控制器,负责协调各个组件完成评估流程。主要功能包括:
负责生成各类评估指标的可视化图表。主要功能包括:
├── scripts/
│ └── evaluator_enhanced.py # 评估引擎主程序
├── modules/
│ ├── lib/
│ │ ├── metric_registry.py # 指标注册系统
│ │ ├── data_process.py # 数据处理模块
│ │ ├── score.py # 评分计算模块
│ │ ├── common.py # 通用工具函数
│ │ ├── chart_generator.py # 图表生成模块
│ │ └── log_manager.py # 日志管理模块
│ └── metric/
│ ├── safety.py # 安全性指标模块
│ ├── comfort.py # 舒适性指标模块
│ ├── traffic.py # 交通规则指标模块
│ ├── efficient.py # 效率指标模块
│ └── function.py # 功能指标模块
├── config/
│ ├── all_metrics_config.yaml # 全量指标配置
│ └── custom_metrics_config.yaml # 自定义指标配置
├── templates/
│ ├── custom_metric_template.py # 自定义指标模板
│ └── unified_custom_metric_template.py # 统一自定义指标模板
└── custom_metrics/ # 用户自定义指标目录
用于存放用户自定义的指标实现脚本。系统会自动扫描此目录下符合命名规范的Python脚本,并将其作为自定义指标加载。
命名规范:
metric_
开头metric_safety_safeTime_CustomTTC.py
实现方式:
包含自定义指标开发的模板文件,用户可以基于这些模板快速开发自己的指标。
python scripts/evaluator_enhanced.py --configPath config/all_metrics_config.yaml --dataPath data_dir --reportPath report_dir --logPath logs
--configPath
: 指标配置文件路径--dataPath
: 评估数据目录路径--reportPath
: 评估报告输出目录--logPath
: 日志文件路径--customMetricsPath
: 自定义指标脚本目录(可选)--customConfigPath
: 自定义指标配置文件路径(可选)本系统支持用户自定义评估指标,您可以通过编写Python脚本来实现自己的指标计算逻辑,并将其集成到评估系统中。
custom_metrics
目录下创建新的Python脚本,遵循命名规范from modules.lib.metric_registry import BaseMetric
class MyCustomMetric(BaseMetric):
def __init__(self, data):
super().__init__(data)
def calculate(self):
# 实现您的计算逻辑
return {
"value": 42.0,
"score": 85,
"details": {"max": 100, "min": 0}
}
python scripts/evaluator_enhanced.py --configPath config/all_metrics_config.yaml --dataPath data_dir --reportPath report_dir --logPath logs --customMetricsPath custom_metrics --customConfigPath config/custom_metrics_config.yaml