acia.segm.processor.online#
Processors to apply remote models for segmentation
- class acia.segm.processor.online.OnlineModel[source]#
Bases:
ProcessorThe model is not running locally on the computer but in a remote location
- __init__(url, username=None, password=None, timeout=30)[source]#
url: remote model executer (can also contain a port definition) username: username password: password
- Parameters:
url (str)
- predict(source, params=None)[source]#
- Parameters:
source (ImageSequenceSource)
- class acia.segm.processor.online.ModelDescriptor[source]#
Bases:
objectDescribing all parameters to run a segmentation model from a git repository
- acia.segm.processor.online.batch(iterable, size)[source]#
Make iterable over packages of a certain size
- Parameters:
iterable (_type_) – source iterable
size (_type_) – size of the batches
- Yields:
_type_ – iterable over individual batches
- class acia.segm.processor.online.FlexibleOnlineModel[source]#
Bases:
ProcessorThe model is not running locally on the computer but in a remote location
- __init__(executorUrl, modelDesc, timeout=600, batch_size=1)[source]#
- Parameters:
executorUrl (str)
modelDesc (ModelDescriptor)
- predict(source, params=None)[source]#
- Parameters:
source (ImageSequenceSource)
- predict_batch(frame_ids, images, params)[source]#
Predict segmentation for a batch of frames
- Parameters:
- Raises:
ValueError – [description]
- Returns:
[Overlay] – An overlay containing the segmentation information for the images
- Return type: