Beispiel #1
0
 def __init__(self, args, addnoise=True):
     super(RandomAffineFlow, self).__init__()
     self._args = args
     self._interp2 = Interp2(clamp=False)
     self._flow_interp2 = Interp2(clamp=False)
     self._meshgrid = Meshgrid()
     self._identity = _IdentityParams()
     self._random_mirror = RandomMirror()
     self._addnoise = addnoise
     self.register_buffer("_noise1", torch.FloatTensor())
     self.register_buffer("_noise2", torch.FloatTensor())
     self.register_buffer("_xbounds", torch.FloatTensor([-1, -1, 1, 1]))
     self.register_buffer("_ybounds", torch.FloatTensor([-1, 1, -1, 1]))
Beispiel #2
0
    def __init__(self, args, addnoise=True, crop=None):
        super(RandomAffineFlowOccKITTI, self).__init__()
        self._args = args
        self._interp2 = Interp2(clamp=False)
        self._flow_interp2 = Interp2MaskBinary(clamp=False)
        self._meshgrid = Meshgrid()
        self._identity = _IdentityParams()
        self._random_mirror = RandomMirror(vertical=False)
        self._addnoise = addnoise
        self._crop = crop

        self.register_buffer("_noise1", torch.FloatTensor())
        self.register_buffer("_noise2", torch.FloatTensor())
        self.register_buffer("_xbounds", torch.FloatTensor([-1, -1, 1, 1]))
        self.register_buffer("_ybounds", torch.FloatTensor([-1, 1, -1, 1]))
        self.register_buffer("_x", torch.IntTensor(1))
        self.register_buffer("_y", torch.IntTensor(1))
Beispiel #3
0
    def __init__(self,
                 args,
                 photometric=True,
                 trans=0.07,
                 scale=[0.93, 1.0],
                 resize=[256, 832]):
        super(Augmentation_ScaleCrop, self).__init__()

        # init
        self._args = args
        self._photometric = photometric
        self._photo_augmentation = PhotometricAugmentation()

        self._batch = None
        self._device = None
        self._identity = _IdentityParams()
        self._meshgrid = Meshgrid()

        # Augmentation Parameters
        self._min_scale = scale[0]
        self._max_scale = scale[1]
        self._max_trans = trans
        self._resize = resize