Comments (8)
Hi,
which dataset are you referring to? In particular, which application?
from differentiable-shadow-mapping.
I assume you are referring to Figure 12 instead of Figure 11. The dataset is generated on-demand in the corresponding script; it does not yet exist as actual loadable dataset.
I will look into this as soon as possible but it might still take a day or two. It should be straightforward to generate the files.
from differentiable-shadow-mapping.
Then, I think I am not quite understanding what the "dataset" should be in this case. Do you need the meshes (cow and plane) with the light directions?
from differentiable-shadow-mapping.
There is no real "dataset" underlying Figure 11. It is simply a single scene to verify that the Mitsuba reference looks close to the images generated by our method (in terms of intensity and shadows). I am unsure what a possible "dataset" with more objects or diverse scenes could be useful for given the context? If you want to share the broader scope of what you are trying to achieve, I might be able to assist you better.
All I can do for now is give you the script to generate and render the scene of Figure 11 (simply execute it in the main directory of this repository):
import matplotlib.pyplot as plt
from diffshadow import *
from diffshadow.simple_renderer import *
device = torch.device('cuda:0')
render_context = dr.RasterizeGLContext(device=device)
renderer = SimpleRenderer(render_context)
meshes = [
Mesh(*load_mesh("data/spot.obj", device=device), d=torch.tensor([0.9], device=device, dtype=torch.float32)),
create_plane_mesh(position=[0, -0.77, 0], normal=[0, 1, 0], size=2, device=device)
]
# Place Spot in the scene
meshes[0] = meshes[0].with_vertices(meshes[0].vertices @ create_rotation_matrix(math.radians(55), 0, 2, device)[:3, :3].T)
meshes[0].vertices[:, 0] -= 0.2
meshes[0].vertices[:, 2] += 0.1
camera = Camera(
view_matrix=create_lookat_matrix([-5, 3, 0], [-0.8, 0, 0], [0, 1, 0]).to(device),
projection_matrix=create_perspective_projection_matrix(fovy=30, device=device)
)
shadow_map_resolution=(1024, 1024)
lights = [
DirectionalLight(azimuth_elevation_to_direction(-math.pi*3/4, math.pi/4).to(device), distance=2, far=5, size=4, resolution=shadow_map_resolution),
DirectionalLight(azimuth_elevation_to_direction(math.pi*3/4, math.pi/2).to(device), distance=2, far=5, size=4, resolution=shadow_map_resolution),
DirectionalLight(azimuth_elevation_to_direction(math.pi*3/4, math.pi/4).to(device), distance=2, far=5, size=4, resolution=shadow_map_resolution),
]
img_light_1 = renderer.render(meshes=meshes, lights=lights[:1], camera=camera, ambient=0, smoothing_kernel_width=3, smoothing_kernel=KernelType.Gaussian)
img_light_2 = renderer.render(meshes=meshes, lights=lights[:2], camera=camera, ambient=0, smoothing_kernel_width=3, smoothing_kernel=KernelType.Gaussian)
img_light_3 = renderer.render(meshes=meshes, lights=lights[:3], camera=camera, ambient=0, smoothing_kernel_width=3, smoothing_kernel=KernelType.Gaussian)
fig, axs = plt.subplots(1, 3, figsize=(15, 5), constrained_layout=True)
axs[0].imshow(to_display_image(img_light_1, grayscale_to_rgb=True))
axs[1].imshow(to_display_image(img_light_2, grayscale_to_rgb=True))
axs[2].imshow(to_display_image(img_light_3, grayscale_to_rgb=True))
plt.show()
from differentiable-shadow-mapping.
I want the data set in Figure 11, which should belong to 6.1. Monocular Pose Estimation task. I also didn't find the dataset in the Mitsuba 3 paper, it would be very much appreciated if you could tell me how to get it.
from differentiable-shadow-mapping.
I want the data set in Figure 11, which should belong to 6.1. Monocular Pose Estimation task. I also didn't find the dataset in the Mitsuba 3 paper, it would be very much appreciated if you could tell me how to get it.
I want the data set in Figure 11, which should belong to 6.1. Monocular Pose Estimation task. I also didn't find the dataset in the Mitsuba 3 paper, it would be very much appreciated if you could tell me how to get it.
from differentiable-shadow-mapping.
I assume you are referring to Figure 12 instead of Figure 11. The dataset is generated on-demand in the corresponding script; it does not yet exist as actual loadable dataset.
I will look into this as soon as possible but it might still take a day or two. It should be straightforward to generate the files.
Thank you for your reply. I'm sorry for misunderstanding. I checked and found that it is definitely Figure 11. It includes the changes in the shadow of a cow under different amounts of light.
from differentiable-shadow-mapping.
Then, I think I am not quite understanding what the "dataset" should be in this case. Do you need the meshes (cow and plane) with the light directions?
Yes, thank you very much. By the way, are there only a cow in this dataset? Or are there other objects?
from differentiable-shadow-mapping.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from differentiable-shadow-mapping.