detnet.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:social-scene-understanding 作者: cvlab-epfl 项目源码 文件源码
def compute_detections_batch(segs, boxes, num_keep,
                             seg_threshold=0.2,
                             sigma=5e-3, step=0.2, num_iters=20,
                             dist_threshold=20.0,
                             iou_threshold=0.5,
                             nms_kind='greedy'):

  if nms_kind == 'greedy':
    # TODO: rename it to CRF?
    _compute_frame = (lambda x: compute_detections_greedy(x[0], x[1], num_keep,
                                                          seg_threshold,
                                                          sigma, step, num_iters,
                                                          dist_threshold))
  elif nms_kind == 'nms':
    _compute_frame = (lambda x: compute_detections_nms(x[0], x[1], num_keep,
                                                       seg_threshold,
                                                       iou_threshold))
  boxes, confidence = tf.map_fn(_compute_frame, (segs, boxes))
  return boxes, confidence
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号