Skip to content

Commit

Permalink
fixed save check
Browse files Browse the repository at this point in the history
  • Loading branch information
Oscarcncn committed Feb 3, 2025
1 parent 99fff49 commit daeef06
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,8 @@ def run(img):
if len(folderChecker) == 0:
savePath = f"resultsave/video/0.mp4"
else:
savePath = f"resultsave/video/{int(sorted(folderChecker, reverse=True)[0].split(".")[0])+1}.mp4"
videoNum = int(sorted(folderChecker)[-1].split(".")[0]) + 1
savePath = f"resultsave/video/{videoNum}.mp4"
# 帧率调整
fps = 25.0
# 创建结果视频写入器以保存文件
Expand Down Expand Up @@ -304,7 +305,8 @@ def run(img):
if len(folderChecker) == 0:
savePath = f"resultsave/video/0.mp4"
else:
savePath = f"resultsave/video/{int(sorted(folderChecker, reverse=True)[0].split(".")[0])+1}.mp4"
videoNum = int(sorted(folderChecker)[-1].split(".")[0]) + 1
savePath = f"resultsave/video/{videoNum}.mp4"
# 帧率调整
fps = 25.0
# 创建结果视频写入器以保存文件
Expand Down

0 comments on commit daeef06

Please sign in to comment.