# HG changeset patch # User bgruening # Date 1742059435 0 # Node ID e5370bb716333da60736b28dabd734834b9a6e00 # Parent 1857781df226105cd906b6852adae28e62eac0a1 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/cellpose commit 5846f23282167df28e6cc00e1bda31523b66b5b4 diff -r 1857781df226 -r e5370bb71633 cellpose.xml --- a/cellpose.xml Tue Feb 11 14:47:54 2025 +0000 +++ b/cellpose.xml Sat Mar 15 17:23:55 2025 +0000 @@ -2,7 +2,7 @@ with Cellpose 3.1.0 - 0 + 1 @@ -19,6 +19,7 @@ echo "@VERSION@" - + @@ -115,7 +116,9 @@ - +
+ +
diff -r 1857781df226 -r e5370bb71633 cp_segmentation.py --- a/cp_segmentation.py Tue Feb 11 14:47:54 2025 +0000 +++ b/cp_segmentation.py Sat Mar 15 17:23:55 2025 +0000 @@ -3,11 +3,24 @@ import os import warnings +# Make sure, that `MKL_NUM_THREADS` is set to 1, to ensure reproducibility: +# https://forum.image.sc/t/reproducibility-how-we-spent-years-building-containers-and-then-mkl-decided-to-screw-our-results/109599 +if str(os.environ['MKL_NUM_THREADS']) != '1': + warnings.warn('MKL_NUM_THREADS must be set to 1 to ensure reproducibility, and will be adjusted accordingly for now.') + os.environ['MKL_NUM_THREADS'] = '1' + +# Load the remaining packages *after* adjusting `MKL_NUM_THREADS` (this likely necessary for it to take effect) import matplotlib.pyplot as plt import numpy as np import skimage.io +import torch from cellpose import models, plot, transforms +# Apply PyTorch guidelines for reproducibility +torch.backends.cudnn.benchmark = True +torch.backends.cudnn.deterministic = True +torch.manual_seed(0) + def main(inputs, img_path, img_format, output_dir): """ diff -r 1857781df226 -r e5370bb71633 test-data/img02_cp_masks_rescale.tif Binary file test-data/img02_cp_masks_rescale.tif has changed diff -r 1857781df226 -r e5370bb71633 test-data/img02_cp_segm_cyto.png Binary file test-data/img02_cp_segm_cyto.png has changed diff -r 1857781df226 -r e5370bb71633 test-data/img02_cp_segm_diameter.png Binary file test-data/img02_cp_segm_diameter.png has changed diff -r 1857781df226 -r e5370bb71633 test-data/img02_cp_segm_gpu.png Binary file test-data/img02_cp_segm_gpu.png has changed