ImageDataLoaders_from_name_re {fastai} | R Documentation |
ImageDataLoaders from name regex
Description
Create from the name attrs of 'fnames' in 'path's with re expression 'pat'
Usage
ImageDataLoaders_from_name_re(
path,
fnames,
pat,
bs = 64,
val_bs = NULL,
shuffle_train = TRUE,
device = NULL,
item_tfms = NULL,
batch_tfms = NULL,
...
)
Arguments
path |
The folder where to work |
fnames |
folder names |
pat |
an argument that requires regex |
bs |
The batch size |
val_bs |
The batch size for the validation DataLoader (defaults to bs) |
shuffle_train |
If we shuffle the training DataLoader or not |
device |
device name |
item_tfms |
One or several transforms applied to the items before batching them |
batch_tfms |
One or several transforms applied to the batches once they are formed |
... |
additional parameters to pass |
Value
None
Examples
## Not run:
URLs_PETS()
path = 'oxford-iiit-pet'
dls = ImageDataLoaders_from_name_re(
path, fnames, pat='(.+)_\\d+.jpg$',
item_tfms = RandomResizedCrop(460, min_scale=0.75), bs = 10,
batch_tfms = list(aug_transforms(size = 299, max_warp = 0),
Normalize_from_stats( imagenet_stats() )
),
device = 'cuda'
)
## End(Not run)
[Package fastai version 2.2.2 Index]