Skip to content
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

N2V preprocess #371

Open
CatEek opened this issue Jan 23, 2025 · 2 comments
Open

N2V preprocess #371

CatEek opened this issue Jan 23, 2025 · 2 comments
Labels
refactoring Streamline and improve source code

Comments

@CatEek
Copy link
Contributor

CatEek commented Jan 23, 2025

Description

Once #365 will be merged, the N2V masking will be applied in the Lightning module. However, this introduces some potentially difficult to maintain code:

if is_tiled:
x, *aux = batch
if type(x) in [list, tuple]:
x = x[0]
else:
if type(batch) in [list, tuple]:
x = batch[0] # TODO change, ugly way to deal with n2v refac
else:
x = batch
aux = []

We should discuss better alternatives!

@CatEek CatEek added the refactoring Streamline and improve source code label Jan 23, 2025
@jdeschamps
Copy link
Member

Can you explain what is happening here? I was having a look at the PR but I don't get why this changed.

@CatEek
Copy link
Contributor Author

CatEek commented Feb 12, 2025

Basically, it's because currently relevant method of compose class outputs a list. Which is there to get rid of possible None values which are there because the targets might or might not be present. As per todo, this needs to be refactored during the dataset refactoring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Streamline and improve source code
Projects
None yet
Development

No branches or pull requests

2 participants