GithubHelp home page GithubHelp logo

inhomogeneous shape about pointnerf HOT 8 CLOSED

beibeirory avatar beibeirory commented on June 12, 2024 1
inhomogeneous shape

from pointnerf.

Comments (8)

renhaofan avatar renhaofan commented on June 12, 2024 3

@cwwjyh @cwwjyh I solved this issue.

revise a lot in nerf_synth360_tf_dataset.py

  • remove line 384
  • change line 401 to proj_mats += [proj_mat_l]
  • change line 495 to
    proj_mat_ls, near_far = self.proj_mats[vid], np.array([2.0, 6.0])
  • change line 563 to
    proj_mat_ls, near_far = self.proj_mats[id], np.array[2.0, 6.0]

from pointnerf.

cwwjyh avatar cwwjyh commented on June 12, 2024

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!

from pointnerf.

Cdawn628 avatar Cdawn628 commented on June 12, 2024

@beibeirory hi,I also meet this problem, do you address this? if yes, could you give me some advice? Thank you so much!

from pointnerf.

renhaofan avatar renhaofan commented on June 12, 2024

np.array([2.0, 6.0]) may not the same in other case, I haven't found elegant soulution for it.

from pointnerf.

Cdawn628 avatar Cdawn628 commented on June 12, 2024

@cwwjyh @cwwjyh I solved this issue.

revise a lot in nerf_synth360_tf_dataset.py

  • remove line 384
  • change line 401 to proj_mats += [proj_mat_l]
  • change line 495 to
    proj_mat_ls, near_far = self.proj_mats[vid], np.array([2.0, 6.0])
  • change line 563 to
    proj_mat_ls, near_far = self.proj_mats[id], np.array[2.0, 6.0]

thanks so much,it works!

from pointnerf.

AnkurVerma02 avatar AnkurVerma02 commented on June 12, 2024

@cwwjyh @cwwjyh I solved this issue.

revise a lot in nerf_synth360_tf_dataset.py

  • remove line 384
  • change line 401 to proj_mats += [proj_mat_l]
  • change line 495 to
    proj_mat_ls, near_far = self.proj_mats[vid], np.array([2.0, 6.0])
  • change line 563 to
    proj_mat_ls, near_far = self.proj_mats[id], np.array[2.0, 6.0]

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

from pointnerf.

AnkurVerma02 avatar AnkurVerma02 commented on June 12, 2024

resolved

from pointnerf.

MouseChannel avatar MouseChannel commented on June 12, 2024

pip install numpy==1.23.5 works for me🤗

from pointnerf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.