Skip to content

Commit

Permalink
[Fix] compute mean using actual points amount when preprocessing
Browse files Browse the repository at this point in the history
  • Loading branch information
jeasinema committed Jan 18, 2018
1 parent 2e10c7a commit 851e75a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# File Name : preprocess.py
# Purpose :
# Creation Date : 10-12-2017
# Last Modified : Mon 01 Jan 2018 01:06:04 PM CST
# Last Modified : Thu 18 Jan 2018 05:34:42 PM CST
# Created By : Jeasine Ma [jeasinema[at]gmail[dot]com]

import os
Expand Down Expand Up @@ -77,7 +77,7 @@ def process_pointcloud(point_cloud, cls=cfg.DETECT_OBJ):
number_buffer[index] += 1

feature_buffer[:, :, -3:] = feature_buffer[:, :, :3] - \
feature_buffer[:, :, :3].mean(axis=1, keepdims=True)
feature_buffer[:, :, :3].sum(axis=1, keepdims=True)/number_buffer.reshape(K, 1, 1)

voxel_dict = {'feature_buffer': feature_buffer,
'coordinate_buffer': coordinate_buffer,
Expand Down

0 comments on commit 851e75a

Please sign in to comment.