Closed gzuidhof closed 9 years ago
I would definitely add the omitted samples from the BatchReader since now we're just throwing data away. Rest is OK and can be merged.
To do
- BatchLoader last iteration output remainder.
- impatch.npatch refactor
https://github.com/StevenReitsma/ml-in-practice/blob/00055f29b036a3ef3b05f5a8bfcf4879521e106a/src/batchreader.py#L44 will fail for batch size < self.batchsize
It seems to work fine, it simply takes the remainder.
Batch loading (
batchloader.py
)Useful class (iterable) added that allows you to do:
Which takes
batchsize
patches from the file on each iteration.Streaming preprocessing (
preprocess.py
)Instead of keeping all the images in memory and processing them (list to list), it now loads one image, processes it, and writes it.
Overview:
It takes just over a minute for the train dataset (fast enough I suppose).
Miscellaneous
util
class added