Bind#

class deeptrack.features.Bind(feature: Feature, **kwargs: Dict[str, Any])#

Bases: StructuralFeature

Bind a feature with property arguments.

When the feature is resolved, the kwarg arguments are passed to the child feature. Thus, this feature allows passing additional keyword arguments (kwargs) to a child feature when it is resolved. These properties can dynamically control the behavior of the child feature.

Parameters#

featureFeature

The child feature

**kwargsDict[str, Any]

Properties to send to child

Example#

Dynamically modify the behavior of a feature:

>>> import deeptrack as dt
>>> gaussian_noise = dt.GaussianNoise()
>>> bound_feature = dt.Bind(gaussian_noise, sigma=5)
>>> output_image = bound_feature.resolve(input_image)

In this example, the sigma parameter is dynamically set to 5 when resolving the gaussian_noise feature.

Methods Summary

get(image, **kwargs)

Resolve the child feature with the dynamically provided arguments.

Methods Documentation

get(image: Any, **kwargs: Dict[str, Any]) Any#

Resolve the child feature with the dynamically provided arguments.

Parameters#

imageAny

The input data or image to process.

**kwargsDict[str, Any]

Properties or arguments to pass to the child feature during resolution.

Returns#

Any

The result of resolving the child feature with the provided arguments.