Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to perform tf.image.per_image_standardization on a batch of images in tensorflow

I would like to know how to perform image whitening on a batch of images.

According to the documentation in https://www.tensorflow.org/api_docs/python/tf/image/per_image_standardization, it is said that tf.image.per_image_standardization takes as input a 3D tensor, that is an image, of shape: [height, width, channels].

Is it a missing feature or there is a different method?

Any help is much appreciated.

like image 414
I. A Avatar asked Jun 13 '17 16:06

I. A


People also ask

How do I rotate an image in Tensorflow?

For rotating an image or a batch of images counter-clockwise by multiples of 90 degrees, you can use tf. image. rot90(image,k=1,name=None) . k denotes the number of 90 degrees rotations you want to make.


1 Answers

This is how to perform this operation on a batch of images.

tf.map_fn(lambda frame: tf.image.per_image_standardization(frame), frames)

like image 191
I. A Avatar answered Sep 21 '22 14:09

I. A