cellpose icon indicating copy to clipboard operation
cellpose copied to clipboard

Questions on color augmentations and cropping during Cellpose SAM fine-tuning

Open vadori opened this issue 4 months ago • 1 comments

Hi,

I’m fine-tuning Cellpose SAM and have two questions:

  1. 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.py used 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)?

  2. 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!

vadori avatar Aug 14 '25 08:08 vadori

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

mrariden avatar Oct 10 '25 13:10 mrariden