Reducer#
- class deeptrack.statistics.Reducer(function, feature=None, distributed=True, **kwargs)#
Bases:
Feature
Base class of features that reduce the dimensionality of the input.
Parameters#
- functionCallable
The function used to reduce the input
- featureFeature, optional
If not None, the output of this feature is used as the input.
- distributedboolean
Whether to apply the reducer to each image in the input list individually.
- axisint, tuple of int
The axis / axes to reduce over
- keepdimsboolean
Whether to keep the singleton dimensions after reducing or squeeze them.
Methods Summary
get
(image, axis[, keepdims])Transform an image [abstract method].
Methods Documentation
- get(image, axis, keepdims=None, **kwargs)#
Transform an image [abstract method].
Abstract method that defines how the feature transforms the input. The current value of all properties will be passed as keyword arguments.
Parameters#
- image‘Image’ or List[‘Image’]
The Image or list of images to transform.
- **kwargsDict[str, Any]
The current value of all properties in properties as well as any global arguments.
Returns#
- ‘Image’ or List[‘Image’]
The transformed image or list of images.
Raises#
- NotImplementedError
Must be overridden by subclasses.