Files
OperationRoomMonitor/setup.sh
2026-06-03 14:46:16 +08:00

33 lines
1.1 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.
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")"
echo "=== 环境检查 ==="
if ! python3 -c "import tkinter" 2>/dev/null; then
echo "警告: 未检测到 python3-tk框选篮子 ROI 会失败。"
echo " Ubuntu/Debian: sudo apt install python3-tk"
fi
if command -v conda >/dev/null 2>&1; then
echo "检测到 conda。推荐: conda activate yolo && pip install -r requirements.txt"
else
echo "使用 venv 安装..."
python3 -m venv .venv
# shellcheck disable=SC1091
source .venv/bin/activate
pip install -U pip
pip install -r requirements.txt
fi
echo ""
echo "=== 权重检查 ==="
for w in hand_detect.pt goodbad_frame.pt haocai_classify.pt; do
test -f "weights/$w" && echo " OK weights/$w" || echo " 缺失 weights/$w"
done
test -f doctor_identity_package/doctor_info.pth && echo " OK doctor_info.pth" || echo " 缺失 doctor_info.pth"
test -f doctor_identity_package/train_reid_contrastive.py && echo " OK train_reid_contrastive.py" || echo " 缺失 train_reid_contrastive.py"
test -f input/视频中的商品信息表.xlsx && echo " OK Excel" || echo " 缺失 Excel"
echo ""
echo "安装说明见 README.md"