-
Notifications
You must be signed in to change notification settings - Fork 15
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
How to normalize the nuclear distance channel? #7
Comments
Hi, We didn't normalize nuclear distance and I think you shouldn't. Instead, it is rescaled by 0.01. cytoself/cytoself/datamanager/opencell.py Line 69 in 0133ab6
|
Thanks for your reply. I was using the main branch and didn't notice that there is a pytorch branch. Will take a look. Thanks. Would you please also help to double check this rescale operation actually aligns with the statement in the paper's method section (https://www.nature.com/articles/s41592-022-01541-z#Sec15) that "The raw pixel intensities in the fluorescence channel are normalized between 0 and 1, and the nuclear distance channel is normalized between −1 and 1." Thanks, |
Hi @li-li-github. Thanks for your advice. As suggested, I have successfully achieved nuclear segmentation with StarDist. But, I'm also curious about how to get the nucleus distance matrix from the segmented picture. Could I reference the code for computing nucleus distance? Thanks. |
Hi @JimmyCai91 and @Yuangaga This was done by rescaling the channel with 0.01. Throughout the whole dataset that we are offering in this repo, the min value of the nuclear distance channel after rescaling is -1.053 and there are only 118 pixels that are lower than -1, so they should be negligible. The idea of making the nuclear distance in [-1, 1] was because, without rescaling, the large values in the nuclear distance channel would overwhelm other channels, resulting in unsuccessful training. I hope this answered your question. |
Hi @li-li-github , Thanks for the reply. It reads great! Thanks, @Yuangaga if you need more info, feel free to start a new issue. |
* added vanilla.py, test_vanila.py * modified vanilla.py * modified vanilla.py * finished vanilla.py for now * added test_VanillaAE; modified VanillaAE * added basetrainer.py * trying to stop codecov warning on PR * trying to stop codecov warning on PR * added test_basetrainer.py * updated VanillaAETrainer; modified BaseTrainer; WIP: added test_VanillaAETrainer; * First fittable VanillaAETrainer * fixed a bug in BaseTrainer * WIP: added vq.py * WIP: modified vq.py * refactored models to trainer * added blank test_vq.py * updated vq.py * modified test_vq.py; fixed some bugs in vq.py * WIP: refactor base trainer * Major refactoring in trainer and model structure * added index_histogram in VectorQuantizer * fixed bugs in vq.py
Hi, great work!
Image data downloaded from those image_data0x.npy files has un-normalized nuclear distance channel. Would be nice if you can provide the way that to normalize the channel to -1 and 1.
Thanks.
The text was updated successfully, but these errors were encountered: