3d reconstruction model and nvm export

414 views
Skip to first unread message

tnt...@gmail.com

unread,
Oct 18, 2016, 6:49:01 AM10/18/16
to Theia Vision Library
Hi,

I'm working on image-based localization problem. I built a framework based on VisualSFM (to build 3D model) and this open source: https://github.com/hanjianwei/ACG-Localizer (to do localization). Our framework is working quite well on our dataset.

However, I found that Theia's incremental SfM is more stable than VisualSFM's to build 3D models. Therefore, I want to use 3D models of Theia for our developed framework and compare with models of VisualSFM to see effects of 3D models to localization accuracy.

The way I did as follows:

1. Using VisualSFM to extract SIFT features (*.sift) and convert *.sift to Theia feature format *.feature. [To ensure two programs using the same features].

2. Reconstruct 3D models by using Theia (it looks better than VisualSFM's by visualization).

3. Export 3D Theia models ---> NVM file.

4. Using VisualSFM to load NVM file (exported by Theia) to create bundle file (this bundle is needed for our localization framework).

5. Using this bundle file in our localization framework for evaluation.


But it seems to me, the nvm/bundle files export from Theia is not the same as VisualSFM's, part of reasons may come from the configuration, for example, feature point normalization, etc, in reconstruction process... As results, the mdoel exported from Theia is not suitable for our framework while VisualSFM's model is good on the same dataset, even though Theia's model looks better than VisualSFM's.

Is there anyway to get the output of Theia reconstruction (export to NVM) in the same configuration of VisualSFM?

Thank you very much.

Best regards,
Trung

Chris Sweeney

unread,
Oct 18, 2016, 11:16:28 AM10/18/16
to tnt...@gmail.com, Theia Vision Library
Can you expand on what you mean by "the same configuration"? What is different between the two? All the details of NVM writing may be found here: https://github.com/sweeneychris/TheiaSfM/blob/master/src/theia/io/write_nvm_file.cc

--
You received this message because you are subscribed to the Google Groups "Theia Vision Library" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theia-vision-lib...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ngoc-Trung Tran

unread,
Oct 18, 2016, 9:40:01 PM10/18/16
to Chris Sweeney, Theia Vision Library
Hi Chris, 

I mean that I am trying to using Theia and VisualSFM on the same dataset  (same feature points, descriptors, ...) to reconstruct 3D models, but it seems to me that the nvm file I obtain from Theia is not the same as VisualSFM, (maybe difference of model scaling, feature point normalization, ...)? Although Theia reconstruction looks better than VisualSFM's , but it's strange to me that the 2D-3D correspondences found by https://github.com/hanjianwei/ACG-Localizer  is not so good as with VisualSFM's output. Thank you.

Best,
Trung

To unsubscribe from this group and stop receiving emails from it, send an email to theia-vision-library+unsub...@googlegroups.com.

Chris Sweeney

unread,
Oct 19, 2016, 12:58:10 AM10/19/16
to Ngoc-Trung Tran, Theia Vision Library
Can you verify that the reconstruction is valid after importing it to the NVM file? For instance, checking in visual sfm that the reprojection error is close to what Theia reports.

Another thing to note is that Theia uses a 2-parameter radial distortion model by default and Visual SfM only uses 1. Two things you could do to remedy this difference: 1) undistort the reconstruction 2) Run the sfm pipeline without optimizing the radial distortion parameters (make sure radial distortion is NOT included on this line in the flags file). That will effectively fix the radial distortion parameters at 0.

Chris

To unsubscribe from this group and stop receiving emails from it, send an email to theia-vision-lib...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Theia Vision Library" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theia-vision-lib...@googlegroups.com.

Chris Sweeney

unread,
Oct 19, 2016, 12:59:57 AM10/19/16
to Ngoc-Trung Tran, Theia Vision Library
Another thing I just thought of is that Visual SfM may be using a threshold on the minimum track size (usually that threshold is set to 3). You may set this to 3 in Theia by adjusting this line in the flags file and see if that gives results more similar to Visual SfM. 

Chris

Ngoc-Trung Tran

unread,
Oct 20, 2016, 5:04:09 AM10/20/16
to Chris Sweeney, Theia Vision Library
Thank you you for the reply. I did a small test to quickly check NVM as follows:

Small dataset: Castle P-30 of Strecha MVS dataset. [I convert PNG to JPG format to easily loaded in VisualSFM].

0. Picking up 29 / 30 images  (to do reconstructions in Theia and VisualSFM) and one remaining image to check the format later.

1. Using VisualSFM to extract features ---> convert to *key file ---> convert to *.features (to use in Theia).
2. Using VisualSFM to reconstruction 29 images to have 3D model --> Add 1 remaining image ---> Resume reconstruction ---> The remaining image is successfully added in 3d model.
3. Using Theia to reconstruction on the same 29 images ---> Export to nvm (update image paths to be valid to load in VisualSFM) ---> Import to NVM (so far it is ok) in VisualSFM ---> Add 1 remaining image ---> Resume reconstruction --- [FAILED]?

The NVM format exported by Theia is in good format, this can be well-visualized on VisualSfM. However, the 3D model, or feature points, distortion... in Theia may be a little different in some steps cause some problems, so the exported NVM can not be used further in VisualSFM or in the localization framework I have. Thank you for comments.

Best regards,
Trung

To unsubscribe from this group and stop receiving emails from it, send an email to theia-vision-library+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Theia Vision Library" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theia-vision-library+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages