cellmap_flow.portable.volume_calls
What the browser calls to plan an annotation volume and its good regions,
and to tell whether a model trains on the session’s volume as it is: the
functions web/src/finetune/volume.ts, web/src/finetune/good-regions.ts,
web/src/finetune/run.ts and web/src/backend/routes/finetune.ts’s
submit run through chunkmirage’s
Engine.call("cellmap_flow.portable.volume_calls:<name>", args, arrays)
(calls.py says the shape). Each takes plain numbers in its JSON and
answers JSON; the rules are volume.py’s and regions.py’s, which the
server calls in its process. A refusal (a ValueError of those rules) is
answered as {"error": <its sentence>}, so the page shows the sentence the
server’s route would, not a Python traceback.
Functions
|
|
|
|
|
|
|
|
|
Training's submit with a model whose grid is not the session |
|
The region a mark makes ( |
|
The good_regions layer's boxes of |
|
|
Module Contents
- cellmap_flow.portable.volume_calls.plan_volume(args, arrays)
volume.plan_volumeoflevel(shape,voxel,corner: the raw level the model reads) andmodel(its voxel sizes and its blocks, asblock_shapestakes them), withdtype, the labels’ (volume.annotation_dtypeofoutput_type, what the model trains on).
- cellmap_flow.portable.volume_calls.plan_paint_volume(args, arrays)
volume.plan_paint_volumeoflevel(shape,voxel,corner: the raw level read at the voxel size) andvoxel_size(nm, z, y, x), a volume painted before any model, withdtypeuint8: its labels are background and objects, which a model’s volume they are carried to holds in its own dtype.
- cellmap_flow.portable.volume_calls.shown_level(args, arrays)
{"index": volume.shown_level(voxel_sizes, pixel_nm)}: which of the raw’s levels (voxel_sizes, nm, finest first) the viewer shows at a screen pixel ofpixel_nm(null: not known, the finest), the default voxel size of a volume painted before any model.
- cellmap_flow.portable.volume_calls.training_refusal(args, arrays)
{"error": <the sentence>}whenvolume(its record) is not trained on (volume.training_refusal: a paint-first volume), else{}.
- cellmap_flow.portable.volume_calls.carry_note(args, arrays)
Training’s submit with a model whose grid is not the session volume’s:
{"note": volume.carried_note(...)}whento(the volume planned for the model to train) is on another grid thanfrom(the session’s volume, its paint’s), each a volume as the browser keeps it, andkeptwhere the old one is kept;{}when they are on one grid (volume.same_grid), and the model trains on the volume as it is.
- cellmap_flow.portable.volume_calls.mark_region(args, arrays)
The region a mark makes (
regions.new_region): a box of the sizesize_nmasks for (regions.region_size_nm, the volume’s output block by default:volumehas itschunk_sizeandoutput_voxel_size, or is null) centred oncentre_nm, labelledlabelor after theregionsalready stored. Answers the region, andboxes, the layer’s boxes of the stored regions and it (region_boxes).
- cellmap_flow.portable.volume_calls.region_boxes(args, arrays)
The good_regions layer’s boxes of
regions: per entry itsoffset_nm,shape_nmandlabel, or null for one that is not a region (regions.region_box_nm), so the layer’s ids stay the entries’ indices.
- cellmap_flow.portable.volume_calls.anchor_boxes(args, arrays)
regions.anchor_boxesofregionson the grid ofvolume(itsdataset_offset_nm,output_voxel_size,dataset_shape_voxelsandchunk_size, the model’s output block): the boxes, and the entries skipped, each by its index inregions.