-
Notifications
You must be signed in to change notification settings - Fork 2
Fixes issues related to using consecutive slices in MTLRS and SKMTEA #8
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
base: main
Are you sure you want to change the base?
Conversation
**.DS_Store Changed loaders to get multiple echoes for skmtea Added num_echoes in base include consecutative slices and double echo added consecutative and finalised echo Update on consecutatiive slices and echoes still error in target reconstruction Update Train and val + plotting works Validation and Training passed with SSIM fixed test script and hx can be an empty list or none Update Spacing Update test_step update to prevent diffeculties with merging Update base.py and mtlrs.py remove print and update log_indices to test plotting Update SSIM with batch size Update base.py update style base.py update requirements.txt
This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days. |
This PR was closed because it has been inactive for 7 days since being marked as stale. |
This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days. |
This PR was closed because it has been inactive for 7 days since being marked as stale. |
This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days. |
This PR was closed because it has been inactive for 7 days since being marked as stale. |
This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days. |
This PR was closed because it has been inactive for 7 days since being marked as stale. |
This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days. |
This PR was closed because it has been inactive for 7 days since being marked as stale. |
@@ -416,19 +416,22 @@ | |||
kspace = kspace[:, :, 0, :] + kspace[:, :, 1, :] | |||
elif not is_none(dataset_format) and dataset_format == "skm-tea-echo1+echo2-mc": | |||
kspace = np.concatenate([kspace[:, :, 0, :], kspace[:, :, 1, :]], axis=-1) | |||
elif not is_none(dataset_format) and dataset_format == "skm-tea-echo1-echo2": | |||
kspace = kspace |
Check failure
Code scanning / CodeQL
Redundant assignment Error
# find the batch size | ||
batch_size = target_reconstruction.shape[0] / self.num_echoes | ||
# reshape to [batch_size, num_echoes, n_x, n_y] | ||
target_reconstruction = target_reconstruction.reshape( |
Check notice
Code scanning / CodeQL
Unused local variable Note
# if self.consecutive_slices > 1: | ||
# # iterate over the slices and always keep the middle slice | ||
# for fname in segmentations: |
Check notice
Code scanning / CodeQL
Commented-out code Note
# for fname in reconstructions: | ||
# reconstructions[fname] = reconstructions[fname][:, self.consecutive_slices // 2] |
Check notice
Code scanning / CodeQL
Commented-out code Note
cascades_loss.append(cascade_loss) | ||
rs_cascade_loss = sum(x * w for x, w in zip(cascades_loss, cascades_weights)) / len(rs_cascade_pred) | ||
rs_cascades_loss.append(rs_cascade_loss) | ||
loss = sum(x * w for x, w in zip(rs_cascades_loss, rs_cascades_weights)) / len(prediction) | ||
else: | ||
# keep the last prediction of the last cascade of the last rs cascade | ||
prediction = prediction[-1][-1][-1] | ||
loss = compute_reconstruction_loss(target, prediction, sensitivity_maps) | ||
if self.consecutive_slices > 1: | ||
loss = compute_reconstruction_loss( |
Check warning
Code scanning / CodeQL
Variable defined multiple times Warning
redefined
@@ -692,6 +692,8 @@ | |||
kspace = kspace[:, :, 0, :] + kspace[:, :, 1, :] | |||
elif not is_none(dataset_format) and dataset_format == "skm-tea-echo1+echo2-mc": | |||
kspace = np.concatenate([kspace[:, :, 0, :], kspace[:, :, 1, :]], axis=-1) | |||
elif not is_none(dataset_format) and dataset_format == "skm-tea-echo1-echo2": | |||
kspace = kspace |
Check failure
Code scanning / CodeQL
Redundant assignment Error
This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days. |
This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days. |
This PR was closed because it has been inactive for 7 days since being marked as stale. |
This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days. |
What does this PR do ?
Fixes implementation of consecutive slices in multi-task collection. Additionally, it adds the possibility to run multiple echoes in one inference.
Collection: Multi-task
Changelog
Usage
SKMTEA Example
Before your PR is "Ready for review"
Pre checks:
PR Type:
If you haven't finished some of the above items you can still open "Draft" PR.
Who can review?
Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.
Additional Information