Skip to content

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

Description

@yipingp

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions