Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about σ-fusion #13

Open
Willyzw opened this issue Jan 2, 2023 · 10 comments
Open

Question about σ-fusion #13

Willyzw opened this issue Jan 2, 2023 · 10 comments

Comments

@Willyzw
Copy link
Contributor

Willyzw commented Jan 2, 2023

Hi, thanks for your great work, which also includes the implementation of sigma-fusion.

In the NeRF-SLAM paper, Table 1 shows a quite large difference in depth L1 metric between the TSDF-based methods (besides σ-fusion) and the nerf-based ones, which has surprised me a lot. So I just run the experiments and test this code myself. The Depth L1 results are as follows:

image

it turns out the TSDF-based approaches are indeed not as good as nerf-slam but actually not that much worse. I'm curious if this is related to any updates or bug fixes that have been made since then.

@phamquandung
Copy link

Hi @Willyzw. How can you get that result when just running the code: python ./examples/slam_demo.py --dataset_dir=./datasets/Replica/office0 --dataset_name=nerf --buffer=100 --slam --parallel_run --img_stride=2 --fusion='sigma' --gui

Could you please help me? Thanks in advance

@Willyzw
Copy link
Contributor Author

Willyzw commented Jan 4, 2023

Hi @phamquandung, first you need to get it installed, I mostly get help from this PR #12. To run the evaluation, you will also need to add the flag --eval to the command.

In addition, I've committed my changes here, which may be useful afc1c2f

@ToniRV
Copy link
Owner

ToniRV commented Jan 4, 2023

Thanks for running the eval again @Willyzw!!

I might have made a mistake.
Your numbers make more sense than mine I think, but it is difficult to say.
Did you change something in the evaluation code?
Could you at least reproduce the results for nerf-slam?

I can't re-run the eval right now, but, if you could share all the results you got, we can make sure we are getting similar values.

@Willyzw
Copy link
Contributor Author

Willyzw commented Jan 4, 2023

Hi @ToniRV glad to receive your reply!

You can please check my changes here master...Willyzw:NeRF-SLAM:master
The results were run after the first commit, so I hardly change any functional stuff or parameter. Later I increase the block_size and mask out the pixels that lack gt values, which has minor improvements. Follows are my updated results:

image

Besides notably the PSNR values are exactly the same as on paper.

Yes, I also run the nerf fusion part. The results are almost consistent with the paper. An exception is the sequence office-1, somehow my L1 is 10.28 vs. 1.98 on paper. I guess the sequence is quite challenging due to the darkness of the scene. The results of nerf-slam are as follows:

image

Above are all my results. Cheers!

@phamquandung
Copy link

Hi @Willyzw. Have you tried with NeRF? python ./examples/slam_demo.py --dataset_dir=./datasets/Replica/office0 --dataset_name=nerf --buffer=100 --slam --parallel_run --img_stride=2 --fusion='nerf' --eval. My result is all zero. I tried with with sigma but then it just stopped.
image
image

@Willyzw
Copy link
Contributor Author

Willyzw commented Jan 5, 2023

Hi @phamquandung, yes I have tried both and have also encountered the mentioned problems. For nerf fusion, you need to skip the fitting step in the very beginning when missing images by checking n_images_for_training, otherwise it just finishes all training steps with 0 images. Or you can try to run the sequential mode.

For sigma fusion, I remember you need to disable the dataflow coming from the dataloader in slam_demo.py.

@phamquandung
Copy link

Hi @Willyzw. Thanks for you quick response. You mean I need to check the line 74 in nerf_fusion.py as below figure? But then I meet other problem as shown below.
image
image

@xiehousen
Copy link

xiehousen commented Jan 6, 2023

Hi @phamquandung, yes I have tried both and have also encountered the mentioned problems. For nerf fusion, you need to skip the fitting step in the very beginning when missing images by checking n_images_for_training, otherwise it just finishes all training steps with 0 images. Or you can try to run the sequential mode.

For sigma fusion, I remember you need to disable the dataflow coming from the dataloader in slam_demo.py.

Hi @Willyzw ,
I wonder how to skip the fitting step?
In my test, the self.ref_frames and the n_images_for_training are both zero.

Thanks a lot for your reply.

@Willyzw
Copy link
Contributor Author

Willyzw commented Jan 7, 2023

Hi @phamquandung I didn't encounter your problem. Maybe you better try the sequential mode.
@xiehousen where do you test the variable? If it is in the constructor, it is no wonder all zeros.

@eriksandstroem
Copy link

eriksandstroem commented Jan 29, 2023

Hi @phamquandung, yes I have tried both and have also encountered the mentioned problems. For nerf fusion, you need to skip the fitting step in the very beginning when missing images by checking n_images_for_training, otherwise it just finishes all training steps with 0 images. Or you can try to run the sequential mode.
For sigma fusion, I remember you need to disable the dataflow coming from the dataloader in slam_demo.py.

Hi @Willyzw , I wonder how to skip the fitting step? In my test, the self.ref_frames and the n_images_for_training are both zero.

Thanks a lot for your reply.

I am also facing this issue. Would appreciate if you have any input @Willyzw. The variable self.npg.nerf.training.n_images_fro_training is updated, but the ref_frames list is empty.

Edit: After looking at your changes to the code here master...Willyzw:NeRF-SLAM:master and adding the two lines at row 287 where it says "# TODO: we need to restore the self.ref_frames[frame_id] = [image, gt, etc] for evaluation...." in nerf_fusion.py it now runs. Strange that this is not updated in the official code release yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants