Skip to content
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

Error Internal at: 346 - Empty obj.file #34

Open
SeskoDk opened this issue Sep 12, 2023 · 15 comments
Open

Error Internal at: 346 - Empty obj.file #34

SeskoDk opened this issue Sep 12, 2023 · 15 comments

Comments

@SeskoDk
Copy link

SeskoDk commented Sep 12, 2023

Dear author,

thank you very much for your great work.

Issue:

I am not able to generate a mesh (obj.file) based on my own custom dataset.
I used the provided branch neuspp, colmap and the colmap2nerf.py to generate a transform.json.
This generated transform.json is compatible with the instant-ngp pipeline, but unfortunately not with neus2pp.
Based on my understanding, the instant-ngp trasnform.json should also work with neus2pp.
Perhaps I missed a specific step or did not consider a required format, I am not sure.

My Approach

  1. I took the pictures with my phone
  2. Used colmap to generate the follwoing files:
DATA_PATH
 ├─ images (Phone)
 ├─ sparse   (Colmap)
 ├─ dense     (Colmap)
 ├─ cameras.text (Colmap)
 ├─ database.db  (Colmap)
 ├─ images.txt  (Colmap)
 ├─ points3D.txt (Colmap)
 ├─ project.ini (Colmap)
  1. Generated the transform.json file via colmap2nerf.py from instant-npg, using the follwoing command:
instant-ngp$ python scripts/colmap2nerf.py --images 'DATA_PATH/images' --text 'DATA_PATH' --aabb_scale 32

The resulted transform.json is organized as follows:

{
  "camera_angle_x": 0.8743924098673197,
  "camera_angle_y": 1.114530598807743,
  "fl_x": 3183.842367574047,
  "fl_y": 3183.842367574047,
  "k1": 0.0015741206657167866,
  "k2": 0,
  "k3": 0,
  "k4": 0,
  "p1": 0,
  "p2": 0,
  "is_fisheye": false,
  "cx": 1488.0,
  "cy": 1984.0,
  "w": 2976.0,
  "h": 3968.0,
  "aabb_scale": 32,
  "frames": [
    {
      "file_path": ".data/images/00001.jpg",
      "sharpness": 8.348386299231485,
      "transform_matrix": [
        [
          -0.006901961827569161,
          -0.38868945495233237,
          0.9213429712032302,
          3.875667772007341
        ],
        [
          0.9938922933833255,
          -0.10414655703566049,
          -0.03649114702771986,
          -0.018699091474430635
        ],
        [
          0.11013842234861199,
          0.9154638181379564,
          0.3870342693576213,
          1.4236670216607075
        ],
        [
          0.0,
          0.0,
          0.0,
          1.0
        ]
      ]
    },
    ...
  ]
}
  1. Run the following command, to generate a mesh as obj.file:
neuspp$  python scripts/run.py --scene transform.json --name custom_mesh --network base.json --n_steps 15000
  1. Resulted in an empty obj.file with the Info:
INFO     #vertices=0 #triangles=0
Got cutlass error: Error Internal at: 346
@19reborn
Copy link
Owner

Hi @SeskoDk, for the neuspp branch, you need to change the aabb_scale in the transform.json to 1, and adjust the scale and offset parameters to make your interested object in the aabb.

@19reborn
Copy link
Owner

Hi @SeskoDk , I'm sorry I didn't notice you have used the base.json. You should use the womask.json and the result should be fine then.

@SeskoDk
Copy link
Author

SeskoDk commented Sep 18, 2023 via email

@19reborn
Copy link
Owner

Yes, you can use --network womask.json instead of --network base.json.

@SeskoDk
Copy link
Author

SeskoDk commented Sep 18, 2023 via email

@19reborn
Copy link
Owner

Hi @SeskoDk , I can get the correct mesh using your provided data.
image

@SeskoDk
Copy link
Author

SeskoDk commented Sep 18, 2023 via email

@19reborn
Copy link
Owner

I trained it for 5000 steps. I also encountered the Cutlass Error: Error Internal at: 346, but the code output the mesh before it broke down. Could you please re-check the codes you use? It should be in the neuspp branch and run with womask.json.

@SeskoDk
Copy link
Author

SeskoDk commented Sep 20, 2023 via email

@19reborn
Copy link
Owner

Hi @SeskoDk , it's because the cmake didn't find the Python path in your environment. You can try adjusting your system path or set it manually for your cmake compiling.

@SeskoDk
Copy link
Author

SeskoDk commented Sep 23, 2023 via email

@19reborn
Copy link
Owner

@SeskoDk
Copy link
Author

SeskoDk commented Sep 25, 2023 via email

@19reborn
Copy link
Owner

Hi @SeskoDk, I set the SDF_GRID in line 39 of testbed_nerf.cu to 1 (rember to cmake again after the change), the scale in the transform.json to 0.25, and the n_frequencies in the bg_network/encoding of the womask.json to 10.

@SeskoDk
Copy link
Author

SeskoDk commented Oct 2, 2023 via email

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