VisCy
VisCy copied to clipboard
sampling strategy to improve class balance across cell cycle
At a recent meeting, we discussed strategies to achieve class balance across the cell cycle. @ziw-liu proposed a selection of FOVs based on the rough measure of the shape of the cells, which I think is a good way to digitally sort the FOVs while constructing a batch.
Let's continue to think about this. We need: a) rough measures of the cell cycle stage:
- cytoplasm/nucleus ratio as measured from 'dirty' segmentations of target channels comes to my mind as the first measure to try. It should work for multiple cell types and microscopes.
b) strategies to assign a probability of sampling to a FOV or a patch:
- @ziw-liu I recall you used the fluorescence channel itself as a weight mask. Can you point to that call?
- We can preprocess or annotate each FOV to assign it a score and use the score to achieve class balance.
- @ziw-liu I recall you used the fluorescence channel itself as a weight mask. Can you point to that call?
It is the RandWeightedCropd transform from MONAI:
https://github.com/mehta-lab/viscy/blob/6daf3223372504fc35e6f44e5909061c426cb2c7/viscy/light/data.py#L493-L497