fmi-faim / faim-wako-searchfirst Goto Github PK
View Code? Open in Web Editor NEWPython scripts for the SearchFirst option in Wako Software Suite
License: MIT License
Python scripts for the SearchFirst option in Wako Software Suite
License: MIT License
Similar to these parameters in previous ImageJ macros:
// Define box in which for objects should be searched
bBx = 30; //x size of FOV is 2560 (for CV7000), 2000 (for CV8000)
bBy = 30; //y size of the FOV is 2160 (for CV7000), 2000 (for CV8000)
width = 2500;
height = 2100;
... we should implement these config parameters:
bounding-box:
min_x: 0
min_y: 0
max_x: 2000
max_y: 2000
This could potentially replace our usage of typer:
When removing points of overlapping labels, we currently only remove the conflicting points themselves (of the label with the smaller area).
Instead, we should remove all points of the smaller object.
A simple parallelization of the for
loop over all .tif
files should go a long way:
with ThreadPoolExecutor(max_workers=num_threads) as executor:
results = list(tqdm(executor.map(process_tif, tif_files), total=len(tif_files)))
An optional "pre-processing" step could be processing the list of files with an external command, e.g. a Fiji script called from the command line. This allows running an arbitrary segmentation while still using the filter
and sample
functionality of this repository.
The best entry point is probably the source folder (as it's a single parameter), but also the list of files would be possible.
Use case:
_process_tif
, with an option to skip the segment
step (i.e. only run label
).filter
and sample
as usual.Add new function segment.apply_weka_classifier()
that takes a classifier.model
file and applies it using pyimagej
and trainableSegmentation
.
/cc @SabineReither
segmentation:
threshold: 128
include_holes: yes
min_size: 10
min_size: 99999999999
min_eccentricity: 0.0
max_eccentricity: 0.9
Add new function segment.apoc_classifier()
that takes a my_model.cl
file and applies it using https://github.com/haesleinhuepf/apoc.
When acquiring objects that vary a lot in size (e.g., small objects fit in a single field of view, large objects require 3x2 tiles in second pass acquisition), we'd like to have a sampling that records:
@nrepina what should be the behavior if two objects are close to each other? If we just sample per-object, we have the possibility of overlap (and therefore bleaching) between tiles belonging to two different objects.
I would be nice if we can keep the run script general, and have full flexibility in defining the processing via the config file.
steps:
- segment: cellpose
- filter: # all functions should accept 'labels' and change inplace (and an optional other_channel argument?)
- bounding_box
- object_size
- sample: grid
cellpose:
- model: /path/to/model
- diameter: 50.0
- cellprob_threshold: 0.0
- flow_threshold: 0.4
bounding_box:
- min_x: 0
- min_y: 0
- max_x: 2000
- max_y: 2000
object_size:
- min_size: 100
The items in steps
should correspond to functions in the faim_wako_searchfirst.segment
, faim_wako_searchfirst.filter
and faim_wako_searchfirst.sample
modules, respectively.
In addition to steps
, each function's arguments are listed under the function name. (This entry should be optional if the function requires no additional arguments.)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.