Files
yolov26_3d/eval_tools/model_comparison/gen_eval_report.sh
2026-06-24 09:35:46 +08:00

35 lines
1.2 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
#
# 根据 evaluation_report.json 自动生成单模型 Markdown 评测报告
#
# 用法:
# bash eval_tools/model_comparison/gen_eval_report.sh <evaluation_report.json>
# bash eval_tools/model_comparison/gen_eval_report.sh <evaluation_report.json> [--output <输出路径>] [--model "模型名"] [--date YYYY-MM-DD]
#
# 示例:
# bash eval_tools/model_comparison/gen_eval_report.sh \
# evaluation_results/.../evaluation_report.json
#
# bash eval_tools/model_comparison/gen_eval_report.sh \
# evaluation_results/.../evaluation_report.json \
# --model yolov5s-300w-newdata-cncap \
# --date 2026-02-28
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
export PYTHONPATH="${PROJECT_ROOT}:${PYTHONPATH}"
if [ $# -eq 0 ]; then
echo "用法: bash $0 <evaluation_report.json> [选项...]"
echo ""
echo "选项:"
echo " --output/-o <路径> 输出 Markdown 文件路径默认JSON 同目录下的 EVALUATION_REPORT.md"
echo " --model <名称> 模型名称(默认从目录名推断)"
echo " --date <YYYY-MM-DD> 评测日期(默认:今天)"
exit 1
fi
python "${SCRIPT_DIR}/generate_eval_report.py" "$@"