dgs.utils.validation

Utilities for validating recurring data types.

Module Functions

validate_bboxes(bboxes[, length, dims, ...])

Given a torchvision tensor of bounding boxes, validate them and return them as a torchvision-tensor of bounding-boxes.

validate_dimensions(tensor, dims, *_[, length])

Given a tensor, make sure he has the correct number of dimensions.

validate_filepath(file_paths[, length])

Validate the file path.

validate_heatmaps(heatmaps[, length, dims, ...])

Validate a given tensor of heatmaps, whether it has the correct format and shape.

validate_ids(ids[, length])

Validate a given tensor or single integer value.

validate_image(images[, length, dims])

Given one single image or a stacked batch images, validate them and return a torchvision-tensor image.

validate_images(images)

Given one single or multiple images, validate them and return a torchvision-tensor image.

validate_key_points(key_points[, length, ...])

Given a tensor of key points, validate them and return them as torch tensor of the correct shape.

validate_value(value, data, validation)

Check a single value against a given predefined validation, possibly given some additional data.