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

Does phase input need to be normalized with dataset statistics? #17

Closed
ziw-liu opened this issue Apr 4, 2023 · 4 comments
Closed

Does phase input need to be normalized with dataset statistics? #17

ziw-liu opened this issue Apr 4, 2023 · 4 comments

Comments

@ziw-liu
Copy link
Collaborator

ziw-liu commented Apr 4, 2023

When deploying on a microscope system for online inference, we may not have access to dataset-level summary statistics for normalization.

During a discussion with @ieivanov and @Soorya19Pradeep, the necessity of normalizing phase input came under question. If deconvolution already guarantees zero mean for background, and the exact values of foreground pixels carry physical meaning (relative phase delay), further subtraction and scaling seems redundant for thin samples such as monolayer cell cultures. The remaining small variations can be adjusted by augmentation during model training.

@mattersoflight may have more input on whether there is empirical evidence that normalization for phase is still necessary at inference time.

@mattersoflight
Copy link
Member

mattersoflight commented Apr 5, 2023

@ziw-liu , @Soorya19Pradeep , @ieivanov Great question!

The typical dynamic range of phase (in radians) is (-0.5, 1.25)*wavelength. Interestingly, the exact dynamic range depends on two aspects of the specimen:

  • the refractive index of material (intuitive),
  • the fraction of FOV populated by dense cells/tissue (not-so-intuitive).

Let's consider two extremes:

  • If the FOV consists of uniform media, the measured mean/median phase will be zero, with zero dynamic range.
  • If the FOV is 100% occupied by cells/tissue, the measured mean phase will also approach zero, with a significant dynamic range.

This difference in dynamic range does encode for confluence. For phase->labels models, it does make sense that we do not do any further normalization.

The reason we decided to normalize phase (and other quantitative label-free channels) in the previous experiments was different - we were normalizing dynamic ranges across different channels (phase, retardance, orientation, dop). These computational experiments led to Table 2 of the paper.

@ziw-liu
Copy link
Collaborator Author

ziw-liu commented Apr 5, 2023

we were normalizing dynamic ranges across different channels (phase, retardance, orientation, dop)

Yes it makes sense that we scale multiple input channels to similar orders of magnitude for numerical stability. But I guess in this case the scaling factors can be fixed and not necessarily bootstrapped for each dataset?

@mattersoflight mattersoflight transferred this issue from mehta-lab/microDL Jul 13, 2023
@ziw-liu
Copy link
Collaborator Author

ziw-liu commented Jan 3, 2024

Phase still needs to be normalized due to mehta-lab/waveorder#151.

@ziw-liu
Copy link
Collaborator Author

ziw-liu commented Apr 8, 2024

FOV-level normalization of phase seems to be working well in training and inference.

@ziw-liu ziw-liu closed this as completed Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants