Hey! Awesome code, read you blog post and found your data augmentation methods awesome.
I checked out the data.py file, and noticed you were using np.append to add a new image to the feature set. It is much faster to first use Python lists, and then convert them numpy arrays later. It can be from 10 -30 times faster.
So you could do something like:
x = []
y = []
...
x.append(image)
y.append(angle)
...
x = np.asarray(x)
y = np.asarray(y)
Thanks @sebasibarguen, awesome hint! I know it's an old issue (sorry my notifications were turned off), but feel free to submit a PR if you happen to work on this again. 🙂
Hey! Awesome code, read you blog post and found your data augmentation methods awesome.
I checked out the
data.py
file, and noticed you were usingnp.append
to add a new image to the feature set. It is much faster to first use Python lists, and then convert them numpy arrays later. It can be from 10 -30 times faster.So you could do something like: