for other purposes: color balance, enhancement, filtering, inpainting, ... Extract information from them: classification, measurements... a) flltering b) feature extraction c) segmentation d) measures non-local means denoising total variation denoising blob detection super-pixels skeleton & local diameter particle properties segmentation from markers ridge detection
architecture (GPU) constraints But a great tool for pre-processing: intensity and size normalization, data augmentation, ... post-processing: instance segmentation, measures...
architecture (GPU) constraints But a great tool for pre-processing: intensity and size normalization, data augmentation, ... post-processing: instance segmentation, measures... No bleeding-edge algorithm mature well-established algorithms, limit API size
filters , measure >>> im = io.imread(’image_file.png’) >>> im.shape # 2-D array (512 , 512) >>> threshold = filters. threshold_otsu (im) # float >>> im_binary = im < threshold # numpy mask >>> labels = measure.label(im_binary) >>> type(im), type(labels) # images are numpy arrays (<type ’numpy.ndarray ’>, <type ’numpy.ndarray ’>) >>> labels [0, 0] # pixels are array elements 0 x Also works with 3-D images Most functions work for 2D & 3D Images are NumPy arrays Pixels are array elements Simple API relying on functions new = function(image) Optional parameters: keyword arguments
use GPUs, Spark, etc. scikit-image uses NumPy! Roadmap: experiment with numba, Pythran Divide into blocks: use util.view as blocks to iterate conveniently over blocks Parallel processing: use joblib.Parallel or dask (da.map overlap) Better integration desirable (border effects) experimental apply parallel function
memory = Memory ( cachedir=’ . / c a c h e d i r ’ , verbose=0) @memory . cache def mem_label ( x ) : r e t u r n measure . label ( x ) @memory . cache def mem_threshold_otsu ( x ) : r e t u r n filters . threshold_otsu ( x ) [ . . . ] val = mem_threshold_otsu ( dat ) objects = dat > val median_dat = mem_median_filter ( dat , 3) val2 = mem_threshold_otsu ( median_dat [ objects ] ) liquid = median_dat > val2 segmentation_result = np . copy ( objects ) . astype ( np . uint8 ) segmentation_result [ liquid ] = 2 aggregates = mem_binary_fill_holes ( objects ) cores = mem_binary_erosion ( aggregates , np . ones ((10 , 10 , ← 10) ) )
and selections DashCanvas ( i d=’ canvas−c o l o r ’ , lineWidth=5, filename=” image . jpg ” , hide_buttons=[ ’ zoom ’ ,← ’ pan ’ ] , ) Functions to transform annota- tions (eg to Numpy arrays used by skimage) from dash_canvas import ← utils
callbacks e.g. load annotation geometry Annotations triggering callbacks (click, release, hover... 3-D images and timeseries Richer annotations & visualizations More examples for the gallery itk-snap
callbacks e.g. load annotation geometry Annotations triggering callbacks (click, release, hover... 3-D images and timeseries Richer annotations & visualizations More examples for the gallery Thank you! Feedback very welcome Be in touch @EGouillart itk-snap