ImageGrains 2.0: IG2_full_set_cp_SAM (mirror)
This is an unmodified copy of the default ImageGrains 2.0 model: Cellpose-SAM fine-tuned on about 29,000 hand-outlined sediment grains. It is mirrored here only because Zenodo serves this 1.2 GB file slowly (often under 1 MB/s), which makes it slow to fetch in every new Google Colab session. The Zenodo record is the original; please cite the authors.
| Original | Zenodo record 15728186, doi:10.5281/zenodo.15309323 |
| Paper | Mair, D., Witz, G., et al. (2026). ImageGrains 2.0: Improved precision and generalization for grain segmentation. Earth Surface Dynamics 14, 527–551. doi:10.5194/esurf-14-527-2026 |
| Code | github.com/dmair1989/imagegrains |
| Licence | CC BY 4.0, as on Zenodo |
| File | IG2_full_set_cp_SAM, 1,218,643,463 bytes, MD5 5a5b74bc70a63b6605afd50465240969 (the same as on Zenodo) |
Use
Needs cellpose 4 or newer.
from cellpose import models
model = models.CellposeModel(gpu=True, pretrained_model="IG2_full_set_cp_SAM") # path to the downloaded file
masks, flows, styles = model.eval(img, bsize=256, tile_overlap=0.1, normalize={"percentile": [1, 99]},
diameter=None, cellprob_threshold=0.0, flow_threshold=0.4)
These are the inference settings of the ImageGrains 2.0 paper. The model never rescales its 256 px tiles, so it works best when grains are a few tens of pixels across.