SECUREXSECURITY ENGINEERINGNVR 文档

音频检测器

目标检测器负责执行神经网络推理。选择检测器时要同时考虑硬件、模型格式、输入张量布局、像素格式、数据类型、输入尺寸和标签映射;“检测器能启动”并不代表模型配置一定正确。

核心匹配关系

项目必须匹配
runtime / type模型运行时,例如 OpenVINO、EdgeTPU、ONNX、TensorRT、RKNN、Hailo。
model path必须是该 runtime 能读取的模型格式。
width / height必须与模型输入尺寸一致。
input_tensor例如 nhwc / nchw。
input_pixel_format例如 rgb / bgr。
input_dtypefloat / int 等必须符合模型。
labelmap标签编号必须和训练模型的类别顺序一致。

OpenVINO 示例

detectors:
  ov:
    type: openvino
    device: CPU

model:
  width: 300
  height: 300
  input_tensor: nhwc
  input_pixel_format: bgr
  path: /openvino-model/ssdlite_mobilenet_v2.xml
  labelmap_path: /openvino-model/coco_91cl_bkgr.txt

性能判断

观察 inference speed、detector utilization 和 detect FPS。多个摄像头共享一个检测器时,如果推理速度跟不上输入帧,队列会积压;这时应降低 detect FPS/分辨率,使用更高效模型,或增加/更换加速器。

排错顺序

  1. 先确认硬件设备在容器中可见。
  2. 确认 runtime 能加载模型,没有 shape / dtype / unsupported layer 错误。
  3. 确认 labelmap 与模型一致。
  4. 用单摄像头、低 FPS 验证基础推理,再扩展多路。

关于 CPU

CPU 检测适合测试和少量低帧率摄像头。正式多路部署通常建议使用专用加速器或 OpenVINO GPU/NPU 等方案,以避免 AI 推理和 FFmpeg 解码争抢 CPU。

Audio Detectors

The object detector runs neural-network inference. Hardware, runtime, model format, tensor layout, pixel format, data type, input dimensions, and label map must agree. A detector process starting successfully does not prove the model configuration is correct.

Compatibility matrix

ItemMust match
runtime / typeOpenVINO, EdgeTPU, ONNX, TensorRT, RKNN, Hailo, etc.
model pathA model format supported by that runtime.
width / heightThe model input shape.
input_tensorFor example NHWC or NCHW.
input_pixel_formatFor example RGB or BGR.
input_dtypeFloat/int type expected by the model.
labelmapClass indices and order used during training.

OpenVINO example

detectors:
  ov:
    type: openvino
    device: CPU

model:
  width: 300
  height: 300
  input_tensor: nhwc
  input_pixel_format: bgr
  path: /openvino-model/ssdlite_mobilenet_v2.xml
  labelmap_path: /openvino-model/coco_91cl_bkgr.txt

Performance

Watch inference speed, detector utilization, and detect FPS. If inference cannot keep up across cameras, reduce detection workload, choose a faster model, or add/change acceleration.

Troubleshooting order

  1. Confirm the device is visible inside the container.
  2. Confirm the runtime loads the model without shape/dtype/layer errors.
  3. Verify label-map ordering.
  4. Test one low-FPS camera before scaling out.

CPU detector

CPU inference is useful for testing and small workloads. Multi-camera production systems generally benefit from dedicated inference hardware or GPU/NPU acceleration so inference does not compete with video decoding.

Detectores de audio

El detector ejecuta la inferencia de la red neuronal. Hardware, runtime, formato de modelo, layout del tensor, formato de píxel, tipo de datos, dimensiones y label map deben coincidir.

Compatibilidad

ElementoDebe coincidir
runtime / typeOpenVINO, EdgeTPU, ONNX, TensorRT, RKNN, Hailo, etc.
model pathFormato admitido por el runtime.
width / heightDimensiones de entrada.
input_tensorNHWC o NCHW.
input_pixel_formatRGB o BGR.
input_dtypeTipo esperado.
labelmapÍndices/orden de clases.

Ejemplo OpenVINO

detectors:
  ov:
    type: openvino
    device: CPU

model:
  width: 300
  height: 300
  input_tensor: nhwc
  input_pixel_format: bgr
  path: /openvino-model/ssdlite_mobilenet_v2.xml
  labelmap_path: /openvino-model/coco_91cl_bkgr.txt

Rendimiento

Observe inference speed, utilización y detect FPS. Si no se mantiene el ritmo, reduzca carga o use un acelerador/modelo más eficiente.

Diagnóstico

  1. Compruebe el dispositivo dentro del contenedor.
  2. Compruebe carga del modelo.
  3. Verifique label map.
  4. Pruebe una cámara a bajo FPS antes de escalar.

CPU

CPU sirve para pruebas y cargas pequeñas; varias cámaras suelen beneficiarse de aceleración dedicada.

输入关键词开始搜索