open-forest-observatory / geograypher

Multiview Semantic Reasoning with Geospatial Data
BSD 3-Clause "New" or "Revised" License
10 stars 4 forks source link

Class Name Sidecar File #102

Closed Ruprabhu25 closed 2 months ago

Ruprabhu25 commented 3 months ago

Closes #60 . I created a method save_ids_to_labels which is used in both the save_mesh and save_renders_pytorch3d methods since they should both save the IDs_to_labels to a JSON file. I also added extra parsing in the init method of meshes.py to allow greater flexibility for users to enter IDs_to_labels (can support None, PATH_TYPE, dict). The logic checks for each type and eventually converts it into a dict.

Ruprabhu25 commented 3 months ago

For better flexibility, we could also allow users to name the file how they want, the only (could be the default) filename is 'IDs_to_labels.json' which saves it in the same folder as the mesh / render folder when using save_render_pytorch3d. Feel free to make suggestions for a better name, different names for meshes vs renders, etc.

russelldj commented 2 months ago

Looks basically done to me! Can you resolve the conflicts by merging in main or rebasing onto main? Merging would be the simpler of the two. Also, once you've done that, it would be good to use the new ensure_folder/ensure_containing_folder utility functions.

Ruprabhu25 commented 2 months ago

Looks basically done to me! Can you resolve the conflicts by merging in main or rebasing onto main? Merging would be the simpler of the two. Also, once you've done that, it would be good to use the new ensure_folder/ensure_containing_folder utility functions.

Done, should I go ahead and merge the pull request?