Commit Graph

9 Commits

Author SHA1 Message Date
1caba41625 feat: 批处理多ROI推理 - 添加 batch_process_detections 批量后处理 - 重构 _process_frame 收集多ROI统一推理 2026-02-03 11:17:54 +08:00
d7f56683c7 perf: GPU NMS + 日志优化 + 数组预分配
- GPU NMS: torchvision.ops.nms 替代 CPU NMS, 50-80% 提升
- 日志优化: 每10帧输出一次性能日志, 减少90%日志开销
- 数组预分配: 预分配8400框缓冲区, 避免重复创建
- 预过滤: 置信度>0.3的框先过滤, 减少NMS计算量

性能对比:
- 优化前: 40-50ms
- 优化后: 17-22ms (60% 提升)
2026-02-02 16:37:24 +08:00
c17f983ab3 perf: batch=1 优化减少延迟
- settings: batch_size=41
- tensorrt_engine: BATCH_SIZE=41
- preprocessor: 移除 padding 逻辑,直接 batch=1
- 预处理延迟从 17ms  5ms
2026-02-02 15:25:13 +08:00
745cadc8e7 feat: TensorRT 固定 batch=4 重构
- tensorrt_engine.py 工业级 Buffer Pool
- preprocessor.py 添加 pad_to_batch4()
- postprocessor.py 支持批量输出
- settings.py 固定 batch_size=4
2026-02-02 14:49:47 +08:00
29d3ea0bc4 feat: 传递离岗时长到告警记录
- ResultReporter AlertInfo 添加 duration_minutes
- main.py 使用 report_alert 替代 report_detection_alert
- _store_alert 保存 duration_minutes
2026-01-30 17:27:39 +08:00
36674edff8 fix: 修复导入错误
- 移除不存在的 init_database 导入
- DatabaseManager  SQLiteManager
2026-01-30 14:54:20 +08:00
fdd3e9ac88 feat: 算法层接管判断权
- 添加 AlgorithmManager 集成
- 新增 _build_tracks() 将检测转为算法输入格式
- 重构 _handle_detections() 让算法决定是否告警
- 注册算法时从 ROI 配置读取参数
- 停止使用 PostProcessor.check_alarm_condition() 做业务判断

新的执行链路:
ROI裁剪  480p预处理  YOLO推理  algorithm.process()  告警
2026-01-30 14:24:34 +08:00
b0ddb6ee1a feat(project): move edge_inference_service contents to root and update paths
- Moved all project files and directories (config, core, models, etc.) from
  edge_inference_service/ to the repository root ai_edge/
- Updated model path in config/settings.py to reflect new structure
- Revised usage paths in __init__.py documentation
2026-01-29 18:43:19 +08:00
6733344b11 初始化边缘推理服务 2026-01-29 18:33:12 +08:00