(batch_data, ratio=0.1)
return noisey_data
Randomly replace points with noise.
        Input:
          BxNx3 array, original batch of point clouds
        Return:
          BxNx3 array, jittered batch of point clouds
Randomly replace points with noise.
        Input:
          BxNx3 array, original batch of point clouds
        Return:
          BxNx3 array, jittered batch of point clouds
Randomly replace points with noise . Input : BxNx3 array original batch of point clouds Return : BxNx3 array jittered batch of point clouds
def noisey_point_cloud(batch_data, ratio=0.1):
    """ Randomly replace points with noise.
        Input:
          BxNx3 array, original batch of point clouds
        Return:
          BxNx3 array, jittered batch of point clouds
    """
    assert ratio < 1 and ratio >= 0
    B, N, C = batch_data.shape
    noise = np.random.rand(B, N, C) * 2 - 1

    rand_idx = np.random.permutation(list(range(0, N)))
    rand_idx = rand_idx[: int(N * ratio)]

    noisey_data = batch_data
    noisey_data[:, rand_idx, :] = noise[:, rand_idx, :]

    # noiseThresh = np.random.rand(B, N)
    # noiseThresh=(noiseThresh > ratio).choose(1,0)
    # for i in range(C):
    #     noise[:, :, i] = noise[:, :, i] * noiseThresh
    #
    # noisey_data =(noise > 0).choose(batch_data,noise)
    return noisey_data
def noisey_point_cloud ( batch_data , ratio = 0.1 ) : assert ratio < 1 and ratio >= 0 B , N , C = batch_data . shape noise = np . random . rand ( B , N , C ) * 2 - 1 rand_idx = np . random . permutation ( list ( range ( 0 , N ) ) ) rand_idx = rand_idx [ : int ( N * ratio ) ] noisey_data = batch_data noisey_data [ : , rand_idx , : ] = noise [ : , rand_idx , : ] # noiseThresh = np.random.rand(B, N) # noiseThresh=(noiseThresh > ratio).choose(1,0) # for i in range(C): #     noise[:, :, i] = noise[:, :, i] * noiseThresh # # noisey_data =(noise > 0).choose(batch_data,noise) return noisey_data