代码拉取完成,页面将自动刷新
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: Mads Dyrmann
"""
import kitti
import pandas as pd
import os
CROPBBOXTOIMAGE = True
kittidir = '/mnt/AU_BrugerDrev/Database/GetThumbnailsFromServerForDetection_242_326_336_249_250_279_2018-05-22/LocalizationAnnotationsOnedir/KittiAnnotations'
exportdir = '/mnt/AU_BrugerDrev/Database/GetThumbnailsFromServerForDetection_242_326_336_249_250_279_2018-05-22/LocalizationAnnotationsOnedir/AUAnnotations'
annotationFiles = []
for root, dirnames, filenames in os.walk(kittidir):
for filename in filenames:
if filename.lower().endswith(('.txt')):
annotationFiles.append(os.path.join(root, filename))
imsize = {'width':2448,
'height':2048,
'depth':3}
def createIfNotExist(directory):
if not os.path.exists(directory):
os.makedirs(directory)
createIfNotExist(exportdir)
for annotationFile in annotationFiles:
with open(annotationFile,'r') as fid:
annotationlist = fid.readlines()
AUannotationList = kitti.kitti2AU(annotationlist, filename=None)
df = pd.DataFrame(AUannotationList)
filename, ext = os.path.splitext(os.path.basename(annotationFile))
df.to_csv(os.path.join(exportdir,filename+'.csv'),sep=';')
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。