albumentations-team / albumentations_examples

Augmentations usage examples for albumentations library
MIT License
414 stars 98 forks source link

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

Open HajunKim opened 2 years ago

HajunKim commented 2 years ago

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

Dipet commented 2 years ago

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