dgs.models.similarity.pose_similarity.IntersectionOverUnion¶
- class dgs.models.similarity.pose_similarity.IntersectionOverUnion(*args: Any, **kwargs: Any)[source]¶
Use the bounding-box based intersection-over-union as a similarity metric.
Params¶
- __init__(config: dict[str, any], path: list[str])[source]¶
Methods
configure_torch_module
(module[, train])Set compute mode and send model to the device or multiple parallel devices if applicable.
forward
(data, target)Given two states containing bounding-boxes, compute the intersection over union between each pair.
get_data
(ds)Given a
State
obtain the ground-truth bounding-boxes astorchvision.tv_tensors.BoundingBoxes
object of size[N x 4]
.get_target
(ds)Given a
State
obtain the ground-truth bounding-boxes astorchvision.tv_tensors.BoundingBoxes
object of size[T x 4]
.get_train_data
(ds)A custom function to get special data for training purposes.
Terminate this module and all of its submodules.
validate_params
(validations[, attrib_name])Given per key validations, validate this module's parameters.
Attributes
Get the device of this module.
Get whether this module is set to training-mode.
Get the name of the module.
Get the name of the module.
Get the escaped name of the module usable in filepaths by replacing spaces and underscores.
Get the (floating point) precision used in multiple parts of this module.