Skip to content

Custom Augmentation: AttributeError: 'Compose' object has no attribute 'to_deterministic' #388

@jjohn485

Description

@jjohn485

Hi, I've been really impressed by all of your work so far! It has been working great for me except for this one error.
When I try to create a custom augmentation for my images and masks, I keep receiving an error saying AttributeError: 'Compose' object has no attribute 'to_deterministic'.
I'm not sure what the issue is. Any help would be greatly appreciated!

from imgaug import augmenters as iaa

def custom_augmentation():
return iaa.Sequential(
[
# apply the following augmenters to most images
iaa.Fliplr(0.5), # horizontally flip 50% of all images
iaa.Flipud(0.5), # horizontally flip 50% of all images
])

model.train(
train_images = images_train_full_dir,
train_annotations = annotations_train_full_dir,
val_images = images_prepped_val_dir,
val_annotations = annotations_prepped_val_dir,
validate = True,
checkpoints_path = "/tmp/vgg_unet_1" ,
steps_per_epoch = 25,
batch_size = 8,
preprocessing = normalization,
epochs=5,
callbacks = callbacks,
do_augment=True, # enable augmentation
custom_augmentation=custom_augmentation
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions