ACE Segmentation Function
Cutting edge vision transformer and CNN-based DL architectures trained on very large LSFM datasets to map cFos brain-wide.
CLI
To look at the arguments that need to be provided to the function, invoke the help menu using:
$ miracl seg ace -h
The following menu will be printed to the terminal:
usage: miracl ace [-h] -sai SA_INPUT_FOLDER -sao SA_OUTPUT_FOLDER -sam
{unet,unetr,ensemble} [-sas height width depth]
[-sar X-res Y-res Z-res] [-saw SA_NR_WORKERS]
[-sac SA_CACHE_RATE] [-sasw SA_SW_BATCH_SIZE] [-samc] [-sav]
[-sau]
AI-based Cartography of Ensembles (ACE) segmentation method
optional arguments:
-h, --help show this help message and exit
-sai SA_INPUT_FOLDER, --sa_input_folder SA_INPUT_FOLDER
path to raw tif/tiff data folder
-sao SA_OUTPUT_FOLDER, --sa_output_folder SA_OUTPUT_FOLDER
path to output file folder
-sam {unet,unetr,ensemble}, --sa_model_type {unet,unetr,ensemble}
model architecture
-sas height width depth, --sa_image_size height width depth
image size (type: int; default: fetched from image
header)
-sar X-res Y-res Z-res, --sa_resolution X-res Y-res Z-res
voxel size (type: _validate_vox_res)
-saw SA_NR_WORKERS, --sa_nr_workers SA_NR_WORKERS
number of cpu cores deployed to pre-process image
patches in parallel (type: int; default: 4)
-sac SA_CACHE_RATE, --sa_cache_rate SA_CACHE_RATE
percentage of raw data that is loaded into cpu during
segmentation (type: float; default: 0.0)
-sasw SA_SW_BATCH_SIZE, --sa_sw_batch_size SA_SW_BATCH_SIZE
number of image patches being processed by the model
in parallel on gpu (type: int; default: 4)
-samc, --sa_monte_dropout
use Monte Carlo dropout (default: False)
-sav, --sa_visualize_results
visualizing model output after predictions (default:
False)
-sau, --sa_uncertainty_map
enable map (default: False)
Flag |
Parameter |
Type |
Description |
Default |
---|---|---|---|---|
-sai, --sa_input_folder |
SA_INPUT_FOLDER |
|
path to raw tif/tiff data folder |
|
-sao, --sa_output_folder |
SA_OUTPUT_FOLDER |
|
path to output file folder |
|
-sam, --sa_model_type |
{unet,unetr,ensemble} |
|
model architecture |
|
-sas, --sa_image_size |
height width depth |
|
image size; provided as three arguments |
|
-sar, --sa_resolution |
X-res Y-res Z-res |
|
voxel resolution; provided as three arguments |
|
-saw, --sa_nr_workers |
SA_NR_WORKERS |
|
number of cpu cores deployed to pre-process image patches in parallel |
|
-sac, --sa_cache_rate |
SA_CACHE_RATE |
|
percentage of raw data that is loaded into cpu during segmentation |
|
-sasw,--sa_sw_batch_size |
SA_SW_BATCH_SIZE |
|
number of image patches being processed by the model in parallel on gpu |
|
-samc,--sa_monte_dropout |
True/False |
|
use Monte Carlo dropout |
|
-sav, --sa_visualize_results |
True/False |
|
visualizing model output after predictions |
|
-sau, --sa_uncertainty_map |
True/False |
|
enable map |
|
Note
The -sa
in the flag part stands for segmentation ACE
.
Example usage:
$ miracl seg ace \
-sai ./walking/subject_01/cells/ \
-sao ./output_dir \
-sam unet