Files
OperationRoomMonitor/setup.sh

33 lines
1.1 KiB
Bash
Raw Normal View History

2026-06-02 16:59:42 +08:00
#!/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"
2026-06-03 14:46:16 +08:00
test -f doctor_identity_package/train_reid_contrastive.py && echo " OK train_reid_contrastive.py" || echo " 缺失 train_reid_contrastive.py"
2026-06-02 16:59:42 +08:00
test -f input/视频中的商品信息表.xlsx && echo " OK Excel" || echo " 缺失 Excel"
echo ""
echo "安装说明见 README.md"