dgs.models.dataset.dataset.BBoxDataset¶
- class dgs.models.dataset.dataset.BBoxDataset(*args: Any, **kwargs: Any)[source]¶
A dataset using the bounding boxes as indices. See
BaseDataset
for more information.- __init__(config: dict[str, any], path: list[str]) None ¶
Methods
arbitrary_to_ds
(a, idx)Given a single bounding box (ID) and other arbitrary data, convert everything to a
State
object.configure_torch_module
(module[, train])Set compute mode and send model to the device or multiple parallel devices if applicable.
get_image_crops
(ds)Add the image crops and local key-points to a given state.
get_path_in_dataset
(path)Given an arbitrary file- or directory-path, return its absolute path.
Terminate this module and all of its submodules.
Given one single image, with its corresponding bounding boxes and key-points, obtain a cropped image for every bounding box with localized key-points.
Given an image, bboxes, and key-points, resize them with custom modes.
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.
Arbitrary data, which will be converted using
self.arbitrary_to_ds()
The base path to the dataset.