I found mxnet.image contains many useful data augmentations implemented in python while mxnet.io.ImageRecordIter is an efficient data iterator implemented in C++.
However, the data augmentations in ImageRecordIter is not flexible. I would like to know if it is possible to combine them? If it is, is there any existing examples on how to use it?
I would suggest to look at these tutorials:
Using Datasets and DataLoader which is the new way to load data (to have the best performance, make sure to set the
num_workersparameter to the number of core of your CPU. It is using multiprocessing to efficiently pre-fetch and pre-process the data.)
- Types of data augmentation
- Apply data augmentation with MXNet Gluon
In short, you can still get good performance and you don’t need to use the ImageRecordIter. Have a look at the ImageRecordDataset, ImageFolderDataset and DataLoader. (note that this bug exists: https://github.com/apache/incubator-mxnet/issues/9974 and look at the associated hot fix)