facebookresearch / pytorch3d

PyTorch3D is FAIR's library of reusable components for deep learning with 3D data
https://pytorch3d.org/
Other
8.7k stars 1.3k forks source link

The render image has no grad #1879

Open yejr0229 opened 1 day ago

yejr0229 commented 1 day ago

I use the following code to render a mesh from one view:

    mesh.textures = TexturesUV(
                maps=init_texture.unsqueeze(0).to(device),   # / 255
                faces_uvs=faces.textures_idx[None, ...],
                verts_uvs=verts_uvs[None, ...])
    renderer = init_renderer(cameras,
        shader=init_soft_phong_shader(
            camera=cameras,
            blend_params=BlendParams(),
            device=device),
        image_size=image_size*2, 
        faces_per_pixel=faces_per_pixel
    )
    images, fragments = renderer(mesh)

And the images.requires_grad=False, how should I deal with it?