[MF]修改文件

This commit is contained in:
songbingle 2025-06-04 17:29:25 +08:00
parent e9cb1e5d8f
commit e53572bc2f
3 changed files with 12 additions and 10 deletions

6
.idea/le-yolo.iml generated
View File

@ -2,8 +2,10 @@
<module type="WEB_MODULE" version="4">
<component name="Go" enabled="true" />
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.venv" />
</content>
<orderEntry type="jdk" jdkName="Python 3.13 (le-yolo)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -1,3 +1,3 @@
from ultralytics import YOLO
model = YOLO("yolov8n.pt")
results = model.predict("../res/test.mp4", show=True, save=True)
results = model.predict("../res/video.mp4", show=True, save=True)

View File

@ -16,13 +16,13 @@ if not exist "venv" (
echo 激活虚拟环境...
call venv\Scripts\activate.bat
:: 检查测试视频文件是否存在
if not exist "res\test.mp4" (
echo ❌ 错误: res\test.mp4 文件不存在!
echo 请在 res\ 目录中放置名为 test.mp4 的视频文件
pause
exit /b 1
)
@REM :: 检查测试视频文件是否存在
@REM if not exist "res\test.mp4" (
@REM echo ❌ 错误: res\test.mp4 文件不存在!
@REM echo 请在 res\ 目录中放置名为 test.mp4 的视频文件
@REM pause
@REM exit /b 1
@REM )
echo ✅ 找到测试视频文件: res\test.mp4