Repository navigation
IP Storage: use ragged list Zarrv3 - #108
Open
indecisiveuser wants to merge 28 commits into
Open
indecisiveuser wants to merge 28 commits into
indecisiveuser wants to merge 28 commits into
Conversation
indecisiveuser
force-pushed
the
ip-storage-update
branch
from
September 28, 2026 16:21
342030c to
b0d6389
Compare
Member
|
Great initiative - since we are touching this, interest points may have further attributes ( |
Collaborator
Author
|
Hi @StephanPreibisch, thanks for your comments. I have updated this to hopefully have a better structure. Now,
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR aims to change both the data format and structure of stored interest points. Currently, interest points are stored in n5 format. There is one folder per timepoint/viewid combination. All interest points for that tile are stored in an array containing the IP id and its (x,y,z) coordinates. Then correspondences are stored as an adjacency list: correspondence id in the current tile --> timepoint, setup number, label, detection number in the other setup.
We are trying to migrate to zarrv3 for all parts of the registration pipeline. But we cannot reap the benefits of sharded zarr3 files for setups consisting of a large number of small variable-length files.
Therefore, this PR introduces uncompressed ragged list zarr3 interest point storage. In particular, for each timepoint, setup number, and label, an index is kept. This shows the offset and count of each view's interest points in a flat IP list. A two-level indexing scheme occurs for correspondences: view and pair indexes, where view indexes into pair. In more detail, the view index stores (per timepoint,setup,label) the offset and count of the number of pairs in the pair index. Then, the pair index stores (for the timpoint,setup,label in question) each partner's timepoint,setup,label in addition to its offset and count in the flat correspondence array.
This becomes more interesting when considering the case of IP re-detection or re-matching. In particular, if one re-detects interest points on a single tile, the new version appends these points to the current points / correspondences lists. Then it updates the index to reflect the new location of the points. This workflow applies whenever 3/4 or more of the array would still be considered to be 'current' following an update. (Here, ¾ was an arbitrary choice; I have not benchmarked this.) If <=3/4 of the array would be 'current' following an update, the index would be rewritten.
I have benchmarked the current version against the new IP storage structure on a dataset crop (25 tiles from LICONN mirror scope data). I chose 2^16 point chunks / 2^20 point shards as this performed well in my exploratory tests. Here are the results:
Additionally, the number of IP files decreased from 10,043 to 32. Evidently, the efficiency of all parts of the registration pipeline seem to have improved (some drastically like the solver). TPS fusion was not run as part of the suite because most of it does not use interest points, and so I did not figure the extra compute cost to be necessary. Complete runs showed that the two methods produce output that is essentially the same. (There are minor differences due to the non-deterministic nature of RANSAC etc.)
P.S. In order to better extract performance gains from the new data structure, there were some changes in BigStitcher-Spark. These are located at: https://github.com/JaneliaSciComp/BigStitcher-Spark/tree/ip-store-update