feat: TensorRT 固定 batch=4 重构
- tensorrt_engine.py 工业级 Buffer Pool - preprocessor.py 添加 pad_to_batch4() - postprocessor.py 支持批量输出 - settings.py 固定 batch_size=4
This commit is contained in:
4
main.py
4
main.py
@@ -204,7 +204,7 @@ class EdgeInferenceService:
|
||||
frame: VideoFrame,
|
||||
roi
|
||||
):
|
||||
"""处理ROI帧"""
|
||||
"""处理ROI帧,固定 batch=4 推理"""
|
||||
try:
|
||||
if not roi.enabled:
|
||||
return
|
||||
@@ -213,7 +213,7 @@ class EdgeInferenceService:
|
||||
|
||||
processed_image, scale_info = cropped
|
||||
|
||||
batch_data = self._preprocessor._batch_preprocessor._stack_and_normalize(
|
||||
batch_data, _ = self._preprocessor._batch_preprocessor.preprocess_batch(
|
||||
[processed_image]
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user