code uses a pre-trained segmentation model (U-net) and an input image. It preprocesses the image for the model. • Preprocessing the image Pads the image to ensure its dimensions are divisible by 32, which is necessary for the models that we will use. • Preparing Input for Model Inference After setting up an albumentations transformation pipeline for normalization, we apply the normalization transformation to the padded image, then convert the normalized image to a PyTorch tensor and add a batch dimension. Performs inference using the pre-trained model to obtain a segmentation mask. • Postprocessing the segmentation mask It converts the model's output to a binary mask, removes padding from the mask, and then resizes the masked image.
-
Notifications
You must be signed in to change notification settings - Fork 0
Aalaa4444/preprocessing-for-VITON-models
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
preprocessing for VITON models
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published