本文整理匯總了Python中models.Box.ytl方法的典型用法代碼示例。如果您正苦於以下問題:Python Box.ytl方法的具體用法?Python Box.ytl怎麽用?Python Box.ytl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類models.Box
的用法示例。
在下文中一共展示了Box.ytl方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: convert_to_db
# 需要導入模塊: from models import Box [as 別名]
# 或者: from models.Box import ytl [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