Label#
- class deeptrack.features.Label(output_shape: int | Callable[[...], int] | None = None, **kwargs: Dict[str, Any])#
Bases:
Feature
Output the properties of this feature.
This feature can be used to extract properties in a feature set and combine them into a numpy array. Specifically, it extracts specified properties from a feature set and combines them into a NumPy array. Optionally, the output array can be reshaped to a specified shape.
Parameters#
- output_shapeOptional[PropertyLike[Tuple[int, …]]], optional
Specifies the desired shape of the output array. If None, the output array will be one-dimensional.
- **kwargsDict[str, Any]
Additional keyword arguments passed to the parent Feature class.
Methods#
- get(image, output_shape=None, **kwargs)
Extracts and combines properties into a NumPy array, reshaping it if output_shape is specified.
Methods Summary
get
(image[, output_shape])Extract and combine properties into a NumPy array.
Methods Documentation
- get(image: Any, output_shape: Tuple[int, ...] | None = None, **kwargs: Dict[str, Any]) ndarray #
Extract and combine properties into a NumPy array.
Parameters#
- imageAny
The input image (not used in this feature).
- output_shapeTuple[int, …], optional
Specifies the desired shape of the output array. If None, the output array will be one-dimensional.
- **kwargsDict[str, Any]
Additional properties passed to the feature.
Returns#
- np.ndarray
The extracted properties combined into a NumPy array. If output_shape is specified, the array is reshaped accordingly.