dgs.models.dataset.MOT.MOTImage

class dgs.models.dataset.MOT.MOTImage(*args: Any, **kwargs: Any)[source]

Load a ground-truth- or detection-file in the MOT format.

Params

Optional Params

file_separator (str, optional):

The str or regular expression used to split the lines in the annotation file. Default DEF_VAL["dataset"]["MOT"]["file_separator"].

crop_key (str, optional):

The name of the key in the seqinfo file containing the info for the image crops. Default DEF_VAL["dataset"]["MOT"]["crop_key"].

seqinfo_path (str, optional):

The optional path to the seqinfo.ini file. Default DEF_VAL["dataset"]["MOT"]["seqinfo_path"].

seqinfo_key (str, optional):

The key to use in the seqinfo file. Default DEF_VAL["submission"]["MOT"]["seqinfo_key"].

__init__(config: dict[str, any], path: list[str])[source]

Methods

arbitrary_to_ds(a, idx)

Most of the state is available, now just load the image crops.

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()

Terminate this module and all of its submodules.

transform_crop_resize()

Given one single image, with its corresponding bounding boxes and key-points, obtain a cropped image for every bounding box with localized key-points.

transform_resize_image()

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

device

Get the device of this module.

is_training

Get whether this module is set to training-mode.

module_name

Get the name of the module.

module_type

name

Get the name of the module.

name_safe

Get the escaped name of the module usable in filepaths by replacing spaces and underscores.

precision

Get the (floating point) precision used in multiple parts of this module.

data

Arbitrary data, which will be converted using self.arbitrary_to_ds()

dataset_path

The base path to the dataset.