I would like to know on how can I do batchgenerator on many images in a folder?
Because right now in the code example_ipynb.ipynb is using the self._data; which mean the data from skimage. Because I have many datasets to be run.
def generate_train_batch(self):
# usually you would now select random instances of your data. We only have one therefore we skip this
img = self._data
# The camera image has only one channel. Our batch layout must be (b, c, x, y). Let's fix that
img = np.tile(img[None, None], (self.BATCH_SIZE, 1, 1, 1))
# now construct the dictionary and return it. np.float32 cast because most networks take float
return {'data':img.astype(np.float32), 'some_other_key':'some other value'}`
I would like to know on how can I do batchgenerator on many images in a folder? Because right now in the code example_ipynb.ipynb is using the self._data; which mean the data from skimage. Because I have many datasets to be run.
`class DataLoader(DataLoaderBase): def init(self, data, BATCH_SIZE=2, num_batches=None, seed=False): super(DataLoader, self).init(data, BATCH_SIZE, num_batches, seed)
data is now stored in self._data.
this is the code.
Need your guide in this matter.
Thank you.