detrium.data.transforms.mosaic

DEIM: DETR with Improved Matching for Fast Convergence Copyright (c) 2024 The DEIM Authors. All Rights Reserved.

class Mosaic(T.Transform)

Applies Mosaic augmentation to a batch of images. Combines four randomly selected images into a single composite image with randomized transformations.

名称类型默认值
output_size—320
max_size—None
rotation_range—0
translation_range—(0.1, 0.1)
scaling_range—(0.5, 1.5)
probability—1.0
fill_value—114
use_cache—True
max_cached_images—50
random_pop—True
load_samples_from_dataset(self, image, target, dataset)

Loads and resizes a set of images and their corresponding targets.

名称类型默认值
image——
target——
dataset——
create_mosaic_from_dataset(self, images, targets, max_height, max_width)

Creates a mosaic image by combining multiple images.

名称类型默认值
images——
targets——
max_height——
max_width——
forward(self, *inputs)

Args: inputs (tuple): Input tuple containing (image, target, dataset). Returns: tuple: Augmented (image, target, dataset).

名称类型默认值
inputs——