Conversation
- Positional features (Center_*, BoundingBox*, Location_*, centroid-*) were relative to each tile's crop; report them in the labels' pixel grid, including the alignment crop offset. - The auto margin assumed a cell reaches at most half its bbox from its centroid, truncating asymmetric cells at tile edges. Crop each tile to the union of its owned cells' bounding boxes plus 1 px instead. - Multiscale labels computed centroids on the coarsest scale only, so cells that vanish there were never featurized or QC'd. Scan the requested scale.
Cast each tile to float32 and fill one preallocated, label-sorted array instead of concat -> sort_index -> nunique -> cast. Constant columns are found from per-tile min/max (same semantics) and never copied. ~3x lower peak memory and ~27x faster on 1e8 values; output is bit-identical.
Granularity samples each crop on a 1/4 then 1/16 grid anchored at the crop origin and removes background with an opening reaching ~320 px, so tiled values drifted from an untiled run. When granularity is requested, snap tile crops to its 16 px grid and pad them by 256 px. On real Xenium DAPI nuclei, tiled-vs-untiled Spearman for bins 1-5 rises from 0.77-0.90 to 0.94-0.997; higher bins remain context-dependent (documented).
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1295 +/- ##
==========================================
+ Coverage 78.44% 78.51% +0.07%
==========================================
Files 63 63
Lines 9532 9537 +5
Branches 1594 1593 -1
==========================================
+ Hits 7477 7488 +11
+ Misses 1489 1486 -3
+ Partials 566 563 -3
🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Tiled
calculate_image_features(andcalculate_tiling_qc) could silently return values that depend ontile_size:Center_X/Y,BoundingBox*,Location_*,centroid-*are now in the labels' pixel grid.Output assembly no longer copies the full table three times: ~3x lower peak memory and ~27x faster on 1e8 values, with identical output.