ShichenLiu / SoftRas

Project page of paper "Soft Rasterizer: A Differentiable Renderer for Image-based 3D Reasoning"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

libtorch C++ API

lasagnaphil opened this issue · comments

It would be good to add a libtorch C++ API to this library. For example, right now I need a differentiable renderer with C++ physics simulation code, and mixing Python and C++ (via pybind11) makes the code very hard to maintain. Using the PyTorch C++ frontend, this can be achieved quite easily.

I've actually already done this in my personal fork, and confirmed that this could be done with minimum changes. (Since the libtorch C++ code is already there, the only thing to do is to recreate some of the Python wrappers with the C++ Autograd API.) But the code there is also mixed with other small changes and it's a bit cumbersome right now to split into separate PRs. So I'll start working on this once PR #96 (Adding support for dimensions where width != height) is merged.