48 lines
1.2 KiB
Bash
Executable File
48 lines
1.2 KiB
Bash
Executable File
#!/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 "=================================================="
|
||
|
||
|
||
|
||
|
||
|
||
|