Applying transforms to a batch of images
See original GitHub issueHi.
I am aware of this guide that shows how to apply transforms to multiple images, masks, etc. But I am not sure how I could extend this to use inside a more generic pipeline with tf.data
.
Consider the existing guide that shows how to use albumentations
with TensorFlow. It applies the augmentation transforms to single examples and for a larger dataset, it can quickly become very expensive. Rather, applying the pipeline on batches might be more efficient as stated here.
How can we achieve this i.e. how can we modify the augmentation pipeline, in this case, to allow a batch of images to be processed?
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
Can transforms.Compose handle a batch of Images? - vision
I have a preprocessing pipeling with transforms.Compose() . However, I'm wondering if this can also handle batches in the same way as nn....
Read more >How to apply a transformation on multiple images?
Transformations can be added on the fly to any image just by updating its URL.For example, let's say you've created a named...
Read more >Batch support for Transform? #157 - pytorch/vision - GitHub
Any plans for updating Transform to support batch inputs instead of just single images? This is useful for applying transforms outside of a ......
Read more >Apply transformation matrix to batch of images - Google Groups
I'm having difficulty conceptualizing the fastest way to perform this transformation to a single image, let alone the entire batch of images. In...
Read more >How to apply image transform to a list of images and maintain ...
You got the error because try apply transformation of single image to list: A more convenient way to get a batch of any...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I see. But having it supporting batches might beneficial for the
tf.data
pipeline sincetf.numpy_function
is already very expensive.GPU augmentations are very useful in nodes having many GPUs (8-16). In environments with many jobs running it is not acceptable to use 20+ cores for a single GPU job as machines run out of available cores before they run out of GPUs. Having (most of the time) very expensive GPUs idle is a massive waste of resources. So even if it was slightly slower it is still a crucial addition in my opinion.