Pool#
- class deeptrack.math.Pool(pooling_function: Callable, ksize: int | Callable[[...], int] = 3, **kwargs)#
Bases:
Feature
Downsamples the image by applying a function to local regions of the image.
Parameters#
- pooling_functionfunction
A function that is applied to each local region of the image. DOES NOT NEED TO BE WRAPPED IN A ANOTHER FUNCTIOn. Must implement the axis argument. Examples include np.mean, np.max, np.min, etc.
- ksizeint
Size of the pooling kernel.
- cvalnumber
Value to pad edges with if necessary.
- func_kwargsdict
Additional parameters sent to the pooling function.
Methods Summary
get
(image, ksize, **kwargs)Transform an image [abstract method].
Methods Documentation
- get(image, ksize, **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.