Commit a8b7ff1b authored by Starrah's avatar Starrah
Browse files

fix: error of sample_points when num_point < far_idx_choice

In data_processor.py sample_points, when num_points < far_idx_choice, a negative value is passed into np.random.choice, which cause a ValueError.
In fact the variable `near_idxs_choice` return by the deleted line is never used.
parent a7cf5368
...@@ -88,7 +88,6 @@ class DataProcessor(object): ...@@ -88,7 +88,6 @@ class DataProcessor(object):
pts_near_flag = pts_depth < 40.0 pts_near_flag = pts_depth < 40.0
far_idxs_choice = np.where(pts_near_flag == 0)[0] far_idxs_choice = np.where(pts_near_flag == 0)[0]
near_idxs = np.where(pts_near_flag == 1)[0] near_idxs = np.where(pts_near_flag == 1)[0]
near_idxs_choice = np.random.choice(near_idxs, num_points - len(far_idxs_choice), replace=False)
choice = [] choice = []
if num_points > len(far_idxs_choice): if num_points > len(far_idxs_choice):
near_idxs_choice = np.random.choice(near_idxs, num_points - len(far_idxs_choice), replace=False) near_idxs_choice = np.random.choice(near_idxs, num_points - len(far_idxs_choice), replace=False)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment