PaddlePaddle / PaddleDetection

Object Detection toolkit based on PaddlePaddle. It supports object detection, instance segmentation, multiple object tracking and real-time multi-person keypoint detection.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

op_helper中的is_poly(segm)方法不安全

xiaoming-master opened this issue · comments

问题确认 Search before asking

  • 我已经查询历史issue,没有类似需求。I have searched the issues and found no similar feature requests.

需求描述 Feature Description

def is_poly(segm):
assert isinstance(segm, (list, dict)),
"Invalid segm type: {}".format(type(segm))
return isinstance(segm, list)
这玩意儿是不是写得太草率了,就只做了类型判断,segm内部元素格式也不判断,也不验证segm是不是真的Polygon

是否愿意提交PR Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!

而且一些op增广gt_poly数据时需要ndarray,一些又需要list类型,有点混乱