I've been thinking about optimizing gala. I think one of the first steps is to stop merging segments during agglomeration, and just keep track of the merges in a tree. I've created a Python tree library viridis (after Morelia viridis, the green tree python) and use it to keep track of the merge tree. All the segment merging logic is gone, simplifying the codebase while increasing efficiency. It passes all the current tests (admittedly few, but they cover the essentials of agglomeration and feature computation).
Please let me know if there are any objections to this change.
I've been thinking about optimizing gala. I think one of the first steps is to stop merging segments during agglomeration, and just keep track of the merges in a tree. I've created a Python tree library viridis (after Morelia viridis, the green tree python) and use it to keep track of the merge tree. All the segment merging logic is gone, simplifying the codebase while increasing efficiency. It passes all the current tests (admittedly few, but they cover the essentials of agglomeration and feature computation).
Please let me know if there are any objections to this change.