MCPcopy Create free account
hub / github.com/MetaSLAM/SphereVLAD / get_from_folder

Method get_from_folder

dataloader/pittsburgh.py:72–89  ·  view source on GitHub ↗
(self, data_path, index)

Source from the content-addressed store, hash-verified

70 log_print("Generated pickles!\n", "g")
71
72 def get_from_folder(self, data_path, index):
73
74 all_file_id = []
75 pose_data = glob(data_path+'/*_pose.npy')
76 for file_name in pose_data:
77 all_file_id.append(file_name.split('_pose')[-2])
78 all_file_id.sort()
79 all_data_df = pd.DataFrame(all_file_id, columns=["file"])
80 all_data_df["pcd_position_x"] = all_data_df["file"].apply(
81 lambda x: np.load(x + '_pose.npy')[0])
82 all_data_df["pcd_position_y"] = all_data_df["file"].apply(
83 lambda x: np.load(x + '_pose.npy')[1])
84 all_data_df["pcd_position_z"] = all_data_df["file"].apply(
85 lambda x: np.load(x + '_pose.npy')[2])
86 all_data_df["date"] = all_data_df["file"].apply(
87 lambda x: x.split('/')[-2])
88 all_data_df.reset_index(drop=True, inplace=True)
89 return all_data_df
90
91 def get_df(self, dataset_dir, type='train', is_shuffle=False):
92 file_df = pd.DataFrame()

Callers 1

get_dfMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected