def RealUnlabelDataLoadProcess(pipe, datafile, params):
path, file = os.path.split(datafile)
batchSize = params['batchSize']
dataset = RealDataLoaderSVBRDF(path, file)
dataset.shuffle(params['randomSeed'])
pipe.send(dataset.dataSize)
counter = 0
posInDataSet = 0
epoch = 0
while(True):
imgbatch = dataset.GetBatch(posInDataSet, batchSize)
for i in range(0, batchSize):
imgbatch[i,:,:,:] = autoExposure(imgbatch[i,:,:,:])
pipe.send(imgbatch)
counter = counter + batchSize
posInDataSet = (posInDataSet + batchSize) % dataset.dataSize
newepoch = counter / dataset.dataSize
if(newepoch != epoch):
dataset.shuffle()
epoch = newepoch
评论列表
文章目录