Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jjohn485 opened this issue Nov 18, 2022 · 0 comments

Comments

@jjohn485
Copy link

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
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant