hierarchicalMapper(mds):Run for a period of time and report an error
@rajkataria HI, Thank you very much for your excellent work. I have no problem running mapper (MDS), but when I run hierarchical SFM, MDS will report the following errors. Is it convenient for you to debug or tell me what to do?
./colmap hierarchicalMapper --database_path /media/Data1/2021_01_13_17_28_25/data.db --image_path /media/Data1/2021_01_13_17_28_25/rgb --output_path /media/Data1/2021_01_13_17_28_25/result

@coder12333444: Sorry for the late reply. Unfortunately, we never tested our code on the hierarchical mapper. I believe it may be an instantiation issue where certain variables may not have been instantiated. My guess is that you may have to instantiate MDS in controllers/hierarchical_mapper.cc.
The reconstructions corresponding to incremental mappers that get spawned by the hierarchical mapper require MDS initialization like the following. I'm not familiar with how colmap separates how different reconstructions in their database so I'm not able to provide specific instructions on how to get it running without spending more time on it.
int begin_index = (*options.database_path).rfind('/');
std::string database_path = (*options.database_path).substr(0, begin_index);
MDS mds = MDS(database_path, "AAM", &database_cache);
mds.SetRegisteredImages(reconstruction.RegImageIds());
mapper.RegisterNextImage(mds, mapper_options, image.first);
@rajkataria . Thank you very much for your reply. I revised it for a while, but the same problem remains. You have time to integrate MDS into the hierarchical mapper. Thank you very much! ! ! !
@rajkataria I am very sorry to bother you again, this question has bothered me for a long time, since the first time I asked you, so I very much hope that you can integrate MDS into the hierarchical sfm. In addition, I read your paper 10 times, and the algorithm in it has only one theoretical formula. When I use thread to reconstrut ! MDS always reports error,but when I not use thread ,sequentially Reconstruct Partitions,the result is ok!
ThreadPool thread_pool(num_eff_workers);
for (size_t k = 0; k < inter_clusters_.size(); k++) {
const auto& cluster = inter_clusters_[k];
// RunCluster(cluster,&cluster_database_caches[k],
// &reconstruction_managers[k],k);
thread_pool.AddTask(RunCluster,cluster,&cluster_database_caches[k],
&reconstruction_managers[k],k);
}
@coder12333444 Unfortunately I don't have much time right now to look into integrating Reliable Resectioning into hierarchical SfM. I may have time in the next few months and I can have a look at it then. I can definitely answer questions pertaining to our paper if they arise.
@rajkataria
I recently refactored all the code of mds, I put it into sfm/incremntal_maper, there is no error when hierarchical SfM running, but the result of running is wrong, so I want to ask you,
At the time of initialization, is the database the database after feature extraction and matching or a new empty database?

. If it is a new database, I print it as follows:
image names are always empty ,So it means that the code in the for loop never runs
So I am very confused when this mds is initialized, is the database a new database or is it generated after image extracting and image matching?
@coder12333444 Which dataset are you running (for which you're getting the wrong result)? Are you running the original code or your refactored code?
We don't modify the database in any way and use the original database as is. If there's a new file being created, check out issue #3 (the format of the argument is a bit strict).