Creating Test Dataset Using utils/gen_real_data.py
nayeemiiitd opened this issue · 1 comments
For creating test dataset, the code calls a method query_gt_test_set() which require correspondence's mat files. What these files contains and how can we create them ?
def query_gt_test_set():
label_path = '/Earthbyte/tynguyen/real_rawdata/joe_data/test/labels/'
mat_file_name_list = [label_path+'corresponences0_10.mat',
label_path+'correspondences11_21.mat',
label_path+'correspondences22_30.mat',
label_path+'correspondences31_40.mat',
label_path+'correspondences41_49.mat']
for i in range(len(mat_file_name_list)):
gt_array = io.loadmat(mat_file_name_list[i])
corr1_array = gt_array['all_corr1']
corr2_array = gt_array['all_corr2']
if i == 0:
complete_corr_array1 = corr1_array
complete_corr_array2 = corr2_array
else:
complete_corr_array1 = np.concatenate((complete_corr_array1, corr1_array), axis=0)
complete_corr_array2 = np.concatenate((complete_corr_array2, corr2_array), axis=0)
# Return 200x2, 200x2 arrays.
# To query 4 points on the first image, do:
# complete_corr_array1[image_index*4:(image_index + 1)*4] => 4x2
return complete_corr_array1, complete_corr_array2
Hi there,
This is for our aerial image dataset. Each .mat file contains four correspondences for some pairs of input images.
Since we cannot provide this dataset which belongs to a private company, you might not need to use this function.
We also recommend an alternative aerial image dataset in README.md.
Essentially, the output of this function (query_gt_test_set()) is two 200x2 arrays:
complete_corr_array1: four points on the first image
complete_corr_array2: corresponding four points on the second image.
You can create a test set by finding 4 point correspondences for every pair of test images.