Questions on color augmentations and cropping during Cellpose SAM fine-tuning
Hi,
I’m fine-tuning Cellpose SAM and have two questions:
-
Color/intensity augmentations The paper states that, during training, images undergo:
- 25% contrast inversion (
x → 1 − x) - 10% random channel drop (third channel)
- random channel permutation
- per-channel brightness jitter (Gaussian, σ = 0.2)
- contrast rescaling by a uniformly drawn factor between −2 and 2 applied to all 256 images in a batch.
I don’t see these transforms in the public
train.pyused for fine-tuning. Are these augmentations intentionally omitted? If yes, is there a recommended way to reproduce them (e.g., a reference transform pipeline or config)? - 25% contrast inversion (
-
Cropping behavior Am I correct that I don’t need to pre-crop training images because the training pipeline performs the necessary random crops/affine transforms to produce fixed-size inputs (256x256 for 2D images)?
Thanks in advance!
Are these augmentations intentionally omitted? If yes, is there a recommended way to reproduce them (e.g., a reference transform pipeline or config)?
No, they haven't been added to the repo yet.
Am I correct that I don’t need to pre-crop training images because the training pipeline performs the necessary random crops/affine transforms to produce fixed-size inputs (256x256 for 2D images)?
Yes