Repository navigation
Feat/rib landmark scaling - #1
Merged
Merged
Conversation
…ries Two changes needed to run the verpex stack on a much larger landmark set (104 rib POIs over a hemithorax instead of 35 vertebra POIs). HeatmapDenseNet and UNetHeatmapDenseNet computed the per-landmark feature encoding by broadcasting (B, N, 1, H, W, D) against (B, 1, F, H, W, D) and summing over space, which materialises a (B, N, F, H, W, D) intermediate. At verpex's N=35 and an 8x8x9 heatmap that is 20 MB per sample; at N=104 and the U-Net decoder's 28x36x52 it is 5.6 GB per sample, which no batch size makes fit. The einsum contracts straight to (B, N, F) instead - same numbers, same detach semantics, batched matmul. test_models.py now pins the equivalence against the broadcast formulation and checks the heatmaps stay detached. PoiPredictionModule built its two stages from the module-level registries, so a subclass wanting different stage implementations had to reimplement __init__. They are class attributes now (COARSE_MODULES / REFINER_MODULES), built through registry.build as before. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J7ZFviVmei5PikGKn3bVV1
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.
No description provided.