# HG changeset patch
# User imgteam
# Date 1719388988 0
# Node ID e59c0e930b1f48b1d9b6fb37c617bf71df2f2222
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/plantseg/ commit 842fb4a9435114d06329e2cdfaeb8ed8d8479681
diff -r 000000000000 -r e59c0e930b1f create-config.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/create-config.py Wed Jun 26 08:03:08 2024 +0000
@@ -0,0 +1,58 @@
+import argparse
+import json
+
+import yaml
+
+
+# This script genereates the config file required by PlantSeg.
+# For an overview of the config fields, see:
+# https://github.com/kreshuklab/plant-seg/blob/master/examples/config.yaml
+
+
+def listify(d, k, sep=',', dtype=float):
+ if k not in d:
+ return
+ d[k] = [dtype(token.strip()) for token in str(d[k]).split(sep)]
+
+
+if __name__ == '__main__':
+
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--inputs', type=str, help='Path to the inputs file', required=True)
+ parser.add_argument('--config', type=str, help='Path to the config file', required=True)
+ parser.add_argument('--img_in', type=str, help='Path to the input image', required=True)
+ parser.add_argument('--workers', type=int, default=1)
+ args = parser.parse_args()
+
+ with open(args.inputs, 'r') as fp:
+ inputs = json.load(fp)
+
+ # Set configuration options from the tool wrapper
+ cfg = dict(path=args.img_in)
+ for section_name in (
+ 'preprocessing',
+ 'cnn_prediction',
+ 'cnn_postprocessing',
+ 'segmentation',
+ 'segmentation_postprocessing',
+ ):
+ cfg[section_name] = inputs[section_name]
+
+ # Set additional required configuration options
+ cfg['preprocessing']['save_directory'] = 'PreProcessing'
+ cfg['preprocessing']['crop_volume'] = '[:,:,:]'
+ cfg['preprocessing']['filter'] = dict(state=False, type='gaussian', filter_param=1.0)
+
+ cfg['cnn_prediction']['device'] = 'cuda'
+ cfg['cnn_prediction']['num_workers'] = args.workers
+ cfg['cnn_prediction']['model_update'] = False
+
+ cfg['segmentation']['name'] = 'MultiCut'
+ cfg['segmentation']['save_directory'] = 'MultiCut'
+
+ # Parse lists of values encoded as strings as actual lists of values
+ listify(cfg['preprocessing'], 'factor')
+ listify(cfg['cnn_prediction'], 'patch')
+
+ with open(args.config, 'w') as fp:
+ fp.write(yaml.dump(cfg))
diff -r 000000000000 -r e59c0e930b1f creators.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/creators.xml Wed Jun 26 08:03:08 2024 +0000
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 000000000000 -r e59c0e930b1f plantseg.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plantseg.xml Wed Jun 26 08:03:08 2024 +0000
@@ -0,0 +1,108 @@
+
+ with PlantSeg
+
+ creators.xml
+ tests.xml
+ 1.8.1
+ 0
+
+
+
+
+
+ operation_3443
+
+
+ plantseg
+
+
+ plant-seg
+ pytorch
+ bioimageio.spec
+ pyyaml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ **Perform segmentation in densely packed 3-D volumetric images.**
+
+ PlantSeg is a tool for cell instance aware segmentation in densely packed 3D volumetric images.
+ The pipeline uses a two stages segmentation strategy (Neural Network + Segmentation).
+ The pipeline is tuned for plant cell tissue acquired with confocal and light sheet microscopy.
+
+
+
+ 10.7554/eLife.57613
+
+
diff -r 000000000000 -r e59c0e930b1f test-data/sample_ovule.h5
Binary file test-data/sample_ovule.h5 has changed
diff -r 000000000000 -r e59c0e930b1f test-data/sample_ovule.tiff
Binary file test-data/sample_ovule.tiff has changed
diff -r 000000000000 -r e59c0e930b1f test-data/sample_ovule_output.h5
Binary file test-data/sample_ovule_output.h5 has changed
diff -r 000000000000 -r e59c0e930b1f tests.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests.xml Wed Jun 26 08:03:08 2024 +0000
@@ -0,0 +1,95 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+