-
Notifications
You must be signed in to change notification settings - Fork 42
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
First time trying out the package #243
Comments
Hi @zwep. Thanks for using DIRECT and reporting the above issues. To be able to help you better, please split each individual problem into seperate issues. Also please provide the configuration file you used. |
Hi, I have rephrased the original issue to focus only on one thing. I hope this helps! |
I have done some debugging.. and I come to the following adaptation to TransformConfig. However, given the changes that I made, I am really not sure if Im doing it right. I do get it working, but I have the feeling that something else is going wrong.
|
Hi @zwep. This in the
|
Riight of course. So then I also need to incorporate the following changes:
|
Actually, I see the problem; for inference, yes, you need to put it like that
|
For training and validation, this should work:
I will open an issue to fix it for inference. |
Can you also tell me why there is this difference between training and validation, and inference? I thought that the same code would be used to parse these dictionary keys |
…, #247, #249) Minor code fixes: * Fix transforms creation for inference using `dict_flatten` Config fixes: * Update projects/<configs> to new transforms config: ``` cropping: crop: null sensitivity_map_estimation: estimate_sensitivity_maps: true # Estimate the sensitivity map on the ACS normalization: scaling_key: masked_kspace ``` Documentation fixes: * Update some documentation files
…I-AI#244, NKI-AI#245, NKI-AI#246, NKI-AI#247, NKI-AI#249) (#3) Minor code fixes: * Fix transforms creation for inference using `dict_flatten` Config fixes: * Update projects/<configs> to new transforms config: ``` cropping: crop: null sensitivity_map_estimation: estimate_sensitivity_maps: true # Estimate the sensitivity map on the ACS normalization: scaling_key: masked_kspace ``` Documentation fixes: * Update some documentation files
Describe the bug
When using the following .yaml file located here, and replacing the 'inference' section with
inference:
batch_size: 8
dataset:
name: CalgaryCampinas
crop_outer_slices: true
text_description: inference
transforms:
masking:
name: CalgaryCampinas
accelerations: [ 10 ]
Then when running the following command (I have left out the definition for each variable below, since I dont think they are relevant)
direct predict $result_path
--checkpoint $chpt_path
--cfg $cfg_path
--data-root $data_root
--num-gpus 1
I run into the following issue
File "/local_scratch/sharreve/anaconda3/envs/direct/lib/python3.9/site-packages/direct-1.0.5.dev0-py3.9-linux-x86_64.egg/direct/predict.py", line 22, in _get_transforms
transforms = build_inference_transforms(env, mask_func, dataset_cfg)
File "/local_scratch/sharreve/anaconda3/envs/direct/lib/python3.9/site-packages/direct-1.0.5.dev0-py3.9-linux-x86_64.egg/direct/inference.py", line 138, in build_inference_transforms
transforms = partial_build_mri_transforms(**remove_keys(dataset_cfg.transforms, "masking"))
TypeError: build_mri_transforms() got an unexpected keyword argument 'cropping'
To Reproduce
Install the direct package via cuda
Download the pretrained rim model
Unzip this and define the appropriate path names
Change the 'projects/calgary_campinas/configs/base_rim.yaml' with the suggestions above
Run the 'direct predict ...' command
Expected behavior
A succesful run
Environment
dlup version: Not installed.
direct version: 1.0.5.dev0
How installed: using conda
Python version: 3.9
Operating System:
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: