Beispiel #1
0
 def local_descriptors_ds(self, descriptor_name, one_to_many=True):
     path_ = pjoin(self.base_dir, 'local_descriptors', descriptor_name) + "_imgid"
     if one_to_many:
         ds_ = ds.SQLiteTableOneToManyDataStore(path_, table_name='id_item_imgid')
     else:
         ds_ = ds.SQLiteTableDataStore(path_, table_name='id_item_imgid')
     return ds_
Beispiel #2
0
 def pqcodes_ds(self, descriptor_name, pq_params):
     path_ = pjoin(self.base_dir, 'pqcodes', descriptor_name, build_pq_params_str(pq_params))
     ds_ = ds.SQLiteTableDataStore(path_, ndarray_bytes_only=True)
     return ds_
Beispiel #3
0
 def centroids_pairwise_distances_ds(self, descriptor_name, pq_params):
     path_ = pjoin(self.base_dir, 'centroids_pairwise_distances', descriptor_name, build_pq_params_str(pq_params))
     ds_ = ds.SQLiteTableDataStore(path_)
     return ds_
Beispiel #4
0
 def local_descriptors_sample_ds(self, descriptor_name, sample_part):
     path_ = pjoin(self.base_dir, 'local_descriptors', descriptor_name) + "_sample-" + str(sample_part)
     ds_ = ds.SQLiteTableDataStore(path_)
     return ds_
Beispiel #5
0
 def global_descriptors_ds(self, descriptor_name):
     path_ = pjoin(self.base_dir, 'global_descriptors', descriptor_name)
     ds_ = ds.SQLiteTableDataStore(path_)
     return ds_
Beispiel #6
0
 def bovw_descriptors_ds(self, descriptor_name, pq_params):
     # descriptor_name: 'bovwbincounts' | 'bovwproductbincounts'
     path_ = pjoin(self.base_dir, 'global_descriptors', descriptor_name + '_' + build_pq_params_str(pq_params))
     ds_ = ds.SQLiteTableDataStore(path_)
     return ds_