inhomogeneous shape
beibeirory opened this issue · comments
when I ran "bash dev_scripts/w_tt_ft/barn_test.sh ", I got an error.
Traceback (most recent call last):
File "test_ft.py", line 354, in
main()
File "test_ft.py", line 294, in main
train_dataset = create_dataset(opt)
File "/home/llh/experiments/code/pointnerf-master/run/../data/init.py", line 45, in create_dataset
instance.initialize(opt)
File "/home/llh/experiments/code/pointnerf-master/run/../data/tt_ft_dataset.py", line 164, in initialize
self.proj_mats, self.intrinsics, self.world2cams, self.cam2worlds = self.build_proj_mats()
File "/home/llh/experiments/code/pointnerf-master/run/../data/tt_ft_dataset.py", line 417, in build_proj_mats
proj_mats = np.stack(proj_mats)
File "<array_function internals>", line 200, in stack
File "/home/llh/.conda/envs/pointnerf/lib/python3.8/site-packages/numpy/core/shape_base.py", line 458, in stack
arrays = [asanyarray(arr) for arr in arrays]
File "/home/llh/.conda/envs/pointnerf/lib/python3.8/site-packages/numpy/core/shape_base.py", line 458, in
arrays = [asanyarray(arr) for arr in arrays]
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
end loading
dev_scripts/w_tt_ft/barn_test.sh: line 170: 53626 Segmentation fault (core dumped)
I print "proj_mats",
(array([[-2.12008414e+02, 1.42189409e+01, -2.65582607e+01,
3.62517905e+02],
[-7.07794035e+01, -1.64727407e+02, 6.40869593e+01,
1.70559990e+02],
[-7.23240000e-01, 8.93794000e-02, 6.84789000e-01,
1.77161000e+00],
[ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
1.00000000e+00]]), array([0. , 4.5]))
It has inhomogeneous shape.
when I ran "bash dev_scripts/w_tt_ft/barn_test.sh ", I got an error.
Traceback (most recent call last): File "test_ft.py", line 354, in main() File "test_ft.py", line 294, in main train_dataset = create_dataset(opt) File "/home/llh/experiments/code/pointnerf-master/run/../data/init.py", line 45, in create_dataset instance.initialize(opt) File "/home/llh/experiments/code/pointnerf-master/run/../data/tt_ft_dataset.py", line 164, in initialize self.proj_mats, self.intrinsics, self.world2cams, self.cam2worlds = self.build_proj_mats() File "/home/llh/experiments/code/pointnerf-master/run/../data/tt_ft_dataset.py", line 417, in build_proj_mats proj_mats = np.stack(proj_mats) File "<array_function internals>", line 200, in stack File "/home/llh/.conda/envs/pointnerf/lib/python3.8/site-packages/numpy/core/shape_base.py", line 458, in stack arrays = [asanyarray(arr) for arr in arrays] File "/home/llh/.conda/envs/pointnerf/lib/python3.8/site-packages/numpy/core/shape_base.py", line 458, in arrays = [asanyarray(arr) for arr in arrays] ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part. end loading dev_scripts/w_tt_ft/barn_test.sh: line 170: 53626 Segmentation fault (core dumped)
I print "proj_mats", (array([[-2.12008414e+02, 1.42189409e+01, -2.65582607e+01, 3.62517905e+02], [-7.07794035e+01, -1.64727407e+02, 6.40869593e+01, 1.70559990e+02], [-7.23240000e-01, 8.93794000e-02, 6.84789000e-01, 1.77161000e+00], [ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 1.00000000e+00]]), array([0. , 4.5]))
It has inhomogeneous shape.
Hi , I also meet this problem, do you address this? if yes, could you give me some advice? Thank you!
@beibeirory hi,I also meet this problem, do you address this? if yes, could you give me some advice? Thank you so much!
np.array([2.0, 6.0])
may not the same in other case, I haven't found elegant soulution for it.
@cwwjyh @cwwjyh I solved this issue.
revise a lot in
nerf_synth360_tf_dataset.py
Hey, I tried what you suggested but still I am getting a similar error. Can you please have a look at it,
dtu_ft train id [25, 21, 33, 22, 14, 15, 26, 30, 31, 35, 34, 43, 46, 29, 16, 36] dtu_ft test id [32, 24, 23, 44] self.plane_ind 0 Traceback (most recent call last): File "/hdd/xpsuser_hdd/ankur/pointnerf/run/train_ft.py", line 1081, in <module> main() File "/hdd/xpsuser_hdd/ankur/pointnerf/run/train_ft.py", line 595, in main train_dataset = create_dataset(opt) File "/hdd/xpsuser_hdd/ankur/pointnerf/run/../data/__init__.py", line 42, in create_dataset instance.initialize(opt) File "/hdd/xpsuser_hdd/ankur/pointnerf/run/../data/dtu_ft_dataset.py", line 133, in initialize _, _ , w2cs, c2ws = self.build_proj_mats(list=self.pair_idx[1]) File "/hdd/xpsuser_hdd/ankur/pointnerf/run/../data/dtu_ft_dataset.py", line 462, in build_proj_mats proj_mats, intrinsics = np.stack(proj_mats), np.stack(intrinsics) File "<__array_function__ internals>", line 200, in stack File "/hdd/xpsuser_hdd/ankur/lib/python3.10/site-packages/numpy/core/shape_base.py", line 458, in stack arrays = [asanyarray(arr) for arr in arrays] File "/hdd/xpsuser_hdd/ankur/lib/python3.10/site-packages/numpy/core/shape_base.py", line 458, in <listcomp> arrays = [asanyarray(arr) for arr in arrays] ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part. end loading
resolved
pip install numpy==1.23.5 works for me🤗