人员/车辆检测器指南

控制台中的人员车辆检测器模型卡片

人员/车辆检测器模型可让您检测和统计视频帧中的人员或车辆*。该模型接受视频流作为输入,并输出一个协议缓冲区,其中包含在每个帧中检测到的人员和车辆的数量。模型以 6 FPS 的帧率运行。

* 汽车、公交车、卡车、自行车、摩托车和救护车。

模型输出

人员/车辆检测器模型会显示在当前处理的帧中检测到的人员和车辆数量。以下是模型输出的协议缓冲区定义。输出流的频率是恒定的:每秒一帧。

// The prediction result proto for Person/Vehicle Detection.
message OccupancyCountingPredictionResult {

 // Current timestamp.
 google.protobuf.Timestamp current_time = 1;

 // The entity info for annotations from the model.
 message Entity {
   // Label id.
   int64 label_id = 1;
   // Human readable string of the label.
   string label_string = 2;
 }

 // Identified box contains location and the entity of the object.
 message IdentifiedBox {
   // An unique id for this box.
   int64 box_id = 1;
   // Bounding Box in the normalized coordinates.
   message NormalizedBoundingBox {
     // Min in x coordinate.
     float xmin = 1;
     // Min in y coordinate.
     float ymin = 2;
     // Width of the bounding box.
     float width = 3;
     // Height of the bounding box.
     float height = 4;
   }
   // Bounding Box in the normalized coordinates.
   NormalizedBoundingBox normalized_bounding_box = 2;
   // Confidence score associated with this box.
   float score = 3;
   // Entity of this box.
   Entity entity = 4;
 }

 // A list of identified boxes.
 repeated IdentifiedBox identified_boxes = 2;

 // The statistics info for annotations from the model.
 message Stats {
   // The object info and count for annotations from the model.
   message ObjectCount {
     // Entity of this object.
     Entity entity = 1;
     // Count of the object.
     int32 count = 2;
   }
   // Counts of the full frame.
   repeated ObjectCount full_frame_count = 1;
 }

 // Detection statistics.
 Stats stats = 3;
}

最佳做法和限制

  • 避免使用不寻常的摄像头视角(例如俯视图),因为这些视角下的人和车辆与标准或常见视角下的人和车辆不同。检测质量可能会受到异常视图的很大影响。
  • 确保人员和车辆完全或大部分可见。检测质量可能会受到其他对象部分遮挡的影响。
  • 人员/车辆检测器具有最小可检测对象大小。此大小约为相机视图大小的 2%。确保目标人员和车辆距离摄像头不会太远。这些关键对象的可视尺寸必须足够大。
  • 感兴趣的区域必须有适当的光照。
  • 确保视频源摄像头镜头洁净。
  • 确保实体(人员或汽车除外)不会遮挡摄像头的任何视野范围。
  • 以下因素可能会降低模型的性能。在获取数据时,请考虑以下因素:
    • 光线条件不佳。
    • 拥挤和物体遮挡。
    • 不常见的观点。
    • 小型对象大小。