Thanks… for your response. I checked the meta data for my image in an online tool. I could see the following
Orientation	Rotate 90 CW
However, when this images is transmitted via any medium like Whatsapp, online portal it seems this property is deleted. Once the meta data is deleted the behavior is ok in Pytorch
Here is how this is happening

Clicked the photo from my camera – View is ok
Uploaded the photo to Google photos and download again – An exif property is added (Orientation: Rotate 90 CW)
Transmit the image via Whatsapp, onlineportal - Orientation property is again deleted from image

There is one more important point. It looks like pytorch respects the orientation property. But opencvs does not respect this property. Hence, if any project is a mix of opencvs and pytorch then the output could be confusing
Question:
Is there a way to instruct pytorch to ignore orientation exif meta data