def __init__(self, transforms, img_scale, pts_scale_ratio, flip=False, flip_direction='horizontal', pcd_horizontal_flip=False, pcd_vertical_flip=False):
    self.transforms = Compose(transforms)
    self.img_scale = (img_scale if isinstance(img_scale, list) else [img_scale])
    self.pts_scale_ratio = (pts_scale_ratio if isinstance(pts_scale_ratio, list) else [float(pts_scale_ratio)])
    assert mmcv.is_list_of(self.img_scale, tuple)
    assert mmcv.is_list_of(self.pts_scale_ratio, float)
    self.flip = flip
    self.pcd_horizontal_flip = pcd_horizontal_flip
    self.pcd_vertical_flip = pcd_vertical_flip
    self.flip_direction = (flip_direction if isinstance(flip_direction, list) else [flip_direction])
    assert mmcv.is_list_of(self.flip_direction, str)
    if ((not self.flip) and (self.flip_direction != ['horizontal'])):
        warnings.warn('flip_direction has no effect when flip is set to False')
    if (self.flip and (not any([((t['type'] == 'RandomFlip3D') or (t['type'] == 'RandomFlip')) for t in transforms]))):
        warnings.warn('flip has no effect when RandomFlip is not in transforms')
def __init__(self, transforms, img_scale, pts_scale_ratio, flip=False, flip_direction='horizontal', pcd_horizontal_flip=False, pcd_vertical_flip=False):
    self.transforms = Compose(transforms)
    self.img_scale = (img_scale if isinstance(img_scale, list) else [img_scale])
    self.pts_scale_ratio = (pts_scale_ratio if isinstance(pts_scale_ratio, list) else [float(pts_scale_ratio)])
    assert mmcv.is_list_of(self.img_scale, tuple)
    assert mmcv.is_list_of(self.pts_scale_ratio, float)
    self.flip = flip
    self.pcd_horizontal_flip = pcd_horizontal_flip
    self.pcd_vertical_flip = pcd_vertical_flip
    self.flip_direction = (flip_direction if isinstance(flip_direction, list) else [flip_direction])
    assert mmcv.is_list_of(self.flip_direction, str)
    if ((not self.flip) and (self.flip_direction != ['horizontal'])):
        warnings.warn('flip_direction has no effect when flip is set to False')
    if (self.flip and (not any([((t['type'] == 'RandomFlip3D') or (t['type'] == 'RandomFlip')) for t in transforms]))):
        warnings.warn('flip has no effect when RandomFlip is not in transforms')