BindUpdate#
- class deeptrack.features.BindUpdate(feature: Feature, **kwargs: Any)#
Bases:
StructuralFeatureBind a feature with certain arguments.
Deprecated since version 2.0: This feature is deprecated and may be removed in a future release. It is recommended to use Bind instead for equivalent functionality. Further, the current implementation is not guaranteed to be exactly equivalent to prior implementations.
This feature binds a child feature with specific properties (kwargs) that are passed to it when it is updated. It is similar to the Bind feature but is marked as deprecated in favor of Bind.
Parameters#
- feature: Feature
The child feature to bind with specific arguments.
- **kwargs: Any
Properties to send to the child feature during updates.
Methods#
- get(inputs, **kwargs) -> Any
It resolves the child feature with the provided arguments.
Examples#
>>> import deeptrack as dt
Start by creating a Gaussian feature:
>>> gaussian_noise = dt.Gaussian()
Dynamically modify the behavior of the feature using BindUpdate:
>>> bound_feature = dt.BindUpdate(gaussian_noise, mu = 5, sigma=3)
>>> import numpy as np >>> >>> input_image = np.zeros((512, 512)) >>> output_image = bound_feature.resolve(input_image) >>> round(np.mean(output_image), 1), round(np.std(output_image), 1) (5.0, 3.0)
Methods Summary
get(inputs, **kwargs)Resolve the child feature with the provided arguments.
Methods Documentation
- get(inputs: Any, **kwargs: Any) Any#
Resolve the child feature with the provided arguments.
Parameters#
- inputs: Any
The input data to process.
- **kwargs: 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.