Skip to content

How to determine near and far for custom dataset? #43

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

Open
yipingp opened this issue Apr 9, 2024 · 1 comment
Open

How to determine near and far for custom dataset? #43

yipingp opened this issue Apr 9, 2024 · 1 comment

Comments

@yipingp
Copy link

yipingp commented Apr 9, 2024

Thanks for your great work!

I ran the code on dtu dataset in neus format, which contains image, mask, cameras_sphere.npz and cameras_large.npz. How should I determine near and far in this dataset (or a custom dataset created from colmap)?

I tried to use scale_mat_0 in camera_dict to replace self.cal_scale_mat() in dtu_fit.py, but it doesn't seem correct.

self.scale_mat = camera_dict['scale_mat_0'].astype(np.float32)
self.scale_factor = 1. / self.scale_mat[0,0]

# ! estimate scale_mat
# self.scale_mat, self.scale_factor = self.cal_scale_mat(
#     img_hw=[self.img_wh[1], self.img_wh[0]],
#     intrinsics=self.all_intrinsics[self.train_img_idx],
#     extrinsics=self.all_w2cs[self.train_img_idx],
#     near_fars=self.raw_near_fars[self.train_img_idx],
#     factor=1.1)
@BharathSeshadri
Copy link

hello, @yipingp were you able to solve this? in the same situation as you were

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

2 participants