Commit d35088b6 authored by Shaoshuai Shi's avatar Shaoshuai Shi
Browse files

check np.float32/np.float64 when using create_integrated_database.py

parent 96ba76a3
......@@ -29,6 +29,12 @@ def create_integrated_db_with_infos(args, root_path):
obj_points = np.fromfile(str(obj_path), dtype=np.float32).reshape(
[-1, args.num_point_features])
num_points = obj_points.shape[0]
if num_points != info['num_points_in_gt']:
obj_points = np.fromfile(str(obj_path), dtype=np.float64).reshape([-1, args.num_point_features])
num_points = obj_points.shape[0]
obj_points = obj_points.astype(np.float32)
assert num_points == info['num_points_in_gt']
db_info_global[category][idx]['global_data_offset'] = (start_idx, start_idx + num_points)
start_idx += num_points
global_db_list.append(obj_points)
......
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