10000 Fixes issues related to using consecutive slices in MTLRS and SKMTEA by TimPaquaij · Pull Request #8 · wdika/atommic · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TimPaquaij
Copy link

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

model:
  consecutive_slices: 3
  dimensionality: 2
  coil_dim: 2
  num_echoes: 2

  train_ds:
    dataset_format: skm-tea-echo1-echo2
    consecutive_slices: 3
    coil_dim: 3

  validation_ds:
    dataset_format: skm-tea-echo1-echo2
    consecutive_slices: 3
    coil_dim: 3

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation?
  • Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
    • Reviewer: Does the PR have correct import guards for all optional libraries?

PR Type:

  • New Feature
  • Bugfix
  • Documentation

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

  • Related to # (issue)

**.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
Copy link

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.

@github-actions github-actions bot added the Stale label Dec 11, 2024
Copy link

This PR was closed because it has been inactive for 7 days since being marked as stale.

@github-actions github-actions bot closed this Dec 19, 2024
@wdika wdika reopened this Jan 9, 2025
@github-actions github-actions bot removed the Stale label Jan 10, 2025
Copy link

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.

@github-actions github-actions bot added the Stale label Jan 25, 2025
Copy link
github-actions bot commented Feb 1, 2025

This PR was closed because it has been inactive for 7 days since being marked as stale.

@github-actions github-actions bot closed this Feb 1, 2025
@wdika wdika reopened this Feb 10, 2025
@github-actions github-actions bot removed the Stale label Feb 11, 2025
Copy link

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.

@github-actions github-actions bot added the Stale label Feb 25, 2025
Copy link
github-actions bot commented Mar 4, 2025

This PR was closed because it has been inactive for 7 days since being marked as stale.

@github-actions github-actions bot closed this Mar 4, 2025
@wdika wdika reopened this Mar 6, 2025
@github-actions github-actions bot removed the Stale label Mar 7, 2025
Copy link

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.

@github-actions github-actions bot added the Stale label Mar 21, 2025
Copy link

This PR was closed because it has been inactive for 7 days since being marked as stale.

@github-actions github-actions bot closed this Mar 28, 2025
@wdika wdika reopened this Mar 28, 2025
@github-actions github-actions bot removed the Stale label Mar 29, 2025
Copy link

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.

@github-actions github-actions bot added the Stale label Apr 12, 2025
Copy link

This PR was closed because it has been inactive for 7 days since being marked as stale.

@github-actions github-actions bot closed this Apr 20, 2025
@wdika wdika reopened this Apr 22, 2025
@wdika wdika removed the Stale label Apr 22, 2025
@@ -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

This assignment assigns a variable to itself.
# 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

Variable target_reconstruction is not used.
Comment on lines +1730 to +1732
# 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

This comment appears to contain commented-out code.
Comment on lines +1746 to +1747
# for fname in reconstructions:
# reconstructions[fname] = reconstructions[fname][:, self.consecutive_slices // 2]

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
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

This assignment to 'loss' is unnecessary as it is
redefined
before this value is used.
@@ -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 assignment assigns a variable to itself.
@wdika wdika added the help wanted Extra attention is needed label Apr 22, 2025
Copy link
github-actions bot commented May 7, 2025

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.

@github-actions github-actions bot added the Stale label May 7, 2025
@wdika wdika removed the Stale label May 7, 2025
Copy link

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.

@github-actions github-actions bot added the Stale label May 22, 2025
Copy link

This PR was closed because it has been inactive for 7 days since being marked as stale.

@github-actions github-actions bot closed this May 29, 2025
@wdika wdika removed the Stale label May 30, 2025
@wdika wdika reopened this Jun 17, 2025
Copy link
github-actions bot commented Jul 2, 2025

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.

@github-actions github-actions bot added the Stale label Jul 2, 2025
@wdika wdika removed the Stale label Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common help wanted Extra attention is needed MTL REC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0