florin.classification¶
Utilities for classifying connected components.
Classes¶
- FlorinClassifier
- Classification unit for weak object grouping.
Functions¶
- classify
- Classify a segmented object.
Functions
classify (obj, \*classes) |
Multiclass classificaiton based on human-tuned boundaries. |
Classes
FlorinClassifier (label, **kwargs) |
Classify connected components based on boundary conditions. |
-
class
florin.classification.
FlorinClassifier
(label, **kwargs)[source]¶ Classify connected components based on boundary conditions.
Parameters: - label – The class label identifying this class. Can be any arbitrary label.
- boundaries – Pairs of values (2-tuples) passed as keyword arguments defining the
boundaries to classify along. For example, passing
area=(5, 10)
tells this class that the objects it contains have an area/volume of 5 <= obj.area <= 10.
Methods
classify
(self, obj)Determine if an object is in this class. -
classify
(self, obj)[source]¶ Determine if an object is in this class.
Parameters: obj (skimage.measure._regionprops.RegionProperties) – The object to classify. Returns: True if the object is within all defined boundaries else False. If no boundaries were provided, return True (e.g., the default class). Return type: bool
-
florin.classification.
classify
(obj, *classes)[source]¶ Multiclass classificaiton based on human-tuned boundaries.
Parameters: - obj (skimage.measure._regionprops.RegionProperties) – The object to classify.
- classes (florin.classify.FlorinClassifiers) – The classes to select from.
Returns: Updates
obj
with a class label (obj.class_label
) and passes it on for further processing.Return type: obj
Notes
In a typical FLoRIN pipeline, florin.reconstruct() will be called immediately after florin.classify().