borglab / gtsfm

End-to-end SFM framework based on GTSAM
Other
396 stars 49 forks source link

Organize the passing of ground truth (poses, meshes etc.) in the scene optimizer and individual modules #361

Open akshay-krishnan opened 2 years ago

akshay-krishnan commented 2 years ago

Currently, the complexity of the run() methods in the individual modules and the scene optimizer is increasing due to the overhead produced by ground truth and metrics as discussed in #295 .

akshay-krishnan commented 2 years ago

Some of my thoughts:

The metrics are the same for a type of module irrespective of the implementation. Ex: all translation averaging methods would have the same metrics. So we could move the computation of metrics into a different method in the base class. This method would accept the results produced by run() and the ground truth, and compute the metrics. It would be called by the create_computation_graph method after calling run().

This does not solve the problem of complexity in the scene optimizer. One partial solution (to reduce some complexity) is to have a container for ground truth data (poses, meshes, intrinsics etc.), and pass these without any manipulation to the individual modules from the scene optimizer. The individual modules can use whatever part of ground truth they like. The downside to this is of course that computation to manipulate ground truth might be repeated in the individual modules.