|
59 | 59 | "properties": { |
60 | 60 | "use_whole_cell_only": { |
61 | 61 | "type": "boolean", |
| 62 | + "default": true, |
62 | 63 | "description": "Use only the whole-cell segmentation to process cells (skip nuclear segmentation).", |
63 | 64 | "fa_icon": "fas fa-stopwatch", |
64 | | - "help_text": "Set this to `true` to use only the whole-cell segmentation to process cells. This will skip segmentation of nuclei and associated measurements but retains cell, erosion, and expansion measurements." |
| 65 | + "help_text": "Defaults to `true`: only the whole-cell segmentation is used to process cells. Nuclei are not segmented and nuclear measurements are not produced; cell, erosion, and expansion measurements are kept. Set to `false` to also segment nuclei and measure them." |
65 | 66 | } |
66 | 67 | } |
67 | 68 | }, |
|
164 | 165 | "properties": { |
165 | 166 | "cellpose_tile_norm_blocksize": { |
166 | 167 | "type": "integer", |
| 168 | + "hidden": true, |
167 | 169 | "minimum": 0, |
168 | 170 | "description": "Block size in pixels for Cellpose's tile-local intensity normalisation. 0 uses Cellpose's whole-patch default.", |
169 | 171 | "help_text": "Segmentation always runs on patches, and normalisation is computed from the patch, so without this a cell's segmentation depends on what else landed in its patch and changing `--patch_width_pixel` changes results. Patch overlap does not help: it resolves cells straddling a boundary, not differing normalisation.\n\nThis is forwarded as `--method-kwargs '{\"normalize\": {\"tile_norm_blocksize\": N, \"percentile\": [1.0, 99.0]}}'`, which sopa passes into `model.eval`, making the percentile statistics local to each block rather than global to the patch.\n\nChoose a block that comfortably contains many nuclei. At COMET's 0.28 um/px with `--cellpose_diameter 30` (8.4 um cells), 512 px is 143 um, about 17 nuclear diameters. Small blocks are actively harmful: a 128 px (36 um) block spans roughly 4 cell diameters, so in sparse tissue it can contain no nuclei at all and its noise is stretched to the full range. Cellpose only guards a flat block when its 1-99 percentile range falls below 1e-3, which such blocks exceed.\n\nNote this does not normalise across the whole image -- nothing in the patch-parallel design ever sees it.", |
170 | 172 | "fa_icon": "fas fa-th" |
171 | 173 | }, |
172 | 174 | "cellpose_clip_limit": { |
173 | 175 | "type": "number", |
| 176 | + "hidden": true, |
174 | 177 | "minimum": 0, |
175 | 178 | "description": "sopa's CLAHE clip limit, applied before Cellpose. Defaults to 0 in this pipeline, disabling CLAHE; null restores sopa's default of 0.2.", |
176 | 179 | "help_text": "sopa runs `skimage.exposure.equalize_adapthist` on each patch before Cellpose sees it. This is sopa's addition, not part of Cellpose -- Cellpose contains no CLAHE code, and its released weights were trained on percentile-normalised input, so this preprocessing is off that contract.\n\nSetting 0 disables CLAHE. Worth testing: CLAHE is the largest single source of patch-dependence in this stack, and on an all-zero patch it expands the image to the full range, which defeats Cellpose's own empty-patch guard.", |
177 | 180 | "fa_icon": "fas fa-adjust" |
178 | 181 | }, |
179 | 182 | "cellpose_clahe_kernel_size": { |
180 | 183 | "type": "integer", |
| 184 | + "hidden": true, |
181 | 185 | "minimum": 1, |
182 | 186 | "description": "Kernel size in pixels for sopa's CLAHE. Unset uses skimage's default of patch.shape // 8, which scales with patch_width_pixel.", |
183 | 187 | "help_text": "Left unset, skimage derives the kernel from the patch: 1/8 of its height and width. The contrast-enhancement length scale therefore moves with `--patch_width_pixel` -- 187 px (52 um) at 1500, 375 px (105 um) at 3000, 750 px (210 um) at 6000 -- so the same tissue is enhanced differently purely because of a patching knob.\n\nPinning an absolute value removes that coupling. cellSAM, which also CLAHEs each block, fixes its kernel at 128 px rather than deriving it from the block size.\n\nHas no effect while `--cellpose_clip_limit` is 0.", |
184 | 188 | "fa_icon": "fas fa-ruler-combined" |
185 | 189 | }, |
186 | 190 | "cellpose_gaussian_sigma": { |
187 | 191 | "type": "number", |
| 192 | + "hidden": true, |
188 | 193 | "minimum": 0, |
189 | 194 | "description": "Sigma for sopa's gaussian smoothing, applied before Cellpose. Defaults to 0 in this pipeline, disabling it; null restores sopa's default of 1.", |
190 | 195 | "help_text": "Like CLAHE, this is sopa's addition rather than Cellpose's: Cellpose's own smoothing and sharpening parameters (`smooth_radius`, `sharpen_radius`) both default to 0, and it applies neither unless asked.\n\nUnlike CLAHE this is not a source of patch dependence, since a small-sigma convolution is local and only edge reflection differs between patch layouts. Disabling it is therefore about matching Cellpose's preprocessing contract, not about stability. Raise it if your data is noisy enough to need denoising before segmentation.", |
|
556 | 561 | "properties": { |
557 | 562 | "smooth_masks": { |
558 | 563 | "type": "boolean", |
| 564 | + "hidden": true, |
559 | 565 | "description": "Enable mask smoothing before cell measurement.", |
560 | 566 | "fa_icon": "fas fa-wave-square", |
561 | 567 | "help_text": "When enabled, segmentation masks are smoothed to reduce polygon complexity before being passed to cellmeasurement. Choose the method with smooth_method." |
562 | 568 | }, |
563 | 569 | "smooth_method": { |
564 | 570 | "type": "string", |
| 571 | + "hidden": true, |
565 | 572 | "default": "morphological", |
566 | 573 | "description": "Smoothing algorithm: 'morphological' (disk close+open) or 'shapely' (Douglas-Peucker polygon simplification).", |
567 | 574 | "fa_icon": "fas fa-cogs", |
|
570 | 577 | }, |
571 | 578 | "smooth_kernel_size": { |
572 | 579 | "type": "integer", |
| 580 | + "hidden": true, |
573 | 581 | "default": 2, |
574 | 582 | "minimum": 1, |
575 | 583 | "maximum": 10, |
|
579 | 587 | }, |
580 | 588 | "smooth_n_workers": { |
581 | 589 | "type": "integer", |
| 590 | + "hidden": true, |
582 | 591 | "default": 8, |
583 | 592 | "minimum": 1, |
584 | 593 | "maximum": 64, |
|
588 | 597 | }, |
589 | 598 | "smooth_chunksize": { |
590 | 599 | "type": "integer", |
| 600 | + "hidden": true, |
591 | 601 | "default": 200, |
592 | 602 | "minimum": 1, |
593 | 603 | "maximum": 10000, |
|
597 | 607 | }, |
598 | 608 | "smooth_tolerance": { |
599 | 609 | "type": "number", |
| 610 | + "hidden": true, |
600 | 611 | "default": 1, |
601 | 612 | "minimum": 0.01, |
602 | 613 | "description": "[shapely] Douglas-Peucker simplification tolerance in pixels.", |
|
605 | 616 | }, |
606 | 617 | "smooth_min_area": { |
607 | 618 | "type": "number", |
| 619 | + "hidden": true, |
608 | 620 | "default": 0, |
609 | 621 | "minimum": 0, |
610 | 622 | "description": "[shapely] Minimum polygon area in pixels\u00b2 to retain after simplification.", |
|
0 commit comments