Controllable Shadow Generation with Single-Step Diffusion Models from Synthetic Data
Paper • 2412.11972 • Published • 1
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
This is the public synthetic test set for controllable shadow generation created by Jasper Research Team. The project page for the research introduced this dataset is available at this link. We created this dataset using Blender. It has 3 tracks: softness control, horizontal direction control and vertical direction control.
Example renders from the dataset below:
The dataset is formatted to be used with WebDataset.
import matplotlib.pyplot as plt
import webdataset as wds
# Create a data iterator
url = f"pipe:curl -s -L https://huggingface.co/datasets/jasperai/controllable-shadow-generation-benchmark/blob/main/controllable-shadow-generation-benchmark.tar"
data_iter = iter(wds.WebDataset(url))
# Sample from the dataset
data = next(data_iter)
# Visualize the image, object mask, and object shadow
_, axs = plt.subplots(1, 3, figsize=(15, 5))
axs[0].imshow(data['image.png'])
axs[0].set_title('Image')
axs[1].imshow(data['mask.png'])
axs[1].set_title('Mask')
axs[2].imshow(data['shadow.png'])
axs[2].set_title('Shadow')
# Print the metadata
print(data['metadata.json'])
Example metadata:
{
'track': 'softness_control', # Which track the image belongs to
'light_energy': 1000, # Energy of the area light
'size': 2, # Size of the area light
'theta': 30.0, # Polar coodinate of the area light
'phi': 0.0, # Azimuthal coodinate of the area light
'r': 8.0, # Radius of the sphere
'light_location': '4.0,0.0,6.928203105926514', # Cartesian coordinate of the area light
'samples': 512, # We use Cycle rendering engine in Blender when creating the dataset.
# This parameter shows # of samples used by Cycle when rendering the image.
'resolution_x': 1024, # Width of the image.
'resolution_y': 1024 # Height of the image.
}
If you use this dataset, please consider citing our paper:
@misc{
title={Controllable Shadow Generation with Single-Step Diffusion Models from Synthetic Data},
author={Tasar, Onur and Chadebec, Clement and Aubin, Benjamin},
year={2024},
eprint={2412.11972},
archivePrefix={arXiv},
primaryClass={cs.CV}
}