bev-project/archive_scripts/simple_inference.sh

48 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
# 简化版推理脚本 - 使用mmdet3d标准测试工具
export PATH=/opt/conda/bin:$PATH
echo "=================================================="
echo "BEVFusion推理使用mmdet3d标准工具"
echo "=================================================="
echo "Checkpoint: epoch_19.pth"
echo "配置: multitask.yaml"
echo "数据集: nuScenes val (前10个样本)"
echo "=================================================="
echo ""
CONFIG="configs/nuscenes/det/transfusion/secfpn/camera+lidar/swint_v0p075/multitask.yaml"
CHECKPOINT="runs/run-326653dc-74184412/epoch_19.pth"
# 检查文件
if [ ! -f "$CHECKPOINT" ]; then
echo "❌ Checkpoint不存在: $CHECKPOINT"
exit 1
fi
echo "✅ 文件检查通过"
echo ""
echo "开始推理..."
echo ""
# 使用mmdet3d的test.py进行推理和评估
/opt/conda/bin/torchpack dist-run -np 1 /opt/conda/bin/python tools/test.py \
"$CONFIG" \
"$CHECKPOINT" \
--eval bbox segm \
--show-dir inference_results_simple
echo ""
echo "=================================================="
echo "✅ 推理完成!"
echo "结果保存在: inference_results_simple/"
echo "评估指标已输出"
echo "=================================================="