cellmap_flow.portable.calls
What the browser calls: the functions web/src/backend/routes/rank.ts
runs through chunkmirage’s Engine.call("cellmap_flow.portable.calls:<name>",
args, arrays) (chunkmirage.calls says the shape: fn(args, arrays),
args the JSON arguments, arrays the bytes sent beside them, in order;
a JSON value, bytes, or a pair of JSON and arrays back). Each decodes its
arrays, calls the maths in rank.py, carry.py or activation.py
and encodes the answer; the maths is not here. The workers take turns, so what a call needs
from the one before (the rank’s tallies) travels in its JSON.
Functions
|
One painted chunk added to a model's tallies ( |
|
The score of |
|
|
|
|
|
|
|
|
|
|
|
|
|
The old volume's paint carried onto the new grid ( |
Module Contents
- cellmap_flow.portable.calls.rank_tally(args, arrays)
One painted chunk added to a model’s tallies (
rank.tally).args:tallies(the ones so far, as this answered them; null for fresh ones),shape(z, y, x),channels,labels_dtypeandaffinity;arrays: the chunk’s labels (z, y, x), then its target, mask and the model’s logits (each C, z, y, x float32, the logits NaN where not read). Answers the tallies.
- cellmap_flow.portable.calls.rank_score(args, arrays)
The score of
tallies(rank.rank_score) forchannels, anaffinitymodel’s or not; null when nothing was counted.
- cellmap_flow.portable.calls.windowed(args, arrays)
rank.windowed:normwith its MinMaxNormalizer set to the raw’s window [lo,hi], or null.
- cellmap_flow.portable.calls.norm_tries(args, arrays)
rank.norm_tries: the input normalizations a model is scored through, fromown(its declaration,own_from) andsession.
- cellmap_flow.portable.calls.best_try(args, arrays)
rank.best_try: the index of the best ofscores, or null.
- cellmap_flow.portable.calls.needed_postprocess(args, arrays)
rank.needed_postprocess: the postprocessing a model ofoutput_classneeds instead ofpostprocessto show a good prediction, with a ThresholdPostprocessor atthreshold(a probability) when that is given, or null.
- cellmap_flow.portable.calls.output_activation(args, arrays)
activation.output_activation: the output activation of a served model’s graph,nodes(each{"op", "inputs", "outputs"}, a clip’sminandmaxwhere read) read back from its valueoutput, as{"output_class", "op"}; null when the graph does not say.
- cellmap_flow.portable.calls.rank_row(args, arrays)
rank.score_row: the ranking’s row frombase(the score read throughnorm, which came fromnorm_from),stretched(the score read throughnormstretched toraw, or null),raw(the raw’s window, or null) andothers(what the other normalizations tried matched); null whenbaseis null.
- cellmap_flow.portable.calls.carry_paint(args, arrays)
The old volume’s paint carried onto the new grid (
carry.carry).args:oldandnew(each aGrid’s fields),old_dtype,new_dtypeandindices, the old painted chunks’;arrays: those chunks’ labels, whole, in that order. Answers the counts withindices, the new chunks’ in the order of the arrays beside them, each a whole chunk to write where it is not 0.