本文整理汇总了Python中models.Box.occluded方法的典型用法代码示例。如果您正苦于以下问题:Python Box.occluded方法的具体用法?Python Box.occluded怎么用?Python Box.occluded使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类models.Box
的用法示例。
在下文中一共展示了Box.occluded方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: convert_to_db
# 需要导入模块: from models import Box [as 别名]
# 或者: from models.Box import occluded [as 别名]
def convert_to_db(paths, job, label):
paths = clean_paths(paths)
paths_db = []
for path in paths:
path_db = Path(job = job, label=label)
for box in path:
box_db = Box(path = path_db)
box_db.xtl = box['rect'][0]
box_db.ytl = box['rect'][1]
box_db.xbr = box['rect'][0] + box['rect'][2]
box_db.ybr = box['rect'][1] + box['rect'][3]
box_db.frame = box['frame']
box_db.outside = 0 if box['visible'] else 1
box_db.occluded = 0
path_db.boxes.append(box_db)
paths_db.append(path_db)
return paths_db