albumentations_examples icon indicating copy to clipboard operation
albumentations_examples copied to clipboard

Migrating from torchvision to Albumentations/ Using albumentations with PIL (Normalize)

Open HajunKim opened this issue 2 years ago • 1 comments

it is mentioned how to convert torchvision transform:normalize to albumetaions transform:normalize when using the same pipe line. but it is not metioned how to convert torchvision normalize to albumentaions normalize when using albumentaions with PIL.

If it is impossible, I'd appreciate it if you could mention it. If it is possible, please give use some example. Thank you

HajunKim avatar Feb 26 '22 15:02 HajunKim

I can not understand your problem. Could you provide small reproducible example? If you read PIL image you need convert it into np.ndarray and then provide it into pipeline. Try to look into this tutorial: https://albumentations.ai/docs/examples/migrating_from_torchvision_to_albumentations/#migrating-from-torchvision-to-albumentations

Dipet avatar Feb 28 '22 10:02 Dipet