ActiveVisionLab / nope-nerf

(CVPR 2023) NoPe-NeRF: Optimising Neural Radiance Field with No Pose Prior
https://nope-nerf.active.vision/
MIT License
372 stars 30 forks source link

how can I get the intrinsics.npz file. #2

Open Mialiu91 opened 1 year ago

Mialiu91 commented 1 year ago

hello! I want to use my own image sequence and transforms.json file with customised camera intrinsics to train nope-nerf. How can I get the intrinsics.npz file.

bianwenjing commented 1 year ago

Hi, the intrinsics loaded into the model is a 3*3 numpy array with the form [[fx, 0, cx], [0, fy, cy], [0, 0, 1]]. You can customise it here

Mialiu91 commented 1 year ago

Hi, the intrinsics loaded into the model is a 3*3 numpy array with the form [[fx, 0, cx], [0, fy, cy], [0, 0, 1]]. You can customise it here

我看到/dataset.py的84行不是加载npz文件吗?但是我没有npz文件呀,我之前用colmap直接生成就是transforms.json文件。我要怎么做,才能生成npz文件?我看到你们也要求要有poses_bounds.npy文件。这些是怎么得到的呢,或者您能给一个数据集为视频然后处理的过程吗?

很抱歉跟你说了中文hh

bianwenjing commented 1 year ago

你好,你可以使用LLFF的代码通过colmap直接生成poses_bounds.npy文件。

Mialiu91 commented 1 year ago

你好,我通过LLFF的代码成功获得了poses_bounds.npy文件,非常感谢 但是在获取intrinsics.npz 文件的时候遇到了问题。 这是我通过colmap获得的相机内参camera.txt文件

Camera list with one line of data per camera:

CAMERA_ID, MODEL, WIDTH, HEIGHT, PARAMS[]

Number of cameras: 1

1 OPENCV 720 960 820.31459827405592 820.50408617729659 359.18572754357598 475.48795630162346 0.078613006345238295 -0.14522316190415999 0.0018221148761639534 -4.5084170435548633e-05

但是我不知道后面的八个参数哪个才是fx, cx, fy, cy,可以教我一下吗?非常感谢

bianwenjing commented 1 year ago

你好,生成的poses_bounds.npy中已经包含intrinsic,不需要另外获取intrinsics.npz

Mialiu91 commented 1 year ago

谢谢你,我已经成功训练了,我想问一下如果我想用训练好的某个pt文件去渲染生成视频或者照片或者点云,我该怎么做呢

bianwenjing commented 1 year ago

你好,你可以使用vis/render.py 生成图片,深度图及其视频,请参考README.md. 我们目前没有提供点云的渲染

yuedajiong commented 1 year ago

this paper wants to avoid camera pose, can we skip the colmap step, wheterh poses_bounds.npy or intrinsics.npz, including training?

bianwenjing commented 1 year ago

this paper wants to avoid camera pose, can we skip the colmap step, wheterh poses_bounds.npy or intrinsics.npz, including training?

Hi, in our paper, we assume the camera intrinsic is known. However, similar to NeRFmm, it is still possible for you to optimise the intrinsic jointly in the optimisation process. We haven't conducted extensive experiments on it, but you can try setting cfg['pose']['learn_focal'] to True and customise the cfg['pose']['init_focal_type'] to experiment with optimising the intrinsic..

qiuda16 commented 8 months ago

this paper wants to avoid camera pose, can we skip the colmap step, wheterh poses_bounds.npy or intrinsics.npz, including training?

Hi, in our paper, we assume the camera intrinsic is known. However, similar to NeRFmm, it is still possible for you to optimise the intrinsic jointly in the optimisation process. We haven't conducted extensive experiments on it, but you can try setting cfg['pose']['learn_focal'] to True and customise the cfg['pose']['init_focal_type'] to experiment with optimising the intrinsic..

您好 如果我的场景是弱纹理无法在colmap中生成poses_bounds.npy 该怎么获得intrinsics.npz那