thousandbrainsproject / tbp.monty

Monty is a sensorimotor learning framework based on the thousand brains theory of the neocortex.
https://thousandbrainsproject.readme.io
MIT License
107 stars 27 forks source link

Fix `get_possible_3d_rotations` #41

Closed scottcanoe closed 2 days ago

scottcanoe commented 2 days ago

The current implementation of get_possible_3d_rotations removes some but not all duplicate rotations (see below). I reimplemented this function to ensure unique rotations by performing a quaternion-based comparison of all possible rotations.

This function is no longer used in benchmark experiments, so it should have no impact on existing configs in Monty. Still, it seems like a good idea to have this function return unique rotations as that is the expected behavior.

Existing get_possible_3d_rotations (with 90 degree increments). Dashed lines show duplicates sets of rotations: image_rotations

Reimplemented get_possible_3d_rotations (with 90 degree increments): potted_meat_can_6x4