You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yudao/start_yolo_service.bat

28 lines
605 B
Batchfile

@echo off
echo Starting YOLO Service...
cd /d %~dp0
REM 检查Python环境
python --version
if %errorlevel% neq 0 (
echo Python not found, please install Python first
pause
exit /b 1
)
REM 安装依赖(如果需要)
echo Installing dependencies...
pip install ultralytics
REM 预加载模型路径(可选)
set MODEL_PATH=%~dp0yolo11n.pt
REM 启动YOLO服务
echo Starting YOLO service on localhost:9999
if exist "%MODEL_PATH%" (
python yolo_service.py --host localhost --port 9999 --model "%MODEL_PATH%"
) else (
python yolo_service.py --host localhost --port 9999
)
pause