open-forest-observatory / geograypher

Enabling Geospatial Predictions from Individual Drone Images
https://open-forest-observatory.github.io/geograypher/
BSD 3-Clause "New" or "Revised" License
11 stars 5 forks source link

Re-introduce `PyTorch3d` rendering #146

Closed asidhu0 closed 4 months ago

asidhu0 commented 4 months ago

Created a derived Mesh class from TexturedPhotogrammetryMesh named TexturedPhotogrammetryMeshPyTorch3dRendering that handles PyTorch3D rendering. In this derived class, computing the pixel-to-face correspondences is done using PyTorch3D's rasterizer method.

Converting the cameras to PyTorch3D cameras is also handled in this derived mesh class, so PhotogrammetryCamera and PhotogrammetryCamera do not have to deal with PyTorch3D. I created a get_instrinsic_camera_properties() method in the PhotogrammetryCamera class so that the derived mesh using PyTorch3D for the pix2face computation has access to the cameras to convert them to PyTorch3D cameras.