fastface.transforms

class fastface.transforms.Interpolate(target_size: int = 640)

Interpolates the image and boxes using target size

class fastface.transforms.ConditionalInterpolate(max_size: int = 640)

Interpolates the image and boxes if image height or width exceed given maximum size

class fastface.transforms.Padding(target_size: Tuple[int, int] = (640, 640), pad_value: int = 0)

Applies padding to image and target boxes

class fastface.transforms.FaceDiscarder(min_face_size: int = 0, max_face_size: int = inf)

Discard face boxes using min and max scale

class fastface.transforms.Rotate(degree: float = 0)

Rotates the image and boxes clockwise using given degree

class fastface.transforms.RandomGaussianBlur(p: float = 0.5, kernel_size: int = 15, sigma: float = 5)

Applies gaussian blur to the image with a probability of p

class fastface.transforms.ColorJitter(p: float = 0.5, brightness: float = 0, contrast: float = 0, saturation: float = 0)

Jitters the color of the image with randomly selected values

class fastface.transforms.LFFDRandomSample(scales: List[Tuple[int, int]], target_size: Tuple[int, int] = (640, 640), p: float = 0.5)

Applies augmantation defined in the LFFD paper

class fastface.transforms.RandomRotate(p: float = 0.5, degree_range: float = 0)

Rotates the image and boxes clockwise with randomly selected value

class fastface.transforms.RandomHorizontalFlip(p: float = 0.5)

Applies random horizontal flip for the image and updated boxes

class fastface.transforms.Compose(*transforms)

Compose given transforms