Skip to content

Commit

Permalink
fix bug reported in #3
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardzhou130 committed Apr 20, 2021
1 parent 8b4a60b commit 3a72f23
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dataloader/instance_augmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,10 @@ def instance_flip(self, points,axis,center,flip_type = 1):

def check_occlusion(self,points,center,min_dist=2):
'check if close to a point'
dist = np.linalg.norm(points-center,axis=0)
if points.ndim == 1:
dist = np.linalg.norm(points[np.newaxis,:]-center,axis=1)
else:
dist = np.linalg.norm(points-center,axis=1)
return np.all(dist>min_dist)

def rotate_origin(self,xyz,radians):
Expand Down

0 comments on commit 3a72f23

Please sign in to comment.