Skip to content

Commit 54d683c

Browse files
committed
inference tooltips + readme tweaks
1 parent ae4ff74 commit 54d683c

File tree

2 files changed

+36
-9
lines changed

2 files changed

+36
-9
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# napari-cellseg3d
22

3-
[![License](https://img.shields.io/pypi/l/napari-cellseg3d.svg?color=green)](https://github.com/C_Achard/napari-cellseg-annotator/raw/main/LICENSE)
4-
[![PyPI](https://img.shields.io/pypi/v/napari-cellseg3d.svg?color=green)](https://pypi.org/project/napari-cellseg-annotator)
5-
[![Python Version](https://img.shields.io/pypi/pyversions/napari-cellseg3d.svg?color=green)](https://python.org)
6-
[![tests](https://github.com/C_Achard/napari-cellseg3d/workflows/tests/badge.svg)](https://github.com/C_Achard/napari-cellseg-annotator/actions)
7-
[![codecov](https://codecov.io/gh/C_Achard/napari-cellseg3d/branch/main/graph/badge.svg)](https://codecov.io/gh/C_Achard/napari-cellseg-annotator)
8-
[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-cellseg3d)](https://napari-hub.org/plugins/cellseg-annotator-test)
3+
[![License](https://img.shields.io/pypi/l/napari-cellseg-annotator.svg?color=green)](https://github.com/AdaptiveMotorControlLab/CellSeg3d/raw/main/LICENSE)
4+
[![PyPI](https://img.shields.io/pypi/v/napari-cellseg-annotator.svg?color=green)](https://pypi.org/project/napari-cellseg-annotator)
5+
[![Python Version](https://img.shields.io/pypi/pyversions/napari-cellseg-annotator.svg?color=green)](https://python.org)
6+
[![tests](https://github.com/AdaptiveMotorControlLab/CellSeg3d/workflows/tests/badge.svg)](https://github.com/AdaptiveMotorControlLab/CellSeg3d/actions)
7+
[![codecov](https://codecov.io/gh/AdaptiveMotorControlLab/CellSeg3d/branch/main/graph/badge.svg)](https://codecov.io/gh/AdaptiveMotorControlLab/CellSeg3d)
8+
[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-cellseg-annotator)](https://napari-hub.org/plugins/cellseg-annotator-test)
99

1010
napari plugin providing cell segmentation tools : training, inference, review...
1111

napari_cellseg3d/plugin_model_inference.py

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,6 @@ def __init__(self, viewer: "napari.viewer.Viewer"):
118118
######################
119119
# TODO : better way ?
120120
self.segres_size = ui.make_n_spinboxes(min=1, max=1024, default=128)
121-
self.segres_size.setToolTip(
122-
"Image size on which the SegResNet has been trained (default : 128)"
123-
)
124121
self.model_choice.currentIndexChanged.connect(
125122
self.toggle_display_segres_size
126123
)
@@ -234,6 +231,36 @@ def __init__(self, viewer: "napari.viewer.Viewer"):
234231
self.btn_model_path.setVisible(False)
235232
self.lbl_model_path.setVisible(False)
236233

234+
##################
235+
##################
236+
#tooltips
237+
self.view_checkbox.setToolTip("Show results in the napari viewer")
238+
self.display_number_choice.setToolTip("Choose how many results to display once the work is done.\n"
239+
"Maximum is 10 for clarity")
240+
self.show_original_checkbox.setToolTip("Displays the image used for inference in the viewer")
241+
self.segres_size.setToolTip(
242+
"Image size on which the SegResNet has been trained (default : 128)"
243+
)
244+
self.aniso_checkbox.setToolTip("If you have anisotropic data, you can scale data using your resolution in microns")
245+
[w.setToolTip("Resolution in microns") for w in self.aniso_box_widgets]
246+
thresh_desc = "Thresholding : all values in the image below the chosen probability threshold will be set to 0, and all others to 1."
247+
self.thresholding_checkbox.setToolTip(thresh_desc)
248+
self.thresholding_count.setToolTip(thresh_desc)
249+
self.window_infer_box.setToolTip("Sliding window inference runs the model on parts of the image"
250+
"\nrather than the whole image, to reduce memory requirements."
251+
"\nUse this if you have large images.")
252+
self.window_size_choice.setToolTip("Size of the window to run inference with (in pixels)")
253+
self.keep_data_on_cpu_box.setToolTip("If enabled, data will be kept on the RAM rather than the VRAM.\nCan avoid out of memory issues with CUDA")
254+
self.instance_box.setToolTip("Instance segmentation will convert instance (0/1) labels to labels that attempt to assign an unique ID to each cell.")
255+
self.instance_method_choice.setToolTip("Choose which method to use for instance segmentation"
256+
"\nConnected components : all separated objects will be assigned an unique ID. Robust but will not work correctly with adjacent/touching objects\n"
257+
"Watershed : assigns objects ID based on the probability gradient surrounding an object. Requires the model to surround objects in a gradient; can possibly correctly separate unique but touching/adjacent objects.")
258+
self.instance_prob_thresh.setToolTip("All objects below this probability will be ignored (set to 0)")
259+
self.instance_small_object_thresh.setToolTip("Will remove all objects smaller (in volume) than the specified number of pixels")
260+
self.save_stats_to_csv_box.setToolTip("Will save several statistics for each object to a csv in the results folder. Stats include : volume, centroid coordinates, sphericity")
261+
##################
262+
##################
263+
237264
self.build()
238265

239266
def check_ready(self):

0 commit comments

Comments
 (0)