#coding=utf-8
import os
import shutil
def split_datasets(path,mode,a,b):
os.mkdir(path+mode+'/gt/')
os.mkdir(path+mode+'/image/')
os.mkdir(path+mode+'/sparedepthmap/')
for i in range (a,b):
shutil.copy('./image/'+str(i)+'.png', path+mode+'/image/'+str(i)+'.png')
shutil.copy('./depthmap_quick/'+str(i)+'.png', path+mode+'/sparedepthmap/'+str(i)+'.png')
shutil.copy('./depthmap_integral/'+str(i)+'.png', path+mode+'/gt/'+str(i)+'.png')
path = './data/'
os.mkdir(path)
os.mkdir(path+'train')
os.mkdir(path+'val')
os.mkdir(path+'test')
split_datasets(path,'train',3,206 +1)
split_datasets(path,'val',207,274 +1)
split_datasets(path,'test',275,342 +1)
自制数据集划分
最新推荐文章于 2024-03-18 08:32:43 发布