Skip to content

在终端实时显示人物数量#4707

Merged
donghaiwang merged 2 commits into
OpenHUTB:mainfrom
heeyusike:main
Dec 27, 2025
Merged

在终端实时显示人物数量#4707
donghaiwang merged 2 commits into
OpenHUTB:mainfrom
heeyusike:main

Conversation

@heeyusike

Copy link
Copy Markdown
Contributor

修改概述:
为驾驶事故检测工具新增终端实时显示人物数量的功能,同时优化日志一致性与检测总结统计项。

修改的详细描述

1.在detector.py的detect_frame方法中,新增人物(person 类别)数量统计逻辑,并将统计结果作为返回值传递
2.在run_detection循环中,添加 “每 10 帧输出一次人物数量” 的逻辑(可通过output_interval调整间隔),避免终端刷屏
3.将detector.py中的print语句统一替换为logging模块,与主程序日志格式(时间 + 级别 + 内容)保持一致
4.在检测总结环节,新增 “检测过程中最大人物数量” 的统计项,便于回顾检测数据
5.在main.py的日志初始化函数中,补充logger.propagate = False配置,避免日志重复输出

经过了什么样的测试?

1.操作系统:Windows 10、macOS 14、Linux Ubuntu 22.04
2.Python 版本:3.8、3.9、3.10、3.11

运行效果

动图、视频、截图等
dface733209cba760ee12a89b3288286
Uploading dface733209cba760ee12a89b3288286.jpg…

优化驾驶事故视频识别工具,提升性能、灵活性和日志管理,新增人和小车识别提示。
Refactor accident detection module to include logging and person count output.
@donghaiwang
donghaiwang merged commit 0ff218b into OpenHUTB:main Dec 27, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants