Datasets:

Modalities:
Image
Text
Formats:
text
ArXiv:
Libraries:
Datasets
License:

You need to agree to share your contact information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

You agree that this data will only be used for non-commercial purposes.

Log in or Sign Up to review the conditions and access this dataset content.

Complex Virtual Dressing Dataset (CVDD)

This dataset contains 516 pairs of virtual try-on test data in complex scenarios, as proposed in the paper "FitDiT: Advancing the Authentic Garment Details for High-fidelity Virtual Try-on".

The images in this dataset have varying resolutions. To ensure consistent testing under the same resolution, you can use the following code:

from PIL import Image
import math

def pad_and_resize(im, new_width=768, new_height=1024, pad_color=(255, 255, 255), mode=Image.LANCZOS):
    old_width, old_height = im.size
    
    ratio_w = new_width / old_width
    ratio_h = new_height / old_height
    if ratio_w < ratio_h:
        new_size = (new_width, round(old_height * ratio_w))
    else:
        new_size = (round(old_width * ratio_h), new_height)
    
    im_resized = im.resize(new_size, mode)

    pad_w = math.ceil((new_width - im_resized.width) / 2)
    pad_h = math.ceil((new_height - im_resized.height) / 2)

    new_im = Image.new('RGB', (new_width, new_height), pad_color)
    
    new_im.paste(im_resized, (pad_w, pad_h))

    return new_im, pad_w, pad_h


def unpad_and_resize(padded_im, pad_w, pad_h, original_width, original_height):
    width, height = padded_im.size

    left = pad_w
    top = pad_h
    right = width - pad_w
    bottom = height - pad_h
    
    cropped_im = padded_im.crop((left, top, right, bottom))

    resized_im = cropped_im.resize((original_width, original_height), Image.LANCZOS)

    return resized_im


# resize image to same resolution(e.g., 768x1024)
image_size = image.size
image, pad_w, pad_h = pad_and_resize(image, 768, 1024)

# convert back to original size
image = unpad_and_resize(image, pad_w, pad_h, image_size[0], image_size[1])
Downloads last month
40