-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding support for pyramids #129
base: main
Are you sure you want to change the base?
Conversation
308392c
to
8a137d4
Compare
eb83d8c
to
8a137d4
Compare
@edyoshikun thanks - this implementation seems backward compatible with previous configs for training and prediction for virtual staining and contrastive learning tasks. Can you check with the configs we are sharing with the preprint if they need any change (e.g., explicitly setting the scale = 0)? |
@mattersoflight we don't need to change the previous configs because by default the Dataloader will be set to "0" the highest resolution if the parameter is not provided in the config. For the preprint, I thought we were pointing them to |
I've tested the basic @edyoshikun I'm happy to leave this as a branch while we test this out end to end during the course. |
The code changes look good, but we should test that training actually works before merging. |
@@ -219,7 +223,7 @@ def __getitem__(self, index: int) -> Sample: | |||
sample = { | |||
"index": sample_index, | |||
"source": self._stack_channels(sample_images, "source"), | |||
"norm_meta": norm_meta, | |||
# "norm_meta": norm_meta, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for?
@@ -318,6 +324,7 @@ def __init__( | |||
augmentations: list[MapTransform] = [], | |||
caching: bool = False, | |||
ground_truth_masks: Path | None = None, | |||
pyramid_resolution: str = "0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#218 used array_key
for this parameter, which is a more general naming:
VisCy/viscy/data/mmap_cache.py
Line 40 in 1d3261d
array_key: str = "0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this might work for training, the prediction writer will get a shape mismatch error and needs to be patched too.
This PR adds the support for pyramids to address #125. This modifies the
HCSDataloader()