弯弯的,应该进不去
按照这个教程 https://blog.csdn.net/qq_21578849/article/details/84980298
#这是将VOC数据集里面的数据提取一类,我的是person,需要改动的,就是文件夹的名称和位置,以及保存路径
import os
import os.path
import shutil
fileDir_ann = "E:\\VOCdevkit\\VOC2007\\Annotations"
fileDir_img = "E:\\VOCdevkit\\VOC2007\\JPEGImages\\"
saveDir_img = "E:\\VOCdevkit\\VOC2007\\JPEGImages_ssd\\"
if not os.path.exists(saveDir_img):
os.mkdir(saveDir_img)
names = locals()
for files in os.walk(fileDir_ann):
for file in files[2]:
print (file + "-->start!" )
saveDir_ann = "E:\\VOCdevkit\\VOC2007\\Annotations_ssd\\"
if not os.path.exists(saveDir_ann):
os.mkdir(saveDir_ann)
fp = open(fileDir_ann + '\\' + file)
saveDir_ann = saveDir_ann + file
fp_w = open(saveDir_ann, 'w')
classes = ['aeroplane','bicycle','bird','boat','bottle','bus','car','cat','chair','cow','diningtable','dog','horse','motorbike','pottedplant','sheep','sofa','train','tvmonitor','person']
lines = fp.readlines()
ind_start = []
ind_end = []
lines_id_start = lines[:]
lines_id_end = lines[:]
classes1 =