Tub
This is the standard donkey data store. The "data" folder is what we call a "tub"
Accepted Types
The following datatypes are supported.
str
int
float
/np.float
image_array
s andarray
s (np.ndarray
)image
(jpeg / png)
The Tub
is an append only format, that is optimized for reads (to speed up training models).
It maintains indexes for records, and uses memory mapped files.
The Tub
exposes an Iterator
that can be used to read records. These iterators can be further used by Pipeline
s to do arbitrary transformations of data prior to training (for data augumentation).
Example
from donkeycar.parts.tub_v2 import Tub
# Here we define records that have a single `input` of type `int`.
inputs = ['input']
types = ['int']
tub = Tub(path, inputs, types)