-
Notifications
You must be signed in to change notification settings - Fork 34
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
patch_halo
seems to be ignored
#205
Comments
In patch_halo = get_patch_halo(model_name)
predictor = ArrayPredictor(model=model, in_channels=model_config['in_channels'],
out_channels=model_config['out_channels'], device=device, patch=patch,
patch_halo=patch_halo, single_batch_mode=single_batch_mode, headless=False,
verbose_logging=False, disable_tqdm=disable_tqdm) In patch_halo = get_patch_halo(model_name)
is_embedding = not model_config.get('is_segmentation', True)
self.predictor = ArrayPredictor(model=model, in_channels=model_config['in_channels'],
out_channels=model_config['out_channels'], device=device, patch=self.patch,
patch_halo=patch_halo, single_batch_mode=False, headless=True,
is_embedding=is_embedding) But: def get_patch_halo(model_name):
predict_template = get_predict_template()
patch_halo = predict_template['predictor']['patch_halo']
config_train = get_train_config(model_name)
if config_train["model"]["name"] == "UNet2D":
patch_halo[0] = 0
return patch_halo So I guess the user config is not used. Should be an easy fix. |
Hey @wolny I guess a halo of [2, 4, 4] is fine for all purposes? Is it why we currently have fixed halo for PlantSeg? Or do we actually want to let users to set it? |
patch_halo
seems to be ignored, possibly a very bad bugpatch_halo
seems to be ignored
Somehow according to this paper, halo matters: Exact Tile-Based Segmentation Inference for Images Larger than GPU Memory. But empirically changing halo wouldn't help. |
hey @qin-yu, yes at some point I've decided to simplify the process and use a fixed 'patch_halo' during inference instead of letting the user to specify it. If there are still references to 'patch_halo' in the config, I'd just remove them since it's not used |
With the latest implementation of the halo, its shape has become a significant factor and can no longer be simplified. Previously, the irrelevance of the halo's size was a key indicator of underlying issues. I've implemented some changes in wolny/pytorch-3dunet#113 for pytorch-3dunet. After receiving a review from @wolny, I plan to submit a pull request for further updates in plantseg. |
|
I am fixing this right now.
My version:
v1.6.6
My workflow: CLI
My config:
Workflow output:
The text was updated successfully, but these errors were encountered: