charlesq34 / frustum-pointnets

Frustum PointNets for 3D Object Detection from RGB-D Data
Apache License 2.0
1.57k stars 538 forks source link

Question about depth augmentation #104

Open lozino opened 4 years ago

lozino commented 4 years ago
dist = np.sqrt(np.sum(box3d_center[0]**2+box3d_center[1]**2))
shift = np.clip(np.random.randn()*dist*0.05, dist*0.8, dist*1.2)
point_set[:,2] += shift
box3d_center[2] += shift

While reading through the dataset preparation I stumbled upon the piece of code above, which is (I assume) used to perform depth augmentation as outlined in your publication.

The intention is clear: perturbing both the point cloud and the box by a function of the distance by sampling from a unit gaussian and multiplying the result by 0.05*dist.

The problem lies in the clipping operation that follows: since the clipping range is set to [0.8*dist, 1.2*dist], the result is that the value is always equal to 0.8*dist, since the sampled value is always much smaller.

Is this intended or is this a bug?

Another question: why consider only the xy distance instead of the full distance? This value tends to be very small.

Thank you.